PageSourceSearch

https://monarca-mexican-restaurant.vercel.app/assets/index-DyguDIK6.js

js monarca-mexican-restaurant.vercel.app collected 2026-10-03 07:19:49 UTC 570,776 bytes, 304 lines download raw bytes

vendor: 5,690 bytes, lines 1-9
1var Yh=e=>{throw TypeError(e)};var ql=(e,t,r)=>t.has(e)||Yh("Cannot "+r);var S=(e,t,r)=>(ql(e,t,"read from private field"),r?r.call(e):t.get(e)),K=(e,t,r)=>t.has(e)?Yh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),U=(e,t,r,n)=>(ql(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),te=(e,t,r)=>(ql(e,t,"access private method"),r);var Vo=(e,t,r,n)=>({set _(s){U(e,t,s,r)},get _(){return S(e,t,n)}});function Dw(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function Pm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Om={exports:{}},fl={},Am={exports:{}},Z={};/**
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 Ro=Symbol.for("react.element"),Mw=Symbol.for("react.portal"),Uw=Symbol.for("react.fragment"),Fw=Symbol.for("react.strict_mode"),zw=Symbol.for("react.profiler"),Bw=Symbol.for("react.provider"),Ww=Symbol.for("react.context"),Vw=Symbol.for("react.forward_ref"),Hw=Symbol.for("react.suspense"),qw=Symbol.for("react.memo"),Kw=Symbol.for("react.lazy"),Xh=Symbol.iterator;function Gw(e){return e===null||typeof e!="object"?null:(e=Xh&&e[Xh]||e["@@iterator"],typeof e=="function"?e:null)}var Im={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lm=Object.assign,$m={};function li(e,t,r){this.props=e,this.context=t,this.refs=$m,this.updater=r||Im}li.prototype.isReactComponent={};li.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")};li.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dm(){}Dm.prototype=li.prototype;function md(e,t,r){this.props=e,this.context=t,this.refs=$m,this.updater=r||Im}var gd=md.prototype=new Dm;gd.constructor=md;Lm(gd,li.prototype);gd.isPureReactComponent=!0;var Zh=Array.isArray,Mm=Object.prototype.hasOwnProperty,vd={current:null},Um={key:!0,ref:!0,__self:!0,__source:!0};function Fm(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Mm.call(t,n)&&!Um.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),c=0;c<a;c++)l[c]=arguments[c+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:Ro,type:e,key:i,ref:o,props:s,_owner:vd.current}}function Qw(e,t){return{$$typeof:Ro,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ro}function Jw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ef=/\/+/g;function Kl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jw(""+e.key):t.toString(36)}function va(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ro:case Mw:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Kl(o,0):n,Zh(s)?(r="",e!=null&&(r=e.replace(ef,"$&/")+"/"),va(s,t,r,"",function(c){return c})):s!=null&&(yd(s)&&(s=Qw(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(ef,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Zh(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+Kl(i,a);o+=va(i,t,r,l,s)}else if(l=Gw(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+Kl(i,a++),o+=va(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ho(e,t,r){if(e==null)return e;var n=[],s=0;return va(e,n,"","",function(i){return t.call(r,i,s++)}),n}function Yw(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 Xe={current:null},ya={transition:null},Xw={ReactCurrentDispatcher:Xe,ReactCurrentBatchConfig:ya,ReactCurrentOwner:vd};function zm(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 7,627 bytes, lines 9-25
9Z.Children={map:Ho,forEach:function(e,t,r){Ho(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ho(e,function(){t++}),t},toArray:function(e){return Ho(e,function(t){return t})||[]},only:function(e){if(!yd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=li;Z.Fragment=Uw;Z.Profiler=zw;Z.PureComponent=md;Z.StrictMode=Fw;Z.Suspense=Hw;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xw;Z.act=zm;Z.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=Lm({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=vd.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Mm.call(t,l)&&!Um.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 c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Ro,type:e.type,key:s,ref:i,props:n,_owner:o}};Z.createContext=function(e){return e={$$typeof:Ww,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Bw,_context:e},e.Consumer=e};Z.createElement=Fm;Z.createFactory=function(e){var t=Fm.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:Vw,render:e}};Z.isValidElement=yd;Z.lazy=function(e){return{$$typeof:Kw,_payload:{_status:-1,_result:e},_init:Yw}};Z.memo=function(e,t){return{$$typeof:qw,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=ya.transition;ya.transition={};try{e()}finally{ya.transition=t}};Z.unstable_act=zm;Z.useCallback=function(e,t){return Xe.current.useCallback(e,t)};Z.useContext=function(e){return Xe.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return Xe.current.useDeferredValue(e)};Z.useEffect=function(e,t){return Xe.current.useEffect(e,t)};Z.useId=function(){return Xe.current.useId()};Z.useImperativeHandle=function(e,t,r){return Xe.current.useImperativeHandle(e,t,r)};Z.useInsertionEffect=function(e,t){return Xe.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return Xe.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return Xe.current.useMemo(e,t)};Z.useReducer=function(e,t,r){return Xe.current.useReducer(e,t,r)};Z.useRef=function(e){return Xe.current.useRef(e)};Z.useState=function(e){return Xe.current.useState(e)};Z.useSyncExternalStore=function(e,t,r){return Xe.current.useSyncExternalStore(e,t,r)};Z.useTransition=function(){return Xe.current.useTransition()};Z.version="18.3.1";Am.exports=Z;var b=Am.exports;const A=Pm(b),Bm=Dw({__proto__:null,default:A},[b]);/**
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 Zw=b,ex=Symbol.for("react.element"),tx=Symbol.for("react.fragment"),rx=Object.prototype.hasOwnProperty,nx=Zw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sx={key:!0,ref:!0,__self:!0,__source:!0};function Wm(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)rx.call(t,n)&&!sx.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:ex,type:e,key:i,ref:o,props:s,_owner:nx.current}}fl.Fragment=tx;fl.jsx=Wm;fl.jsxs=Wm;Om.exports=fl;var u=Om.exports,Vm={exports:{}},wt={},Hm={exports:{}},qm={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(T,R){var $=T.length;T.push(R);e:for(;0<$;){var Q=$-1>>>1,z=T[Q];if(0<s(z,R))T[Q]=R,T[$]=z,$=Q;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var R=T[0],$=T.pop();if($!==R){T[0]=$;e:for(var Q=0,z=T.length,X=z>>>1;Q<X;){var ee=2*(Q+1)-1,Ce=T[ee],Be=ee+1,se=T[Be];if(0>s(Ce,$))Be<z&&0>s(se,Ce)?(T[Q]=se,T[Be]=$,Q=Be):(T[Q]=Ce,T[ee]=$,Q=ee);else if(Be<z&&0>s(se,$))T[Q]=se,T[Be]=$,Q=Be;else break e}}return R}function s(T,R){var $=T.sortIndex-R.sortIndex;return $!==0?$:T.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,h=null,p=3,f=!1,w=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(T){for(var R=r(c);R!==null;){if(R.callback===null)n(c);else if(R.startTime<=T)n(c),R.sortIndex=R.expirationTime,t(l,R);else break;R=r(c)}}function _(T){if(v=!1,y(T),!w)if(r(l)!==null)w=!0,B(E);else{var R=r(c);R!==null&&q(_,R.startTime-T)}}function E(T,R){w=!1,v&&(v=!1,m(j),j=-1),f=!0;var $=p;try{for(y(R),h=r(l);h!==null&&(!(h.expirationTime>R)||T&&!D());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,p=h.priorityLevel;var z=Q(h.expirationTime<=R);R=e.unstable_now(),typeof z=="function"?h.callback=z:h===r(l)&&n(l),y(R)}else n(l);h=r(l)}if(h!==null)var X=!0;else{var ee=r(c);ee!==null&&q(_,ee.startTime-R),X=!1}return X}finally{h=null,p=$,f=!1}}var k=!1,C=null,j=-1,O=5,N=-1;function D(){return!(e.unstable_now()-N<O)}function I(){if(C!==null){var T=e.unstable_now();N=T;var R=!0;try{R=C(!0,T)}finally{R?W():(k=!1,C=null)}}else k=!1}var W;if(typeof g=="function")W=function(){g(I)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,Y=L.port2;L.port1.onmessage=I,W=function(){Y.postMessage(null)}}else W=function(){x(I,0)};function B(T){C=T,k||(k=!0,W())}function q(T,R){j=x(function(){T(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){w||f||(w=!0,B(E))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(p){case 1:case 2:case 3:var R=3;break;default:R=p}var $=p;p=R;try{return T()}finally{p=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var $=p;p=T;try{return R()}finally{p=$}},e.unstable_scheduleCallback=function(T,R,$){var Q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Q+$:Q):$=Q,T){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=$+z,T={id:d++,callback:R,priorityLevel:T,startTime:$,expirationTime:z,sortIndex:-1},$>Q?(T.sortIndex=$,t(c,T),r(l)===null&&T===r(c)&&(v?(m(j),j=-1):v=!0,q(_,$-Q))):(T.sortIndex=z,t(l,T),w||f||(w=!0,B(E))
vendor: 4,402 bytes, lines 25-33
25),T},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(T){var R=p;return function(){var $=p;p=R;try{return T.apply(this,arguments)}finally{p=$}}}})(qm);Hm.exports=qm;var ix=Hm.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 ox=b,vt=ix;function P(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 Km=new Set,Qi={};function Zn(e,t){Zs(e,t),Zs(e+"Capture",t)}function Zs(e,t){for(Qi[e]=t,e=0;e<t.length;e++)Km.add(t[e])}var vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dc=Object.prototype.hasOwnProperty,ax=/^[: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]*$/,tf={},rf={};function lx(e){return Dc.call(rf,e)?!0:Dc.call(tf,e)?!1:ax.test(e)?rf[e]=!0:(tf[e]=!0,!1)}function cx(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 ux(e,t,r,n){if(t===null||typeof t>"u"||cx(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 Ze(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new Ze(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new Ze(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new Ze(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new Ze(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){ze[e]=new Ze(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new Ze(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new Ze(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new Ze(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new Ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var wd=/[\-:]([a-z])/g;function xd(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
33-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(wd,xd);ze[t]=new Ze(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(wd,xd);ze[t]=new Ze(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(wd,xd);ze[t]=new Ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new Ze(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new Ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function bd(e,t,r,n){var s=ze.hasOwnProperty(t)?ze[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ux(t,r,s,n)&&(r=null),n||s===null?lx(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 Sr=ox.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qo=Symbol.for("react.element"),ws=Symbol.for("react.portal"),xs=Symbol.for("react.fragment"),_d=Symbol.for("react.strict_mode"),Mc=Symbol.for("react.profiler"),Gm=Symbol.for("react.provider"),Qm=Symbol.for("react.context"),Sd=Symbol.for("react.forward_ref"),Uc=Symbol.for("react.suspense"),Fc=Symbol.for("react.suspense_list"),Ed=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),Jm=Symbol.for("react.offscreen"),nf=Symbol.iterator;function bi(e){return e===null||typeof e!="object"?null:(e=nf&&e[nf]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Object.assign,Gl;function Pi(e){if(Gl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Gl=t&&t[1]||""}return`
34`+Gl+e}var Ql=!1;function Jl(e,t){if(!e||Ql)return"";Ql=!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(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(`
35`),i=n.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ql=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pi(e):""}function dx(e){switch(e.tag){case 5:return Pi(e.type);case 16:return Pi("Lazy");case 13:return Pi("Suspense");case 19:return Pi("SuspenseList");case 0:case 2:case 15:return e=Jl(e.type,!1),e;case 11:return e=Jl(e.type.render,!1),e;case 1:return e=Jl(e.type,!0),e;default:return""}}function zc(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 xs:return"Fragment";case ws:return"Portal";case Mc:return"Profiler";case _d:return"StrictMode";case Uc:return"Suspense";case Fc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qm:return(e.displayName||"Context")+".Consumer";case Gm:return(e._context.displayName||"Context")+".Provider";case Sd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ed:return t=e.displayName||null,t!==null?t:zc(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return zc(e(t))}catch{}}return null}function hx(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 zc(t);case 8:return t===_d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ym(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fx(e){var t=Ym(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ko(e){e._valueTracker||(e._valueTracker=fx(e))}function Xm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Ym(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Oa(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 Bc(e,t){var r=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function sf(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=un(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 Zm(e,t){t=t.checked,t!=null&&bd(e,"checked",t,!1)}function Wc(e,t){Zm(e,t);var r=un(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")?Vc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Vc(e,t.type,un(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function of(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 Vc(e,t,r){(t!=="number"||Oa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Oi=Array.isArray;function Os(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=""+un(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 Hc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function af(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(P(92));if(Oi(r)){if(1<r.length)throw Error(P(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:un(r)}}function eg(e,t){var r=un(t.value),n=un(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 lf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function tg(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 qc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Go,rg=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(Go=Go||document.createElement("div"),Go.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Go.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ji(e,t){if(t){var r=e.firstChild;
vendor: 9,851 bytes, line 37
37if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Di={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},px=["Webkit","ms","Moz","O"];Object.keys(Di).forEach(function(e){px.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Di[t]=Di[e]})});function ng(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Di.hasOwnProperty(e)&&Di[e]?(""+t).trim():t+"px"}function sg(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=ng(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var mx=xe({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 Kc(e,t){if(t){if(mx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Gc(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 Qc=null;function kd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jc=null,As=null,Is=null;function cf(e){if(e=Oo(e)){if(typeof Jc!="function")throw Error(P(280));var t=e.stateNode;t&&(t=yl(t),Jc(e.stateNode,e.type,t))}}function ig(e){As?Is?Is.push(e):Is=[e]:As=e}function og(){if(As){var e=As,t=Is;if(Is=As=null,cf(e),t)for(e=0;e<t.length;e++)cf(t[e])}}function ag(e,t){return e(t)}function lg(){}var Yl=!1;function cg(e,t,r){if(Yl)return e(t,r);Yl=!0;try{return ag(e,t,r)}finally{Yl=!1,(As!==null||Is!==null)&&(lg(),og())}}function Yi(e,t){var r=e.stateNode;if(r===null)return null;var n=yl(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(P(231,t,typeof r));return r}var Yc=!1;if(vr)try{var _i={};Object.defineProperty(_i,"passive",{get:function(){Yc=!0}}),window.addEventListener("test",_i,_i),window.removeEventListener("test",_i,_i)}catch{Yc=!1}function gx(e,t,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var Mi=!1,Aa=null,Ia=!1,Xc=null,vx={onError:function(e){Mi=!0,Aa=e}};function yx(e,t,r,n,s,i,o,a,l){Mi=!1,Aa=null,gx.apply(vx,arguments)}function wx(e,t,r,n,s,i,o,a,l){if(yx.apply(this,arguments),Mi){if(Mi){var c=Aa;Mi=!1,Aa=null}else throw Error(P(198));Ia||(Ia=!0,Xc=c)}}function es(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ug(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 uf(e){if(es(e)!==e)throw Error(P(188))}function xx(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(P(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return uf(s),e;if(i===n)return uf(s),t;i=i.sibling}throw Error(P(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?e:t}function dg(e){return e=xx(e),e!==null?hg(e):null}function hg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hg(e);if(t!==null)return t;e=e.sibling}return null}var fg=vt.unstable_scheduleCallback,df=vt.unstable_cancelCallback,bx=vt.unstable_shouldYield,_x=vt.unstable_requestPaint,Ee=vt.unstable_now,Sx=vt.unstable_getCurrentPriorityLevel,Cd=vt.unstable_ImmediatePriority,pg=vt.unstable_UserBlockingPriority,La=vt.unstable_NormalPriority,Ex=vt.unstable_LowPriority,mg=vt.unstable_IdlePriority,pl=null,tr=null;function kx(e){if(tr&&typeof tr.onCommitFiberRoot=="function")try{tr.onCommitFiberRoot(pl,e,void 0,(e.current.flags&128)===128)}catch{}}var Wt=Math.clz32?Math.clz32:jx,Cx=Math.log,Tx=Math.LN2;function jx(e){return e>>>=0,e===0?32:31-(Cx(e)/Tx|0)|0}var Qo=64,Jo=4194304;function Ai(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 $a(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Ai(a):(i&=o,i!==0&&(n=Ai(i)))}else o=r&~s,o!==0?n=Ai(o):i!==0&&(n=Ai(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Wt(t),s=1<<r,n|=e[r],t&=~s;return n}function Rx(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 Nx(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Wt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Rx(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Zc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function gg(){var e=Qo;return Qo<<=1,!(Qo&4194240)&&(Qo=64),e}function Xl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function No(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wt(t),e[t]=r}function Px(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-Wt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Td(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Wt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var oe=0;function vg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var yg,jd,wg,xg,bg,eu=!1,Yo=[],Zr=null,en=null,tn=null,Xi=new Map,Zi=new Map,Ur=[],Ox="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 hf(e,t){switch(e){case"focusin":case"focusout":Zr=null;break;case"dragenter":case"dragleave":en=null;break;case"mouseover":case"mouseout":tn=null;break;case"pointerover":case"pointerout":Xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Si(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Oo(t),t!==null&&jd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Ax(e,t,r,n,s){switch(t){case"focusin":return Zr=Si(Zr,e,t,r,n,s),!0;case"dragenter":return en=Si(en,e,t,r,n,s),!0;case"mouseover":return tn=Si(tn,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Xi.set(i,Si(Xi.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Zi.set(i,Si(Zi.get(i)||null,e,t,r,n,s)),!0}return!1}function _g(e){var t=Pn(e.target);if(t!==null){var r=es(t);if(r!==null){if(t=r.tag,t===13){if(t=ug(r),t!==null){e.blockedOn=t,bg(e.priority,function(){wg(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 wa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=tu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Qc=n,r.target.dispatchEvent(n),Qc=null}else return t=Oo(r),t!==null&&jd(t),e.blockedOn=r,!1;t.shift()}return!0}
vendor: 10,569 bytes, line 37
37function ff(e,t,r){wa(e)&&r.delete(t)}function Ix(){eu=!1,Zr!==null&&wa(Zr)&&(Zr=null),en!==null&&wa(en)&&(en=null),tn!==null&&wa(tn)&&(tn=null),Xi.forEach(ff),Zi.forEach(ff)}function Ei(e,t){e.blockedOn===t&&(e.blockedOn=null,eu||(eu=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,Ix)))}function eo(e){function t(s){return Ei(s,e)}if(0<Yo.length){Ei(Yo[0],e);for(var r=1;r<Yo.length;r++){var n=Yo[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Zr!==null&&Ei(Zr,e),en!==null&&Ei(en,e),tn!==null&&Ei(tn,e),Xi.forEach(t),Zi.forEach(t),r=0;r<Ur.length;r++)n=Ur[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ur.length&&(r=Ur[0],r.blockedOn===null);)_g(r),r.blockedOn===null&&Ur.shift()}var Ls=Sr.ReactCurrentBatchConfig,Da=!0;function Lx(e,t,r,n){var s=oe,i=Ls.transition;Ls.transition=null;try{oe=1,Rd(e,t,r,n)}finally{oe=s,Ls.transition=i}}function $x(e,t,r,n){var s=oe,i=Ls.transition;Ls.transition=null;try{oe=4,Rd(e,t,r,n)}finally{oe=s,Ls.transition=i}}function Rd(e,t,r,n){if(Da){var s=tu(e,t,r,n);if(s===null)lc(e,t,n,Ma,r),hf(e,n);else if(Ax(s,e,t,r,n))n.stopPropagation();else if(hf(e,n),t&4&&-1<Ox.indexOf(e)){for(;s!==null;){var i=Oo(s);if(i!==null&&yg(i),i=tu(e,t,r,n),i===null&&lc(e,t,n,Ma,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else lc(e,t,n,null,r)}}var Ma=null;function tu(e,t,r,n){if(Ma=null,e=kd(n),e=Pn(e),e!==null)if(t=es(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ug(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 Ma=e,null}function Sg(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(Sx()){case Cd:return 1;case pg:return 4;case La:case Ex:return 16;case mg:return 536870912;default:return 16}default:return 16}}var Jr=null,Nd=null,xa=null;function Eg(){if(xa)return xa;var e,t=Nd,r=t.length,n,s="value"in Jr?Jr.value:Jr.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return xa=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 Xo(){return!0}function pf(){return!1}function xt(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Xo:pf,this.isPropagationStopped=pf,this}return xe(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=Xo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xo)},persist:function(){},isPersistent:Xo}),t}var ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pd=xt(ci),Po=xe({},ci,{view:0,detail:0}),Dx=xt(Po),Zl,ec,ki,ml=xe({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Od,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!==ki&&(ki&&e.type==="mousemove"?(Zl=e.screenX-ki.screenX,ec=e.screenY-ki.screenY):ec=Zl=0,ki=e),Zl)},movementY:function(e){return"movementY"in e?e.movementY:ec}}),mf=xt(ml),Mx=xe({},ml,{dataTransfer:0}),Ux=xt(Mx),Fx=xe({},Po,{relatedTarget:0}),tc=xt(Fx),zx=xe({},ci,{animationName:0,elapsedTime:0,pseudoElement:0}),Bx=xt(zx),Wx=xe({},ci,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vx=xt(Wx),Hx=xe({},ci,{data:0}),gf=xt(Hx),qx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kx={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"},Gx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gx[e])?!!t[e]:!1}function Od(){return Qx}var Jx=xe({},Po,{key:function(e){if(e.key){var t=qx[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"?Kx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Od,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}}),Yx=xt(Jx),Xx=xe({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vf=xt(Xx),Zx=xe({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Od}),eb=xt(Zx),tb=xe({},ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),rb=xt(tb),nb=xe({},ml,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),sb=xt(nb),ib=[9,13,27,32],Ad=vr&&"CompositionEvent"in window,Ui=null;vr&&"documentMode"in document&&(Ui=document.documentMode);var ob=vr&&"TextEvent"in window&&!Ui,kg=vr&&(!Ad||Ui&&8<Ui&&11>=Ui),yf=" ",wf=!1;function Cg(e,t){switch(e){case"keyup":return ib.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function ab(e,t){switch(e){case"compositionend":return Tg(t);case"keypress":return t.which!==32?null:(wf=!0,yf);case"textInput":return e=t.data,e===yf&&wf?null:e;default:return null}}function lb(e,t){if(bs)return e==="compositionend"||!Ad&&Cg(e,t)?(e=Eg(),xa=Nd=Jr=null,bs=!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 kg&&t.locale!=="ko"?null:t.data;default:return null}}var cb={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"?!!cb[e.type]:t==="textarea"}function jg(e,t,r,n){ig(n),t=Ua(t,"onChange"),0<t.length&&(r=new Pd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Fi=null,to=null;function ub(e){Ug(e,0)}function gl(e){var t=Es(e);if(Xm(t))return e}function db(e,t){if(e==="change")return t}var Rg=!1;if(vr){var rc;if(vr){var nc="oninput"in document;if(!nc){var bf=document.createElement("div");bf.setAttribute("oninput","return;"),nc=typeof bf.oninput=="function"}rc=nc}else rc=!1;Rg=rc&&(!document.documentMode||9<document.documentMode)}function _f(){Fi&&(Fi.detachEvent("onpropertychange",Ng),to=Fi=null)}function Ng(e){if(e.propertyName==="value"&&gl(to)){var t=[];jg(t,to,e,kd(e)),cg(ub,t)}}function hb(e,t,r){e==="focusin"?(_f(),Fi=t,to=r,Fi.attachEvent("onpropertychange",Ng)):e==="focusout"&&_f()}function fb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gl(to)}function pb(e,t){if(e==="click")return gl(t)}function mb(e,t){if(e==="input"||e==="change")return gl(t)}function gb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:gb;function ro(e,t){if(Ht(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(!Dc.call(t,s)||!Ht(e[s],t[s]))return!1}return!0}function Sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ef(e,t){var r=Sf(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=Sf(r)}}function Pg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Og(){for(var e=window,t=Oa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Oa(e.document)}return t}function Id(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")}
vendor: 5,809 bytes, line 37
37function vb(e){var t=Og(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Pg(r.ownerDocument.documentElement,r)){if(n!==null&&Id(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Ef(r,i);var o=Ef(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var yb=vr&&"documentMode"in document&&11>=document.documentMode,_s=null,ru=null,zi=null,nu=!1;function kf(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;nu||_s==null||_s!==Oa(n)||(n=_s,"selectionStart"in n&&Id(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zi&&ro(zi,n)||(zi=n,n=Ua(ru,"onSelect"),0<n.length&&(t=new Pd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=_s)))}function Zo(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ss={animationend:Zo("Animation","AnimationEnd"),animationiteration:Zo("Animation","AnimationIteration"),animationstart:Zo("Animation","AnimationStart"),transitionend:Zo("Transition","TransitionEnd")},sc={},Ag={};vr&&(Ag=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function vl(e){if(sc[e])return sc[e];if(!Ss[e])return e;var t=Ss[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ag)return sc[e]=t[r];return e}var Ig=vl("animationend"),Lg=vl("animationiteration"),$g=vl("animationstart"),Dg=vl("transitionend"),Mg=new Map,Cf="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){Mg.set(e,t),Zn(t,[e])}for(var ic=0;ic<Cf.length;ic++){var oc=Cf[ic],wb=oc.toLowerCase(),xb=oc[0].toUpperCase()+oc.slice(1);gn(wb,"on"+xb)}gn(Ig,"onAnimationEnd");gn(Lg,"onAnimationIteration");gn($g,"onAnimationStart");gn("dblclick","onDoubleClick");gn("focusin","onFocus");gn("focusout","onBlur");gn(Dg,"onTransitionEnd");Zs("onMouseEnter",["mouseout","mouseover"]);Zs("onMouseLeave",["mouseout","mouseover"]);Zs("onPointerEnter",["pointerout","pointerover"]);Zs("onPointerLeave",["pointerout","pointerover"]);Zn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),bb=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function Tf(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,wx(n,t,void 0,e),e.currentTarget=null}function Ug(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Tf(s,a,c),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Tf(s,a,c),i=l}}}if(Ia)throw e=Xc,Ia=!1,Xc=null,e}function fe(e,t){var r=t[lu];r===void 0&&(r=t[lu]=new Set);var n=e+"__bubble";r.has(n)||(Fg(t,e,2,!1),r.add(n))}function ac(e,t,r){var n=0;t&&(n|=4),Fg(r,e,n,t)}var ea="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[ea]){e[ea]=!0,Km.forEach(function(r){r!=="selectionchange"&&(bb.has(r)||ac(r,!1,e),ac(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ea]||(t[ea]=!0,ac("selectionchange",!1,t))}}function Fg(e,t,r,n){switch(Sg(t)){case 1:var s=Lx;break;case 4:s=$x;break;default:s=Rd}r=s.bind(null,t,r,e),s=void 0,!Yc||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 lc(e,t,r,n,s){var i=n;
vendor: 22,735 bytes, lines 37-38
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Pn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}cg(function(){var c=i,d=kd(r),h=[];e:{var p=Mg.get(e);if(p!==void 0){var f=Pd,w=e;switch(e){case"keypress":if(ba(r)===0)break e;case"keydown":case"keyup":f=Yx;break;case"focusin":w="focus",f=tc;break;case"focusout":w="blur",f=tc;break;case"beforeblur":case"afterblur":f=tc;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":f=mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Ux;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=eb;break;case Ig:case Lg:case $g:f=Bx;break;case Dg:f=rb;break;case"scroll":f=Dx;break;case"wheel":f=sb;break;case"copy":case"cut":case"paste":f=Vx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=vf}var v=(t&4)!==0,x=!v&&e==="scroll",m=v?p!==null?p+"Capture":null:p;v=[];for(var g=c,y;g!==null;){y=g;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,m!==null&&(_=Yi(g,m),_!=null&&v.push(so(g,_,y)))),x)break;g=g.return}0<v.length&&(p=new f(p,w,null,r,d),h.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==Qc&&(w=r.relatedTarget||r.fromElement)&&(Pn(w)||w[yr]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(w=r.relatedTarget||r.toElement,f=c,w=w?Pn(w):null,w!==null&&(x=es(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(f=null,w=c),f!==w)){if(v=mf,_="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=vf,_="onPointerLeave",m="onPointerEnter",g="pointer"),x=f==null?p:Es(f),y=w==null?p:Es(w),p=new v(_,g+"leave",f,r,d),p.target=x,p.relatedTarget=y,_=null,Pn(d)===c&&(v=new v(m,g+"enter",w,r,d),v.target=y,v.relatedTarget=x,_=v),x=_,f&&w)t:{for(v=f,m=w,g=0,y=v;y;y=cs(y))g++;for(y=0,_=m;_;_=cs(_))y++;for(;0<g-y;)v=cs(v),g--;for(;0<y-g;)m=cs(m),y--;for(;g--;){if(v===m||m!==null&&v===m.alternate)break t;v=cs(v),m=cs(m)}v=null}else v=null;f!==null&&jf(h,p,f,v,!1),w!==null&&x!==null&&jf(h,x,w,v,!0)}}e:{if(p=c?Es(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var E=db;else if(xf(p))if(Rg)E=mb;else{E=fb;var k=hb}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=pb);if(E&&(E=E(e,c))){jg(h,E,r,d);break e}k&&k(e,p,c),e==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&Vc(p,"number",p.value)}switch(k=c?Es(c):window,e){case"focusin":(xf(k)||k.contentEditable==="true")&&(_s=k,ru=c,zi=null);break;case"focusout":zi=ru=_s=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,kf(h,r,d);break;case"selectionchange":if(yb)break;case"keydown":case"keyup":kf(h,r,d)}var C;if(Ad)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else bs?Cg(e,r)&&(j="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(j="onCompositionStart");j&&(kg&&r.locale!=="ko"&&(bs||j!=="onCompositionStart"?j==="onCompositionEnd"&&bs&&(C=Eg()):(Jr=d,Nd="value"in Jr?Jr.value:Jr.textContent,bs=!0)),k=Ua(c,j),0<k.length&&(j=new gf(j,e,null,r,d),h.push({event:j,listeners:k}),C?j.data=C:(C=Tg(r),C!==null&&(j.data=C)))),(C=ob?ab(e,r):lb(e,r))&&(c=Ua(c,"onBeforeInput"),0<c.length&&(d=new gf("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:c}),d.data=C))}Ug(h,t)})}function so(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ua(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Yi(e,r),i!=null&&n.unshift(so(e,i,s)),i=Yi(e,t),i!=null&&n.push(so(e,i,s))),e=e.return}return n}function cs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jf(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=Yi(r,i),l!=null&&o.unshift(so(r,l,a))):s||(l=Yi(r,i),l!=null&&o.push(so(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var _b=/\r\n?/g,Sb=/\u0000|\uFFFD/g;function Rf(e){return(typeof e=="string"?e:""+e).replace(_b,`
38`).replace(Sb,"")}function ta(e,t,r){if(t=Rf(t),Rf(e)!==t&&r)throw Error(P(425))}function Fa(){}var su=null,iu=null;function ou(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 au=typeof setTimeout=="function"?setTimeout:void 0,Eb=typeof clearTimeout=="function"?clearTimeout:void 0,Nf=typeof Promise=="function"?Promise:void 0,kb=typeof queueMicrotask=="function"?queueMicrotask:typeof Nf<"u"?function(e){return Nf.resolve(null).then(e).catch(Cb)}:au;function Cb(e){setTimeout(function(){throw e})}function cc(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),eo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);eo(t)}function rn(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 Pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ui,io="__reactProps$"+ui,yr="__reactContainer$"+ui,lu="__reactEvents$"+ui,Tb="__reactListeners$"+ui,jb="__reactHandles$"+ui;function Pn(e){var t=e[Zt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[yr]||r[Zt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Pf(e);e!==null;){if(r=e[Zt])return r;e=Pf(e)}return t}e=r,r=e.parentNode}return null}function Oo(e){return e=e[Zt]||e[yr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function yl(e){return e[io]||null}var cu=[],ks=-1;function vn(e){return{current:e}}function pe(e){0>ks||(e.current=cu[ks],cu[ks]=null,ks--)}function de(e,t){ks++,cu[ks]=e.current,e.current=t}var dn={},Ke=vn(dn),it=vn(!1),qn=dn;function ei(e,t){var r=e.type.contextTypes;if(!r)return dn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ot(e){return e=e.childContextTypes,e!=null}function za(){pe(it),pe(Ke)}function Of(e,t,r){if(Ke.current!==dn)throw Error(P(168));de(Ke,t),de(it,r)}function zg(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(P(108,hx(e)||"Unknown",s));return xe({},r,n)}function Ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dn,qn=Ke.current,de(Ke,e),de(it,it.current),!0}function Af(e,t,r){var n=e.stateNode;if(!n)throw Error(P(169));r?(e=zg(e,t,qn),n.__reactInternalMemoizedMergedChildContext=e,pe(it),pe(Ke),de(Ke,e)):pe(it),de(it,r)}var hr=null,wl=!1,uc=!1;function Bg(e){hr===null?hr=[e]:hr.push(e)}function Rb(e){wl=!0,Bg(e)}function yn(){if(!uc&&hr!==null){uc=!0;var e=0,t=oe;try{var r=hr;for(oe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}hr=null,wl=!1}catch(s){throw hr!==null&&(hr=hr.slice(e+1)),fg(Cd,yn),s}finally{oe=t,uc=!1}}return null}var Cs=[],Ts=0,Wa=null,Va=0,Et=[],kt=0,Kn=null,pr=1,mr="";function Cn(e,t){Cs[Ts++]=Va,Cs[Ts++]=Wa,Wa=e,Va=t}function Wg(e,t,r){Et[kt++]=pr,Et[kt++]=mr,Et[kt++]=Kn,Kn=e;var n=pr;e=mr;var s=32-Wt(n)-1;n&=~(1<<s),r+=1;var i=32-Wt(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,pr=1<<32-Wt(t)+s|r<<s|n,mr=i+e}else pr=1<<i|r<<s|n,mr=e}function Ld(e){e.return!==null&&(Cn(e,1),Wg(e,1,0))}function $d(e){for(;e===Wa;)Wa=Cs[--Ts],Cs[Ts]=null,Va=Cs[--Ts],Cs[Ts]=null;for(;e===Kn;)Kn=Et[--kt],Et[kt]=null,mr=Et[--kt],Et[kt]=null,pr=Et[--kt],Et[kt]=null}var mt=null,pt=null,ge=!1,Bt=null;function Vg(e,t){var r=Ct(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 If(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,mt=e,pt=rn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mt=e,pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Kn!==null?{id:pr,overflow:mr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ct(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,mt=e,pt=null,!0):!1;default:return!1}}function uu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function du(e){if(ge){var t=pt;if(t){var r=t;if(!If(e,t)){if(uu(e))throw Error(P(418));t=rn(r.nextSibling);var n=mt;t&&If(e,t)?Vg(n,r):(e.flags=e.flags&-4097|2,ge=!1,mt=e)}}else{if(uu(e))throw Error(P(418));e.flags=e.flags&-4097|2,ge=!1,mt=e}}}function Lf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mt=e}function ra(e){if(e!==mt)return!1;if(!ge)return Lf(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ou(e.type,e.memoizedProps)),t&&(t=pt)){if(uu(e))throw Hg(),Error(P(418));for(;t;)Vg(e,t),t=rn(t.nextSibling)}if(Lf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){pt=rn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}pt=null}}else pt=mt?rn(e.stateNode.nextSibling):null;return!0}function Hg(){for(var e=pt;e;)e=rn(e.nextSibling)}function ti(){pt=mt=null,ge=!1}function Dd(e){Bt===null?Bt=[e]:Bt.push(e)}var Nb=Sr.ReactCurrentBatchConfig;function Ci(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(P(309));var n=r.stateNode}if(!n)throw Error(P(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,e))}return e}function na(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $f(e){var t=e._init;return t(e._payload)}function qg(e){function t(m,g){if(e){var y=m.deletions;y===null?(m.deletions=[g],m.flags|=16):y.push(g)}}function r(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function n(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function s(m,g){return m=an(m,g),m.index=0,m.sibling=null,m}function i(m,g,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<g?(m.flags|=2,g):y):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,y,_){return g===null||g.tag!==6?(g=vc(y,m.mode,_),g.return=m,g):(g=s(g,y),g.return=m,g)}function l(m,g,y,_){var E=y.type;return E===xs?d(m,g,y.props.children,_,y.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$r&&$f(E)===g.type)?(_=s(g,y.props),_.ref=Ci(m,g,y),_.return=m,_):(_=ja(y.type,y.key,y.props,null,m.mode,_),_.ref=Ci(m,g,y),_.return=m,_)}function c(m,g,y,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=yc(y,m.mode,_),g.return=m,g):(g=s(g,y.children||[]),g.return=m,g)}function d(m,g,y,_,E){return g===null||g.tag!==7?(g=Hn(y,m.mode,_,E),g.return=m,g):(g=s(g,y),g.return=m,g)}function h(m,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=vc(""+g,m.mode,y),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case qo:return y=ja(g.type,g.key,g.props,null,m.mode,y),y.ref=Ci(m,null,g),y.return=m,y;case ws:return g=yc(g,m.mode,y),g.return=m,g;case $r:var _=g._init;return h(m,_(g._payload),y)}if(Oi(g)||bi(g))return g=Hn(g,m.mode,y,null),g.return=m,g;na(m,g)}return null}function p(m,g,y,_){var E=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:a(m,g,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case qo:return y.key===E?l(m,g,y,_):null;case ws:return y.key===E?c(m,g,y,_):null;case $r:return E=y._init,p(m,g,E(y._payload),_)}if(Oi(y)||bi(y))return E!==null?null:d(m,g,y,_,null);na(m,y)}return null}function f(m,g,y,_,E){if(typeof _=="string"&&_!==""||typeof _=="number")return m=m.get(y)||null,a(g,m,""+_,E);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case qo:return m=m.get(_.key===null?y:_.key)||null,l(g,m,_,E);case ws:return m=m.get(_.key===null?y:_.key)||null,c(g,m,_,E);case $r:var k=_._init;return f(m,g,y,k(_._payload),E)}if(Oi(_)||bi(_))return m=m.get(y)||null,d(g,m,_,E,null);na(g,_)}return null}function w(m,g,y,_){for(var E=null,k=null,C=g,j=g=0,O=null;C!==null&&j<y.length;j++){C.index>j?(O=C,C=null):O=C.sibling;var N=p(m,C,y[j],_);if(N===null){C===null&&(C=O);break}e&&C&&N.alternate===null&&t(m,C),g=i(N,g,j),k===null?E=N:k.sibling=N,k=N,C=O}if(j===y.length)return r(m,C),ge&&Cn(m,j),E;if(C===null){for(;j<y.length;j++)C=h(m,y[j],_),C!==null&&(g=i(C,g,j),k===null?E=C:k.sibling=C,k=C);return ge&&Cn(m,j),E}for(C=n(m,C);j<y.length;j++)O=f(C,m,j,y[j],_),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?j:O.key),g=i(O,g,j),k===null?E=O:k.sibling=O,k=O);return e&&C.forEach(function(D){return t(m,D)}),ge&&Cn(m,j),E}function v(m,g,y,_){var E=bi(y);if(typeof E!="function")throw Error(P(150));if(y=E.call(y),y==null)throw Error(P(151));for(var k=E=null,C=g,j=g=0,O=null,N=y.next();C!==null&&!N.done;j++,N=y.next()){C.index>j?(O=C,C=null):O=C.sibling;var D=p(m,C,N.value,_);if(D===null){C===null&&(C=O);break}e&&C&&D.alternate===null&&t(m,C),g=i(D,g,j),k===null?E=D:k.sibling=D,k=D,C=O}if(N.done)return r(m,C),ge&&Cn(m,j),E;if(C===null){for(;!N.done;j++,N=y.next())N=h(m,N.value,_),N!==null&&(g=i(N,g,j),k===null?E=N:k.sibling=N,k=N);return ge&&Cn(m,j),E}for(C=n(m,C);!N.done;j++,N=y.next())N=f(C,m,j,N.value,_),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?j:N.key),g=i(N,g,j),k===null?E=N:k.sibling=N,k=N);return e&&C.forEach(function(I){return t(m,I)}),ge&&Cn(m,j),E}function x(m,g,y,_){if(typeof y=="object"&&y!==null&&y.type===xs&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case qo:e:{for(var E=y.key,k=g;k!==null;){if(k.key===E){if(E=y.type,E===xs){if(k.tag===7){r(m,k.sibling),g=s(k,y.props.children),g.return=m,m=g;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$r&&$f(E)===k.type){r(m,k.sibling),g=s(k,y.props),g.ref=Ci(m,k,y),g.return=m,m=g;break e}r(m,k);break}else t(m,k);k=k.sibling}y.type===xs?(g=Hn(y.props.children,m.mode,_,y.key),g.return=m,m=g):(_=ja(y.type,y.key,y.props,null,m.mode,_),_.ref=Ci(m,g,y),_.return=m,m=_)}return o(m);case ws:e:{for(k=y.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(m,g.sibling),g=s(g,y.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=yc(y,m.mode,_),g.return=m,m=g}return o(m);case $r:return k=y._init,x(m,g,k(y._payload),_)}if(Oi(y))return w(m,g,y,_);if(bi(y))return v(m,g,y,_);na(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(m,g.sibling),g=s(g,y),g.return=m,m=g):(r(m,g),g=vc(y,m.mode,_),g.return=m,m=g),o(m)):r(m,g)}return x}var ri=qg(!0),Kg=qg(!1),Ha=vn(null),qa=null,js=null,Md=null;function Ud(){Md=js=qa=null}function Fd(e){var t=Ha.current;pe(Ha),e._currentValue=t}function hu(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 $s(e,t){qa=e,Md=js=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(st=!0),e.firstContext=null)}function jt(e){var t=e._currentValue;if(Md!==e)if(e={context:e,memoizedValue:t,next:null},js===null){if(qa===null)throw Error(P(308));js=e,qa.dependencies={lanes:0,firstContext:e}}else js=js.next=e;return t}var On=null;function zd(e){On===null?On=[e]:On.push(e)}function Gg(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,zd(t)):(r.next=s.next,s.next=r),t.interleaved=r,wr(e,n)}function wr(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 Dr=!1;function Bd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qg(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 gr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ne&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,wr(e,r)}return s=n.interleaved,s===null?(t.next=t,zd(n)):(t.next=s.next,s.next=t),n.interleaved=t,wr(e,r)}function _a(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,Td(e,r)}}function Df(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ka(e,t,r,n){var s=e.updateQueue;Dr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,d=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,v=a;switch(p=t,f=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){h=w.call(f,h,p);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,p=typeof w=="function"?w.call(f,h,p):w,p==null)break e;h=xe({},h,p);break e;case 2:Dr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=f,l=h):d=d.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Qn|=o,e.lanes=o,e.memoizedState=h}}function Mf(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(P(191,s));s.call(n)}}}var Ao={},rr=vn(Ao),oo=vn(Ao),ao=vn(Ao);function An(e){if(e===Ao)throw Error(P(174));return e}function Wd(e,t){switch(de(ao,t),de(oo,e),de(rr,Ao),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qc(t,e)}pe(rr),de(rr,t)}function ni(){pe(rr),pe(oo),pe(ao)}function Jg(e){An(ao.current);var t=An(rr.current),r=qc(t,e.type);t!==r&&(de(oo,e),de(rr,r))}function Vd(e){oo.current===e&&(pe(rr),pe(oo))}var ye=vn(0);function Ga(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 dc=[];function Hd(){for(var e=0;e<dc.length;e++)dc[e]._workInProgressVersionPrimary=null;dc.length=0}var Sa=Sr.ReactCurrentDispatcher,hc=Sr.ReactCurrentBatchConfig,Gn=0,we=null,Pe=null,Ie=null,Qa=!1,Bi=!1,lo=0,Pb=0;function We(){throw Error(P(321))}function qd(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ht(e[r],t[r]))return!1;return!0}function Kd(e,t,r,n,s,i){if(Gn=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Sa.current=e===null||e.memoizedState===null?Lb:$b,e=r(n,s),Bi){i=0;do{if(Bi=!1,lo=0,25<=i)throw Error(P(301));i+=1,Ie=Pe=null,t.updateQueue=null,Sa.current=Db,e=r(n,s)}while(Bi)}if(Sa.current=Ja,t=Pe!==null&&Pe.next!==null,Gn=0,Ie=Pe=we=null,Qa=!1,t)throw Error(P(300));return e}function Gd(){var e=lo!==0;return lo=0,e}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function Rt(){if(Pe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Ie===null?we.memoizedState:Ie.next;if(t!==null)Ie=t,Pe=e;else{if(e===null)throw Error(P(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function co(e,t){return typeof t=="function"?t(e):t}function fc(e){var t=Rt(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 38
38var n=Pe,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,c=i;do{var d=c.lane;if((Gn&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=h,o=n):l=l.next=h,we.lanes|=d,Qn|=d}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,Ht(n,t.memoizedState)||(st=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,we.lanes|=i,Qn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function pc(e){var t=Rt(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Ht(i,t.memoizedState)||(st=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Yg(){}function Xg(e,t){var r=we,n=Rt(),s=t(),i=!Ht(n.memoizedState,s);if(i&&(n.memoizedState=s,st=!0),n=n.queue,Qd(tv.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(r.flags|=2048,uo(9,ev.bind(null,r,n,s,t),void 0,null),Le===null)throw Error(P(349));Gn&30||Zg(r,t,s)}return s}function Zg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ev(e,t,r,n){t.value=r,t.getSnapshot=n,rv(t)&&nv(e)}function tv(e,t,r){return r(function(){rv(t)&&nv(e)})}function rv(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ht(e,r)}catch{return!0}}function nv(e){var t=wr(e,1);t!==null&&Vt(t,e,1,-1)}function Uf(e){var t=Qt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:e},t.queue=e,e=e.dispatch=Ib.bind(null,we,e),[t.memoizedState,e]}function uo(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.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 sv(){return Rt().memoizedState}function Ea(e,t,r,n){var s=Qt();we.flags|=e,s.memoizedState=uo(1|t,r,void 0,n===void 0?null:n)}function xl(e,t,r,n){var s=Rt();n=n===void 0?null:n;var i=void 0;if(Pe!==null){var o=Pe.memoizedState;if(i=o.destroy,n!==null&&qd(n,o.deps)){s.memoizedState=uo(t,r,i,n);return}}we.flags|=e,s.memoizedState=uo(1|t,r,i,n)}function Ff(e,t){return Ea(8390656,8,e,t)}function Qd(e,t){return xl(2048,8,e,t)}function iv(e,t){return xl(4,2,e,t)}function ov(e,t){return xl(4,4,e,t)}function av(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 lv(e,t,r){return r=r!=null?r.concat([e]):null,xl(4,4,av.bind(null,t,e),r)}function Jd(){}function cv(e,t){var r=Rt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&qd(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function uv(e,t){var r=Rt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&qd(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function dv(e,t,r){return Gn&21?(Ht(r,t)||(r=gg(),we.lanes|=r,Qn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,st=!0),e.memoizedState=r)}function Ob(e,t){var r=oe;oe=r!==0&&4>r?r:4,e(!0);var n=hc.transition;hc.transition={};try{e(!1),t()}finally{oe=r,hc.transition=n}}function hv(){return Rt().memoizedState}function Ab(e,t,r){var n=on(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},fv(e))pv(t,r);else if(r=Gg(e,t,r,n),r!==null){var s=Ye();Vt(r,e,n,s),mv(r,t,n)}}function Ib(e,t,r){var n=on(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(fv(e))pv(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Ht(a,o)){var l=t.interleaved;l===null?(s.next=s,zd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Gg(e,t,s,n),r!==null&&(s=Ye(),Vt(r,e,n,s),mv(r,t,n))}}function fv(e){var t=e.alternate;return e===we||t!==null&&t===we}function pv(e,t){Bi=Qa=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function mv(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Td(e,r)}}var Ja={readContext:jt,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},Lb={readContext:jt,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:Ff,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ea(4194308,4,av.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ea(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ea(4,2,e,t)},useMemo:function(e,t){var r=Qt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Qt();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=Ab.bind(null,we,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 38-40
38,useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:Uf,useDebugValue:Jd,useDeferredValue:function(e){return Qt().memoizedState=e},useTransition:function(){var e=Uf(!1),t=e[0];return e=Ob.bind(null,e[1]),Qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=we,s=Qt();if(ge){if(r===void 0)throw Error(P(407));r=r()}else{if(r=t(),Le===null)throw Error(P(349));Gn&30||Zg(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,Ff(tv.bind(null,n,i,e),[e]),n.flags|=2048,uo(9,ev.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Qt(),t=Le.identifierPrefix;if(ge){var r=mr,n=pr;r=(n&~(1<<32-Wt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=lo++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Pb++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$b={readContext:jt,useCallback:cv,useContext:jt,useEffect:Qd,useImperativeHandle:lv,useInsertionEffect:iv,useLayoutEffect:ov,useMemo:uv,useReducer:fc,useRef:sv,useState:function(){return fc(co)},useDebugValue:Jd,useDeferredValue:function(e){var t=Rt();return dv(t,Pe.memoizedState,e)},useTransition:function(){var e=fc(co)[0],t=Rt().memoizedState;return[e,t]},useMutableSource:Yg,useSyncExternalStore:Xg,useId:hv,unstable_isNewReconciler:!1},Db={readContext:jt,useCallback:cv,useContext:jt,useEffect:Qd,useImperativeHandle:lv,useInsertionEffect:iv,useLayoutEffect:ov,useMemo:uv,useReducer:pc,useRef:sv,useState:function(){return pc(co)},useDebugValue:Jd,useDeferredValue:function(e){var t=Rt();return Pe===null?t.memoizedState=e:dv(t,Pe.memoizedState,e)},useTransition:function(){var e=pc(co)[0],t=Rt().memoizedState;return[e,t]},useMutableSource:Yg,useSyncExternalStore:Xg,useId:hv,unstable_isNewReconciler:!1};function $t(e,t){if(e&&e.defaultProps){t=xe({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function fu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:xe({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bl={isMounted:function(e){return(e=e._reactInternals)?es(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ye(),s=on(e),i=gr(n,s);i.payload=t,r!=null&&(i.callback=r),t=nn(e,i,s),t!==null&&(Vt(t,e,s,n),_a(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ye(),s=on(e),i=gr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=nn(e,i,s),t!==null&&(Vt(t,e,s,n),_a(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ye(),n=on(e),s=gr(r,n);s.tag=2,t!=null&&(s.callback=t),t=nn(e,s,n),t!==null&&(Vt(t,e,n,r),_a(t,e,n))}};function zf(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!ro(r,n)||!ro(s,i):!0}function gv(e,t,r){var n=!1,s=dn,i=t.contextType;return typeof i=="object"&&i!==null?i=jt(i):(s=ot(t)?qn:Ke.current,n=t.contextTypes,i=(n=n!=null)?ei(e,s):dn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Bf(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&&bl.enqueueReplaceState(t,t.state,null)}function pu(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Bd(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=jt(i):(i=ot(t)?qn:Ke.current,s.context=ei(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(fu(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&bl.enqueueReplaceState(s,s.state,null),Ka(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function si(e,t){try{var r="",n=t;do r+=dx(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function mc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function mu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Mb=typeof WeakMap=="function"?WeakMap:Map;function vv(e,t,r){r=gr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Xa||(Xa=!0,ku=n),mu(e,t)},r}function yv(e,t,r){r=gr(-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(){mu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){mu(e,t),typeof n!="function"&&(sn===null?sn=new Set([this]):sn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Wf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Mb;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=Xb.bind(null,e,t,r),t.then(e,e))}function Vf(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 Hf(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=gr(-1,1),t.tag=2,nn(r,t,1))),r.lanes|=1),e)}var Ub=Sr.ReactCurrentOwner,st=!1;function Je(e,t,r,n){t.child=e===null?Kg(t,null,r,n):ri(t,e.child,r,n)}function qf(e,t,r,n,s){r=r.render;var i=t.ref;return $s(t,s),n=Kd(e,t,r,n,i,s),r=Gd(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xr(e,t,s)):(ge&&r&&Ld(t),t.flags|=1,Je(e,t,n,s),t.child)}function Kf(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!sh(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,wv(e,t,i,n,s)):(e=ja(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:ro,r(o,n)&&e.ref===t.ref)return xr(e,t,s)}return t.flags|=1,e=an(i,n),e.ref=t.ref,e.return=t,t.child=e}function wv(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(ro(i,n)&&e.ref===t.ref)if(st=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(st=!0);else return t.lanes=e.lanes,xr(e,t,s)}return gu(e,t,r,n,s)}function xv(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(Ns,ct),ct|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(Ns,ct),ct|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,de(Ns,ct),ct|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,de(Ns,ct),ct|=n;return Je(e,t,s,r),t.child}function bv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 3,213 bytes, line 40
40function gu(e,t,r,n,s){var i=ot(r)?qn:Ke.current;return i=ei(t,i),$s(t,s),r=Kd(e,t,r,n,i,s),n=Gd(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xr(e,t,s)):(ge&&n&&Ld(t),t.flags|=1,Je(e,t,r,s),t.child)}function Gf(e,t,r,n,s){if(ot(r)){var i=!0;Ba(t)}else i=!1;if($s(t,s),t.stateNode===null)ka(e,t),gv(t,r,n),pu(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=jt(c):(c=ot(r)?qn:Ke.current,c=ei(t,c));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Bf(t,o,n,c),Dr=!1;var p=t.memoizedState;o.state=p,Ka(t,n,o,s),l=t.memoizedState,a!==n||p!==l||it.current||Dr?(typeof d=="function"&&(fu(t,r,d,n),l=t.memoizedState),(a=Dr||zf(t,r,a,n,p,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Qg(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:$t(t.type,a),o.props=c,h=t.pendingProps,p=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=jt(l):(l=ot(r)?qn:Ke.current,l=ei(t,l));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&Bf(t,o,n,l),Dr=!1,p=t.memoizedState,o.state=p,Ka(t,n,o,s);var w=t.memoizedState;a!==h||p!==w||it.current||Dr?(typeof f=="function"&&(fu(t,r,f,n),w=t.memoizedState),(c=Dr||zf(t,r,c,n,p,w,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),o.props=n,o.state=w,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return vu(e,t,r,n,i,s)}function vu(e,t,r,n,s,i){bv(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&Af(t,r,!1),xr(e,t,i);n=t.stateNode,Ub.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ri(t,e.child,null,i),t.child=ri(t,null,a,i)):Je
vendor: 9,711 bytes, line 40
40(e,t,a,i),t.memoizedState=n.state,s&&Af(t,r,!0),t.child}function _v(e){var t=e.stateNode;t.pendingContext?Of(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Of(e,t.context,!1),Wd(e,t.containerInfo)}function Qf(e,t,r,n,s){return ti(),Dd(s),t.flags|=256,Je(e,t,r,n),t.child}var yu={dehydrated:null,treeContext:null,retryLane:0};function wu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sv(e,t,r){var n=t.pendingProps,s=ye.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),de(ye,s&1),e===null)return du(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=El(o,n,0,null),e=Hn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=wu(r),t.memoizedState=yu,e):Yd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Fb(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=an(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=an(a,i):(i=Hn(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?wu(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=yu,n}return i=e.child,e=i.sibling,n=an(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Yd(e,t){return t=El({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function sa(e,t,r,n){return n!==null&&Dd(n),ri(t,e.child,null,r),e=Yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fb(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=mc(Error(P(422))),sa(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=El({mode:"visible",children:n.children},s,0,null),i=Hn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&ri(t,e.child,null,o),t.child.memoizedState=wu(o),t.memoizedState=yu,i);if(!(t.mode&1))return sa(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(P(419)),n=mc(i,n,void 0),sa(e,t,o,n)}if(a=(o&e.childLanes)!==0,st||a){if(n=Le,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,wr(e,s),Vt(n,e,s,-1))}return nh(),n=mc(Error(P(421))),sa(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Zb.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,pt=rn(s.nextSibling),mt=t,ge=!0,Bt=null,e!==null&&(Et[kt++]=pr,Et[kt++]=mr,Et[kt++]=Kn,pr=e.id,mr=e.overflow,Kn=t),t=Yd(t,n.children),t.flags|=4096,t)}function Jf(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),hu(e.return,t,r)}function gc(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Ev(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Je(e,t,n.children,r),n=ye.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&&Jf(e,r,t);else if(e.tag===19)Jf(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(de(ye,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&&Ga(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),gc(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ga(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}gc(t,!0,r,null,i);break;case"together":gc(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 xr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Qn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,r=an(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=an(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function zb(e,t,r){switch(t.tag){case 3:_v(t),ti();break;case 5:Jg(t);break;case 1:ot(t.type)&&Ba(t);break;case 4:Wd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;de(Ha,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(de(ye,ye.current&1),t.flags|=128,null):r&t.child.childLanes?Sv(e,t,r):(de(ye,ye.current&1),e=xr(e,t,r),e!==null?e.sibling:null);de(ye,ye.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Ev(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),de(ye,ye.current),n)break;return null;case 22:case 23:return t.lanes=0,xv(e,t,r)}return xr(e,t,r)}var kv,xu,Cv,Tv;kv=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}};xu=function(){};Cv=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,An(rr.current);var i=null;switch(r){case"input":s=Bc(e,s),n=Bc(e,n),i=[];break;case"select":s=xe({},s,{value:void 0}),n=xe({},n,{value:void 0}),i=[];break;case"textarea":s=Hc(e,s),n=Hc(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Fa)}Kc(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Qi.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Qi.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&fe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Tv=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ti(e,t){if(!ge)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 Ve(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 Bb(e,t,r){var n=t.pendingProps;switch($d(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return ot(t.type)&&za(),Ve(t),null;case 3:return n=t.stateNode,ni(),pe(it),pe(Ke),Hd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ra(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bt!==null&&(ju(Bt),Bt=null))),xu(e,t),Ve(t),null;case 5:Vd(t);var s=An(ao.current);if(r=t.type,e!==null&&t.stateNode!=null)Cv(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(P(166));return Ve(t),null}if(e=An(rr.current),ra(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Zt]=t,n[io]=i,e=(t.mode&1)!==0,r){case"dialog":fe("cancel",n),fe("close",n);break;case"iframe":case"object":case"embed":fe("load",n);break;case"video":case"audio":for(s=0;s<Ii.length;s++)fe(Ii[s],n);break;case"source":fe("error",n);break;case"img":case"image":case"link":fe("error",n),fe("load",n);break;case"details":fe("toggle",n);break;case"input":sf(n,i),fe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},fe("invalid",n);break;case"textarea":af(n,i),fe("invalid",n)}Kc(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,630 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&ta(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ta(n.textContent,a,e),s=["children",""+a]):Qi.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&fe("scroll",n)}switch(r){case"input":Ko(n),of(n,i,!0);break;case"textarea":Ko(n),lf(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Fa)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tg(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Zt]=t,e[io]=n,kv(e,t,!1,!1),t.stateNode=e;e:{switch(o=Gc(r,n),r){case"dialog":fe("cancel",e),fe("close",e),s=n;break;case"iframe":case"object":case"embed":fe("load",e),s=n;break;case"video":case"audio":for(s=0;s<Ii.length;s++)fe(Ii[s],e);s=n;break;case"source":fe("error",e),s=n;break;case"img":case"image":case"link":fe("error",e),fe("load",e),s=n;break;case"details":fe("toggle",e),s=n;break;case"input":sf(e,n),s=Bc(e,n),fe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=xe({},n,{value:void 0}),fe("invalid",e);break;case"textarea":af(e,n),s=Hc(e,n),fe("invalid",e);break;default:s=n}Kc(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?sg(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&rg(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Ji(e,l):typeof l=="number"&&Ji(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qi.hasOwnProperty(i)?l!=null&&i==="onScroll"&&fe("scroll",e):l!=null&&bd(e,i,l,o))}switch(r){case"input":Ko(e),of(e,n,!1);break;case"textarea":Ko(e),lf(e);break;case"option":n.value!=null&&e.setAttribute("value",""+un(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Os(e,!!n.multiple,i,!1):n.defaultValue!=null&&Os(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Fa)}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 Ve(t),null;case 6:if(e&&t.stateNode!=null)Tv(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(r=An(ao.current),An(rr.current),ra(t)){if(n=t.stateNode,r=t.memoizedProps,n[Zt]=t,(i=n.nodeValue!==r)&&(e=mt,e!==null))switch(e.tag){case 3:ta(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ta(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Zt]=t,t.stateNode=n}return Ve(t),null;case 13:if(pe(ye),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&&pt!==null&&t.mode&1&&!(t.flags&128))Hg(),ti(),t.flags|=98560,i=!1;else if(i=ra(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(P(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(P(317));i[Zt]=t}else ti(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ve(t),i=!1}else Bt!==null&&(ju(Bt),Bt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ye.current&1?Oe===0&&(Oe=3):nh())),t.updateQueue!==null&&(t.flags|=4),Ve(t),null);case 4:return ni(),xu(e,t),e===null&&no(t.stateNode.containerInfo),Ve(t),null;case 10:return Fd(t.type._context),Ve(t),null;case 17:return ot(t.type)&&za(),Ve(t),null;case 19:if(pe(ye),i=t.memoizedState,i===null)return Ve(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Ti(i,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ga(e),o!==null){for(t.flags|=128,Ti(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return de(ye,ye.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ee()>ii&&(t.flags|=128,n=!0,Ti(i,!1),t.lanes=4194304)}else{if(!n)if(e=Ga(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ti(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ge)return Ve(t),null}else 2*Ee()-i.renderingStartTime>ii&&r!==1073741824&&(t.flags|=128,n=!0,Ti(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ee(),t.sibling=null,r=ye.current,de(ye,n?r&1|2:r&1),t):(Ve(t),null);case 22:case 23:return rh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?ct&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Wb(e,t){switch($d(t),t.tag){case 1:return ot(t.type)&&za(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ni(),pe(it),pe(Ke),Hd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Vd(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return ni(),null;case 10:return Fd(t.type._context),null;case 22:case 23:return rh(),null;case 24:return null;default:return null}}var ia=!1,qe=!1,Vb=typeof WeakSet=="function"?WeakSet:Set,M=null;function Rs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Se(e,t,n)}else r.current=null}function bu(e,t,r){try{r()}catch(n){Se(e,t,n)}}var Yf=!1;function Hb(e,t){if(su=Da,e=Og(),Id(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(a=o+s),h!==i||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===e)break t;if(p===r&&++c===s&&(a=o),p===i&&++d===n&&(l=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(iu={focusedElem:e,selectionRange:r},Da=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,x=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:$t(t.type,v),x);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(_){Se(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=Yf,Yf=!1,w}function Wi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&bu(t,r,i)}s=s.next}while(s!==n)}}function _l(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 _u(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 jv(e){var t=e.alternate;t!==null&&(e.alternate=null,jv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[io],delete t[lu],delete t[Tb],delete t[jb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rv(e){return e.tag===5||e.tag===3||e.tag===4}function Xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rv(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 Su(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=Fa));else if(n!==4&&(e=e.child,e!==null))for(Su(e,t,r),e=e.sibling;e!==null;)Su(e,t,r),e=e.sibling}function Eu(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(Eu(e,t,r),e=e.sibling;e!==null;)Eu(e,t,r),e=e.sibling}var Me=null,Ft=!1;function Pr(e,t,r){for(r=r.child;r!==null;)Nv(e,t,r),r=r.sibling}function Nv(e,t,r){if(tr&&typeof tr.onCommitFiberUnmount=="function")try{tr.onCommitFiberUnmount(pl,r)}catch{}switch(r.tag){case 5:qe||Rs(r,t);case 6:var n=Me,s=Ft;Me=null,Pr(e,t,r),Me=n,Ft=s,Me!==null&&(Ft?(e=Me,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Me.removeChild(r.stateNode));break;case 18:Me!==null&&(Ft?(e=Me,r=r.stateNode,e.nodeType===8?cc(e.parentNode,r):e.nodeType===1&&cc(e,r),eo(e)):cc(Me,r.stateNode));break;case 4:n=Me,s=Ft,Me=r.stateNode.containerInfo,Ft=!0,Pr(e,t,r),Me=n,Ft=s;break;case 0:case 11:case 14:case 15:if(!qe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&bu(r,t,o),s=s.next}while(s!==n)}Pr(e,t,r);break;case 1:if(!qe&&(Rs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Se(r,t,a)}Pr(e,t,r);break;case 21:Pr(e,t,r);break;case 22:r.mode&1?(qe=(n=qe)||r.memoizedState!==null,Pr(e,t,r),qe=n):Pr(e,t,r);break;default:Pr(e,t,r)}}function Zf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Vb),t.forEach(function(n){var s=e1.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function At(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Me=a.stateNode,Ft=!1;break e;case 3:Me=a.stateNode.containerInfo,Ft=!0;break e;case 4:Me=a.stateNode.containerInfo,Ft=!0;break e}a=a.return}if(Me===null)throw Error(P(160));Nv(i,o,s),Me=null,Ft=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Se(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Pv(t,e),t=t.sibling}function Pv(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(t,e),Gt(e),n&4){try{Wi(3,e,e.return),_l(3,e)}catch(v){Se(e,e.return,v)}try{Wi(5,e,e.return)}catch(v){Se(e,e.return,v)}}break;case 1:At(t,e),Gt(e),n&512&&r!==null&&Rs(r,r.return);break;case 5:if(At(t,e),Gt(e),n&512&&r!==null&&Rs(r,r.return),e.flags&32){var s=e.stateNode;try{Ji(s,"")}catch(v){Se(e,e.return,v)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Zm(s,i),Gc(a,o);var c=Gc(a,i);for(o=0;o<l.length;o+=2){var d=l[o],h=l[o+1];d==="style"?sg(s,h):d==="dangerouslySetInnerHTML"?rg(s,h):d==="children"?Ji(s,h):bd(s,d,h,c)}switch(a){case"input":Wc(s,i);break;case"textarea":eg(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Os(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Os(s,!!i.multiple,i.defaultValue,!0):Os(s,!!i.multiple,i.multiple?[]:"",!1))}s[io]=i}catch(v){Se(e,e.return,v)}}break;case 6:if(At(t,e),Gt(e),n&4){if(e.stateNode===null)throw Error(P(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){Se(e,e.return,v)}}break;case 3:if(At(t,e),Gt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{eo(t.containerInfo)}catch(v){Se(e,e.return,v)}break;case 4:At(t,e),Gt(e);break;case 13:At(t,e),Gt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(eh=Ee())),n&4&&Zf(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(qe=(c=qe)||d,At(t,e),qe=c):At(t,e),Gt(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(M=e,d=e.child;d!==null;){for(h=M=d;M!==null;){switch(p=M,f=p.child,p.tag){case 0:case 11:case 14:case 15:Wi(4,p,p.return);break;case 1:Rs(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){Se(n,r,v)}}break;case 5:Rs(p,p.return);break;case 22:if(p.memoizedState!==null){tp(h);continue}}f!==null?(f.return=p,M=f):tp(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=ng("display",o))}catch(v){Se(e,e.return,v)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(v){Se(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:At(t,e),Gt(e),n&4&&Zf(e);break;case 21:break;default:At(t,e),Gt(e)}}function Gt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Rv(r)){var n=r;break e}r=r.return}throw Error(P(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Ji(s,""),n.flags&=-33);var i=Xf(e);Eu(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Xf(e);Su(e,a,o);break;default:throw Error(P(161))}}catch(l){Se(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qb(e,t,r){M=e,Ov(e)}function Ov(e,t,r){for(var n=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||ia;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||qe;a=ia;var c=qe;if(ia=o,(qe=l)&&!c)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?rp(s):l!==null?(l.return=o,M=l):rp(s);for(;i!==null;)M=i,Ov(i),i=i.sibling;M=s,ia=a,qe=c}ep(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):ep(e)}}function ep(e){for(;M!==null;){var t=M;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qe||_l(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!qe)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:$t(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Mf(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Mf(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&eo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}qe||t.flags&512&&_u(t)}catch(p){Se(t,t.return,p)}}if(t===e){M=null;break}if(r=t.sibling,r!==null){r.return=t.return,M=r;break}M=t.return}}function tp(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var r=t.sibling;if(r!==null){r.return=t.return,M=r;break}M=t.return}}function rp(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{_l(4,t)}catch(l){Se(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Se(t,s,l)}}var i=t.return;try{_u(t)}catch(l){Se(t,i,l)}break;case 5:var o=t.return;try{_u(t)}catch(l){Se(t,o,l)}}}catch(l){Se(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var Kb=Math.ceil,Ya=Sr.ReactCurrentDispatcher,Xd=Sr.ReactCurrentOwner,Tt=Sr.ReactCurrentBatchConfig,ne=0,Le=null,je=null,Fe=0,ct=0,Ns=vn(0),Oe=0,ho=null,Qn=0,Sl=0,Zd=0,Vi=null,nt=null,eh=0,ii=1/0,ur=null,Xa=!1,ku=null,sn=null,oa=!1,Yr=null,Za=0,Hi=0,Cu=null,Ca=-1,Ta=0;function Ye(){return ne&6?Ee():Ca!==-1?Ca:Ca=Ee()}function on(e){return e.mode&1?ne&2&&Fe!==0?Fe&-Fe:Nb.transition!==null?(Ta===0&&(Ta=gg()),Ta):(e=oe,e!==0||(e=window.event,e=e===void 0?16:Sg(e.type)),e):1}function Vt(e,t,r,n){if(50<Hi)throw Hi=0,Cu=null,Error(P(185));No(e,r,n),(!(ne&2)||e!==Le)&&(e===Le&&(!(ne&2)&&(Sl|=r),Oe===4&&Fr(e,Fe)),at(e,n),r===1&&ne===0&&!(t.mode&1)&&(ii=Ee()+500,wl&&yn()))}function at(e,t){var r=e.callbackNode;Nx(e,t);var n=$a(e,e===Le?Fe:0);if(n===0)r!==null&&df(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&df(r),t===1)e.tag===0?Rb(np.bind(null,e)):Bg(np.bind(null,e)),kb(function(){!(ne&6)&&yn()}),r=null;else{switch(vg(n)){case 1:r=Cd;break;case 4:r=pg;break;case 16:r=La;break;case 536870912:r=mg;break;default:r=La}r=Fv(r,Av.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Av(e,t){if(Ca=-1,Ta=0,ne&6)throw Error(P(327));var r=e.callbackNode;if(Ds()&&e.callbackNode!==r)return null;var n=$a(e,e===Le?Fe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=el(e,n);else{t=n;var s=ne;ne|=2;var i=Lv();(Le!==e||Fe!==t)&&(ur=null,ii=Ee()+500,Vn(e,t));do try{Jb();break}catch(a){Iv(e,a)}while(!0);Ud(),Ya.current=i,ne=s,je!==null?t=0:(Le=null,Fe=0,t=Oe)}if(t!==0){if(t===2&&(s=Zc(e),s!==0&&(n=s,t=Tu(e,s))),t===1)throw r=ho,Vn(e,0),Fr(e,n),at(e,Ee()),r;if(t===6)Fr(e,n);else{if(s=e.current.alternate,!(n&30)&&!Gb(s)&&(t=el(e,n),t===2&&(i=Zc(e),i!==0&&(n=i,t=Tu(e,i))),t===1))throw r=ho,Vn(e,0),Fr(e,n),at(e,Ee()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(P(345));case 2:Tn(e,nt,ur);break;case 3:if(Fr(e,n),(n&130023424)===n&&(t=eh+500-Ee(),10<t)){if($a(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ye(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=au(Tn.bind(null,e,nt,ur),t);break}Tn(e,nt,ur);break;case 4:if(Fr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-Wt(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=Ee()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Kb(n/1960))-n,10<n){e.timeoutHandle=au(Tn.bind(null,e,nt,ur),n);break}Tn(e,nt,ur);break;case 5:Tn(e,nt,ur);break;default:throw Error(P(329))}}}return at(e,Ee()),e.callbackNode===r?Av.bind(null,e):null}function Tu(e,t){var r=Vi;return e.current.memoizedState.isDehydrated&&(Vn(e,t).flags|=256),e=el(e,t),e!==2&&(t=nt,nt=r,t!==null&&ju(t)),e}function ju(e){nt===null?nt=e:nt.push.apply(nt,e)}function Gb(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Ht(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fr(e,t){for(t&=~Zd,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Wt(t),n=1<<r;e[r]=-1,t&=~n}}function np(e){if(ne&6)throw Error(P(327));Ds();var t=$a(e,0);if(!(t&1))return at(e,Ee()),null;var r=el(e,t);if(e.tag!==0&&r===2){var n=Zc(e);n!==0&&(t=n,r=Tu(e,n))}if(r===1)throw r=ho,Vn(e,0),Fr(e,t),at(e,Ee()),r;if(r===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,nt,ur),at(e,Ee()),null}function th(e,t){var r=ne;ne|=1;try{return e(t)}finally{ne=r,ne===0&&(ii=Ee()+500,wl&&yn())}}function Jn(e){Yr!==null&&Yr.tag===0&&!(ne&6)&&Ds();var t=ne;ne|=1;var r=Tt.transition,n=oe;try{if(Tt.transition=null,oe=1,e)return e()}finally{oe=n,Tt.transition=r,ne=t,!(ne&6)&&yn()}}function rh(){ct=Ns.current,pe(Ns)}function Vn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Eb(r)),je!==null)for(r=je.return;r!==null;){var n=r;switch($d(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&za();break;case 3:ni(),pe(it),pe(Ke),Hd();break;case 5:Vd(n);break;case 4:ni();break;case 13:pe(ye);break;case 19:pe(ye);break;case 10:Fd(n.type._context);break;case 22:case 23:rh()}r=r.return}if(Le=e,je=e=an(e.current,null),Fe=ct=t,Oe=0,ho=null,Zd=Sl=Qn=0,nt=Vi=null,On!==null){for(t=0;t<On.length;t++)if(r=On[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}On=null}return e}function Iv(e,t){do{var r=je;try{if(Ud(),Sa.current=Ja,Qa){for(var n=we.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Qa=!1}if(Gn=0,Ie=Pe=we=null,Bi=!1,lo=0,Xd.current=null,r===null||r.return===null){Oe=1,ho=t,je=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Fe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=Vf(o);if(f!==null){f.flags&=-257,Hf(f,o,a,i,t),f.mode&1&&Wf(i,c,t),t=f,l=c;var w=t.updateQueue;if(w===null){var v=new Set;v.add(l),t.updateQueue=v}else w.add(l);break e}else{if(!(t&1)){Wf(i,c,t),nh();break e}l=Error(P(426))}}else if(ge&&a.mode&1){var x=Vf(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Hf(x,o,a,i,t),Dd(si(l,a));break e}}i=l=si(l,a),Oe!==4&&(Oe=2),Vi===null?Vi=[i]:Vi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=vv(i,l,t);Df(i,m);break e;case 1:a=l;var g=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(sn===null||!sn.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=yv(i,a,t);Df(i,_);break e}}i=i.return}while(i!==null)}Dv(r)}catch(E){t=E,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function Lv(){var e=Ya.current;return Ya.current=Ja,e===null?Ja:e}function nh(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Le===null||!(Qn&268435455)&&!(Sl&268435455)||Fr(Le,Fe)}function el(e,t){var r=ne;ne|=2;var n=Lv();(Le!==e||Fe!==t)&&(ur=null,Vn(e,t));do try{Qb();break}catch(s){Iv(e,s)}while(!0);if(Ud(),ne=r,Ya.current=n,je!==null)throw Error(P(261));return Le=null,Fe=0,Oe}function Qb(){for(;je!==null;)$v(je)}function Jb(){for(;je!==null&&!bx();)$v(je)}function $v(e){var t=Uv(e.alternate,e,ct);e.memoizedProps=e.pendingProps,t===null?Dv(e):je=t,Xd.current=null}function Dv(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Wb(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,je=null;return}}else if(r=Bb(r,t,ct),r!==null){je=r;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Oe===0&&(Oe=5)}function Tn(e,t,r){var n=oe,s=Tt.transition;try{Tt.transition=null,oe=1,Yb(e,t,r,n)}finally{Tt.transition=s,oe=n}return null}function Yb(e,t,r,n){do Ds();while(Yr!==null);if(ne&6)throw Error(P(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(P(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Px(e,i),e===Le&&(je=Le=null,Fe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||oa||(oa=!0,Fv(La,function(){return Ds(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Tt.transition,Tt.transition=null;var o=oe;oe=1;var a=ne;ne|=4,Xd.current=null,Hb(e,r),Pv(r,e),vb(iu),Da=!!su,iu=su=null,e.current=r,qb(r),_x(),ne=a,oe=o,Tt.transition=i}else e.current=r;if(oa&&(oa=!1,Yr=e,Za=s),i=e.pendingLanes,i===0&&(sn=null),kx(r.stateNode),at(e,Ee()),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(Xa)throw Xa=!1,e=ku,ku=null,e;return Za&1&&e.tag!==0&&Ds(),i=e.pendingLanes,i&1?e===Cu?Hi++:(Hi=0,Cu=e):Hi=0,yn(),null}function Ds(){if(Yr!==null){var e=vg(Za),t=Tt.transition,r=oe;try{if(Tt.transition=null,oe=16>e?16:e,Yr===null)var n=!1;else{if(e=Yr,Yr=null,Za=0,ne&6)throw Error(P(331));var s=ne;for(ne|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(M=c;M!==null;){var d=M;switch(d.tag){case 0:case 11:case 15:Wi(8,d,i)}var h=d.child;if(h!==null)h.return=d,M=h;else for(;M!==null;){d=M;var p=d.sibling,f=d.return;if(jv(d),d===c){M=null;break}if(p!==null){p.return=f,M=p;break}M=f}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Wi(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,M=m;break e}M=i.return}}var g=e.current;for(M=g;M!==null;){o=M;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,M=y;else e:for(o=g;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:_l(9,a)}}catch(E){Se(a,a.return,E)}if(a===o){M=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,M=_;break e}M=a.return}}if(ne=s,yn(),tr&&typeof tr.onPostCommitFiberRoot=="function")try{tr.onPostCommitFiberRoot(pl,e)}catch{}n=!0}return n}finally{oe=r,Tt.transition=t}}return!1}function sp(e,t,r){t=si(r,t),t=vv(e,t,1),e=nn(e,t,1),t=Ye(),e!==null&&(No(e,1,t),at(e,t))}function Se(e,t,r){if(e.tag===3)sp(e,e,r);else for(;t!==null;){if(t.tag===3){sp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(sn===null||!sn.has(n))){e=si(r,e),e=yv(t,e,1),t=nn(t,e,1),e=Ye(),t!==null&&(No(t,1,e),at(t,e));break}}t=t.return}}function Xb(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ye(),e.pingedLanes|=e.suspendedLanes&r,Le===e&&(Fe&r)===r&&(Oe===4||Oe===3&&(Fe&130023424)===Fe&&500>Ee()-eh?Vn(e,0):Zd|=r),at(e,t)}function Mv(e,t){t===0&&(e.mode&1?(t=Jo,Jo<<=1,!(Jo&130023424)&&(Jo=4194304)):t=1);var r=Ye();e=wr(e,t),e!==null&&(No(e,t,r),at(e,r))}function Zb(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Mv(e,r)}function e1(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(P(314))}n!==null&&n.delete(t),Mv(e,r)}var Uv;Uv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||it.current)st=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return st=!1,zb(e,t,r);st=!!(e.flags&131072)}else st=!1,ge&&t.flags&1048576&&Wg(t,Va,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ka(e,t),e=t.pendingProps;var s=ei(t,Ke.current);$s(t,r),s=Kd(null,t,n,e,s,r);var i=Gd();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,ot(n)?(i=!0,Ba(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Bd(t),s.updater=bl,t.stateNode=s,s._reactInternals=t,pu(t,n,e,r),t=vu(null,t,n,!0,i,r)):(t.tag=0,ge&&i&&Ld(t),Je(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=r1(n),e=$t(n,e),s){case 0:t=gu(null,t,n,e,r);break e;case 1:t=Gf(null,t,n,e,r);break e;case 11:t=qf(null,t,n,e,r);break e;case 14:t=Kf(null,t,n,$t(n.type,e),r);break e}throw Error(P(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),gu(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),Gf(e,t,n,s,r);case 3:e:{if(_v(t),e===null)throw Error(P(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Qg(e,t),Ka(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=si(Error(P(423)),t),t=Qf(e,t,n,r,s);break e}else if(n!==s){s=si(Error(P(424)),t),t=Qf(e,t,n,r,s);break e}else for(pt=rn(t.stateNode.containerInfo.firstChild),mt=t,ge=!0,Bt=null,r=Kg(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ti(),n===s){t=xr(e,t,r);break e}Je(e,t,n,r)}t=t.child}return t;case 5:return Jg(t),e===null&&du(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,ou(n,s)?o=null:i!==null&&ou(n,i)&&(t.flags|=32),bv(e,t),Je(e,t,o,r),t.child;case 6:return e===null&&du(t),null;case 13:return Sv(e,t,r);case 4:return Wd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ri(t,null,n,r):Je(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),qf(e,t,n,s,r);case 7:return Je(e,t,t.pendingProps,r),t.child;case 8:return Je(e,t,t.pendingProps.children,r),t.child;case 12:return Je(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,de(Ha,n._currentValue),n._currentValue=o,i!==null)if(Ht(i.value,o)){if(i.children===s.children&&!it.current){t=xr(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=gr(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),hu(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(P(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),hu(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Je(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,$s(t,r),s=jt(s),n=n(s),t.flags|=1,Je(e,t,n,r),t.child;case 14:return n=t.type,s=$t(n,t.pendingProps),s=$t(n.type,s),Kf(e,t,n,s,r);case 15:return wv(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),ka(e,t),t.tag=1,ot(n)?(e=!0,Ba(t)):e=!1,$s(t,r),gv(t,n,s),pu(t,n,s,r),vu(null,t,n,!0,e,r);case 19:return Ev(e,t,r);case 22:return xv(e,t,r)}throw Error(P(156,t.tag))};function Fv(e,t){return fg(e,t)}function t1(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 Ct(e,t,r,n){return new t1(e,t,r,n)}function sh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function r1(e){if(typeof e=="function")return sh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Sd)return 11;if(e===Ed)return 14}return 2}function an(e,t){var r=e.alternate;return r===null?(r=Ct(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 6,631 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ja(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")sh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xs:return Hn(r.children,s,i,t);case _d:o=8,s|=8;break;case Mc:return e=Ct(12,r,t,s|2),e.elementType=Mc,e.lanes=i,e;case Uc:return e=Ct(13,r,t,s),e.elementType=Uc,e.lanes=i,e;case Fc:return e=Ct(19,r,t,s),e.elementType=Fc,e.lanes=i,e;case Jm:return El(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Gm:o=10;break e;case Qm:o=9;break e;case Sd:o=11;break e;case Ed:o=14;break e;case $r:o=16,n=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Ct(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Hn(e,t,r,n){return e=Ct(7,e,n,t),e.lanes=r,e}function El(e,t,r,n){return e=Ct(22,e,n,t),e.elementType=Jm,e.lanes=r,e.stateNode={isHidden:!1},e}function vc(e,t,r){return e=Ct(6,e,null,t),e.lanes=r,e}function yc(e,t,r){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function n1(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=Xl(0),this.expirationTimes=Xl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xl(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ih(e,t,r,n,s,i,o,a,l){return e=new n1(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bd(i),e}function s1(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ws,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function zv(e){if(!e)return dn;e=e._reactInternals;e:{if(es(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var r=e.type;if(ot(r))return zg(e,r,t)}return t}function Bv(e,t,r,n,s,i,o,a,l){return e=ih(r,n,!0,e,s,i,o,a,l),e.context=zv(null),r=e.current,n=Ye(),s=on(r),i=gr(n,s),i.callback=t??null,nn(r,i,s),e.current.lanes=s,No(e,s,n),at(e,n),e}function kl(e,t,r,n){var s=t.current,i=Ye(),o=on(s);return r=zv(r),t.context===null?t.context=r:t.pendingContext=r,t=gr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=nn(s,t,o),e!==null&&(Vt(e,s,o,i),_a(e,s,o)),o}function tl(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 ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function oh(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function i1(){return null}var Wv=typeof reportError=="function"?reportError:function(e){console.error(e)};function ah(e){this._internalRoot=e}Cl.prototype.render=ah.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));kl(e,t,null,null)};Cl.prototype.unmount=ah.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jn(function(){kl(null,e,null,null)}),t[yr]=null}};function Cl(e){this._internalRoot=e}Cl.prototype.unstable_scheduleHydration=function(e){if(e){var t=xg();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ur.length&&t!==0&&t<Ur[r].priority;r++);Ur.splice(r,0,e),r===0&&_g(e)}};function lh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Tl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function op(){}function o1(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=tl(o);i.call(c)}}var o=Bv(t,n,e,0,null,!1,!1,"",op);return e._reactRootContainer=o,e[yr]=o.current,no(e.nodeType===8?e.parentNode:e),Jn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=tl(l);a.call(c)}}var l=ih(e,0,!1,null,null,!1,!1,"",op);return e._reactRootContainer=l,e[yr]=l.current,no(e.nodeType===8?e.parentNode:e),Jn(function(){kl(t,l,r,n)}),l}function jl(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=tl(o);a.call(l)}}kl(t,o,e,s)}else o=o1(r,t,e,s,n);return tl(o)}yg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ai(t.pendingLanes);r!==0&&(Td(t,r|1),at(t,Ee()),!(ne&6)&&(ii=Ee()+500,yn()))}break;case 13:Jn(function(){var n=wr(e,1);if(n!==null){var s=Ye();Vt(n,e,1,s)}}),oh(e,1)}};jd=function(e){if(e.tag===13){var t=wr(e,134217728);if(t!==null){var r=Ye();Vt(t,e,134217728,r)}oh(e,134217728)}};wg=function(e){if(e.tag===13){var t=on(e),r=wr(e,t);if(r!==null){var n=Ye();Vt(r,e,t,n)}oh(e,t)}};xg=function(){return oe};bg=function(e,t){var r=oe;try{return oe=e,t()}finally{oe=r}};Jc=function(e,t,r){switch(t){case"input":if(Wc(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=yl(n);if(!s)throw Error(P(90));Xm(n),Wc(n,s)}}}break;case"textarea":eg(e,r);break;case"select":t=r.value,t!=null&&Os(e,!!r.multiple,t,!1)}};ag=th;lg=Jn;var a1={usingClientEntryPoint:!1,Events:[Oo,Es,yl,ig,og,th]},ji={findFiberByHostInstance:Pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},l1={bundleType:ji.bundleType,version:ji.version,rendererPackageName:ji.rendererPackageName,rendererConfig:ji.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dg(e),e===null?null:e.stateNode},findFiberByHostInstance:ji.findFiberByHostInstance||i1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var aa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!aa.isDisabled&&aa.supportsFiber)try{pl=aa.inject(l1),tr=aa}catch{}}wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=a1;wt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lh(t))throw Error(P(200));return s1(e,t,null,r)};wt.createRoot=function(e,t){if(!lh(e))throw Error(P(299));var r=!1,n="",s=Wv;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ih(e,1,!1,null,null,r,!1,n,s),e[yr]=t.current,no(e.nodeType===8?e.parentNode:e),new ah(t)};wt.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(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=dg(t),e=e===null?null:e.stateNode,e};wt.flushSync=function(e){return Jn(e)};wt.hydrate=function(e,t,r){if(!Tl(t))throw Error(P(200));return jl(null,e,t,!0,r)};wt.hydrateRoot=function(e,t,r){if(!lh(e))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Wv;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Bv(t,null,e,1,r??null,s,!1,i,o),e[yr]=t.current,no(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Cl(t)};wt.render=function(e,t,r){if(!Tl(t))throw Error(P(200));return jl(null,e,t,!1,r)};wt.unmountComponentAtNode=function(e){if(!Tl(e))throw Error(P(40));return e._reactRootContainer?(Jn(function(){jl(null,null,e,!1,function(){e._reactRootContainer=null,e[yr]=null})}),!0):!1};wt.unstable_batchedUpdates=th;wt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Tl(r))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return jl(e,t,r,!1,n)};wt.version="18.3.1-next-f1338f8080-20240426";function Vv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vv)}catch(e){console.error(e)}}Vv(),Vm.exports=wt;var Io=Vm.exports;const Hv=Pm(Io);var qv,ap=Io;qv=ap.createRoot,ap.hydrateRoot;const c1=1,u1=1e6;let wc=0;function d1(){return wc=(wc+1)%Number.MAX_SAFE_INTEGER,wc.toString()}const xc=new Map,lp=e=>{if(xc.has(e))return;const t=setTimeout(()=>{xc.delete(e),qi({type:"REMOVE_TOAST",toastId:e})},u1);xc.set(e,t)},h1=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,c1)};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;return r?lp(r):e.toasts.forEach(n=>{lp(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,576 bytes, line 40
40n.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)}}},Ra=[];let Na={toasts:[]};function qi(e){Na=h1(Na,e),Ra.forEach(t=>{t(Na)})}function f1({...e}){const t=d1(),r=s=>qi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>qi({type:"DISMISS_TOAST",toastId:t});return qi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Kv(){const[e,t]=b.useState(Na);return b.useEffect(()=>(Ra.push(t),()=>{const r=Ra.indexOf(t);r>-1&&Ra.splice(r,1)}),[e]),{...e,toast:f1,dismiss:r=>qi({type:"DISMISS_TOAST",toastId:r})}}function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function cp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gv(...e){return t=>{let r=!1;const n=e.map(s=>{const i=cp(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():cp(e[s],null)}}}}function Ae(...e){return b.useCallback(Gv(...e),e)}function di(e,t=[]){let r=[];function n(i,o){const a=b.createContext(o),l=r.length;r=[...r,o];const c=h=>{var m;const{scope:p,children:f,...w}=h,v=((m=p==null?void 0:p[e])==null?void 0:m[l])||a,x=b.useMemo(()=>w,Object.values(w));return u.jsx(v.Provider,{value:x,children:f})};c.displayName=i+"Provider";function d(h,p){var v;const f=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,w=b.useContext(f);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[c,d]}const s=()=>{const i=r.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,p1(s,...t)]}function p1(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const h=l(i)[`__scope${c}`];return{...a,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function rl(e){const t=g1(e),r=b.forwardRef((n,s)=>{const{children:i,...o}=n,a=b.Children.toArray(i),l=a.find(y1);if(l){const c=l.props.children,d=a.map(h=>h===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:h);return u.jsx(t,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,d):null})}return u.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var m1=rl("Slot");function g1(e){const t=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const o=x1(s),a=w1(i,s.props);return s.type!==b.Fragment&&(a.ref=n?Gv(n,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qv=Symbol("radix.slottable");function v1(e){const t=({children:r})=>u.jsx(u.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Qv,t}function y1(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qv}function w1(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function x1(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 Jv(e){const t=e+"CollectionProvider",[r,n]=di(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:x,children:m}=v,g=A.useRef(null),y=A.useRef(new Map).current;return u.jsx(s,{scope:x,itemMap:y,collectionRef:g,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=rl(a),c=A.forwardRef((v,x)=>{const{scope:m,children:g}=v,y=i(a,m),_=Ae(x,y.collectionRef);return u.jsx(l,{ref:_,children:g})});c.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=rl(d),f=A.forwardRef((v,x)=>{const{scope:m,children:g,...y}=v,_=A.useRef(null),E=Ae(x,_),k=i(d,m);return A.useEffect(()=>(k.itemMap.set(_,{ref:_,...y}),()=>void k.itemMap.delete(_))),u.jsx(p,{[h]:"",ref:E,children:g})});f.displayName=d;function w(v){const x=i(e+"CollectionConsumer",v);return A.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((k,C)=>y.indexOf(k.ref.current)-y.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},w,n]}var b1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=b1.reduce((e,t)=>{const r=rl(`Primitive.${t}`),n=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Yv(e,t){e&&Io.flushSync(()=>e.dispatchEvent(t))}function hn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _1(e,t=globalThis==null?void 0:globalThis.document){const r=hn(e);b.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 S1="DismissableLayer",Ru="dismissableLayer.update",E1="dismissableLayer.pointerDownOutside",k1="dismissableLayer.focusOutside",up,Xv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ch=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=b.useContext(Xv),[d,h]=b.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),w=Ae(t,C=>h(C)),v=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=v.indexOf(x),g=d?v.indexOf(d):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,_=g>=m,E=T1(C=>{const j=C.target,O=[...c.branches].some(N=>N.contains(j));!_||O||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},p),k=j1(C=>{const j=C.target;[...c.branches].some(N=>N.contains(j))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},p);return _1(C=>{g===c.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},p),b.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(up=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),dp(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=up)}},[d,p,r,c]),b.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),dp())},[d,c]),b.useEffect(()=>{const C=()=>f({});return document.addEventListener(Ru,C),()=>document.removeEventListener(Ru,C)},[]),u.jsx(ke.div,{...l,ref:w,style:{pointerEvents:y?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,E.onPointerDownCapture)})});ch.displayName=S1;var C1="DismissableLayerBranch",Zv=b.forwardRef((e,t)=>{const r=b.useContext(Xv),n=b.useRef(null),s=Ae(t,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),u.jsx(ke.div,{...e,ref:s})});Zv.displayName=C1;function T1(e,t=globalThis==null?void 0:globalThis.document){const r=hn(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){ey(E1,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function j1(e,t=globalThis==null?void 0:globalThis.document){const r=hn(e),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&ey(k1,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function dp(){const e=new CustomEvent(Ru);document.dispatchEvent(e)}function ey(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Yv(s,i):s.dispatchEvent(i)}var R1=ch,N1=Zv,fn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},P1="Portal",ty=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=b.useState(!1);fn(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Hv.createPortal(u.jsx(ke.div,{...n,ref:t}),o):null});ty.displayName=P1;function O1(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var uh=e=>{const{present:t,children:r}=e,n=A1(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=Ae(n.ref,I1(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}):null};uh.displayName="Presence";function A1(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=O1(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=la(n.current);i.current=a==="mounted"?c:"none"},[a]),fn(()=>{const c=n.current,d=s.current;if(d!==e){const p=i.current,f=la(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),fn(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=f=>{const v=la(n.current).includes(f.animationName);if(f.target===t&&v&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=f=>{f.target===t&&(i.current=la(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function la(e){return(e==null?void 0:e.animationName)||"none"}function I1(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 L1=Bm[" useInsertionEffect ".trim().toString()]||fn;function dh({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=$1({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const d=b.useRef(e!==void 0);b.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=b.useCallback(d=>{var h;if(a){const p=D1(d)?d(e):d;p!==e&&((h=o.current)==null||h.call(o,p))}else i(d)},[a,e,i,o]);return[l,c]}function $1({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),i=b.useRef(t);return L1(()=>{i.current=t},[t]),b.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function D1(e){return typeof e=="function"}var M1=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"}),U1="VisuallyHidden",Rl=b.forwardRef((e,t)=>u.jsx(ke.span,{...e,ref:t,style:{...M1,...e.style}}));Rl.displayName=U1;var F1=Rl,hh="ToastProvider",[fh,z1,B1]=Jv("Toast"),[ry,KN]=di("Toast",[B1]),[W1,Nl]=ry(hh),ny=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[c,d]=b.useState(0),h=b.useRef(!1),p=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${hh}\`. Expected non-empty \`string\`.`),u.jsx(fh.Provider,{scope:t,children:u.jsx(W1,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>d(f=>f+1),[]),onToastRemove:b.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};ny.displayName=hh;var sy="ToastViewport",V1=["F8"],Nu="toast.viewportPause",Pu="toast.viewportResume",iy=b.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=V1,label:s="Notifications ({hotkey})",...i}=e,o=Nl(sy,r),a=z1(r),l=b.useRef(null),c=b.useRef(null),d=b.useRef(null),h=b.useRef(null),p=Ae(t,h,o.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;b.useEffect(()=>{const x=m=>{var y;n.length!==0&&n.every(_=>m[_]||m.code===_)&&((y=h.current)==null||y.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),b.useEffect(()=>{const x=l.current,m=h.current;if(w&&x&&m){const g=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Nu);m.dispatchEvent(k),o.isClosePausedRef.current=!0}},y=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(Pu);m.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&y()},E=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",g),x.addEventListener("focusout",_),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",E),window.addEventListener("blur",g),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",g),window.removeEventListener("focus",y)}}},[w,o.isClosePausedRef]);const v=b.useCallback(({tabbingDirection:x})=>{const g=a().map(y=>{const _=y.ref.current,E=[_,...n_(_)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?g.reverse():g).flat()},[a]);return b.useEffect(()=>{const x=h.current;if(x){const m=g=>{var E,k,C;const y=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!y){const j=document.activeElement,O=g.shiftKey;if(g.target===x&&O){(E=c.current)==null||E.focus();return}const I=v({tabbingDirection:O?"backwards":"forwards"}),W=I.findIndex(L=>L===j);bc(I.slice(W+1))?g.preventDefault():O?(k=c.current)==null||k.focus():(C=d.current)==null||C.focus()}};return x.addEventListener("keydown",m),()=>x.removeEventListener("keydown",m)}},[a,v]),u.jsxs(N1,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&u.jsx(Ou,{ref:c,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});bc(x)}}),u.jsx(fh.Slot,{scope:r,children:u.jsx(ke.ol,{tabIndex:-1,...i,ref:p})}),w&&u.jsx(Ou,{ref:d,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});bc(x)}})]})});iy.displayName=sy;var oy="ToastFocusProxy",Ou=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Nl(oy,r);return u.jsx(Rl,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});Ou.displayName=oy;var Lo="Toast",H1="toast.swipeStart",q1="toast.swipeMove",K1="toast.swipeCancel",G1="toast.swipeEnd",ay=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=dh({prop:n,defaultProp:s??!0,onChange:i,caller:Lo});return u.jsx(uh,{present:r||a,children:u.jsx(Y1,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:hn(e.onPause),onResume:hn(e.onResume),onSwipeStart:ue(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,c=>{const{x:d,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:ue(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,c=>{const{x:d,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});ay.displayName=Lo;var[Q1,J1]=ry(Lo,{onClose(){}}),Y1=b.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...w}=e,v=Nl(Lo,r),[x,m]=b.useState(null),g=Ae(t,L=>m(L)),y=b.useRef(null),_=b.useRef(null),E=s||v.duration,k=b.useRef(0),C=b.useRef(E),j=b.useRef(0),{onToastAdd:O,onToastRemove:N}=v,D=hn(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=v.viewport)==null||Y.focus()),o()}),I=b.useCallback(L=>{!L||L===1/0||(window.clearTimeout(j.current),k.current=new Date().getTime(),j.current=window.setTimeout(D,L))},[D]);b.useEffect(()=>{const L=v.viewport;if(L){const Y=()=>{I(C.current),c==null||c()},B=()=>{const q=new Date().getTime()-k.current;C.current=C.current-q,window.clearTimeout(j.current),l==null||l()};return L.addEventListener(Nu,B),L.addEventListener(Pu,Y),()=>{L.removeEventListener(Nu,B),L.removeEventListener(Pu,Y)}}},[v.viewport,E,l,c,I]),b.useEffect(()=>{i&&!v.isClosePausedRef.current&&I(E)},[i,E,v.isClosePausedRef,I]),b.useEffect(()=>(O(),()=>N()),[O,N]);const W=b.useMemo(()=>x?py(x):null,[x]);return v.viewport?u.jsxs(u.Fragment,{children:[W&&u.jsx(X1,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),u.jsx(Q1,{scope:r,onClose:D,children:Io.createPortal(u.jsx(fh.ItemSlot,{scope:r,children:u.jsx(R1,{asChild:!0,onEscapeKeyDown:ue(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||D(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":v.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:ue(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:ue(e.onPointerMove,L=>{if(!y.current)return;const Y=L.clientX-y.current.x,B=L.clientY-y.current.y,q=!!_.current,T=["left","right"].includes(v.swipeDirection),R=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,$=T?R(0,Y):0,Q=T?0:R(0,B),z=L.pointerType==="touch"?10:2,X={x:$,y:Q},ee={originalEvent:L,delta:X};q?(_.current=X,ca(q1,h,ee,{discrete:!1})):hp(X,v.swipeDirection,z)?(_.current=X,ca(H1,d,ee,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Y)>z||Math.abs(B)>z)&&(y.current=null)}),onPointerUp:ue(e.onPointerUp,L=>{const Y=_.current,B=L.target;if(B.hasPointerCapture(L.pointerId)&&B.releasePointerCapture(L.pointerId),_.current=null,y.current=null,Y){const q=L.currentTarget,T={originalEvent:L,delta:Y};hp(Y,v.swipeDirection,v.swipeThreshold)?ca(G1,f,T,{discrete:!0}):ca(K1,p,T,{discrete:!0}),q.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),X1=e=>{const{__scopeToast:t,children:r,...n}=e,s=Nl(Lo,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return t_(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(ty,{asChild:!0,children:u.jsx(Rl,{...n,children:i&&u.jsxs(u.Fragment,{children:[s.label," ",r]})})})},Z1="ToastTitle",ly=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(ke.div,{...n,ref:t})});ly.displayName=Z1;var e_="ToastDescription",cy=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(ke.div,{...n,ref:t})});cy.displayName=e_;var uy="ToastAction",dy=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(fy,{altText:r,asChild:!0,children:u.jsx(ph,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${uy}\`. Expected non-empty \`string\`.`),null)});dy.displayName=uy;var hy="ToastClose",ph=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=J1(hy,r);return u.jsx(fy,{asChild:!0,children:u.jsx(ke.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,s.onClose)})})});ph.displayName=hy;var fy=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return u.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function py(e){const t=[];
vendor: 6,033 bytes, lines 40-94
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),r_(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...py(n))}}),t}function ca(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Yv(s,i):s.dispatchEvent(i)}var hp=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function t_(e=()=>{}){const t=hn(e);fn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function r_(e){return e.nodeType===e.ELEMENT_NODE}function n_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function bc(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var s_=ny,my=iy,gy=ay,vy=ly,yy=cy,wy=dy,xy=ph;function by(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=by(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function _y(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=by(e))&&(n&&(n+=" "),n+=t);return n}const fp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pp=_y,Sy=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return pp(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const d=r==null?void 0:r[c],h=i==null?void 0:i[c];if(d===null)return null;const p=fp(d)||fp(h);return s[c][p]}),a=r&&Object.entries(r).reduce((c,d)=>{let[h,p]=d;return p===void 0||(c[h]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(w=>{let[v,x]=w;return Array.isArray(x)?x.includes({...i,...a}[v]):{...i,...a}[v]===x})?[...c,h,p]:c},[]);return pp(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const i_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ey=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var o_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const a_=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...o_,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ey("lucide",s),...a},[...o.map(([c,d])=>b.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const le=(e,t)=>{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(a_,{ref:i,iconNode:t,className:Ey(`lucide-${i_(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const l_=le("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const mh=le("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const c_=le("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const ky=le("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const gh=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const u_=le("Contrast",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const d_=le("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const mp=le("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const h_=le("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const f_=le("Focus",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const p_=le("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const m_=le("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const g_=le("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Cy=le("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const Ty=le("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const vh=le("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const v_=le("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const y_=le("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const yh=le("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const w_=le("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const x_=le("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const jy=le("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const b_=le("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const __=le("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const _c=le("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const S_=le("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const wh=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,223 bytes, line 195
195],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xh="-",E_=e=>{const t=C_(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(xh);return a[0]===""&&a.length!==1&&a.shift(),Ry(a,t)||k_(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Ry=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Ry(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(xh);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},gp=/^\[(.+)\]$/,k_=e=>{if(gp.test(e)){const t=gp.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},C_=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return j_(Object.entries(e.classGroups),r).forEach(([i,o])=>{Au(o,n,i,t)}),n},Au=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:vp(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(T_(s)){Au(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Au(o,vp(t,i),r,n)})})},vp=(e,t)=>{let r=e;return t.split(xh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},T_=e=>e.isThemeGetter,j_=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,R_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},Ny="!",N_=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,d=0,h;for(let x=0;x<a.length;x++){let m=a[x];if(c===0){if(m===s&&(n||a.slice(x,x+i)===t)){l.push(a.slice(d,x)),d=x+i;continue}if(m==="/"){h=x;continue}}m==="["?c++:m==="]"&&c--}const p=l.length===0?a:a.substring(d),f=p.startsWith(Ny),w=f?p.substring(1):p,v=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:o}):o},P_=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},O_=e=>({cache:R_(e.cacheSize),parseClassName:N_(e),...E_(e)}),A_=/\s+/,I_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(A_);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(c);let w=!!f,v=n(w?p.substring(0,f):p);if(!v){if(!w){a=c+(a.length>0?" "+a:a);continue}if(v=n(p),!v){a=c+(a.length>0?" "+a:a);continue}w=!1}const x=P_(d).join(":"),m=h?x+Ny:x,g=m+v;if(i.includes(g))continue;i.push(g);const y=s(v,w);for(let _=0;_<y.length;++_){const E=y[_];i.push(m+E)}a=c+(a.length>0?" "+a:a)}return a};function L_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Py(t))&&(n&&(n+=" "),n+=r);return n}const Py=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Py(e[n]))&&(r&&(r+=" "),r+=t);return r};function $_(e,...t){let r,n,s,i=o;function o(l){const c=t.reduce((d,h)=>h(d),e());return r=O_(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=I_(l,r);return s(l,d),d}return function(){return i(L_.apply(null,arguments))}}const he=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Oy=/^\[(?:([a-z-]+):)?(.+)\]$/i,D_=/^\d+\/\d+$/,M_=new Set(["px","full","screen"]),U_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F_=/\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))\(.+\)$/,B_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=e=>Ms(e)||M_.has(e)||D_.test(e),Or=e=>hi(e,"length",Y_),Ms=e=>!!e&&!Number.isNaN(Number(e)),Sc=e=>hi(e,"number",Ms),Ri=e=>!!e&&Number.isInteger(Number(e)),V_=e=>e.endsWith("%")&&Ms(e.slice(0,-1)),J=e=>Oy.test(e),Ar=e=>U_.test(e),H_=new Set(["length","size","percentage"]),q_=e=>hi(e,H_,Ay),K_=e=>hi(e,"position",Ay),G_=new Set(["image","url"]),Q_=e=>hi(e,G_,Z_),J_=e=>hi(e,"",X_),Ni=()=>!0,hi=(e,t,r)=>{const n=Oy.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Y_=e=>F_.test(e)&&!z_.test(e),Ay=()=>!1,X_=e=>B_.test(e),Z_=e=>W_.test(e),eS=()=>{const e=he("colors"),t=he("spacing"),r=he("blur"),n=he("brightness"),s=he("borderColor"),i=he("borderRadius"),o=he("borderSpacing"),a=he("borderWidth"),l=he("contrast"),c=he("grayscale"),d=he("hueRotate"),h=he("invert"),p=he("gap"),f=he("gradientColorStops"),w=he("gradientColorStopPositions"),v=he("inset"),x=he("margin"),m=he("opacity"),g=he("padding"),y=he("saturate"),_=he("scale"),E=he("sepia"),k=he("skew"),C=he("space"),j=he("translate"),O=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",J,t],I=()=>[J,t],W=()=>["",ar,Or],L=()=>["auto",Ms,J],Y=()=>["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"],T=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",J],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ms,J];return{cacheSize:500,separator:":",theme:{colors:[Ni],spacing:[ar,Or],blur:["none","",Ar,J],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Ar,J],borderSpacing:I(),borderWidth:W(),contrast:Q(),grayscale:R(),hueRotate:Q(),invert:R(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[V_,Or],inset:D(),margin:D(),opacity:Q(),padding:I(),saturate:Q(),scale:Q(),sepia:R(),skew:Q(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[Ar]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...Y(),J]}],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:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ri,J]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Ri,J]}],"grid-cols":[{"grid-cols":[Ni]}],"col-start-end":[{col:["auto",{span:["full",Ri,J]},J]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Ni]}],"row-start-end":[{row:["auto",{span:[Ri,J]},J]}],"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",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[Ar]},Ar]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ar,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Sc]}],"font-family":[{font:[Ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",Ms,Sc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ar,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ar,Or]}],"underline-offset":[{"underline-offset":["auto",ar,J]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),K_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",q_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Q_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
vendor: 5,172 bytes, line 195
195],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...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":[m]}],"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":[ar,J]}],"outline-w":[{outline:[ar,Or]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ar,Or]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ar,J_]}],"shadow-color":[{shadow:[Ni]}],opacity:[{opacity:[m]}],"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",Ar,J]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[y]}],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":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Ri,J]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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 195
195],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ar,Or,Sc]}],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"]}}},tS=$_(eS);function yt(...e){return tS(_y(e))}const rS=s_,Iy=b.forwardRef(({className:e,...t},r)=>u.jsx(my,{ref:r,className:yt("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}));Iy.displayName=my.displayName;const nS=Sy("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"}}),Ly=b.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(gy,{ref:n,className:yt(nS({variant:t}),e),...r}));Ly.displayName=gy.displayName;const sS=b.forwardRef(({className:e,...t},r)=>u.jsx(wy,{ref:r,className:yt("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}));sS.displayName=wy.displayName;const $y=b.forwardRef(({className:e,...t},r)=>u.jsx(xy,{ref:r,className:yt("absolute right-2 top-2 rounded-md p-1 text-foreground
195/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:u.jsx(wh,{className:"h-4 w-4"})}));$y.displayName=xy.displayName;const Dy=b.forwardRef(({className:e,...t},r)=>u.jsx(vy,{ref:r,className:yt("text-sm font-semibold",e),...t}));Dy.displayName=vy.displayName;const My=b.forwardRef(({className:e,...t},r)=>u.jsx(yy,{ref:r,className:yt("text-sm opacity-90",e),...t}));My.displayName=yy.displayName;function iS(){const{toasts:e}=Kv();return u.jsxs(rS,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return u.jsxs(Ly,{...i,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(Dy,{children:r}),n&&u.jsx(My,{children:n})]}),s,u.jsx($y,{})]},t)}),u.jsx(Iy,{})]})}var yp=["light","dark"],oS="(prefers-color-scheme: dark)",aS=b.createContext(void 0),lS={setTheme:e=>{},themes:[]},cS=()=>{var e;return(e=b.useContext(aS))!=null?e:lS};b.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?yp.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(w,v=!1,x=!0)=>{let m=o?o[w]:w,g=v?w+"|| ''":`'${m}'`,y="";return s&&x&&!v&&yp.includes(w)&&(y+=`d.style.colorScheme = '${w}';`),r==="class"?v||m?y+=`c.add(${g})`:y+="null":m&&(y+=`d[s](n,${g})`),y},f=e?`!function(){${d}${p(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${oS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var uS=e=>{switch(e){case"success":return fS;case"info":return mS;case"warning":return pS;case"error":return gS;default:return null}},dS=Array(12).fill(0),hS=({visible:e,className:t})=>A.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},A.createElement("div",{className:"sonner-spinner"},dS.map((r,n)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),fS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yS=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Iu=1,wS=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 195
195{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:Iu++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
195this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],A.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(bS(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:d})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));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)||Iu++;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}},tt=new wS,xS=(e,t)=>{let r=(t==null?void 0:t.id)||Iu++;return tt.addToast({title:e,...t,id:r}),r},bS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_S=xS,SS=()=>tt.toasts,ES=()=>tt.getActiveToasts();Object.assign(_S,{success:tt.success,info:tt.info,warning:tt.warning,error:tt.error,custom:tt.custom,message:tt.message,promise:tt.promise,dismiss:tt.dismiss,loading:tt.loading},{getHistory:SS,getToasts:ES});function kS(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))}kS(`: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;
195left: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}
195: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%);
195--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%)}
196`);function ua(e){return e.label!==void 0}var CS=3,TS="32px",jS="16px",wp=4e3,RS=356,NS=14,PS=20,OS=200;function It(...e){return e.filter(Boolean).join(" ")}function AS(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var IS=e=>{var t,r,n,s,i,o,a,l,c,d,h;let{invert:p,toast:f,unstyled:w,interacting:v,setHeights:x,visibleToasts:m,heights:g,index:y,toasts:_,expanded:E,removeToast:k,defaultRichColors:C,closeButton:j,style:O,cancelButtonStyle:N,actionButtonStyle:D,className:I="",descriptionClassName:W="",duration:L,position:Y,gap:B,loadingIcon:q,expandByDefault:T,classNames:R,icons:$,closeButtonAriaLabel:Q="Close toast",pauseWhenPageIsHidden:z}=e,[X,ee]=A.useState(null),[Ce,Be]=A.useState(null),[se,ns]=A.useState(!1),[kr,xn]=A.useState(!1),[Cr,ss]=A.useState(!1),[Tr,zo]=A.useState(!1),[Bl,Bo]=A.useState(!1),[Wl,wi]=A.useState(0),[is,Hh]=A.useState(0),xi=A.useRef(f.duration||L||wp),qh=A.useRef(null),bn=A.useRef(null),jw=y===0,Rw=y+1<=m,bt=f.type,os=f.dismissible!==!1,Nw=f.className||"",Pw=f.descriptionClassName||"",Wo=A.useMemo(()=>g.findIndex(G=>G.toastId===f.id)||0,[g,f.id]),Ow=A.useMemo(()=>{var G;return(G=f.closeButton)!=null?G:j},[f.closeButton,j]),Kh=A.useMemo(()=>f.duration||L||wp,[f.duration,L]),Vl=A.useRef(0),as=A.useRef(0),Gh=A.useRef(0),ls=A.useRef(null),[Aw,Iw]=Y.split("-"),Qh=A.useMemo(()=>g.reduce((G,ae,me)=>me>=Wo?G:G+ae.height,0),[g,Wo]),Jh=yS(),Lw=f.invert||p,Hl=bt==="loading";as.current=A.useMemo(()=>Wo*B+Qh,[Wo,Qh]),A.useEffect(()=>{xi.current=Kh},[Kh]),A.useEffect(()=>{ns(!0)},[]),A.useEffect(()=>{let G=bn.current;if(G){let ae=G.getBoundingClientRect().height;return Hh(ae),x(me=>[{toastId:f.id,height:ae,position:f.position},...me]),()=>x(me=>me.filter(Nt=>Nt.toastId!==f.id))}},[x,f.id]),A.useLayoutEffect(()=>{if(!se)return;let G=bn.current,ae=G.style.height;G.style.height="auto";let me=G.getBoundingClientRect().height;G.style.height=ae,Hh(me),x(Nt=>Nt.find(Pt=>Pt.toastId===f.id)?Nt.map(Pt=>Pt.toastId===f.id?{...Pt,height:me}:Pt):[{toastId:f.id,height:me,position:f.position},...Nt])},[se,f.title,f.description,x,f.id]);let jr=A.useCallback(()=>{xn(!0),wi(as.current),x(G=>G.filter(ae=>ae.toastId!==f.id)),setTimeout(()=>{k(f)},OS)},[f,k,x,as]);A.useEffect(()=>{if(f.promise&&bt==="loading"||f.duration===1/0||f.type==="loading")return;let G;return E||v||z&&Jh?(()=>{if(Gh.current<Vl.current){let ae=new Date().getTime()-Vl.current;xi.current=xi.current-ae}
196Gh.current=new Date().getTime()})():xi.current!==1/0&&(Vl.current=new Date().getTime(),G=setTimeout(()=>{var ae;(ae=f.onAutoClose)==null||ae.call(f,f),jr()},xi.current)),()=>clearTimeout(G)},[E,v,f,bt,z,Jh,jr]),A.useEffect(()=>{f.delete&&jr()},[jr,f.delete]);function $w(){var G,ae,me;return $!=null&&$.loading?A.createElement("div",{className:It(R==null?void 0:R.loader,(G=f==null?void 0:f.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":bt==="loading"},$.loading):q?A.createElement("div",{className:It(R==null?void 0:R.loader,(ae=f==null?void 0:f.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":bt==="loading"},q):A.createElement(hS,{className:It(R==null?void 0:R.loader,(me=f==null?void 0:f.classNames)==null?void 0:me.loader),visible:bt==="loading"})}return A.createElement("li",{tabIndex:0,ref:bn,className:It(I,Nw,R==null?void 0:R.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[bt],(r=f==null?void 0:f.classNames)==null?void 0:r[bt]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:C,"data-styled":!(f.jsx||f.unstyled||w),"data-mounted":se,"data-promise":!!f.promise,"data-swiped":Bl,"data-removed":kr,"data-visible":Rw,"data-y-position":Aw,"data-x-position":Iw,"data-index":y,"data-front":jw,"data-swiping":Cr,"data-dismissible":os,"data-type":bt,"data-invert":Lw,"data-swipe-out":Tr,"data-swipe-direction":Ce,"data-expanded":!!(E||T&&se),style:{"--index":y,"--toasts-before":y,"--z-index":_.length-y,"--offset":`${kr?Wl:as.current}px`,"--initial-height":T?"auto":`${is}px`,...O,...f.style},onDragEnd:()=>{ss(!1),ee(null),ls.current=null},onPointerDown:G=>{Hl||!os||(qh.current=new Date,wi(as.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(ss(!0),ls.current={x:G.clientX,y:G.clientY}))},onPointerUp:()=>{var G,ae,me,Nt;if(Tr||!os)return;ls.current=null;let Pt=Number(((G=bn.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rr=Number(((ae=bn.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),_n=new Date().getTime()-((me=qh.current)==null?void 0:me.getTime()),Ot=X==="x"?Pt:Rr,Nr=Math.abs(Ot)/_n;if(Math.abs(Ot)>=PS||Nr>.11){wi(as.current),(Nt=f.onDismiss)==null||Nt.call(f,f),Be(X==="x"?Pt>0?"right":"left":Rr>0?"down":"up"),jr(),zo(!0),Bo(!1);return}ss(!1),ee(null)},onPointerMove:G=>{var ae,me,Nt,Pt;if(!ls.current||!os||((ae=window.getSelection())==null?void 0:ae.toString().length)>0)return;let Rr=G.clientY-ls.current.y,_n=G.clientX-ls.current.x,Ot=(me=e.swipeDirections)!=null?me:AS(Y);!X&&(Math.abs(_n)>1||Math.abs(Rr)>1)&&ee(Math.abs(_n)>Math.abs(Rr)?"x":"y");let Nr={x:0,y:0};X==="y"?(Ot.includes("top")||Ot.includes("bottom"))&&(Ot.includes("top")&&Rr<0||Ot.includes("bottom")&&Rr>0)&&(Nr.y=Rr):X==="x"&&(Ot.includes("left")||Ot.includes("right"))&&(Ot.includes("left")&&_n<0||Ot.includes("right")&&_n>0)&&(Nr.x=_n),(Math.abs(Nr.x)>0||Math.abs(Nr.y)>0)&&Bo(!0),(Nt=bn.current)==null||Nt.style.setProperty("--swipe-amount-x",`${Nr.x}px`),(Pt=bn.current)==null||Pt.style.setProperty("--swipe-amount-y",`${Nr.y}px`)}},Ow&&!f.jsx?A.createElement("button",{"aria-label":Q,"data-disabled":Hl,"data-close-button":!0,onClick:Hl||!os?()=>{}:()=>{var G;jr(),(G=f.onDismiss)==null||G.call(f,f)},className:It(R==null?void 0:R.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:vS):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:A.createElement(A.Fragment,null,bt||f.icon||f.promise?A.createElement("div",{"data-icon":"",className:It(R==null?void 0:R.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||$w():null,f.type!=="loading"?f.icon||($==null?void 0:$[bt])||uS(bt):null):null,A.createElement("div",{"data-content":"",className:It(R==null?void 0:R.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},A.createElement("div",{"data-title":"",className:It(R==null?void 0:R.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?A.createElement("div",{"data-description":"",className:It(W,Pw,R==null?void 0:R.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&ua(f.cancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||N,onClick:G=>{var ae,me;ua(f.cancel)&&os&&((me=(ae=f.cancel).onClick)==null||me.call(ae,G),jr())},className:It(R==null?void 0:R.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&ua(f.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:G=>{var ae,me;ua(f.action)&&((me=(ae=f.action).onClick)==null||me.call(ae,G),!G.defaultPrevented&&jr())},className:It(R==null?void 0:R.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function xp(){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 LS(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?jS:TS;function l(c){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=a:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var $S=b.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:h,duration:p,style:f,visibleToasts:w=CS,toastOptions:v,dir:x=xp(),gap:m=NS,loadingIcon:g,icons:y,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:E}=e,[k,C]=A.useState([]),j=A.useMemo(()=>Array.from(new Set([n].concat(k.filter(z=>z.position).map(z=>z.position)))),[k,n]),[O,N]=A.useState([]),[D,I]=A.useState(!1),[W,L]=A.useState(!1),[Y,B]=A.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
196k":"light"),q=A.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=A.useRef(null),$=A.useRef(!1),Q=A.useCallback(z=>{C(X=>{var ee;return(ee=X.find(Ce=>Ce.id===z.id))!=null&&ee.delete||tt.dismiss(z.id),X.filter(({id:Ce})=>Ce!==z.id)})},[]);return A.useEffect(()=>tt.subscribe(z=>{if(z.dismiss){C(X=>X.map(ee=>ee.id===z.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{Hv.flushSync(()=>{C(X=>{let ee=X.findIndex(Ce=>Ce.id===z.id);return ee!==-1?[...X.slice(0,ee),{...X[ee],...z},...X.slice(ee+1)]:[z,...X]})})})}),[]),A.useEffect(()=>{if(d!=="system"){B(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:X})=>{B(X?"dark":"light")})}catch{z.addListener(({matches:ee})=>{try{B(ee?"dark":"light")}catch(Ce){console.error(Ce)}})}},[d]),A.useEffect(()=>{k.length<=1&&I(!1)},[k]),A.useEffect(()=>{let z=X=>{var ee,Ce;s.every(Be=>X[Be]||X.code===Be)&&(I(!0),(ee=q.current)==null||ee.focus()),X.code==="Escape"&&(document.activeElement===q.current||(Ce=q.current)!=null&&Ce.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),A.useEffect(()=>{if(q.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,$.current=!1)}},[q.current]),A.createElement("section",{ref:t,"aria-label":`${_} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((z,X)=>{var ee;let[Ce,Be]=z.split("-");return k.length?A.createElement("ol",{key:z,dir:x==="auto"?xp():x,tabIndex:-1,ref:q,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":Ce,"data-lifted":D&&k.length>1&&!i,"data-x-position":Be,style:{"--front-toast-height":`${((ee=O[0])==null?void 0:ee.height)||0}px`,"--width":`${RS}px`,"--gap":`${m}px`,...f,...LS(l,c)},onBlur:se=>{$.current&&!se.currentTarget.contains(se.relatedTarget)&&($.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||$.current||($.current=!0,R.current=se.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{W||I(!1)},onDragEnd:()=>I(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},k.filter(se=>!se.position&&X===0||se.position===z).map((se,ns)=>{var kr,xn;return A.createElement(IS,{key:se.id,icons:y,index:ns,toast:se,defaultRichColors:h,duration:(kr=v==null?void 0:v.duration)!=null?kr:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:w,closeButton:(xn=v==null?void 0:v.closeButton)!=null?xn:o,interacting:W,position:z,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:Q,toasts:k.filter(Cr=>Cr.position==se.position),heights:O.filter(Cr=>Cr.position==se.position),setHeights:N,expandByDefault:i,gap:m,loadingIcon:g,expanded:D,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const DS=({...e})=>{const{theme:t="system"}=cS();return u.jsx($S,{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})},MS=["top","right","bottom","left"],pn=Math.min,ut=Math.max,nl=Math.round,da=Math.floor,nr=e=>({x:e,y:e}),US={left:"right",right:"left",bottom:"top",top:"bottom"},FS={start:"end",end:"start"};function Lu(e,t,r){return ut(e,pn(t,r))}function br(e,t){return typeof e=="function"?e(t):e}function _r(e){return e.split("-")[0]}function fi(e){return e.split("-")[1]}function bh(e){return e==="x"?"y":"x"}function _h(e){return e==="y"?"height":"width"}const zS=new Set(["top","bottom"]);function er(e){return zS.has(_r(e))?"y":"x"}function Sh(e){return bh(er(e))}function BS(e,t,r){r===void 0&&(r=!1);const n=fi(e),s=Sh(e),i=_h(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=sl(o)),[o,sl(o)]}function WS(e){const t=sl(e);return[$u(e),t,$u(t)]}function $u(e){return e.replace(/start|end/g,t=>FS[t])}const bp=["left","right"],_p=["right","left"],VS=["top","bottom"],HS=["bottom","top"];function qS(e,t,r){switch(e){case"top":case"bottom":return r?t?_p:bp:t?bp:_p;case"left":case"right":return t?VS:HS;default:return[]}}function KS(e,t,r,n){const s=fi(e);let i=qS(_r(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map($u)))),i}function sl(e){return e.replace(/left|right|bottom|top/g,t=>US[t])}function GS(e){return{top:0,right:0,bottom:0,left:0,...e}}function Uy(e){return typeof e!="number"?GS(e):{top:e,right:e,bottom:e,left:e}}function il(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 Sp(e,t,r){let{reference:n,floating:s}=e;const i=er(t),o=Sh(t),a=_h(o),l=_r(t),c=i==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-s.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(fi(t)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}const QS=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 17,325 bytes, line 196
196=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Sp(c,n,l),p=n,f={},w=0;for(let v=0;v<a.length;v++){const{name:x,fn:m}=a[v],{x:g,y,data:_,reset:E}=await m({x:d,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});d=g??d,h=y??h,f={...f,[x]:{...f[x],..._}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:d,y:h}=Sp(c,p,l)),v=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:f}};async function fo(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=br(t,e),w=Uy(f),x=a[p?h==="floating"?"reference":"floating":h],m=il(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),g=h==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},E=il(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(m.top-E.top+w.top)/_.y,bottom:(E.bottom-m.bottom+w.bottom)/_.y,left:(m.left-E.left+w.left)/_.x,right:(E.right-m.right+w.right)/_.x}}const JS=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=br(e,t)||{};if(c==null)return{};const h=Uy(d),p={x:r,y:n},f=Sh(s),w=_h(f),v=await o.getDimensions(c),x=f==="y",m=x?"top":"left",g=x?"bottom":"right",y=x?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[f]-p[f]-i.floating[w],E=p[f]-i.reference[f],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=k?k[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=a.floating[y]||i.floating[w]);const j=_/2-E/2,O=C/2-v[w]/2-1,N=pn(h[m],O),D=pn(h[g],O),I=N,W=C-v[w]-D,L=C/2-v[w]/2+j,Y=Lu(I,L,W),B=!l.arrow&&fi(s)!=null&&L!==Y&&i.reference[w]/2-(L<I?N:D)-v[w]/2<0,q=B?L<I?L-I:L-W:0;return{[f]:p[f]+q,data:{[f]:Y,centerOffset:L-Y-q,...B&&{alignmentOffset:q}},reset:B}}}),YS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...x}=br(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=_r(s),g=er(a),y=_r(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=p||(y||!v?[sl(a)]:WS(a)),k=w!=="none";!p&&k&&E.push(...KS(a,v,w,_));const C=[a,...E],j=await fo(t,x),O=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&O.push(j[m]),h){const L=BS(s,o,_);O.push(j[L[0]],j[L[1]])}if(N=[...N,{placement:s,overflows:O}],!O.every(L=>L<=0)){var D,I;const L=(((D=i.flip)==null?void 0:D.index)||0)+1,Y=C[L];if(Y&&(!(h==="alignment"?g!==er(Y):!1)||N.every(T=>T.overflows[0]>0&&er(T.placement)===g)))return{data:{index:L,overflows:N},reset:{placement:Y}};let B=(I=N.filter(q=>q.overflows[0]<=0).sort((q,T)=>q.overflows[1]-T.overflows[1])[0])==null?void 0:I.placement;if(!B)switch(f){case"bestFit":{var W;const q=(W=N.filter(T=>{if(k){const R=er(T.placement);return R===g||R==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,$)=>R+$,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:W[0];q&&(B=q);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function Ep(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kp(e){return MS.some(t=>e[t]>=0)}const XS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=br(e,t);switch(n){case"referenceHidden":{const i=await fo(t,{...s,elementContext:"reference"}),o=Ep(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:kp(o)}}}case"escaped":{const i=await fo(t,{...s,altBoundary:!0}),o=Ep(i,r.floating);return{data:{escapedOffsets:o,escaped:kp(o)}}}default:return{}}}}},Fy=new Set(["left","top"]);async function ZS(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=_r(r),a=fi(r),l=er(r)==="y",c=Fy.has(o)?-1:1,d=i&&l?-1:1,h=br(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof w=="number"&&(f=a==="end"?w*-1:w),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}const eE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await ZS(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},tE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:m,y:g}=x;return{x:m,y:g}}},...l}=br(e,t),c={x:r,y:n},d=await fo(t,l),h=er(_r(s)),p=bh(h);let f=c[p],w=c[h];if(i){const x=p==="y"?"top":"left",m=p==="y"?"bottom":"right",g=f+d[x],y=f-d[m];f=Lu(g,f,y)}if(o){const x=h==="y"?"top":"left",m=h==="y"?"bottom":"right",g=w+d[x],y=w-d[m];w=Lu(g,w,y)}const v=a.fn({...t,[p]:f,[h]:w});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:i,[h]:o}}}}}},rE=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=br(e,t),d={x:r,y:n},h=er(s),p=bh(h);let f=d[p],w=d[h];const v=br(a,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const y=p==="y"?"height":"width",_=i.reference[p]-i.floating[y]+x.mainAxis,E=i.reference[p]+i.reference[y]-x.mainAxis;f<_?f=_:f>E&&(f=E)}if(c){var m,g;const y=p==="y"?"width":"height",_=Fy.has(_r(s)),E=i.reference[h]-i.floating[y]+(_&&((m=o.offset)==null?void 0:m[h])||0)+(_?0:x.crossAxis),k=i.reference[h]+i.reference[y]+(_?0:((g=o.offset)==null?void 0:g[h])||0)-(_?x.crossAxis:0);w<E?w=E:w>k&&(w=k)}return{[p]:f,[h]:w}}}},nE=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=br(e,t),d=await fo(t,c),h=_r(s),p=fi(s),f=er(s)==="y",{width:w,height:v}=i.floating;let x,m;h==="top"||h==="bottom"?(x=h,m=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=h,x=p==="end"?"top":"bottom");const g=v-d.top-d.bottom,y=w-d.left-d.right,_=pn(v-d[x],g),E=pn(w-d[m],y),k=!t.middlewareData.shift;let C=_,j=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=g),k&&!p){const N=ut(d.left,0),D=ut(d.right,0),I=ut(d.top,0),W=ut(d.bottom,0);f?j=w-2*(N!==0||D!==0?N+D:ut(d.left,d.right)):C=v-2*(I!==0||W!==0?I+W:ut(d.top,d.bottom))}await l({...t,availableWidth:j,availableHeight:C});const O=await o.getDimensions(a.floating);return w!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function Pl(){return typeof window<"u"}function pi(e){return zy(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function or(e){var t;return(t=(zy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zy(e){return Pl()?e instanceof Node||e instanceof gt(e).Node:!1}function qt(e){return Pl()?e instanceof Element||e instanceof gt(e).Element:!1}function sr(e){return Pl()?e instanceof HTMLElement||e instanceof gt(e).HTMLElement:!1}function Cp(e){return!Pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot}const sE=new Set(["inline","contents"]);function $o(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!sE.has(s)}const iE=new Set(["table","td","th"]);function oE(e){return iE.has(pi(e))}const aE=[":popover-open",":modal"];function Ol(e){return aE.some(t=>{try{return e.matches(t)}catch{return!1}})}const lE=["transform","translate","scale","rotate","perspective"],cE=["transform","translate","scale","rotate","perspective","filter"],uE=["paint","layout","strict","content"];function Eh(e){const t=kh(),r=qt(e)?Kt(e):e;return lE.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)||cE.some(n=>(r.willChange||"").includes(n))||uE.some(n=>(r.contain||"").includes(n))}function dE(e){let t=mn(e);for(;sr(t)&&!oi(t);){if(Eh(t))return t;if(Ol(t))return null;t=mn(t)}return null}function kh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hE=new Set(["html","body","#document"]);function oi(e){return hE.has(pi(e))}function Kt(e){return gt(e).getComputedStyle(e)}function Al(e){return qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mn(e){if(pi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cp(e)&&e.host||or(e);return Cp(t)?t.host:t}function By(e){const t=mn(e);return oi(t)?e.ownerDocument?e.ownerDocument.body:e.body:sr(t)&&$o(t)?t:By(t)}function po(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=By(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=gt(s);if(i){const a=Du(o);return t.concat(o,o.visualViewport||[],$o(s)?s:[],a&&r?po(a):[])}return t.concat(s,po(s,[],r))}function Du(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wy(e){const t=Kt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=sr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=nl(r)!==i||nl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Ch(e){return qt(e)?e:e.contextElement}function Us(e){const t=Ch(e);if(!sr(t))return nr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Wy(t);let o=(i?nl(r.width):r.width)/n,a=(i?nl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const fE=nr(0);function Vy(e){const t=gt(e);return!kh()||!t.visualViewport?fE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pE(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==gt(e)?!1:t}function Yn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Ch(e);let o=nr(1);t&&(n?qt(n)&&(o=Us(n)):o=Us(e));const a=pE(i,r,n)?Vy(i):nr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const p=gt(i),f=n&&qt(n)?gt(n):n;let w=p,v=Du(w);for(;v&&n&&f!==w;){const x=Us(v),m=v.getBoundingClientRect(),g=Kt(v),y=m.left+(v.clientLeft+parseFloat(g.paddingLeft))*x.x,_=m.top+(v.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,h*=x.y,l+=y,c+=_,w=gt(v),v=Du(w)}}return il({width:d,height:h,x:l,y:c})}function Th(e,t){const r=Al(e).scrollLeft;return t?t.left+r:Yn(or(e)).left+r}function Hy(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Th(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function mE(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=or(n),a=t?Ol(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=nr(1);const d=nr(0),h=sr(n);if((h||!h&&!i)&&((pi(n)!=="body"||$o(o))&&(l=Al(n)),sr(n))){const f=Yn(n);c=Us(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=o&&!h&&!i?Hy(o,l,!0):nr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function gE(e){return Array.from(e.getClientRects())}function vE(e){const t=or(e),r=Al(e),n=e.ownerDocument.body,s=ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Th(e);const a=-r.scrollTop;return Kt(n).direction==="rtl"&&(o+=ut(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function yE(e,t){const r=gt(e),n=or(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=kh();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const wE=new Set(["absolute","fixed"]);function xE(e,t){const r=Yn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=sr(e)?Us(e):nr(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function Tp(e,t,r){let n;if(t==="viewport")n=yE(e,r);else if(t==="document")n=vE(or(e));else if(qt(t))n=xE(t,r);else{const s=Vy(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return il(n)}function qy(e,t){const r=mn(e);return r===t||!qt(r)||oi(r)?!1:Kt(r).position==="fixed"||qy(r,t)}function bE(e,t){const r=t.get(e);if(r)return r;let n=po(e,[],!1).filter(a=>qt(a)&&pi(a)!=="body"),s=null;const i=Kt(e).position==="fixed";let o=i?mn(e):e;for(;qt(o)&&!oi(o);){const a=Kt(o),l=Eh(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&wE.has(s.position)||$o(o)&&!l&&qy(e,o))?n=n.filter(d=>d!==o):s=a,o=mn(o)}return t.set(e,n),n}function _E(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Ol(t)?[]:bE(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,d)=>{const h=Tp(t,d,s);return c.top=ut(h.top,c.top),c.right=pn(h.right,c.right),c.bottom=pn(h.bottom,c.bottom),c.left=ut(h.left,c.left),c},Tp(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SE(e){const{width:t,height:r}=Wy(e);return{width:t,height:r}}function EE(e,t,r){const n=sr(t),s=or(t),i=r==="fixed",o=Yn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=nr(0);function c(){l.x=Th(s)}if(n||!n&&!i)if((pi(t)!=="body"||$o(s))&&(a=Al(t)),n){const f=Yn(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&c();i&&!n&&s&&c();const d=s&&!n&&!i?Hy(s,a):nr(0),h=o.left+a.scrollLeft-l.x-d.x,p=o.top+a.scrollTop-l.y-d.y;return{x:h,y:p,width:o.width,height:o.height}}function Ec(e){return Kt(e).position==="static"}function jp(e,t){if(!sr(e)||Kt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return or(e)===r&&(r=r.ownerDocument.body),r}function Ky(e,t){const r=gt(e);if(Ol(e))return r;if(!sr(e)){let s=mn(e);for(;s&&!oi(s);){if(qt(s)&&!Ec(s))return s;s=mn(s)}return r}let n=jp(e,t);for(;n&&oE(n)&&Ec(n);)n=jp(n,t);return n&&oi(n)&&Ec(n)&&!Eh(n)?r:n||dE(e)||r}const kE=async function(e){const t=this.getOffsetParent||Ky,r=this.getDimensions,n=await r(e.floating);return{reference:EE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function CE(e){return Kt(e).direction==="rtl"}const TE={convertOffsetParentRelativeRectToViewportRelativeRect:mE,getDocumentElement:or,getClippingRect:_E,getOffsetParent:Ky,getElementRects:kE,getClientRects:gE,getDimensions:SE,getScale:Us,isElement:qt,isRTL:CE};function Gy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jE(e,t){let r=null,n;const s=or(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=c;if(a||t(),!p||!f)return;const w=da(h),v=da(s.clientWidth-(d+p)),x=da(s.clientHeight-(h+f)),m=da(d),y={rootMargin:-w+"px "+-v+"px "+-x+"px "+-m+"px",threshold:ut(0,pn(1,l))||1};let _=!0;function E(k){const C=k[0].intersectionRatio;if(C!==l){if(!_)return o();C?o(!1,C):n=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!Gy(c,e.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(E,{...y,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,y)}r.observe(e)}return o(!0),i}function RE(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ch(e),d=s||i?[...c?po(c):[],...po(t)]:[];d.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const h=c&&a?jE(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(m=>{let[g]=m;g&&g.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),r()}),c&&!l&&f.observe(c),f.observe(t));let w,v=l?Yn(e):null;l&&x();function x(){const m=Yn(e);v&&!Gy(v,m)&&r(),v=m,w=requestAnimationFrame(x)}return r(),()=>{var m;d.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),h==null||h(),(m=f)==null||m.disconnect(),f=null,l&&cancelAnimationFrame(w)}}const NE=eE,PE=tE,OE=YS,AE=nE,IE=XS,Rp=JS,LE=rE,$E=(e,t,r)=>{const n=new Map,s={platform:TE,...r},i={...s.platform,_c:n};return QS(e,t,{...s,platform:i})};var DE=typeof document<"u",ME=function(){},Pa=DE?b.useLayoutEffect:ME;function ol(e,t){if(e===t)return!0;
vendor: 4,133 bytes, line 196
196if(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(!ol(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!ol(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Qy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Np(e,t){const r=Qy(e);return Math.round(t*r)/r}function kc(e){const t=b.useRef(e);return Pa(()=>{t.current=e}),t}function UE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,h]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=b.useState(n);ol(p,n)||f(n);const[w,v]=b.useState(null),[x,m]=b.useState(null),g=b.useCallback(T=>{T!==k.current&&(k.current=T,v(T))},[]),y=b.useCallback(T=>{T!==C.current&&(C.current=T,m(T))},[]),_=i||w,E=o||x,k=b.useRef(null),C=b.useRef(null),j=b.useRef(d),O=l!=null,N=kc(l),D=kc(s),I=kc(c),W=b.useCallback(()=>{if(!k.current||!C.current)return;const T={placement:t,strategy:r,middleware:p};D.current&&(T.platform=D.current),$E(k.current,C.current,T).then(R=>{const $={...R,isPositioned:I.current!==!1};L.current&&!ol(j.current,$)&&(j.current=$,Io.flushSync(()=>{h($)}))})},[p,t,r,D,I]);Pa(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(T=>({...T,isPositioned:!1})))},[c]);const L=b.useRef(!1);Pa(()=>(L.current=!0,()=>{L.current=!1}),[]),Pa(()=>{if(_&&(k.current=_),E&&(C.current=E),_&&E){if(N.current)return N.current(_,E,W);W()}},[_,E,W,N,O]);const Y=b.useMemo(()=>({reference:k,floating:C,setReference:g,setFloating:y}),[g,y]),B=b.useMemo(()=>({reference:_,floating:E}),[_,E]),q=b.useMemo(()=>{const T={position:r,left:0,top:0};if(!B.floating)return T;const R=Np(B.floating,d.x),$=Np(B.floating,d.y);return a?{...T,transform:"translate("+R+"px, "+$+"px)",...Qy(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:$}},[r,a,B.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:W,refs:Y,elements:B,floatingStyles:q}),[d,W,Y,B,q])}const FE=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?Rp({element:n.current,padding:s}).fn(r):{}:n?Rp({element:n,padding:s}).fn(r):{}}}},zE=(e,t)=>({...NE(e),options:[e,t]}),BE=(e,t)=>({...PE(e),options:[e,t]}),WE=(e,t)=>({...LE(e),options:[e,t]}),VE=(e,t)=>({...OE(e),options:[e,t]}),HE=(e,t)=>({...AE(e),options:[e,t]}),qE=(e,t)=>({...IE(e),options:[e,t]}),KE=(e,t)=>({...FE(e),options:[e,t]});var GE="Arrow",Jy=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return u.jsx(ke.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jy.displayName=GE;var QE=Jy;function jh(e){const[t,r]=b.useState(void 0);return fn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Yy="Popper",[Xy,Zy]=di(Yy),[GN,e0]=Xy(Yy),t0="PopperAnchor",r0=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=e0(t0,r),o=b.useRef(null),a=Ae(t,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:u.jsx(ke.div,{...s,ref:a})});r0.displayName=t0;var Rh="PopperContent",[JE,YE]=Xy(Rh),n0=b.forwardRef((e,t)=>{var se,ns,kr,xn,Cr,ss;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l
vendor: 4,306 bytes, line 196
196=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:w,...v}=e,x=e0(Rh,r),[m,g]=b.useState(null),y=Ae(t,Tr=>g(Tr)),[_,E]=b.useState(null),k=jh(_),C=(k==null?void 0:k.width)??0,j=(k==null?void 0:k.height)??0,O=n+(i!=="center"?"-"+i:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(c)?c:[c],I=D.length>0,W={padding:N,boundary:D.filter(ZE),altBoundary:I},{refs:L,floatingStyles:Y,placement:B,isPositioned:q,middlewareData:T}=UE({strategy:"fixed",placement:O,whileElementsMounted:(...Tr)=>RE(...Tr,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[zE({mainAxis:s+j,alignmentAxis:o}),l&&BE({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?WE():void 0,...W}),l&&VE({...W}),HE({...W,apply:({elements:Tr,rects:zo,availableWidth:Bl,availableHeight:Bo})=>{const{width:Wl,height:wi}=zo.reference,is=Tr.floating.style;is.setProperty("--radix-popper-available-width",`${Bl}px`),is.setProperty("--radix-popper-available-height",`${Bo}px`),is.setProperty("--radix-popper-anchor-width",`${Wl}px`),is.setProperty("--radix-popper-anchor-height",`${wi}px`)}}),_&&KE({element:_,padding:a}),ek({arrowWidth:C,arrowHeight:j}),p&&qE({strategy:"referenceHidden",...W})]}),[R,$]=o0(B),Q=hn(w);fn(()=>{q&&(Q==null||Q())},[q,Q]);const z=(se=T.arrow)==null?void 0:se.x,X=(ns=T.arrow)==null?void 0:ns.y,ee=((kr=T.arrow)==null?void 0:kr.centerOffset)!==0,[Ce,Be]=b.useState();return fn(()=>{m&&Be(window.getComputedStyle(m).zIndex)},[m]),u.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:q?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[(xn=T.transformOrigin)==null?void 0:xn.x,(Cr=T.transformOrigin)==null?void 0:Cr.y].join(" "),...((ss=T.hide)==null?void 0:ss.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(JE,{scope:r,placedSide:R,onArrowChange:E,arrowX:z,arrowY:X,shouldHideArrow:ee,children:u.jsx(ke.div,{"data-side":R,"data-align":$,...v,ref:y,style:{...v.style,animation:q?void 0:"none"}})})})});n0.displayName=Rh;var s0="PopperArrow",XE={top:"bottom",right:"left",bottom:"top",left:"right"},i0=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=YE(s0,n),o=XE[i.placedSide];return u.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:u.jsx(QE,{...s,ref:r,style:{...s.style,display:"block"}})})});i0.displayName=s0;function ZE(e){return e!==null}var ek=e=>({name:"transformOrigin",options:e,fn(t){var x,m,g;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,d]=o0(r),h={start:"0%",center:"50%",end:"100%"}[d],p=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let w="",v="";return c==="bottom"?(w=o?h:`${p}px`,v=`${-l}px`):c==="top"?(w=o?h:`${p}px`,v=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,v=o?h:`${f}px`):c==="left"&&(w=`${n.floating.width+l}px`,v=o?h:`${f}px`),{data:{x:w,y:v}}}});function o0(e){const[t,r="center"]=e.split("-");return[t,r]}var tk=r0,rk=n0,nk=i0,[Il,QN]=di("Tooltip",[Zy]),Nh=Zy(),a0="TooltipProvider",sk=700,Pp="tooltip.open",[ik,l0]=Il(a0),c0=e=>{const{__scopeTooltip:t,delayDuration:r=sk,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(ik,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};c0.displayName=a0;var u0="Tooltip",[JN,Ll]=Il(u0),Mu="TooltipTrigger",ok=b.forwardRef((e,t)=>
vendor: 5,599 bytes, line 196
196{const{__scopeTooltip:r,...n}=e,s=Ll(Mu,r),i=l0(Mu,r),o=Nh(r),a=b.useRef(null),l=Ae(t,a,s.onTriggerChange),c=b.useRef(!1),d=b.useRef(!1),h=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),u.jsx(tk,{asChild:!0,...o,children:u.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ue(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ue(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});ok.displayName=Mu;var ak="TooltipPortal",[YN,lk]=Il(ak,{forceMount:void 0}),ai="TooltipContent",d0=b.forwardRef((e,t)=>{const r=lk(ai,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Ll(ai,e.__scopeTooltip);return u.jsx(uh,{present:n||o.open,children:o.disableHoverableContent?u.jsx(h0,{side:s,...i,ref:t}):u.jsx(ck,{side:s,...i,ref:t})})}),ck=b.forwardRef((e,t)=>{const r=Ll(ai,e.__scopeTooltip),n=l0(ai,e.__scopeTooltip),s=b.useRef(null),i=Ae(t,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=r,d=s.current,{onPointerInTransitChange:h}=n,p=b.useCallback(()=>{a(null),h(!1)},[h]),f=b.useCallback((w,v)=>{const x=w.currentTarget,m={x:w.clientX,y:w.clientY},g=pk(m,x.getBoundingClientRect()),y=mk(m,g),_=gk(v.getBoundingClientRect()),E=yk([...y,..._]);a(E),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){const w=x=>f(x,d),v=x=>f(x,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",v)}}},[l,d,f,p]),b.useEffect(()=>{if(o){const w=v=>{const x=v.target,m={x:v.clientX,y:v.clientY},g=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),y=!vk(m,o);g?p():y&&(p(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,o,c,p]),u.jsx(h0,{...e,ref:i})}),[uk,dk]=Il(u0,{isInside:!1}),hk=v1("TooltipContent"),h0=b.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Ll(ai,r),c=Nh(r),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(Pp,d),()=>document.removeEventListener(Pp,d)),[d]),b.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),u.jsx(ch,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:u.jsxs(rk,{"data-state":l.stateAttribute,...c,...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:[u.jsx(hk,{children:n}),u.jsx(uk,{scope:r,isInside:!0,children:u.jsx(F1,{id:l.contentId,role:"tooltip",children:s||n})})]})})});d0.displayName=ai;var f0="TooltipArrow",fk=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Nh(r);return dk(f0,r).isInside?null:u.jsx(nk,{...s,...n,ref:t})});fk.displayName=f0;function pk(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function mk(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 gk(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 vk(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,d=a.y,h=l.x,p=l.y;d>n!=p>n&&r<(h-c)*(n-d)/(p-d)+c&&(s=!s)}return s}function yk(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),wk(t)}function wk(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var xk=c0,p0=d0;const bk=xk,_k=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(p0,{ref:n,sideOffset:t,className:yt("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]:sli
196de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));_k.displayName=p0.displayName;var Do=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(){}},Xn=typeof window>"u"||"Deno"in globalThis;function rt(){}function Sk(e,t){return typeof e=="function"?e(t):e}function Uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function m0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ln(e,t){return typeof e=="function"?e(t):e}function St(e,t){return typeof e=="function"?e(t):e}function Op(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Ph(o,t.options))return!1}else if(!go(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Ap(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(mo(t.options.mutationKey)!==mo(i))return!1}else if(!go(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Ph(e,t){return((t==null?void 0:t.queryKeyHashFn)||mo)(e)}function mo(e){return JSON.stringify(e,(t,r)=>zu(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function go(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>go(e[r],t[r])):!1}function g0(e,t){if(e===t)return e;const r=Ip(e)&&Ip(t);if(r||zu(e)&&zu(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let d=0;d<o;d++){const h=r?d:i[d];(!r&&l.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,c++):(a[h]=g0(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function Fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Ip(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zu(e){if(!Lp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Lp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lp(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ek(e){return new Promise(t=>{setTimeout(t,e)})}function Bu(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?g0(e,t):t}function kk(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ck(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Oh=Symbol();function v0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Oh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Tk(e,t){return typeof e=="function"?e(...t):!!e}var Ln,Br,zs,_m,jk=(_m=class extends Do{constructor(){super();K(this,Ln);K(this,Br);K(this,zs);U(this,zs,t=>{if(!Xn&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){S(this,Br)||this.setEventListener(S(this,zs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Br))==null||t.call(this),U(this,Br,void 0))}setEventListener(t){var r;U(this,zs,t),(r=S(this,Br))==null||r.call(this),U(this,Br,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){S(this,Ln)!==t&&(U(this,Ln,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof S(this,Ln)=="boolean"?S(this,Ln):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ln=new WeakMap,Br=new WeakMap,zs=new WeakMap,_m),Ah=new jk,Bs,Wr,Ws,Sm,Rk=(Sm=class extends Do{constructor(){super();K(this,Bs,!0);K(this,Wr);K(this,Ws);U(this,Ws,t=>{if(!Xn&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n
vendor: 14,493 bytes, line 196
196)}}})}onSubscribe(){S(this,Wr)||this.setEventListener(S(this,Ws))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Wr))==null||t.call(this),U(this,Wr,void 0))}setEventListener(t){var r;U(this,Ws,t),(r=S(this,Wr))==null||r.call(this),U(this,Wr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Bs)!==t&&(U(this,Bs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return S(this,Bs)}},Bs=new WeakMap,Wr=new WeakMap,Ws=new WeakMap,Sm),al=new Rk;function Wu(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function Nk(e){return Math.min(1e3*2**e,3e4)}function y0(e){return(e??"online")==="online"?al.isOnline():!0}var w0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Cc(e){return e instanceof w0}function x0(e){let t=!1,r=0,n=!1,s;const i=Wu(),o=v=>{var x;n||(p(new w0(v)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Ah.isFocused()&&(e.networkMode==="always"||al.isOnline())&&e.canRun(),d=()=>y0(e.networkMode)&&e.canRun(),h=v=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,v),s==null||s(),i.resolve(v))},p=v=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,v),s==null||s(),i.reject(v))},f=()=>new Promise(v=>{var x;s=m=>{(n||c())&&v(m)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;s=void 0,n||(v=e.onContinue)==null||v.call(e)}),w=()=>{if(n)return;let v;const x=r===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(m){v=Promise.reject(m)}Promise.resolve(v).then(h).catch(m=>{var k;if(n)return;const g=e.retry??(Xn?0:3),y=e.retryDelay??Nk,_=typeof y=="function"?y(r,m):y,E=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,m);if(t||!E){p(m);return}r++,(k=e.onFail)==null||k.call(e,r,m),Ek(_).then(()=>c()?void 0:f()).then(()=>{t?p(m):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?w():f().then(w),i)}}var Pk=e=>setTimeout(e,0);function Ok(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=Pk;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ue=Ok(),$n,Em,b0=(Em=class{constructor(){K(this,$n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uu(this.gcTime)&&U(this,$n,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xn?1/0:5*60*1e3))}clearGcTimeout(){S(this,$n)&&(clearTimeout(S(this,$n)),U(this,$n,void 0))}},$n=new WeakMap,Em),Vs,Dn,_t,Mn,He,ko,Un,Mt,lr,km,Ak=(km=class extends b0{constructor(t){super();K(this,Mt);K(this,Vs);K(this,Dn);K(this,_t);K(this,Mn);K(this,He);K(this,ko);K(this,Un);U(this,Un,!1),U(this,ko,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Mn,t.client),U(this,_t,S(this,Mn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,Vs,Ik(this.options)),this.state=t.state??S(this,Vs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,He))==null?void 0:t.promise}setOptions(t){this.options={...S(this,ko),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,_t).remove(this)}setData(t,r){const n=Bu(this.state.data,t,this.options);return te(this,Mt,lr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){te(this,Mt,lr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=S(this,He))==null?void 0:n.promise;return(s=S(this,He))==null||s.cancel(t),r?r.then(rt).catch(rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Vs))}isActive(){return this.observers.some(t=>St(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ln(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:!m0(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=S(this,He))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=S(this,He))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,_t).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(S(this,He)&&(S(this,Un)?S(this,He).cancel({revert:!0}):S(this,He).cancelRetry()),this.scheduleGc()),S(this,_t).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||te(this,Mt,lr).call(this,{type:"invalidate"})}fetch(t,r){var c,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(S(this,He))return S(this,He).continueRetry(),S(this,He).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(U(this,Un,!0),n.signal)})},i=()=>{const p=v0(this.options,r),w=(()=>{const v={client:S(this,Mn),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return U(this,Un,!1),this.options.persister?this.options.persister(p,w,this):p(w)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:S(this,Mn),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),U(this,Dn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&te(this,Mt,lr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,w,v,x;Cc(p)&&p.silent||te(this,Mt,lr).call(this,{type:"error",error:p}),Cc(p)||((w=(f=S(this,_t).config).onError)==null||w.call(f,p,this),(x=(v=S(this,_t).config).onSettled)==null||x.call(v,this.state.data,p,this)),this.scheduleGc()};return U(this,He,x0({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,w,v,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(m){l(m);return}(w=(f=S(this,_t).config).onSuccess)==null||w.call(f,p,this),(x=(v=S(this,_t).config).onSettled)==null||x.call(v,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{te(this,Mt,lr).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{te(this,Mt,lr).call(this,{type:"pause"})},onContinue:()=>{te(this,Mt,lr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),S(this,He).start()}},Vs=new WeakMap,Dn=new WeakMap,_t=new WeakMap,Mn=new WeakMap,He=new WeakMap,ko=new WeakMap,Un=new WeakMap,Mt=new WeakSet,lr=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,..._0(n.data,this.options),fetchMeta:t.meta??null};case"success":return U(this,Dn,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 Cc(s)&&s.revert&&S(this,Dn)?{...S(this,Dn),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),Ue.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),S(this,_t).notify({query:this,type:"updated",action:t})})},km);function _0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:y0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ik(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 Jt,Cm,Lk=(Cm=class extends Do{constructor(t={}){super();K(this,Jt);this.config=t,U(this,Jt,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??Ph(s,r);let o=this.get(i);return o||(o=new Ak({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){S(this,Jt).has(t.queryHash)||(S(this,Jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=S(this,Jt).get(t.queryHash);r&&(t.destroy(),r===t&&S(this,Jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Jt).get(t)}getAll(){return[...S(this,Jt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Op(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Op(t,n)):r}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jt=new WeakMap,Cm),Yt,Ge,Fn,Xt,Ir,Tm,$k=(Tm=class extends b0{constructor(t){super();K(this,Xt);K(this,Yt);K(this,Ge);K(this,Fn);this.mutationId=t.mutationId,U(this,Ge,t.mutationCache),U(this,Yt,[]),this.state=t.state||Dk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Yt).includes(t)||(S(this,Yt).push(t),this.clearGcTimeout(),S(this,Ge).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,Yt,S(this,Yt).filter(r=>r!==t)),this.scheduleGc(),S(this,Ge).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Yt).length||(this.state.status==="pending"?this.scheduleGc():S(this,Ge).remove(this))}continue(){var t;return((t=S(this,Fn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,d,h,p,f,w,v,x,m,g,y,_,E,k,C,j;const r=()=>{te(this,Xt,Ir).call(this,{type:"continue"})};U(this,Fn,x0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,N)=>{te(this,Xt,Ir).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{te(this,Xt,Ir).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,Ge).canRun(this)}));const n=this.state.status==="pending",s=!S(this,Fn).canStart();try{if(n)r();else{te(this,Xt,Ir).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=S(this,Ge).config).onMutate)==null?void 0:o.call(i,t,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));N!==this.state.context&&te(this,Xt,Ir).call(this,{type:"pending",context:N,variables:t,isPaused:s})}const O=await S(this,Fn).start();return await((d=(c=S(this,Ge).config).onSuccess)==null?void 0:d.call(c,O,t,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,O,t,this.state.context)),await((w=(f=S(this,Ge).config).onSettled)==null?void 0:w.call(f,O,null,this.state.variables,this.state.context,this)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,O,null,t,this.state.context)),te(this,Xt,Ir).call(this,{type:"success",data:O}),O}catch(O){try{throw await((g=(m=S(this,Ge).config).onError)==null?void 0:g.call(m,O,t,this.state.context,this)),await((_=(y=this.options).onError)==null?void 0:_.call(y,O,t,this.state.context)),await((k=(E=S(this,Ge).config).onSettled)==null?void 0:k.call(E,void 0,O,this.state.variables,this.state.context,this)),await((j=(C=this.options).onSettled)==null?void 0:j.call(C,void 0,O,t,this.state.context)),O}finally{te(this,Xt,Ir).call(this,{type:"error",error:O})}}finally{S(this,Ge).runNext(this)}}},Yt=new WeakMap,Ge=new WeakMap,Fn=new WeakMap,Xt=new WeakSet,Ir=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ue.batch(()=>{S(this,Yt).forEach(n=>{n.onMutationUpdate(t)}),S(this,Ge).notify({mutation:this,type:"updated",action:t})})},Tm);function Dk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fr,Ut,Co,jm,Mk=(jm=class extends Do{constructor(t={}){super();K(this,fr);K(this,Ut);K(this,Co);this.config=t,U(this,fr,new Set),U(this,Ut,new Map),U(this,Co,0)}build(t,r,n){const s=new $k({mutationCache:this,mutationId:++Vo(this,C
196o)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){S(this,fr).add(t);const r=ha(t);if(typeof r=="string"){const n=S(this,Ut).get(r);n?n.push(t):S(this,Ut).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,fr).delete(t)){const r=ha(t);if(typeof r=="string"){const n=S(this,Ut).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&S(this,Ut).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ha(t);if(typeof r=="string"){const n=S(this,Ut).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=ha(t);if(typeof r=="string"){const s=(n=S(this,Ut).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ue.batch(()=>{S(this,fr).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,fr).clear(),S(this,Ut).clear()})}getAll(){return Array.from(S(this,fr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ap(r,n))}findAll(t={}){return this.getAll().filter(r=>Ap(t,r))}notify(t){Ue.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 14,724 bytes, line 196
196r.state.isPaused);return Ue.batch(()=>Promise.all(t.map(r=>r.continue().catch(rt))))}},fr=new WeakMap,Ut=new WeakMap,Co=new WeakMap,jm);function ha(e){var t;return(t=e.options.scope)==null?void 0:t.id}function $p(e){return{onFetch:(t,r)=>{var d,h,p,f,w;const n=t.options,s=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let v=!1;const x=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},m=v0(t.options,t.fetchOptions),g=async(y,_,E)=>{if(v)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const C=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:_,direction:E?"backward":"forward",meta:t.options.meta};return x(D),D})(),j=await m(C),{maxPages:O}=t.options,N=E?Ck:kk;return{pages:N(y.pages,j,O),pageParams:N(y.pageParams,_,O)}};if(s&&i.length){const y=s==="backward",_=y?Uk:Dp,E={pages:i,pageParams:o},k=_(n,E);a=await g(E,k,y)}else{const y=e??i.length;do{const _=l===0?o[0]??n.initialPageParam:Dp(n,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function Dp(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 Uk(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 be,Vr,Hr,Hs,qs,qr,Ks,Gs,Rm,Fk=(Rm=class{constructor(e={}){K(this,be);K(this,Vr);K(this,Hr);K(this,Hs);K(this,qs);K(this,qr);K(this,Ks);K(this,Gs);U(this,be,e.queryCache||new Lk),U(this,Vr,e.mutationCache||new Mk),U(this,Hr,e.defaultOptions||{}),U(this,Hs,new Map),U(this,qs,new Map),U(this,qr,0)}mount(){Vo(this,qr)._++,S(this,qr)===1&&(U(this,Ks,Ah.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,be).onFocus())})),U(this,Gs,al.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,be).onOnline())})))}unmount(){var e,t;Vo(this,qr)._--,S(this,qr)===0&&((e=S(this,Ks))==null||e.call(this),U(this,Ks,void 0),(t=S(this,Gs))==null||t.call(this),U(this,Gs,void 0))}isFetching(e){return S(this,be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Vr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=S(this,be).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=S(this,be).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ln(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return S(this,be).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=S(this,be).get(n.queryHash),i=s==null?void 0:s.state.data,o=Sk(t,i);if(o!==void 0)return S(this,be).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Ue.batch(()=>S(this,be).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=S(this,be).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=S(this,be);Ue.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=S(this,be);return Ue.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ue.batch(()=>S(this,be).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(rt).catch(rt)}invalidateQueries(e,t={}){return Ue.batch(()=>(S(this,be).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=Ue.batch(()=>S(this,be).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(rt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=S(this,be).build(this,t);return r.isStaleByTime(ln(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rt).catch(rt)}fetchInfiniteQuery(e){return e.behavior=$p(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rt).catch(rt)}ensureInfiniteQueryData(e){return e.behavior=$p(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return al.isOnline()?S(this,Vr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,be)}getMutationCache(){return S(this,Vr)}getDefaultOptions(){return S(this,Hr)}setDefaultOptions(e){U(this,Hr,e)}setQueryDefaults(e,t){S(this,Hs).set(mo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Hs).values()],r={};return t.forEach(n=>{go(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){S(this,qs).set(mo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,qs).values()],r={};return t.forEach(n=>{go(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Hr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ph(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===Oh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Hr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,be).clear(),S(this,Vr).clear()}},be=new WeakMap,Vr=new WeakMap,Hr=new WeakMap,Hs=new WeakMap,qs=new WeakMap,qr=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Rm),et,re,To,Qe,zn,Qs,Kr,Gr,jo,Js,Ys,Bn,Wn,Qr,Xs,ie,Li,Vu,Hu,qu,Ku,Gu,Qu,Ju,S0,Nm,zk=(Nm=class extends Do{constructor(t,r){super();K(this,ie);K(this,et);K(this,re);K(this,To);K(this,Qe);K(this,zn);K(this,Qs);K(this,Kr);K(this,Gr);K(this,jo);K(this,Js);K(this,Ys);K(this,Bn);K(this,Wn);K(this,Qr);K(this,Xs,new Set);this.options=r,U(this,et,t),U(this,Gr,null),U(this,Kr,Wu()),this.options.experimental_prefetchInRender||S(this,Kr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,re).addObserver(this),Mp(S(this,re),this.options)?te(this,ie,Li).call(this):this.updateResult(),te(this,ie,Ku).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Yu(S(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Yu(S(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,te(this,ie,Gu).call(this),te(this,ie,Qu).call(this),S(this,re).removeObserver(this)}setOptions(t){const r=this.options,n=S(this,re);if(this.options=S(this,et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof St(this.options.enabled,S(this,re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");te(this,ie,Ju).call(this),S(this,re).setOptions(this.options),r._defaulted&&!Fu(this.options,r)&&S(this,et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,re),observer:this});const s=this.hasListeners();s&&Up(S(this,re),n,this.options,r)&&te(this,ie,Li).call(this),this.updateResult(),s&&(S(this,re)!==n||St(this.options.enabled,S(this,re))!==St(r.enabled,S(this,re))||ln(this.options.staleTime,S(this,re))!==ln(r.staleTime,S(this,re)))&&te(this,ie,Vu).call(this);const i=te(this,ie,Hu).call(this);s&&(S(this,re)!==n||St(this.options.enabled,S(this,re))!==St(r.enabled,S(this,re))||i!==S(this,Qr))&&te(this,ie,qu).call(this,i)}getOptimisticResult(t){const r=S(this,et).getQueryCache().build(S(this,et),t),n=this.createResult(r,t);return Wk(this,n)&&(U(this,Qe,n),U(this,Qs,this.options),U(this,zn,S(this,re).state)),n}getCurrentResult(){return S(this,Qe)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){S(this,Xs).add(t)}getCurrentQuery(){return S(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=S(this,et).defaultQueryOptions(t),n=S(this,et).getQueryCache().build(S(this,et),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return te(this,ie,Li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,Qe)))}createResult(t,r){var O;const n=S(this,re),s=this.options,i=S(this,Qe),o=S(this,zn),a=S(this,Qs),c=t!==n?t.state:S(this,To),{state:d}=t;let h={...d},p=!1,f;if(r._optimisticResults){const N=this.hasListeners(),D=!N&&Mp(t,r),I=N&&Up(t,n,r,s);(D||I)&&(h={...h,..._0(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:w,errorUpdatedAt:v,status:x}=h;f=h.data;let m=!1;if(r.placeholderData!==void 0&&f===void 0&&x==="pending"){let N;i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(N=i.data,m=!0):N=typeof r.placeholderData=="function"?r.placeholderData((O=S(this,Ys))==null?void 0:O.state.data,S(this,Ys)):r.placeholderData,N!==void 0&&(x="success",f=Bu(i==null?void 0:i.data,N,r),p=!0)}if(r.select&&f!==void 0&&!m)if(i&&f===(o==null?void 0:o.data)&&r.select===S(this,jo))f=S(this,Js);else try{U(this,jo,r.select),f=r.select(f),f=Bu(i==null?void 0:i.data,f,r),U(this,Js,f),U(this,Gr,null)}catch(N){U(this,Gr,N)}S(this,Gr)&&(w=S(this,Gr),f=S(this,Js),v=Date.now(),x="error");const g=h.fetchStatus==="fetching",y=x==="pending",_=x==="error",E=y&&g,k=f!==void 0,j={status:x,fetchStatus:h.fetchStatus,isPending:y,isSuccess:x==="success",isError:_,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:h.dataUpdatedAt,error:w,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:_&&!k,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:_&&k,isStale:Ih(t,r),refetch:this.refetch,promise:S(this,Kr),isEnabled:St(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=W=>{j.status==="error"?W.reject(j.error):j.data!==void 0&&W.resolve(j.data)},D=()=>{const W=U(this,Kr,j.promise=Wu());N(W)},I=S(this,Kr);switch(I.status){case"pending":t.queryHash===n.queryHash&&N(I);break;case"fulfilled":(j.status==="error"||j.data!==I.value)&&D();break;case"rejected":(j.status!=="error"||j.error!==I.reason)&&D();break}}return j}updateResult(){const t=S(this,Qe),r=this.createResult(S(this,re),this.options);if(U(this,zn,S(this,re).state),U(this,Qs,this.options),S(this,zn).data!==void 0&&U(this,Ys,S(this,re)),Fu(r,t))return;U(this,Qe,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!S(this,Xs).size)return!0;const o=new Set(i??S(this,Xs));return this.options.throwOnError&&o.add("error"),Object.keys(S(this,Qe)).some(a=>{const l=a;return S(this,Qe)[l]!==t[l]&&o.has(l)})};te(this,ie,S0).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&te(this,ie,Ku).call(this)}},et=new WeakMap,re=new WeakMap,To=new WeakMap,Qe=new WeakMap,zn=new WeakMap,Qs=new WeakMap,Kr=new WeakMap,Gr=new WeakMap,jo=new WeakMap,Js=new WeakMap,Ys=new WeakMap,Bn=new WeakMap,Wn=new WeakMap,Qr=new WeakMap,Xs=new WeakMap,ie=new WeakSet,Li=function(t){te(this,ie,Ju).call(this);let r=S(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(rt)),r},Vu=function(){te(this,ie,Gu).call(this);const t=ln(this.options.staleTime,S(this,re));if(Xn||S(this,Qe).isStale||!Uu(t))return;const n=m0(S(this,Qe).dataUpdatedAt,t)+1;U(this,Bn,setTimeout(()=>{S(this,Qe).isStale||this.updateResult()},n))},Hu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,re)):this.options.refetchInterval)??!1},qu=function(t){te(this,ie,Qu).call(this),U(this,Qr,t),!(Xn||St(this.options.enabled,S(this,re))===!1||!Uu(S(this,Qr))||S(this,Qr)===0)&&U(this,Wn,setInterval(()=>{(this.options.refetchIntervalInBackground||Ah.isFocused())&&te(this,ie,Li).call(this)},S(this,Qr)))},Ku=function(){te(this,ie,Vu).call(this),te(this,ie,qu).call(this,te(this,ie,Hu).call(this))},Gu=function(){S(this,Bn)&&(clearTimeout(S(this,Bn)),U(this,Bn,void 0))},Qu=function(){S(this,Wn)&&(clearInterval(S(this,Wn)),U(this,Wn,void 0))},Ju=function(){const t=S(this,et).getQueryCache().build(S(this,et),this.options);if(t===S(this,re))return;const r=S(this,re);U(this,re,t),U(this,To,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},S0=function(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(S(this,Qe))}),S(this,et).getQueryCache().notify({query:S(this,re),type:"observerResultsUpdated"})})},Nm);function Bk(e,t){return St(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mp(e,t){return Bk(e,t)||e.state.data!==void 0&&Yu(e,t,t.refetchOnMount)}function Yu(e,t,r){if(St(t.enabled,e)!==!1&&ln(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ih(e,t)}return!1}function Up(e,t,r,n){return(e!==t||St(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ih(e,r)}function Ih(e,t){return St(t.enabled,e)!==!1&&e.isStaleByTime(ln(t.staleTime,e))}function Wk(e,t){return!Fu(e.getCurrentResult(),t)}var E0=b.createContext(void 0),Vk=e=>{const t=b.useContext(E0);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Hk=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(E0.Provider,{value:e,children:t})),k0=b.createContext(!1),qk=()=>b.useContext(k0);k0.Provider;function Kk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
196var Gk=b.createContext(Kk()),Qk=()=>b.useContext(Gk),Jk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Yk=e=>{b.useEffect(()=>{e.clearReset()},[e])},Xk=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||Tk(r,[e.error,n])),Zk=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},eC=(e,t)=>e.isLoading&&e.isFetching&&!t,tC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Fp=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function rC(e,t,r){var h,p,f,w,v;const n=qk(),s=Qk(),i=Vk(),o=i.defaultQueryOptions(e);(p=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,o),o._optimisticResults=n?"isRestoring":"optimistic",Zk(o),Jk(o,s),Yk(s);const a=!i.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),d=!n&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(x=>{const m=d?l.subscribe(Ue.batchCalls(x)):rt;return l.updateResult(),m},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),tC(o,c))throw Fp(o,l,s);if(Xk({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((w=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||w.call(f,o,c),o.experimental_prefetchInRender&&!Xn&&eC(c,n)){const x=a?Fp(o,l,s):(v=i.getQueryCache().get(o.queryHash))==null?void 0:v.promise;x==null||x.catch(rt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function C0(e,t){return rC(e,zk)}/**
197 * @remix-run/router v1.23.0
198 *
199 * Copyright (c) Remix Software Inc.
200 *
201 * This source code is licensed under the MIT license found in the
202 * LICENSE.md file in the root directory of this source tree.
203 *
204 * @license MIT
205 */function vo(){return vo=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},vo.apply(this,arguments)}var Xr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Xr||(Xr={}));const zp="popstate";function nC(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return Xu("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:ll(s)}return iC(t,r,null,e)}function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function T0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sC(){return Math.random().toString(36).substr(2,8)}function Bp(e,t){return{usr:e.state,key:e.key,idx:t}}function Xu(e,t,r,n){return r===void 0&&(r=null),vo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?mi(t):t,{state:r,key:t&&t.key||n||sC()})}function ll(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 mi(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 iC(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=Xr.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(vo({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=Xr.Pop;let x=d(),m=x==null?null:x-c;c=x,l&&l({action:a,location:v.location,delta:m})}function p(x,m){a=Xr.Push;let g=Xu(v.location,x,m);c=d()+1;let y=Bp(g,c),_=v.createHref(g);try{o.pushState(y,"",_)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(_)}i&&l&&l({action:a,location:v.location,delta:1})}function f(x,m){a=Xr.Replace;let g=Xu(v.location,x,m);c=d();let y=Bp(g,c),_=v.createHref(g);o.replaceState(y,"",_),i&&l&&l({action:a,location:v.location,delta:0})}function w(x){let m=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof x=="str
205ing"?x:ll(x);return g=g.replace(/ $/,"%20"),Re(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(zp,h),l=x,()=>{s.removeEventListener(zp,h),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let m=w(x);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:f,go(x){return o.go(x)}};return v}var Wp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Wp||(Wp={}));function oC(e,t,r){return r===void 0&&(r="/"),aC(e,t,r,!1)}function aC(e,t,r,n){let s=typeof t=="string"?mi(t):t,i=Lh(s.pathname||"/",r);if(i==null)return null;let o=j0(e);lC(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=wC(i);a=vC(o[l],c,n)}return a}function j0(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Re(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 c=cn([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(Re(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),j0(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:mC(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of R0(i.path))s(i,o,l)}),t}function R0(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=R0(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function lC(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:gC(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const cC=/^:[\w-]+$/,uC=3,dC=2,hC=1,fC=10,pC=-2,Vp=e=>e==="*";function mC(e,t){let r=e.split("/"),n=r.length;return r.some(Vp)&&(n+=pC),t&&(n+=dC),r.filter(s=>!Vp(s)).reduce((s,i)=>s+(cC.test(i)?uC:i===""?hC:fC),n)}function gC(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 vC(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=Hp({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!h&&c&&r&&!n[n.length-1].route.index&&(h=Hp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 8,639 bytes, lines 205-214
205Object.assign(s,h.params),o.push({params:s,pathname:cn([i,h.pathname]),pathnameBase:SC(cn([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=cn([i,h.pathnameBase]))}return o}function Hp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=yC(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let v=a[h]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const w=a[h];return f&&!w?c[p]=void 0:c[p]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function yC(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),T0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function wC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return T0(!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 Lh(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 xC(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?mi(e):e;return{pathname:r?r.startsWith("/")?r:bC(r,t):t,search:EC(n),hash:kC(s)}}function bC(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 Tc(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 _C(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function N0(e,t){let r=_C(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function P0(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=mi(e):(s=vo({},e),Re(!s.pathname||!s.pathname.includes("?"),Tc("?","pathname","search",s)),Re(!s.pathname||!s.pathname.includes("#"),Tc("#","pathname","hash",s)),Re(!s.search||!s.search.includes("#"),Tc("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=xC(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const cn=e=>e.join("/").replace(/\/\/+/g,"/"),SC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),EC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function CC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const O0=["post","put","patch","delete"];new Set(O0);const TC=["get",...O0];new Set(TC);/**
206 * React Router v6.30.1
207 *
208 * Copyright (c) Remix Software Inc.
209 *
210 * This source code is licensed under the MIT license found in the
211 * LICENSE.md file in the root directory of this source tree.
212 *
213 * @license MIT
214 */function yo(){return yo=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},yo.apply(this,arguments)}const $h=b.createContext(null),jC=b.createContext(null),ts=b.createContext(null),$l=b.createContext(null),rs=b.createContext({outlet:null,matches:[],isDataRoute:!1}),A0=b.createContext(null);function RC(e,t){let{relative:r}=t===void 0?{}:t;Mo()||Re(!1);let{basename:n,navigator:s}=b.useContext(ts),{hash:i,pathname:o,search:a}=L0(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:cn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function Mo(){return b.useContext($l)!=null}function wn(){return Mo()||Re(!1),b.useContext($l).location}function I0(e){b.useContext(ts).static||b.useLayoutEffect(e)}function NC(){let{isDataRoute:e}=b.useContext(rs);return e?WC():PC()}function PC(){Mo()||Re(!1);let e=b.useContext($h),{basename:t,future:r,navigator:n}=b.useContext(ts),{matches:s}=b.useContext(rs),{pathname:i}=wn(),o=JSON.stringify(N0(s,r.v7_relativeSplatPath)),a=b.useRef(!1);return I0(()=>{a.current=!0}),b.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let h=P0(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:cn([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,o,i,e])}function L0(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=b.useContext(ts),{matches:s}=b.useContext(rs),{pathname:i}=wn(),o=JSON.stringify(N0(s,n.v7_relativeSplatPath));return b.useMemo(()=>P0(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function OC(e,t){return AC(e,t)}function AC(e,t,r,n){Mo()||Re(!1);let{navigator:s}=b.useContext(ts),{matches:i}=b.useContext(rs),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=wn(),d;if(t){var h;let x=typeof t=="string"?mi(t):t;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||Re(!1),d=x}else d=c;let p=d.pathname||"/",f=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=oC(e,{pathname:f}),v=MC(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:cn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:cn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return t&&v?b.createElement($l.Provider,{value:{location:yo({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Xr.Pop}},v):v}function IC(){let e=BC(),t=CC(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 b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:s},r):null,null)}const LC=b.createElement(IC,null);class $C extends b.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?b.createElement(rs.Provider,{value:this.props.routeContext},b.createElement(A0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DC(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext($h);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(rs.Provider,{value:t},n)}function MC(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||Re(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:p,errors:f}
214=r,w=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||w){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,h,p)=>{let f,w=!1,v=null,x=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,v=h.route.errorElement||LC,l&&(c<0&&p===0?(w=!0,x=null):c===p&&(w=!0,x=h.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,p+1)),g=()=>{let y;return f?y=v:w?y=x:h.route.Component?y=b.createElement(h.route.Component,null):h.route.element?y=h.route.element:y=d,b.createElement(DC,{match:h,routeContext:{outlet:d,matches:m,isDataRoute:r!=null},children:y})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement($C,{location:r.location,revalidation:r.revalidation,component:v,error:f,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var $0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($0||{}),cl=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}(cl||{});function UC(e){let t=b.useContext($h);return t||Re(!1),t}function FC(e){let t=b.useContext(jC);return t||Re(!1),t}function zC(e){let t=b.useContext(rs);return t||Re(!1),t}function D0(e){let t=zC(),r=t.matches[t.matches.length-1];return r.route.id||Re(!1),r.route.id}function BC(){var e;let t=b.useContext(A0),r=FC(cl.UseRouteError),n=D0(cl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function WC(){let{router:e}=UC($0.UseNavigateStable),t=D0(cl.UseNavigateStable),r=b.useRef(!1);return I0(()=>{r.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,yo({fromRouteId:t},i)))},[e,t])}function VC(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Lr(e){Re(!1)}function HC(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Xr.Pop,navigator:i,static:o=!1,future:a}=e;Mo()&&Re(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:yo({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=mi(n));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:w="default"}=n,v=b.useMemo(()=>{let x=Lh(d,l);return x==null?null:{location:{pathname:x,search:h,hash:p,state:f,key:w},navigationType:s}},[l,d,h,p,f,w,s]);return v==null?null:b.createElement(ts.Provider,{value:c},b.createElement($l.Provider,{children:r,value:v}))}function qC(e){let{children:t,location:r}=e;return OC(Zu(t),r)}new Promise(()=>{});function Zu(e,t){t===void 0&&(t=[]);let r=[];return b.Children.forEach(e,(n,s)=>{if(!b.isValidElement(n))return;let i=[...t,s];if(n.type===b.Fragment){r.push.apply(r,Zu(n.props.children,i));return}n.type!==Lr&&Re(!1),!n.props.index||!n.props.children||Re(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Zu(n.props.children,i)),r.push(o)}),r}/**
215 * React Router DOM v6.30.1
216 *
217 * Copyright (c) Remix Software Inc.
218 *
219 * This source code is licensed under the MIT license found in the
220 * LICENSE.md file in the root directory of this source tree.
221 *
222 * @license MIT
223 */function ed(){return ed=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},ed.apply(this,arguments)}function KC(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function GC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function QC(e,t){return e.button===0&&(!t||t==="_self")&&!GC(e)}const JC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],YC="6";try{window.__reactRouterVersion=YC}catch{}const XC="startTransition",qp=Bm[XC];function ZC(e){let{basename:t,children:r,future:n,window:s}=e,i=b.useRef();i.current==null&&(i.current=nC({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},d=b.useCallback(h=>{c&&qp?qp(()=>l(h)):l(h)},[l,c]);return b.useLayoutEffect(()=>o.listen(d),[o,d]),b.useEffect(()=>VC(n),[n]),b.createElement(HC,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const eT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dt=b.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:h}=t,p=KC(t,JC),{basename:f}=b.useContext(ts),w,v=!1;if(typeof c=="string"&&tT.test(c)&&(w=c,eT))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),E=Lh(_.pathname,f);_.origin===y.origin&&E!=null?c=E+_.search+_.hash:v=!0}catch{}let x=RC(c,{relative:s}),m=rT(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:h});function g(y){n&&n(y),y.defaultPrevented||m(y)}return b.createElement("a",ed({},p,{href:w||x,onClick:v||i?n:g,ref:r,target:l}))});var Kp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Kp||(Kp={}));var Gp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Gp||(Gp={}));function rT(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=NC(),c=wn(),d=L0(e,{relative:o});return b.useCallback(h=>{if(QC(h,r)){h.preventDefault();let p=n!==void 0?n:ll(c)===ll(d);l(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,d,n,s,r,e,i,o,a])}const nT=Sy("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ir=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?m1:"button";return u.jsx(o,{className:yt(nT({variant:t,size:r,className:e})),ref:i,...s})});ir.displayName="Button";function M0(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dl="Switch",[sT,XN]=di(Dl),[iT,oT]=sT(Dl),U0=b.forwardRef((e,t)=>
223{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,form:d,...h}=e,[p,f]=b.useState(null),w=Ae(t,y=>f(y)),v=b.useRef(!1),x=p?d||!!p.closest("form"):!0,[m,g]=dh({prop:s,defaultProp:i??!1,onChange:c,caller:Dl});return u.jsxs(iT,{scope:r,checked:m,disabled:a,children:[u.jsx(ke.button,{type:"button",role:"switch","aria-checked":m,"aria-required":o,"data-state":W0(m),"data-disabled":a?"":void 0,disabled:a,value:l,...h,ref:w,onClick:ue(e.onClick,y=>{g(_=>!_),x&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),x&&u.jsx(B0,{control:p,bubbles:!v.current,name:n,value:l,checked:m,required:o,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});U0.displayName=Dl;var F0="SwitchThumb",z0=b.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=oT(F0,r);return u.jsx(ke.span,{"data-state":W0(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});z0.displayName=F0;var aT="SwitchBubbleInput",B0=b.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},i)=>{const o=b.useRef(null),a=Ae(o,i),l=M0(r),c=jh(t);return b.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(l!==r&&f){const w=new Event("click",{bubbles:n});f.call(d,r),d.dispatchEvent(w)}},[l,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});B0.displayName=aT;function W0(e){return e?"checked":"unchecked"}var V0=U0,lT=z0;const cr=b.forwardRef(({className:e,...t},r)=>u.jsx(V0,{className:yt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:u.jsx(lT,{className:yt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));cr.displayName=V0.displayName;function H0(e,[t,r]){return Math.min(r,Math.max(t,e))}var cT=b.createContext(void 0);function uT(e){const t=b.useContext(cT);return e||t||"ltr"}var q0=["PageUp","PageDown"],K0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G0={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},gi="Slider",[td,dT,hT]=Jv(gi),[Q0,ZN]=di(gi,[hT]),[fT,Ml]=Q0(gi),J0=b.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:d,onValueChange:h=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:w,...v}=e,x=b.useRef(new Set),m=b.useRef(0),y=o==="horizontal"?pT:mT,[_=[],E]=dh({prop:d,defaultProp:c,onChange:D=>{var W;(W=[...x.current][m.current])==null||W.focus(),h(D)}}),k=b.useRef(_);function C(D){const I=xT(_,D);N(D,I)}function j(D){N(D,m.current)}function O(){const D=k.current[m.current];_[m.current]!==D&&p(_)}function N(D,I,{commit:W}={commit:!1}){const L=ET(i),Y=kT(Math.round((D-n)/i)*i+n,L),B=H0(Y,[n,s]);E((q=[])=>{const T=yT(q,B,I);if(ST(T,l*i)){m.current=T.indexOf(B);const R=String(T)!==String(q);return R&&W&&p(T),R?T:q}else return q})}return u.jsx(fT,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:m,thumbs:x.current,values:_,orientation:o,form:w,children:u.jsx(td.Provider,{scope:e.__scopeSlider,children:u.jsx(td.Slot,{scope:e.__scopeSlider,children:u.jsx(y,{"aria-disabled":a,"data-disabled":a?"":void 0,...v,ref:t,onPointerDown:ue(v.onPointerDown,()=>{a||(k.current=_)}),min:n,max:s,inverted:f,onSlideStart:a?void 0:C,onSlideMove:a?void 0:j,onSlideEnd:a?void 0:O,onHomeKeyDown:()=>!a&&N(n,0,{commit:!0}),onEndKeyDown:()=>!a&&N(s,_.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:I})=>{if(!a){const Y=q0.includes(D.key)||D.shiftKey&&K0.includes(D.key)?10:1,B=m.current,q=_[B],T=i*Y*I;N(q+T,B,{commit:!0})}}})})})})});J0.displayName=gi;var[Y0,X0]=Q0(gi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),pT=b.forwardRef((e,t)=>
223{const{min:r,max:n,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...d}=e,[h,p]=b.useState(null),f=Ae(t,y=>p(y)),w=b.useRef(void 0),v=uT(s),x=v==="ltr",m=x&&!i||!x&&i;function g(y){const _=w.current||h.getBoundingClientRect(),E=[0,_.width],C=Dh(E,m?[r,n]:[n,r]);return w.current=_,C(y-_.left)}return u.jsx(Y0,{scope:e.__scopeSlider,startEdge:m?"left":"right",endEdge:m?"right":"left",direction:m?1:-1,size:"width",children:u.jsx(Z0,{dir:v,"data-orientation":"horizontal",...d,ref:f,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const _=g(y.clientX);o==null||o(_)},onSlideMove:y=>{const _=g(y.clientX);a==null||a(_)},onSlideEnd:()=>{w.current=void 0,l==null||l()},onStepKeyDown:y=>{const E=G0[m?"from-left":"from-right"].includes(y.key);c==null||c({event:y,direction:E?-1:1})}})})}),mT=b.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...c}=e,d=b.useRef(null),h=Ae(t,d),p=b.useRef(void 0),f=!s;function w(v){const x=p.current||d.current.getBoundingClientRect(),m=[0,x.height],y=Dh(m,f?[n,r]:[r,n]);return p.current=x,y(v-x.top)}return u.jsx(Y0,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:u.jsx(Z0,{"data-orientation":"vertical",...c,ref:h,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const x=w(v.clientY);i==null||i(x)},onSlideMove:v=>{const x=w(v.clientY);o==null||o(x)},onSlideEnd:()=>{p.current=void 0,a==null||a()},onStepKeyDown:v=>{const m=G0[f?"from-bottom":"from-top"].includes(v.key);l==null||l({event:v,direction:m?-1:1})}})})}),Z0=b.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...c}=e,d=Ml(gi,r);return u.jsx(ke.span,{...c,ref:t,onKeyDown:ue(e.onKeyDown,h=>{h.key==="Home"?(o(h),h.preventDefault()):h.key==="End"?(a(h),h.preventDefault()):q0.c
223oncat(K0).includes(h.key)&&(l(h),h.preventDefault())}),onPointerDown:ue(e.onPointerDown,h=>{const p=h.target;p.setPointerCapture(h.pointerId),h.preventDefault(),d.thumbs.has(p)?p.focus():n(h)}),onPointerMove:ue(e.onPointerMove,h=>{h.target.hasPointerCapture(h.pointerId)&&s(h)}),onPointerUp:ue(e.onPointerUp,h=>{const p=h.target;p.hasPointerCapture(h.pointerId)&&(p.releasePointerCapture(h.pointerId),i(h))})})}),ew="SliderTrack",tw=b.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Ml(ew,r);return u.jsx(ke.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});tw.displayName=ew;var rd="SliderRange",rw=b.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Ml(rd,r),i=X0(rd,r),o=b.useRef(null),a=Ae(t,o),l=s.values.length,c=s.values.map(p=>iw(p,s.min,s.max)),d=l>1?Math.min(...c):0,h=100-Math.max(...c);return u.jsx(ke.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:h+"%"}})});rw.displayName=rd;var nd="SliderThumb",nw=b.forwardRef((e,t)=>{const r=dT(e.__scopeSlider),[n,s]=b.useState(null),i=Ae(t,a=>s(a)),o=b.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return u.jsx(gT,{...e,ref:i,index:o})}),gT=b.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,o=Ml(nd,r),a=X0(nd,r),[l,c]=b.useState(null),d=Ae(t,g=>c(g)),h=l?o.form||!!l.closest("form"):!0,p=jh(l),f=o.values[n],w=f===void 0?0:iw(f,o.min,o.max),v=wT(n,o.values.length),x=p==null?void 0:p[a.size],m=x?bT(x,w,a.direction):0;return b.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${w}% + ${m}px)`},children:[u.jsx(td.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(ke.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":o.min,"aria-valuenow":f,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:f===void 0?{display:"none"}:e.style,onFocus:ue(e.onFocus,()=>{o.valueIndexToChangeRef.current=n})})}),h&&u.jsx(sw,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:f},n)]})});nw.displayName=nd;var vT="RadioBubbleInput",sw=b.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=b.useRef(null),i=Ae(s,n),o=M0(t);return b.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const h=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(h)}},[o,t]),u.jsx(ke.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});sw.displayName=vT;function yT(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function iw(e,t,r){const i=100/(r-t)*(e-t);return H0(i,[0,100])}function wT(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function xT(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function bT(e,t,r){const n=e/2,i=Dh([0,50],[0,n]);return(n-i(t)*r)*r}function _T(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function ST(e,t){if(t>0){const r=_T(e);return Math.min(...r)>=t}return!0}function Dh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function ET(e){return(String(e).split(".")[1]||"").length}function kT(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var ow=J0,CT=tw,TT=rw,jT=nw;const aw=b.forwardRef(({className:e,...t},r)=>u.jsxs(ow,{ref:r,className:yt("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(CT,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(TT,{className:"absolute h-full bg-primary"})}),u.jsx(jT,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));aw.displayName=ow.displayName;const Qp={textSize:100,dyslexiaFont:!1,lineHeight:!1,highContrast:!1,invertColors:!1,grayscale:!1,highlightLinks:!1,focusOutline:!1,pauseAnimations:!1};function RT(){const[e,t]=b.useState(!1),[r,n]=b.useState(Qp);b.useEffect(()=>{const o=localStorage.getItem("accessibility-settings");if(o)try{n(JSON.parse(o))}catch{console.error("Failed to parse accessibility settings")}},[]),b.useEffect(()=>{const o=document.documentElement,a=document.body;o.style.fontSize=`${r.textSize}%`,r.dyslexiaFont?a.style.fontFamily="OpenDyslexic, Comic Sans MS, sans-serif":a.style.fontFamily="",a.classList.toggle("accessibility-line-height",r.lineHeight),a.classList.toggle("accessibility-high-contrast",r.highContrast),a.classList.toggle("accessibility-invert",r.invertColors),a.classList.toggle("accessibility-grayscale",r.grayscale),a.classList.toggle("accessibility-highlight-links",r.highlightLinks),a.classList.toggle("accessibility-focus-outline",r.focu
223sOutline),a.classList.toggle("accessibility-pause-animations",r.pauseAnimations),localStorage.setItem("accessibility-settings",JSON.stringify(r))},[r]);const s=(o,a)=>{n(l=>({...l,[o]:a}))},i=()=>{n(Qp),localStorage.removeItem("accessibility-settings")};return u.jsxs(u.Fragment,{children:[u.jsx("style",{children:`
224        .accessibility-line-height {
225          line-height: 2 !important;
226        }
227        .accessibility-line-height * {
228          line-height: inherit !important;
229        }
230        .accessibility-high-contrast {
231          filter: contrast(1.5) !important;
232        }
233        .accessibility-invert {
234          filter: invert(1) hue-rotate(180deg) !important;
235        }
236        .accessibility-invert img,
237        .accessibility-invert video {
238          filter: invert(1) hue-rotate(180deg) !important;
239        }
240        .accessibility-grayscale {
241          filter: grayscale(1) !important;
242        }
243        .accessibility-highlight-links a {
244          background-color: yellow !important;
245          color: black !important;
246          text-decoration: underline !important;
247          padding: 2px 4px !important;
248        }
249        .accessibility-focus-outline *:focus {
250          outline: 4px solid #E85A19 !important;
251          outline-offset: 4px !important;
252        }
253        .accessibility-pause-animations *,
254        .accessibility-pause-animations *::before,
255        .accessibility-pause-animations *::after {
256          animation-play-state: paused !important;
257          transition: none !important;
258        }
259      `}),u.jsx("button",{onClick:()=>t(!0),className:"fixed bottom-6 right-6 z-50 flex h-14 w-14 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-elevated transition-transform hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":"Open accessibility options","aria-expanded":e,children:u.jsx(l_,{className:"h-7 w-7","aria-hidden":"true"})}),e&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1),"aria-hidden":"true"}),u.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Accessibility options",className:"fixed bottom-0 right-0 z-50 max-h-[90vh] w-full overflow-y-auto rounded-t-3xl bg-card p-6 shadow-elevated sm:bottom-6 sm:right-6 sm:max-w-md sm:rounded-3xl",children:[u.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[u.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground",children:"Accessibility Options"}),u.jsx("button",{onClick:()=>t(!1),className:"rounded-full p-2 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close accessibility options",children:u.jsx(wh,{className:"h-6 w-6"})})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(_c,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsxs("span",{className:"font-medium text-foreground",children:["Text Size: ",r.textSize,"%"]})]}),u.jsx(aw,{value:[r.textSize],onValueChange:([o])=>s("textSize",o),min:75,max:150,step:25,className:"w-full","aria-label":"Adjust text size"}),u.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[u.jsx("span",{children:"75%"}),u.jsx("span",{children:"100%"}),u.jsx("span",{children:"125%"}),u.jsx("span",{children:"150%"})]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(_c,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Dyslexia-friendly font"})]}),u.jsx(cr,{checked:r.dyslexiaFont,onCheckedChange:o=>s("dyslexiaFont",o),"aria-label":"Toggle dyslexia-friendly font"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(_c,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Increased line height"})]}),u.jsx(cr,{checked:r.lineHeight,onCheckedChange:o=>s("lineHeight",o),"aria-label":"Toggle increased line height"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(u_,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"High contrast"})]}),u.jsx(cr,{checked:r.highContrast,onCheckedChange:o=>s("highContrast",o),"aria-label":"Toggle high contrast mode"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(mp,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Invert colors"})]}),u.jsx(cr,{checked:r.invertColors,onCheckedChange:o=>s("invertColors",o),"aria-label":"Toggle invert colors"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(mp,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Grayscale"})]}),u.jsx(cr,{checked:r.grayscale,onCheckedChange:o=>s("grayscale",o),"aria-label":"Toggle grayscale mode"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(g_,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Highlight links"})]}),u.jsx(cr,{checked:r.highlightLinks,onCheckedChange:o=>s("highlightLinks",o),"aria-label":"Toggle highlight links"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(f_,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Enhanced focus outlines"})]}),u.jsx(cr,{checked:r.focusOutline,onCheckedChange:o=>s("focusOutline",o),"aria-label":"Toggle enhanced focus outlines"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(y_,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"text-foreground",children:"Pause animations"})]}),u.jsx(cr,{checked:r.pauseAnimations,onCheckedChange:o=>s("pauseAnimations",o),"aria-label":"Toggle pause animations"})]})]}),u.jsxs(ir,{onClick:i,variant:"outline",className:"w-full gap-2",children:[u.jsx(w_,{className:"h-4 w-4"}),"Reset All Settings"]})]})]})]})]})}const NT=()=>{const{pathname:e,hash:t}=wn(),[r,n]=b.useState(!1);return b.useEffect(()=>{const s=window.matchMedia("(prefers-reduced-motion: reduce)");n(s.matches);const i=o=>{n(o.matches)};
259return s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[]),b.useEffect(()=>{if(t){const s=setTimeout(()=>{const i=document.querySelector(t);i&&i.scrollIntoView({behavior:r?"auto":"smooth",block:"start"})},100);return()=>clearTimeout(s)}else window.scrollTo({top:0,left:0,behavior:"auto"})},[e,t,r]),b.useEffect(()=>{const s=document.getElementById("main-content");if(s&&!t){const i=setTimeout(()=>{s.focus({preventScroll:!0})},50);return()=>clearTimeout(i)}},[e,t]),null},PT="/assets/monarca-logo-header-DtjblTNT.svg",lw="/assets/monarca-logo-white-CE9s1zy_.svg",Jp=[{name:"Menu",href:"/menu"},{name:"About",href:"/about"},{name:"Contact",href:"/contact"}];function vi(){const[e,t]=b.useState(!1),[r,n]=b.useState(!1),s=wn(),i=b.useRef(null),o=b.useRef(null),a=b.useRef(null),l=s.pathname==="/";b.useEffect(()=>{const h=()=>{t(window.scrollY>50)};return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[]),b.useEffect(()=>{n(!1)},[s]),b.useEffect(()=>{r&&a.current&&a.current.focus()},[r]);const c=b.useCallback(h=>{var p;h.key==="Escape"&&(n(!1),(p=o.current)==null||p.focus())},[]),d=e||!l;return u.jsxs(u.Fragment,{children:[u.jsx("a",{href:"#main-content",className:"skip-to-content",children:"Skip to main content"}),u.jsxs("header",{className:`fixed left-0 right-0 top-0 z-50 transition-all duration-500 ${d?"bg-cream/95 shadow-soft backdrop-blur-md":"bg-transparent"}`,children:[u.jsxs("nav",{className:"mx-auto flex max-w-7xl items-center justify-between px-6 py-4","aria-label":"Main navigation",children:[u.jsx(dt,{to:"/",className:"focus-ring flex items-center rounded-lg","aria-label":"Monarca - Home",children:u.jsx("img",{src:d?PT:lw,alt:"Monarca Mexican Restaurant",className:"h-14 w-auto transition-all sm:h-[68px] object-contain"})}),u.jsx("div",{className:"hidden items-center gap-10 lg:flex",children:Jp.map(h=>u.jsxs(dt,{to:h.href,className:`focus-ring relative py-1 text-sm font-bold uppercase tracking-widest transition-colors ${s.pathname===h.href?"text-primary":d?"text-charcoal hover:text-primary":"text-cream/90 hover:text-cream"}`,"aria-current":s.pathname===h.href?"page":void 0,children:[h.name,s.pathname===h.href&&u.jsx("span",{className:"absolute -bottom-1 left-0 h-0.5 w-full rounded-full bg-primary","aria-hidden":"true"})]},h.name))}),u.jsx("div",{className:"hidden lg:block",children:u.jsx(dt,{to:"/order",children:u.jsx(ir,{className:`rounded-full px-6 py-2 text-sm font-semibold uppercase tracking-wide transition-all ${d?"bg-primary text-cream hover:bg-orange-dark":"bg-cream text-charcoal hover:bg-white"}`,children:"Order Online"})})}),u.jsx("button",{ref:o,type:"button",className:`focus-ring rounded-lg p-2 lg:hidden transition-colors ${d?"text-charcoal":"text-cream"}`,onClick:()=>n(!r),"aria-expanded":r,"aria-controls":"mobile-menu","aria-label":r?"Close menu":"Open menu",children:r?u.jsx(wh,{className:"h-6 w-6","aria-hidden":"true"}):u.jsx(v_,{className:"h-6 w-6","aria-hidden":"true"})})]}),u.jsx("div",{id:"mobile-menu",ref:i,className:`lg:hidden transition-all duration-300 ${r?"max-h-96 opacity-100":"max-h-0 opacity-0 overflow-hidden"}`,onKeyDown:c,role:"menu","aria-label":"Mobile navigation menu",children:u.jsxs("nav",{className:"mx-4 mb-4 flex flex-col gap-1 rounded-2xl bg-cream p-4 shadow-elevated",children:[Jp.map((h,p)=>u.jsx(dt,{ref:p===0?a:void 0,to:h.href,className:`focus-ring rounded-xl px-4 py-3 text-sm font-bold uppercase tracking-widest transition-colors ${s.pathname===h.href?"bg-primary/10 text-primary":"text-charcoal hover:bg-muted"}`,role:"menuitem","aria-current":s.pathname===h.href?"page":void 0,children:h.name},h.name)),u.jsx(dt,{to:"/order",className:"mt-2",role:"menuitem",children:u.jsx(ir,{className:"w-full rounded-full bg-primary py-3 font-semibold text-cream hover:bg-orange-dark",children:"Order Online"})})]})})]})]})}function yi(){const e=wn();return u.jsxs("footer",{className:"bg-charcoal text-cream",children:[u.jsx("div",{className:"mx-auto max-w-7xl px-6 py-16 sm:py-20",children:u.jsxs("div",{className:"grid gap-12 md:grid-cols-2 lg:grid-cols-4",children:[u.jsxs("div",{className:"lg:col-span-2",children:[u.jsx(dt,{to:"/",className:"inline-block",children:u.jsx("img",{src:lw,alt:"Monarca Mexican Restaurant",className:"h-24 w-auto"})}),u.jsx("p",{className:"mt-4 max-w-sm text-cream/80",children:"A family-run Mexican restaurant serving traditional recipes with fresh ingredients and bold flavor since 2015."}),u.jsxs("div",{className:"mt-6 flex gap-3",children:[u.jsx("a",{href:"https://www.instagram.com/monarca_taco/",target:"_blank",rel:"noopener noreferrer",className:"focus-ring flex h-11 w-11 items-center justify-center rounded-full bg-cream/10 transition-colors hover:bg-primary","aria-label":"Follow us on Instagram",children:u.jsx(m_,{className:"h-5 w-5","aria-hidden":"true"})}),u.jsx("a",{href:"https://www.facebook.com/profile.php?id=61565562497421",target:"_blank",rel:"noopener noreferrer",className:"focus-ring flex h-11 w-11 items-center justify-center rounded-full bg-cream/10 transition-colors hover:bg-primary","aria-label":"Follow us on Facebook",children:u.jsx(h_,{className:"h-5 w-5","aria-hidden":"true"})})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-5 text-sm font-semibold uppercase tracking-widest text-cream/50",children:"Explore"}),u.jsx("nav",{"aria-label":"Footer navigation",children:u.jsx("ul",{className:"space-y-3",children:[{name:"Menu",href:"/menu"},{name:"Order Online",href:"/order"},{name:"About Us",href:"/about"},{name:"Contact",href:"/contact"}
259,{name:"Accessibility",href:"/accessibility"}].map(t=>u.jsx("li",{children:u.jsx(dt,{to:t.href,className:"focus-ring rounded text-cream/70 transition-colors hover:text-primary","aria-current":e.pathname===t.href?"page":void 0,children:t.name})},t.name))})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-5 text-sm font-semibold uppercase tracking-widest text-cream/50",children:"Contact"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(vh,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary","aria-hidden":"true"}),u.jsxs("address",{className:"not-italic text-cream/80",children:["21439 Foothill Blvd.",u.jsx("br",{}),"Hayward, CA"]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(yh,{className:"h-5 w-5 shrink-0 text-primary","aria-hidden":"true"}),u.jsx("a",{href:"tel:+15102745097",className:"focus-ring rounded text-cream/80 transition-colors hover:text-primary","aria-label":"Call us at (510) 274-5097",children:"(510) 274-5097"})]}),u.jsx("div",{className:"pt-2 text-sm text-cream/70",children:u.jsx("p",{children:"Open Daily: 9am - 9pm"})})]})]})]})}),u.jsxs("div",{className:"border-t border-cream/10",children:[u.jsxs("div",{className:"mx-auto flex max-w-7xl flex-col items-center justify-between gap-4 px-6 py-6 text-sm text-cream/40 md:flex-row",children:[u.jsxs("p",{children:["© ",new Date().getFullYear()," Monarca Mexican Restaurant"]}),u.jsxs("p",{className:"text-center",children:["We're committed to accessibility."," ",u.jsx(dt,{to:"/accessibility",className:"underline hover:text-primary","aria-current":e.pathname==="/accessibility"?"page":void 0,children:"Learn more"})]})]}),u.jsxs("div",{className:"border-t border-cream/5 py-4 text-center text-xs text-cream/30",children:["Created and powered by"," ",u.jsx("a",{href:"https://www.metadesign-development.com",target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:"mdda"})]})]})]})}const OT="/assets/hero-burrito-wet-Bww8h5tB.jpg",AT="/assets/hero-camarones-chile-_MNutH5d.jpg",IT="/assets/hero-chilaquiles-asada-B3-WREN5.jpg",LT="/assets/hero-quesabirrias-2RhyWWsJ.jpg",$T="/assets/hero-taco-avocado-BQzSEhqI.jpg",Sn=[{id:1,image:OT,alt:"Smothered wet burrito topped with melted cheese and red enchilada sauce"},{id:2,image:AT,alt:"Camarones al chile with shrimp in savory sauce served with rice and beans"},{id:3,image:IT,alt:"Chilaquiles con carne asada with eggs, rice, and refried beans"},{id:4,image:LT,alt:"Crispy quesabirria tacos served with consommé for dipping"},{id:5,image:$T,alt:"Street taco with carne asada, purple cabbage, and fresh avocado"}];function DT(){const[e,t]=b.useState(0),r=b.useRef(null),n=b.useCallback(()=>{t(a=>(a+1)%Sn.length)},[]),s=b.useCallback(()=>{t(a=>(a-1+Sn.length)%Sn.length)},[]),i=b.useCallback(a=>{a.key==="ArrowRight"||a.key==="ArrowDown"?(a.preventDefault(),n()):a.key==="ArrowLeft"||a.key==="ArrowUp"?(a.preventDefault(),s()):a.key==="Home"?(a.preventDefault(),t(0)):a.key==="End"&&(a.preventDefault(),t(Sn.length-1))},[n,s]);b.useEffect(()=>{const a=setInterval(n,5e3);return()=>clearInterval(a)},[n]);const o=()=>{const a=document.getElementById("statement-section");a==null||a.scrollIntoView({behavior:"smooth"})};return u.jsxs("section",{className:"relative h-screen w-full overflow-hidden","aria-label":"Hero",children:[Sn.map((a,l)=>u.jsx("div",{id:`slide-${l}`,role:"tabpanel",className:`absolute inset-0 transition-opacity duration-1500 ${l===e?"opacity-100":"opacity-0"}`,"aria-hidden":l!==e,"aria-labelledby":`slide-tab-${l}`,children:u.jsx("img",{src:a.image,alt:l===e?a.alt:"",className:"h-full w-full object-cover scale-105",loading:l===0?"eager":"lazy"})},a.id)),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-charcoal/40 via-charcoal/20 to-charcoal/70"}),u.jsxs("div",{className:"relative z-10 flex h-full flex-col items-center justify-center px-6 text-center",children:[u.jsx("div",{className:"mb-8 animate-fade-in",children:u.jsx("span",{className:"font-display text-lg tracking-[0.3em] text-cream/80 uppercase",children:"Mexican Restaurant"})}),u.jsxs("h1",{className:"mb-6 max-w-4xl font-display text-5xl font-bold leading-[1.1] text-cream sm:text-6xl md:text-7xl lg:text-8xl animate-fade-in-up",style:{animationDelay:"0.2s"},children:["Authentic Mexican Food,"," ",u.jsx("span",{className:"text-primary",children:"Family Made"})]}),u.jsx("p",{className:"mb-10 max-w-xl text-lg text-cream/80 sm:text-xl animate-fade-in-up",style:{animationDelay:"0.4s"},children:"Traditional recipes. Fresh ingredients. Made with love."}),u.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row animate-fade-in-up",style:{animationDelay:"0.6s"},children:[u.jsx(dt,{to:"/menu",children:u.jsx(ir,{className:"h-14 roun
259ded-full bg-primary px-10 text-lg font-semibold text-cream hover:bg-orange-dark shadow-lg hover:shadow-xl transition-all duration-300",children:"View Menu"})}),u.jsx(dt,{to:"/order",children:u.jsx(ir,{variant:"outline",className:"h-14 rounded-full border-2 border-cream/50 bg-transparent px-10 text-lg font-semibold text-cream hover:bg-cream hover:text-charcoal transition-all duration-300",children:"Order Online"})})]})]}),u.jsx("button",{onClick:o,className:"absolute bottom-8 left-1/2 z-20 -translate-x-1/2 animate-float focus-ring rounded-full p-2","aria-label":"Scroll to content",children:u.jsx(c_,{className:"h-8 w-8 text-cream/70"})}),u.jsx("div",{ref:r,className:"absolute bottom-8 right-8 z-20 hidden gap-2 sm:flex",role:"tablist","aria-label":"Hero slideshow navigation",onKeyDown:i,children:Sn.map((a,l)=>u.jsx("button",{onClick:()=>t(l),className:`h-2 rounded-full transition-all duration-500 focus-ring ${l===e?"w-8 bg-primary":"w-4 bg-cream/50 hover:bg-cream/70"}`,role:"tab","aria-selected":l===e,"aria-label":`Go to slide ${l+1} of ${Sn.length}`,"aria-controls":`slide-${l}`,tabIndex:l===e?0:-1},l))})]})}function MT(){return u.jsxs("section",{id:"statement-section",className:"relative bg-cream py-24 sm:py-32 lg:py-40","aria-labelledby":"statement-heading",children:[u.jsx("div",{className:"pointer-events-none absolute left-0 top-0 h-64 w-64 -translate-x-1/2 -translate-y-1/2 rounded-[60%_40%_30%_70%/60%_30%_70%_40%] bg-primary/5"}),u.jsx("div",{className:"pointer-events-none absolute bottom-0 right-0 h-48 w-48 translate-x-1/3 translate-y-1/3 rounded-[40%_60%_70%_30%/40%_70%_30%_60%] bg-sage/10"}),u.jsxs("div",{className:"container-narrow px-6 text-center",children:[u.jsx("p",{className:"mb-6 font-body text-sm font-medium uppercase tracking-[0.2em] text-primary",children:"Family-Owned"}),u.jsxs("h2",{id:"statement-heading",className:"mx-auto mb-8 max-w-4xl font-display text-3xl font-semibold leading-snug text-charcoal sm:text-4xl md:text-5xl lg:text-6xl",children:["We believe the best meals are made with"," ",u.jsx("span",{className:"text-primary",children:"Family-Owned Since 2024"}),","," ",u.jsx("span",{className:"text-primary",children:"heart"}),", and the"," ",u.jsx("span",{className:"text-primary",children:"freshest ingredients"}),"."]}),u.jsxs(dt,{to:"/about",className:"focus-ring group inline-flex items-center gap-2 rounded-lg text-lg font-medium text-charcoal transition-colors hover:text-primary",children:[u.jsxs("span",{className:"relative",children:["Our Story",u.jsx("span",{className:"absolute -bottom-1 left-0 h-0.5 w-0 bg-primary transition-all duration-300 group-hover:w-full"})]}),u.jsx(mh,{className:"h-5 w-5 transition-transform group-hover:translate-x-1","aria-hidden":"true"})]})]})]})}const UT="/assets/menu-camarones-diabla-Ci4HwQ_z.jpg",cw="/assets/menu-carnitas-CoTGVZAL.jpg",FT="/assets/menu-chilaquiles-asada-BUNqgEus.jpg",zT="/assets/menu-chilaquiles-divorciados-BphKC6oB.jpg",BT="/assets/menu-chilaquiles-huevo-yIog8msB.jpg",WT="/assets/menu-ensalada-pollo-BV13lYFv.jpg",VT="/assets/menu-hamburguesa-J6Rg2IjU.jpg",uw="/assets/menu-quesabirria-Bh0F5YSU.jpg",HT="/assets/menu-caldo-pollo-DekWYr-x.jpg",qT="/assets/hero-camarones-chile-_MNutH5d.jpg",Yp=[{id:"1",name:"Camarones a la Diabla",description:"Spicy shrimp sautéed in a fiery red chile sauce",price:"$18.99",image:UT},{id:"2",name:"Carnitas",description:"Slow-cooked pork, tender and crispy, served with fresh tortillas",price:"$18.50",image:cw},{id:"3",name:"Chilaquiles con Asada",description:"Crispy tortilla chips topped with grilled steak, salsa, crema and queso fresco",price:"$15.99",image:FT},{id:"4",name:"Chilaquiles Divorciados",description:"Half red, half green salsa chilaquiles with eggs and crema",price:"$14.50",image:zT},{id:"5",name:"Chilaquiles con Huevo",description:"Classic chilaquiles topped with sunny-side eggs",price:"$13.50",image:BT},{id:"6",name:"Ensalada de Pollo",description:"Fresh mixed greens with grilled chicken, avocado and chipotle dressing",price:"$12.99",image:WT},{id:"7",name:"Hamburguesa Mexicana",description:"Juicy beef patty with jalapeños, queso, avocado and chipotle mayo",price:"$14.99",image:VT},{id:"8",name:"Quesabirria",description:"Birria-stuffed quesadilla served with rich consomé for dipping",price:"$15.99",image:uw},{id:"9",name:"Caldo de Pollo",description:"Traditional chicken soup with vegetables, rice and warm tortillas",price:"$12.99",image:HT},{id:"10",name:"Camarones al Chile",description:"Shrimp sautéed with bell peppers in a savory chile sauce",price:"$17.99",image:qT}];function KT(){const e=b.useRef(null);b.useEffect(()=>{const r=e.current;if(!r)return;let n,s=0;const i=.5,o=()=>{s+=i;const c=r.scrollWidth/2;s>=c&&(s=0),r.scrollLeft=s,n=requestAnimationFrame(o)};n=requestAnimationFrame(o);const a=()=>cancelAnimationFrame(n),l=()=>{n=requestAnimationFrame(o)};return r.addEventListener("mouseenter",a),r.addEventListener("mouseleave",l),()=>{cancelAnimationFrame(n),r.removeEventListener("mouseenter",a),r.removeEventListener("mouseleave",l)}},[]);const t=[...Yp,...Yp];return u.jsxs("section",{className:"bg-charcoal py-20 sm:py-28","aria-labelledby":"showcase-heading",children:[u.jsx("div",{className:"container-narrow px-6",children:u.jsxs("div",{className:"mb-16 flex flex-col items-center justify-between gap-6 text-center sm:flex-row sm:text-left",children:[u.jsxs("div",{children:[u.jsx("p",{className:"mb-3 font-body text-sm font-medium uppercase tracking-[0.2em] text-primary",children:"Fan Favorites"}),u.jsx("h2",{id:"showcase-heading",className:"font-display text-3xl font-bold text-cream sm:text-4xl md:text-5xl",children:"Signature Dishes"})]}),u.jsx(dt,{to:"/menu",children:u.jsxs(ir,{variant:"outline",className:"group gap-2 rounded-full border-cream/30 bg-transparent text-cream hover:border-primary hover:bg-transparent hover:text-primary",children:["Full Menu",u.jsx(mh,{className:"h-4 w-4 transition-transform group-hover:translate-x-1","aria-hidden":"true"})]})})]})}),u.jsx("div",{ref:e,className:"flex gap-6 overflow-hidden px-6",style:{scrollBehavior:"auto"},children:t.map((r,n)=>u.jsxs("article",{className:"group relative flex-shrink-0 overflow-hidden rounded-3xl",style:{width:"300px"},children:[u.jsx("div",{className:"aspect-square overflow-hidden",children:u.jsx("img",{src:r.image,alt:"","aria-hidden":"true",className:"h-full w-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy"})}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-charcoal/90 via-charcoal/30 to-transparent opacity-80 transition-opacity duration-300 group-hover:opacity-100"}),u.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-6",children:[u.jsx("h3",{className:"mb-2 font-display text-xl font-bold text-cream",children:r.name}),u.jsx("p",{className:"line-clamp-2 text-sm text-cream/80 opacity-0 transition-opacity duration-300 group-hover:opacity-100",children:r.description})]})]},`${r.id}-${n}`))})]})}const GT="/assets/taco-papa-banner-Dw7zLaSg.jpg";function QT(){return u.jsxs("section",{className:"relative h-[60vh] min-h-[400px] w-full overflow-hidden","aria-labelledby":"order-banner-heading",children:[u.jsx("img",{src:GT,alt:"Crispy taco de papa topped with fresh lettuce, crema, and served with salsa",className:"h-full w-full object-cover",loading:"lazy"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-charcoal/80 via-charcoal/40 to-transparent"}),u.jsx("div",{className:"absolute inset-0 flex items-center",children:u.jsx("div",{className:"container-narrow px-6",children:u.jsxs("div",{className:"max-w-xl",children:[u.jsx("p",{className:"mb-4 font-body text-sm font-medium uppercase tracking-[0.2em] text-primary",children:"Order Now"}),u.jsx("h2",{id:"order-banner-heading",className:"mb-6 font-display text-4xl font-bold text-cream sm:text-5xl lg:text-6xl",children:"Ready When You Are"}),u.jsx("p",{className:"mb-8 text-lg text-cream/80",children:"Skip the wait. Order pickup or delivery and enjoy your favorites at home."}),u.jsxs(dt,{to:"/order",className:"focus-ring group inline-flex items-center gap-2 rounded-full bg-primary px-8 py-4 font-semibold text-cream transition-all hover:bg-orange-dark hover:shadow-lg",children:["Order Online",u.jsx(mh,{className:"h-5 w-5 transition-transform group-hover:translate-x-1","aria-hidden":"true"})]})]})})})]})}function JT(){return u.jsx("section",{id:"location",className:"bg-[hsl(var(--navy))] py-20 sm:py-28","aria-labelledby":"location-heading",children:u.jsxs("div",{className:"container-narrow px-6",children:[u.jsxs("div",{className:"mb-16 text-center",children:[u.jsx("p",{className:"mb-3 font-body text-sm font-medium uppercase tracking-[0.2em] text-orange-glow",children:"Visit Us"}),u.jsx("h2",{id:"location-heading",className:"font-display text-3xl font-bold text-white sm:text-4xl md:text-5xl",children:"Come Say Hello"})]}),u.jsxs("div",{className:"grid gap-12 lg:grid-cols-2",children:[u.jsx("div",{className:"relative overflow-hidden rounded-3xl bg-white/10 shadow-card",children:u.jsx("div",{className:"aspect-[4/3] w-full",children:u.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3159.8876!2d-122.0876!3d37.6789!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x808f9311a2fd6d03%3A0x8e3a3c4e5f6a7b8c!2s21439%20Foothill%20Blvd%2C%20Hayward%2C%20CA!5e0!3m2!1sen!2sus!4v1234567890",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Monarca location map",className:"h-full w-full"})})}),u.jsxs("div",{className:"flex flex-col justify-center gap-6",children:[u.jsxs("div",{className:"flex items-start gap-5 rounded-2xl bg-white/10 p-6 backdrop-blur-sm",children:[u.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-orange/20",children:u.jsx(vh,{className:"h-7 w-7 text-orange-glow","aria-hidden":"true"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-1 font-display text-lg font-semibold text-white",children:"Address"}),u.jsxs("address",{className:"not-italic text-white/80",children:["21439 Foothill Blvd.",u.
259jsx("br",{}),"Hayward, CA"]})]})]}),u.jsxs("div",{className:"flex items-start gap-5 rounded-2xl bg-white/10 p-6 backdrop-blur-sm",children:[u.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-orange/20",children:u.jsx(yh,{className:"h-7 w-7 text-orange-glow","aria-hidden":"true"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-1 font-display text-lg font-semibold text-white",children:"Phone"}),u.jsx("a",{href:"tel:+15102745097",className:"focus-ring rounded text-white/80 transition-colors hover:text-orange-glow","aria-label":"Call us at (510) 274-5097",children:"(510) 274-5097"})]})]}),u.jsxs("div",{className:"flex items-start gap-5 rounded-2xl bg-white/10 p-6 backdrop-blur-sm",children:[u.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-orange/20",children:u.jsx(gh,{className:"h-7 w-7 text-orange-glow","aria-hidden":"true"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-1 font-display text-lg font-semibold text-white",children:"Hours"}),u.jsx("p",{className:"text-white/80",children:"Open Daily: 9am - 9pm"})]})]})]})]})]})})}const Mh=b.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:yt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));Mh.displayName="Input";function Ul(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 YT(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?i(d.value):s(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}const XT=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Uh extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class ZT extends Uh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Xp extends Uh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Zp extends Uh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var sd;(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"})(sd||(sd={}));class ej{constructor(t,{headers:r={},customFetch:n,region:s=sd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=XT(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return YT(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:d,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const w=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,w.searchParams.set("forceFunctionRegion",f));let v;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",v=c):typeof c=="string"?(p["Content-Type"]="text/plain",v=c):typeof FormData<"u"&&c instanceof FormData?v=c:(p["Content-Type"]="application/json",v=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?v=JSON.stringify(c):v=c;let x=d;h&&(o=new AbortController,i=setTimeout(()=>
259o.abort(),h),d?(x=o.signal,d.addEventListener("abort",()=>o.abort())):x=o.signal);const m=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:v,signal:x}).catch(E=>{throw new ZT(E)}),g=m.headers.get("x-relay-error");if(g&&g==="true")throw new Xp(m);if(!m.ok)throw new Zp(m);let y=((s=m.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return y==="application/json"?_=yield m.json():y==="application/octet-stream"||y==="application/pdf"?_=yield m.blob():y==="text/event-stream"?_=m:y==="multipart/form-data"?_=yield m.formData():_=yield m.text(),{data:_,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof Zp||a instanceof Xp?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var tj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},rj=class{constructor(e){var t,r;this.shouldThrowOnError=!1,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,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;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");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,c=i.status,d=i.statusText;if(i.ok){var h,p;if(r.method!=="HEAD"){var f;const m=await i.text();m===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((f=r.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?a=m:a=JSON.parse(m))}const v=(h=r.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),x=(p=i.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");v&&x&&x.length>1&&(l=parseInt(x[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var w;const v=await i.text();try{o=JSON.parse(v),Array.isArray(o)&&i.status===404&&(a=[],o=null,c=200,d="OK")}catch{i.status===404&&v===""?(c=204,d="No Content"):o={message:v}}if(o&&r.isMaybeSingle&&(!(o==null||(w=o.details)===null||w===void 0)&&w.includes("0 rows"))&&(o=null,c=200,d="OK"),o&&r.shouldThrowOnError)throw new tj(o)}return{error:o,data:a,count:l,status:c,statusText:d}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="";const l=i==null?void 0:i.cause;if(l){var c,d,h,p;const w=(c=l==null?void 0:l.message)!==null&&c!==void 0?c:"",v=(d=l==null?void 0:l.code)!==null&&d!==void 0?d:"";a=`${(h=i==null?void 0:i.name)!==null&&h!==void 0?h:"FetchError"}: ${i==null?void 0:i.message}`,a+=`
260
261Caused by: ${(p=l==null?void 0:l.name)!==null&&p!==void 0?p:"Error"}: ${w}`,v&&(a+=` (${v})`),l!=null&&l.stack&&(a+=`
262${l.stack}`)}else{var f;a=(f=i==null?void 0:i.stack)!==null&&f!==void 0?f:""}return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},nj=class extends rj{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
262explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const em=new RegExp("[,()]");var gs=class extends nj{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"&&em.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"&&em.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).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}},sj=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new gs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2620){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new gs({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(c.length>0){const d=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new gs({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new gs({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new gs({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},ij=class dw{constructor(t,{headers:r={},schema:n,fetch:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new sj(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new dw(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const d=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(d)),h=n&&Object.values(r).some(d);h?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,w])=>w!==void 0).map(([f,w])=>[f,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([f,w])=>{l.searchParams.append(f,w)})):(a="POST",c=r);const p=new Headers(this.headers);return h?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new gs({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};class oj{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,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
263import ws from "ws"
264new 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+=`
265
266Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const aj="2.90.1",lj=`realtime-js/${aj}`,hw="1.0.0",cj="2.0.0",tm=hw,id=1e4,uj=1e3,dj=100;var Mr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Mr||(Mr={}));var Ne;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ne||(Ne={}));var zt;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(zt||(zt={}));var od;(function(e){e.websocket="websocket"}
266)(od||(od={}));var Rn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Rn||(Rn={}));class hj{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let w=new DataView(f),v=0;w.setUint8(v++,this.KINDS.userBroadcastPush),w.setUint8(v++,l.length),w.setUint8(v++,a.length),w.setUint8(v++,o.length),w.setUint8(v++,c.length),w.setUint8(v++,h.length),w.setUint8(v++,r),Array.from(l,m=>w.setUint8(v++,m.charCodeAt(0))),Array.from(a,m=>w.setUint8(v++,m.charCodeAt(0))),Array.from(o,m=>w.setUint8(v++,m.charCodeAt(0))),Array.from(c,m=>w.setUint8(v++,m.charCodeAt(0))),Array.from(h,m=>w.setUint8(v++,m.charCodeAt(0)));var x=new Uint8Array(f.byteLength+n.byteLength);return x.set(new Uint8Array(f),0),x.set(new Uint8Array(n),f.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,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+i));l=l+i;const h=n.decode(t.slice(l,l+o));l=l+o;const p=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,w={type:this.BROADCAST_EVENT,event:d,payload:f};return o>0&&(w.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:w}}_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)))}}class fw{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var ce;(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"})(ce||(ce={}));const rm=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=fj(o,e,t,s),i),{}):{}},fj=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?pw(i,o):ad(o)},pw=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return vj(t,r)}switch(e){case ce.bool:return pj(t);case ce.float4:case ce.float8:case ce.int2:case ce.int4:case ce.int8:case ce.numeric:case ce.oid:return mj(t);case ce.json:case ce.jsonb:return gj(t);case ce.timestamp:return yj(t);case ce.abstime:case ce.date:case ce.daterange:case ce.int4range:case ce.int8range:case ce.money:case ce.reltime:case ce.text:case ce.time:case ce.timestamptz:case ce.timetz:case ce.tsrange:case ce.tstzrange:return ad(t);default:return ad(t)}},ad=e=>e,pj=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},mj=e=>{if(typeof e=="string"){const t=parseFloat(e);
266if(!Number.isNaN(t))return t}return e},gj=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},vj=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>pw(t,a))}return e},yj=e=>typeof e=="string"?e.replace(" ","T"):e,mw=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};class jc{constructor(t,r,n={},s=id){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var nm;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(nm||(nm={}));class Ki{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ki.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ki.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ki.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const i=this.cloneDeep(t),o=this.transformState(r),a={},l={};return this.map(i,(c,d)=>{o[c]||(l[c]=d)}),this.map(o,(c,d)=>{const h=i[c];if(h){const p=d.map(x=>x.presence_ref),f=h.map(x=>x.presence_ref),w=d.filter(x=>f.indexOf(x.presence_ref)<0),v=h.filter(x=>p.indexOf(x.presence_ref)<0);w.length>0&&(a[c]=w),v.length>0&&(l[c]=v)}else a[c]=d}),this.syncDiff(i,{joins:a,leaves:l},n,s)}static syncDiff(t,r,n,s){const{joins:i,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const d=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),d.length>0){const h=t[a].map(f=>f.presence_ref),p=d.filter(f=>h.indexOf(f.presence_ref)<0);t[a].unshift(...p)}n(a,d,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;const d=l.map(h=>h.presence_ref);c=c.filter(h=>d.indexOf(h.presence_ref)<0),t[a]=c,s(a,c,l),c.length===0&&delete t[a]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var sm;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(sm||(sm={}));var Gi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Gi||(Gi={}));var dr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(dr||(dr={}));class Ps{constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Ne.closed,this.joinedOnce=!1,this.pushBuffer=[],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.timeout=this.socket.timeout,this.joinPush=new jc(this,zt.join,this.params,this.timeout),this.rejoinTimer=new fw(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ne.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ne.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ne.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ne.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ne.errored,this.rejoinTimer.scheduleTimeout())}),this._on(zt.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new Ki(this),this.broadcastEndpointURL=mw(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Ne.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Gi.PRESENCE]&&this.bindings[Gi.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>t==null?void 0:t(dr.CHANNEL_ERROR,f)),this._onClose(()=>t==null?void 0:t(dr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:f})=>{var w;if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(dr.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,x=(w=v==null?void 0:v.length)!==null&&w!==void 0?w:0,m=[];for(let g=0;g<x;g++){const y=v[g],{filter:{event:_,schema:E,table:k,filter:C}}=y,j=f&&f[g];if(j&&j.event===_&&Ps.isFilterValueEqual(j.schema,E)&&Ps.isFilterValueEqual(j.table,k)&&Ps.isFilterValueEqual(j.filter,C))m.push(Object.assign(Object.assign({},y),{id:j.id}));else{this.unsubscribe(),this.state=Ne.errored,t==null||t(dr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=m,t&&t(dr.SUBSCRIBED);return}}).receive("error",f=>{this.state=Ne.errored,t==null||t(dr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(dr.TIMED_OUT)})}return this}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){return this.state===Ne.joined&&t===Gi.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
266try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ne.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(zt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new jc(this,zt.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ne.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new jc(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>dj){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=zt;if(n&&[a,l,c,d].indexOf(o)>=0&&n!==this._joinRef())return;let p=this._onMessage(o,r,n);if(r&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(f=>{var w,v,x;return((w=f.filter)===null||w===void 0?void 0:w.event)==="*"||((x=(v=f.filter)===null||v===void 0?void 0:v.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(f=>f.callback(p,n)):(i=this.bindings[o])===null||i===void 0||i.filter(f=>{var w,v,x,m,g,y,_,E;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const k=f.id,C=(w=f.filter)===null||w===void 0?void 0:w.event;return k&&((v=r.ids)===null||v===void 0?void 0:v.includes(k))&&(C==="*"||(C==null?void 0:C.toLocaleLowerCase())===((x=r.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))&&(!(!((m=f.filter)===null||m===void 0)&&m.table)||f.filter.table===((g=r.data)===null||g===void 0?void 0:g.table))}else{const k=(_=(y=f==null?void 0:f.filter)===null||y===void 0?void 0:y.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return k==="*"||k===((E=r==null?void 0:r.event)===null||E===void 0?void 0:E.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof p=="object"&&"ids"in p){const w=p.data,{schema:v,table:x,commit_timestamp:m,type:g,errors:y}=w;p=Object.assign(Object.assign({},{schema:v,table:x,commit_timestamp:m,eventType:g,new:{},old:{},errors:y}),this._getPayloadRecords(w))}f.callback(p,n)})}_isClosed(){return this.state===Ne.closed}_isJoined(){return this.state===Ne.joined}_isJoining(){return this.state===Ne.joining}_isLeaving(){return this.state===Ne.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&Ps.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(zt.close,{},t)}_onError(t){this._on(zt.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ne.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=rm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=rm(t.columns,t.old_record)),r}}const Rc=()=>{},fa={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},wj=[1e3,2e3,5e3,1e4],xj=1e4,bj=`
267  addEventListener("message", (e) => {
268    if (e.data.event === "start") {
269      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
270    }
271  });`;class _j{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=id,this.transport=null,this.heartbeatIntervalMs=fa.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Rc,this.ref=0,this.reconnectTimer=null,this.vsn=tm,this.logger=Rc,this.conn=null,this.sendBuffer=[],this.serializer
271=new hj,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...i)=>s(...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,this.endPoint=`${t}/${od.websocket}`,this.httpEndpoint=mw(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=oj.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}
272
273To use Realtime in Node.js, you need to provide a WebSocket implementation:
274
275Option 1: Use Node.js 22+ which has native WebSocket support
276Option 2: Install and provide the "ws" package:
277
278  npm install ws
279
280  import ws from "ws"
281  const client = new RealtimeClient(url, {
282    ...options,
283    transport: ws
284  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Mr.connecting:return Rn.Connecting;case Mr.open:return Rn.Open;case Mr.closing:return Rn.Closing;default:return Rn.Closed}}isConnected(){return this.connectionState()===Rn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new Ps(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){const{topic:r,event:n,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(uj,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
vendor: 3,886 bytes, line 284
284heduleTimeout()},fa.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",c)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:i,ref:o}=r,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),i),this.channels.filter(c=>c._isMember(n)).forEach(c=>c._trigger(s,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),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),this.conn.readyState===Mr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Mr.open||this.conn.readyState===Mr.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_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.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)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
284heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(zt.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([bj],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:lj};r&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(zt.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)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new fw(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},fa.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,i,o,a,l,c,d,h,p,f;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:id,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:fa.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Rc,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:tm,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:w=>wj[w-1]||xj,this.vsn){case hw:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(w,v)=>v(JSON.stringify(w)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(w,v)=>v(JSON.parse(w));break;case cj:this.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:this.serializer.encode.bind(this.serializer),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var wo=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 Sj(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function Ej(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 kj(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=Sj(e.baseUrl,n,s),l=await Ej(e.auth),c=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),p=h&&d?JSON.parse(d):d;if(!c.ok){const f=h?p:void 0,w=f==null?void 0:f.error;throw new wo((w==null?void 0:w.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function pa(e){return e.join("�")}var Cj=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:pa(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/${pa(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${pa(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${pa(e.namespace)}`}),!0}catch(t){if(t instanceof wo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof wo&&r.status===409)return;throw r}}};function us(e){return e.join("�")}var Tj=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/${us(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/${us(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/${us(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/${us(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/${us(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/${us(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof wo&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof wo&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},jj=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=kj({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new Cj(this.client,t),this.tableOps=new Tj(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)}
284async 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)}},Fl=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function ve(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Rj=class extends Fl{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},ld=class extends Fl{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const Fh=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Nj=()=>Response,cd=e=>{if(Array.isArray(e))return e.map(r=>cd(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=cd(n)}),t},Pj=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)},Oj=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function xo(e){"@babel/helpers - typeof";return xo=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},xo(e)}function Aj(e,t){if(xo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ij(e){var t=Aj(e,"string");return xo(t)=="symbol"?t:t+""}function Lj(e,t,r){return(t=Ij(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?im(Object(r),!0).forEach(function(n){Lj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Nc=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)},$j=async(e,t,r)=>{e instanceof await Nj()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,i=(n==null?void 0:n.statusCode)||s+"";t(new Rj(Nc(n),s,i))}).catch(n=>{t(new ld(Nc(n),n))}):t(new ld(Nc(e),e))},Dj=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(Pj(n)?(s.headers=H({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),H(H({},s),r))};async function Uo(e,t,r,n,s,i){return new Promise((o,a)=>{e(r,Dj(t,n,s,i)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>$j(l,a,n))})}async function bo(e,t,r,n){return Uo(e,"GET",t,r,n)}async function Dt(e,t,r,n,s){return Uo(e,"POST",t,n,s,r)}async function ud(e,t,r,n,s){return Uo(e,"PUT",t,n,s,r)}async function Mj(e,t,r,n){return Uo(e,"HEAD",t,H(H({},r),{},{noResolveJson:!0}),n)}async function zh(e,t,r,n,s){return Uo(e,"DELETE",t,n,s,r)}var Uj=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(ve(t))return{data:null,error:t};throw t}}};let gw;gw=Symbol.toStringTag;var Fj=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[gw]="BlobDownloadBuilder",this.promise=null}asStream(){return new Uj(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(ve(t))return{data:null,error:t};throw t}}};const zj={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},om={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Bj=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=Fh(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let i;const o=H(H({},om),n);let a=H(H({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(a=H(H({},a),n.headers));const c=s._removeEmptyFolders(t),d=s._getFinalPath(c),h=await(e=="PUT"?ud:Dt)(s.fetch,`${s.url}/object/${d}`,i,H({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:c,id:h.Id,fullPath:h.Key},error:null}}catch(i){if(s.shouldThrowOnError)throw i;if(ve(i))return{data:null,error:i};throw i}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let l;const c=H({upsert:om.upsert},n),d=H(H({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType),{data:{path:i,fullPath:(await ud(s.fetch,a.toString(),l,{headers:d})).Key},error:null}}catch(l){if(s.shouldThrowOnError)throw l;if(ve(l))return{data:null,error:l};throw l}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=H({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Dt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new Fl("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await Dt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
284stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await Dt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),i=await Dt(n.fetch,`${n.url}/object/sign/${s}`,H({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${n.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await Dt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>H(H({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",i=this._getFinalPath(e),o=()=>bo(this.fetch,`${this.url}/${r}/${i}${s}`,{headers:this.headers,noResolveJson:!0});return new Fj(o,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:cd(await bo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await Mj(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ve(n)&&n instanceof ld){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}async remove(e){var t=this;try{return{data:await zh(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=H(H(H({},zj),t),{},{prefix:e||""});return{data:await Dt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=H({},e);return{data:await Dt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}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,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const vw="2.90.1",yw={"X-Client-Info":`storage-js/${vw}`};var Wj=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;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.")),this.url=s.href.replace(/\/$/,""),this.headers=H(H({},yw),t),this.fetch=Fh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await bo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await bo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Dt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await ud(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}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Dt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await zh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},Vj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=H(H({},yw),t),this.fetch=Fh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Dt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;
284try{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{data:await bo(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await zh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!Oj(e))throw new Fl("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 jj({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}};const Bh={"X-Client-Info":`storage-js/${vw}`,"Content-Type":"application/json"};var ww=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function ht(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var Pc=class extends ww{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Hj=class extends ww{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Wh=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),qj=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)},am=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Kj=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(i=>{const o=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||n+"";t(new Pc(am(i),n,o))}).catch(()=>{const i=n+"";t(new Pc(s.statusText||`HTTP ${n} error`,n,i))});else{const i=n+"";t(new Pc(s.statusText||`HTTP ${n} error`,n,i))}}else t(new Hj(am(e),e))},Gj=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(qj(n)?(s.headers=H({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,H(H({},s),r)):s};async function Qj(e,t,r,n,s,i){return new Promise((o,a)=>{e(r,Gj(t,n,s,i)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const c=l.headers.get("content-type");return!c||!c.includes("application/json")?{}:l.json()}).then(l=>o(l)).catch(l=>Kj(l,a,n))})}async function ft(e,t,r,n,s){return Qj(e,"POST",t,n,s,r)}var Jj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=H(H({},Bh),t),this.fetch=Wh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await ft(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ht(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await ft(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ht(n))return{data:null,error:n};throw n}}},Yj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=H(H({},Bh),t),this.fetch=Wh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await ft(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
284if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await ft(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await ft(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}},Xj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=H(H({},Bh),t),this.fetch=Wh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await ft(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await ft(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ht(r))return{data:null,error:r};throw r}}},Zj=class extends Xj{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new eR(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)}},eR=class extends Jj{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new tR(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},tR=class extends Yj{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},rR=class extends Wj{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new Bj(this.url,this.headers,e,this.fetch)}get vectors(){return new Zj(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Vj(this.url+"/iceberg",this.headers,this.fetch)}};const xw="2.90.1",vs=30*1e3,dd=3,Oc=dd*vs,nR="http://localhost:9999",sR="supabase.auth.token",
284iR={"X-Client-Info":`gotrue-js/${xw}`},hd="X-Supabase-Api-Version",bw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},oR=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,aR=10*60*1e3;class _o extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function F(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class lR extends _o{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function cR(e){return F(e)&&e.name==="AuthApiError"}class Nn extends _o{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Er extends _o{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class lt extends Er{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function uR(e){return F(e)&&e.name==="AuthSessionMissingError"}class ds extends Er{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}
284class ma extends Er{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ga extends Er{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 dR(e){return F(e)&&e.name==="AuthImplicitGrantRedirectError"}class lm extends Er{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 hR extends Er{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 fd extends Er{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Ac(e){return F(e)&&e.name==="AuthRetryableFetchError"}class cm extends Er{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class pd extends Er{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const ul="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),um=` 	
285\r=`.split(""),fR=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<um.length;t+=1)e[um[t].charCodeAt(0)]=-2;for(let t=0;t<ul.length;t+=1)e[ul[t].charCodeAt(0)]=t;return e})();function dm(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(ul[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(ul[n]),t.queuedBits-=6}}function _w(e,t,r){const n=fR[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 hm(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{gR(o,n,r)};for(let o=0;o<e.length;o+=1)_w(e.charCodeAt(o),s,i);return t.join("")}function pR(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 mR(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}pR(n,t)}}function gR(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 Fs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)_w(e.charCodeAt(s),r,n);return new Uint8Array(t)}function vR(e){const t=[];return mR(e,r=>t.push(r)),new Uint8Array(t)}function In(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>dm(s,r,n)),dm(null,r,n),t.join("")}function yR(e){return Math.round(Date.now()/1e3)+e}function wR(){return Symbol("auth-callback")}const De=()=>typeof window<"u"&&typeof document<"u",En={tested:!1,writable:!1},Sw=()=>{if(!De())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(En.tested)return En.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),En.tested=!0,En.writable=!0}catch{En.tested=!0,En.writable=!1}return En.writable};function xR(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
285h((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Ew=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),bR=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ys=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}},$e=async(e,t)=>{await e.removeItem(t)};class zl{constructor(){this.promise=new zl.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}zl.promiseConstructor=Promise;function Ic(e){const t=e.split(".");if(t.length!==3)throw new pd("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!oR.test(t[n]))throw new pd("JWT not in base64url format");return{header:JSON.parse(hm(t[0])),payload:JSON.parse(hm(t[1])),signature:Fs(t[2]),raw:{header:t[0],payload:t[1]}}}async function _R(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function SR(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function ER(e){return("0"+e.toString(16)).substr(-2)}function kR(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,ER).join("")}async function CR(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function TR(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 CR(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function hs(e,t,r=!1){const n=kR();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await ys(e,`${t}-code-verifier`,s);const i=await TR(n);return[i,n===i?"plain":"s256"]}const jR=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function RR(e){const t=e.headers.get(hd);if(!t||!t.match(jR))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function NR(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 PR(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 OR=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function fs(e){if(!OR.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Lc(){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 AR(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function fm(e){return JSON.parse(JSON.stringify(e))}const jn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),IR=[502,503,504];async function pm(e){var t;if(!bR(e))throw new fd(jn(e),0);if(IR.includes(e.status))throw new fd(jn(e),e.status);let r;try{r=await e.json()}catch(i){throw new Nn(jn(i),i)}let n;const s=RR(e);if(s&&s.getTime()>=bw["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 cm(jn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new lt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>
285i&&typeof o=="string",!0))throw new cm(jn(r),e.status,r.weak_password.reasons);throw new lR(jn(r),e.status||500,n)}const LR=(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 V(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[hd]||(i[hd]=bw["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await $R(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function $R(e,t,r,n,s,i){const o=LR(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new fd(jn(l),0)}if(a.ok||await pm(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await pm(l)}}function Lt(e){var t;let r=null;UR(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=yR(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function mm(e){const t=Lt(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 zr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function DR(e){return{data:e,error:null}}function MR(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=Ul(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function gm(e){return e}function UR(e){return e.access_token&&e.refresh_token&&e.expires_in}const $c=["global","local","others"];class FR{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Ew(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)}}async signOut(t,r=$c[0]){if($c.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${$c.join(", ")}`);try{return await V(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await V(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:zr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Ul(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 V(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:MR,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(F(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await V(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:zr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await V(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:gm});if(d.error)throw d.error;const h=await d.json(),p=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(w=>{const v=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);c[`${x}Page`]=v}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(F(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){fs(t);try{return await V(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:zr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){fs(t);try{return await V(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:zr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){fs(t);
285try{return await V(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:zr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){fs(t.userId);try{const{data:r,error:n}=await V(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(F(r))return{data:null,error:r};throw r}}async _deleteFactor(t){fs(t.userId),fs(t.id);try{return{data:await V(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await V(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:gm});if(d.error)throw d.error;const h=await d.json(),p=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(w=>{const v=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);c[`${x}Page`]=v}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(F(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await V(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await V(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await V(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await V(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await V(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}}function vm(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const ps={debug:!!(globalThis&&Sw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class kw extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class zR extends kw{}async function BR(e,t,r){ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),ps.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw ps.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new zR(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ps.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"),await r()}}))}function WR(){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 Cw(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
285" is invalid.`);return e.toLowerCase()}function VR(e){return parseInt(e,16)}function HR(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function qR(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:d,uri:h,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
286`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=Cw(e.address),w=d?`${d}://${n}`:n,v=e.statement?`${e.statement}
287`:"",x=`${w} wants you to sign in with your Ethereum account:
288${f}
289
290${v}`;let m=`URI: ${h}
291Version: ${p}
292Chain ID: ${r}${o?`
293Nonce: ${o}`:""}
294Issued At: ${i.toISOString()}`;if(s&&(m+=`
295Expiration Time: ${s.toISOString()}`),a&&(m+=`
296Not Before: ${a.toISOString()}`),l&&(m+=`
297Request ID: ${l}`),c){let g=`
298Resources:`;for(const y of c){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);g+=`
299- ${y}`}m+=g}return`${x}
300${m}`}class Te extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class dl extends Te{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function KR({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Te({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Te({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Te({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Te({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 Te({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Te({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Te({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Te({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(Tw(o)){if(i.rp.id!==o)return new Te({message:`The RP ID "${i.rp.id}
300" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Te({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Te({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 Te({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 Te({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function GR({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 Te({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Te({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Tw(n)){if(r.rpId!==n)return new Te({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Te({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Te({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 Te({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class QR{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 JR=new QR;function YR(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=Ul(e,["challenge","user","excludeCredentials"]),i=Fs(t).buffer,o=Object.assign(Object.assign({},r),{id:Fs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Fs(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function XR(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=Ul(e,["challenge","allowCredentials"]),s=Fs(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Fs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function ZR(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:In(new Uint8Array(e.response.attestationObject)),clientDataJSON:In(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function eN(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:In(new Uint8Array(s.authenticatorData)),clientDataJSON:In(new Uint8Array(s.clientDataJSON)),signature:In(new Uint8Array(s.signature)),userHandle:s.userHandle?In(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Tw(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ym(){var e,t;return!!(De()&&"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 tN(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dl("Browser returned unexpected credential type",t)}:{data:null,error:new dl("Empty credential response",t)}}
300catch(t){return{data:null,error:KR({error:t,options:e})}}}async function rN(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dl("Browser returned unexpected credential type",t)}:{data:null,error:new dl("Empty credential response",t)}}catch(t){return{data:null,error:GR({error:t,options:e})}}}const nN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},sN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function hl(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=hl(a,o):n[i]=hl(o)}else n[i]=o}return n}function iN(e,t){return hl(nN,e,t||{})}function oN(e,t){return hl(sN,e,t||{})}class aN{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){try{const{data:o,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!o)return{data:null,error:a};const l=s??JR.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:c}=o.webauthn.credential_options.publicKey;c.name||(c.name=`${c.id}:${n}`),c.displayName||(c.displayName=c.name)}switch(o.webauthn.type){case"create":{const c=iN(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await tN({publicKey:c,signal:l});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const c=oN(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await rN(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:c,signal:l}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new Nn("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new _o("rpId is required for WebAuthn authentication")};try{if(!ym())return{data:null,error:new Nn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new Nn("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new _o("rpId is required for WebAuthn registration")};try{if(!ym())return{data:null,error:new Nn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new Nn("Unexpected error in register",o)}}}}WR();const lN={url:nR,storageKey:sR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:iR,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function wm(e,t,r){return await r()}const ms={};class So{get jwks(){var t,r;return(r=(t=ms[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ms[this.storageKey]=Object.assign(Object.assign({},ms[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ms[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ms[this.storageKey]=Object.assign(Object.assign({},ms[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 i=Object.assign(Object.assign({},lN),t);if(this.storageKey=i.storageKey,this.instanceID=(r=So.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,So.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&De()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new FR({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Ew(i.fetch),this.lock=i.lock||wm,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&De()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=BR:this.lock=wm,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 aN(this)}
300,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?(i.storage?this.storage=i.storage:Sw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=vm(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=vm(this.memoryStorage)),De()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${xw}) ${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(De()&&(r=xR(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),De()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),dR(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return F(r)?this._returnResult({error:r}):this._returnResult({error:new Nn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await V(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:Lt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:d,password:h,options:p}=t;let f=null,w=null;this.flowType==="pkce"&&([f,w]=await hs(this.storage,this.storageKey)),i=await V(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:w},xform:Lt})}else if("phone"in t){const{phone:d,password:h,options:p}=t;i=await V(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Lt})}else throw new ma("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await $e(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await V(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:mm})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await V(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:mm})}else throw new ma("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new ds;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,c,d,h,p;let f,w;if("message"in t)f=t.message,w=t.signature;else{const{chain:v,wallet:x,statement:m,options:g}=t;let y;if(De())if(typeof x=="object")y=x;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")y=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"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=x}const _=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),E=await y.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 k=Cw(E[0]);let C=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const O=await y.request({method:"eth_chainId"});C=VR(O)}const j={domain:_.host,address:k,statement:m,uri:_.href,version:"1",chainId:C,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=qR(j),w=await y.request({method:"personal_sign",params:[HR(f),k]})}try{const{data:v,error:x}=await V(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:w}
300,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Lt});if(x)throw x;if(!v||!v.session||!v.user){const m=new ds;return this._returnResult({data:{user:null,session:null},error:m})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(F(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(t){var r,n,s,i,o,a,l,c,d,h,p,f;let w,v;if("message"in t)w=t.message,v=t.signature;else{const{chain:x,wallet:m,statement:g,options:y}=t;let _;if(De())if(typeof m=="object")_=m;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof m!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=m}const E=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),g?{statement:g}:null));let C;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")C=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)C=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)w=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),v=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${E.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=y==null?void 0:y.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((h=(d=y==null?void 0:y.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...y.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
301`);const k=await _.signMessage(new TextEncoder().encode(w),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=k}}try{const{data:x,error:m}=await V(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:In(v)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Lt});if(m)throw m;if(!x||!x.session||!x.user){const g=new ds;return this._returnResult({data:{user:null,session:null},error:g})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:m})}
301catch(x){if(F(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 hR;const{data:i,error:o}=await V(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Lt});if(await $e(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new ds;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await V(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Lt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new ds;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await hs(this.storage,this.storageKey));const{error:h}=await V(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:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:d}=await V(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new ma("You must provide either an email or phone number.")}catch(a){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await V(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Lt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await hs(this.storage,this.storageKey));const c=await V(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}
vendor: 7,647 bytes, line 301
301),headers:this.headers,xform:DR});return!((i=c.data)===null||i===void 0)&&i.url&&De()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(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 lt;const{error:s}=await V(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(F(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t,{error:o}=await V(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await V(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new ma("You must provide either an email or phone number and a type")}catch(r){if(F(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 valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Oc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await kn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Lc()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=AR(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await V(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:zr}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new lt}:await V(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:zr})})}catch(r){if(F(r))return uR(r)&&(await this._removeSession(),await $e(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new lt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await hs(this.storage,this.storageKey));const{data:c,error:d}=await V(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:zr});if(d)throw d;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(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 lt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Ic(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(F(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new lt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!De())throw new ga("No browser detected.");
301if(t.error||t.error_description||t.error_code)throw new ga(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 lm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ga("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 lm("No code detected.");const{data:g,error:y}=await this._exchangeCodeForSession(t.code);if(y)throw y;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new ga("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let p=d+h;l&&(p=parseInt(l));const f=p-d;f*1e3<=vs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const w=p-h;d-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,p,d):d-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,p,d);const{data:v,error:x}=await this._getUser(i);if(x)throw x;const m={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:p,refresh_token:o,token_type:c,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:t.type},error:null})}catch(n){if(F(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:i}=r;if(i)return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(cR(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await $e(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=wR(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await hs(this.storage,this.storageKey,!0));try{return await V(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,d;const{data:h,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await V(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return De()&&!(!((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(F(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:d}=t,h=await V(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Lt}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new ds}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await $e(this.storage,`${this.storageKey}-code-verifier`),F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
301return await V(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(F(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 SR(async s=>(s>0&&await _R(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await V(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Lt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Ac(i)&&Date.now()+o-n<vs})}catch(n){if(this._debug(r,"error",n),F(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),De()&&!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 o=await kn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await ys(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Lc()}else if(s&&!s.user&&!s.user){const o=await kn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await $e(this.storage,this.storageKey+"-user"),await ys(this.storage,this.storageKey,s)):s.user=Lc()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Oc;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Oc}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Ac(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new lt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new zl;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new lt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),F(i)){const o={data:null,error:i};return Ac(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await $e(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await ys(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=fm(s);await ys(this.storage,this.storageKey,i)}else{const s=fm(r);await ys(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await $e(this.storage,this.storageKey),await $e(this.storage,this.storageKey+"-code-verifier"),await $e(this.storage,this.storageKey+"-user"),this.userStorage&&await $e(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&De()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
301catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),vs);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)/vs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${vs}ms, refresh threshold is ${dd} ticks`),s<=dd&&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 kw)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!De()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await hs(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await V(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(F(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await V(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(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(F(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?ZR(t.webauthn.credential_response):eN(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await V(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await V(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:YR(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:XR(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}
301=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=Ic(n.access_token);let o=null;i.aal&&(o=i.aal);let a=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const c=i.amr||[];return{data:{currentLevel:o,nextLevel:a,currentAuthenticationMethods:c},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 V(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new lt})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const o=await V(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&De()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const o=await V(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&De()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(F(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 V(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 lt})})}catch(t){if(F(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 V(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 lt})})}catch(r){if(F(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+aR>s)return n;const{data:i,error:o}=await V(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:w}
301=await this.getSession();if(w||!f.session)return this._returnResult({data:null,error:w});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Ic(n);r!=null&&r.allowExpired||NR(i.exp);const c=!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(!c){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const d=PR(s.alg),h=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,vR(`${a}.${l}`)))throw new pd("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}}So.nextInstanceID={};const cN=So,uN="2.90.1";let $i="";typeof Deno<"u"?$i="deno":typeof document<"u"?$i="web":typeof navigator<"u"&&navigator.product==="ReactNative"?$i="react-native":$i="node";const dN={"X-Client-Info":`supabase-js-${$i}/${uN}`},hN={headers:dN},fN={schema:"public"},pN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},mN={};function Eo(e){"@babel/helpers - typeof";return Eo=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},Eo(e)}function gN(e,t){if(Eo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Eo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vN(e){var t=gN(e,"string");return Eo(t)=="symbol"?t:t+""}function yN(e,t,r){return(t=vN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xm(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 _e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xm(Object(r),!0).forEach(function(n){yN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const wN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),xN=()=>Headers,bN=(e,t,r)=>{const n=wN(r),s=xN();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(i,_e(_e({},o),{},{headers:c}))}};function _N(e){return e.endsWith("/")?e:e+"/"}function SN(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:d,global:h}=t,p={db:_e(_e({},l),s),auth:_e(_e({},c),i),realtime:_e(_e({},d),o),storage:{},global:_e(_e(_e({},h),a),{},{headers:_e(_e({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function EN(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(_N(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var kN=class extends cN{constructor(e){super(e)}},CN=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=EN(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:fN,realtime:mN,auth:_e(_e({},pN),{},{storageKey:o}),global:hN},l=SN(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=bN(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(_e({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new ij(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new rR(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new ej(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)}
301channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},d,h){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new kN({url:this.authUrl.href,headers:_e(_e({},p),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new _j(this.realtimeUrl.href,_e(_e({},e),{},{params:_e(_e({},{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 TN=(e,t,r)=>new CN(e,t,r);function jN(){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}jN()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const RN="https://brqslionlprymnrkahqz.supabase.co",NN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJycXNsaW9ubHByeW1ucmthaHF6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg3NTA3NTMsImV4cCI6MjA4NDMyNjc1M30.9sb_nuEppMzdzpNVTkZLc4Q4puXFkn_o4g7LtOc633w",Vh=TN(RN,NN,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});function PN(){const{toast:e}=Kv(),[t,r]=b.useState(""),[n,s]=b.useState(!1),[i,o]=b.useState(!1),a=async l=>{l.preventDefault(),o(!0);try{const{data:c,error:d}=await Vh.functions.invoke("send-newsletter-signup",{body:{email:t}});if(d)throw d;s(!0),r(""),setTimeout(()=>s(!1),5e3)}catch(c){console.error("Error subscribing:",c),e({title:"Subscription failed",description:"Please try again later.",variant:"destructive"})}finally{o(!1)}};return u.jsxs("section",{className:"relative overflow-hidden py-20 sm:py-28 bg-[sidebar-primary-foreground] bg-orange-800","aria-labelledby":"newsletter-heading",children:[u.jsx("div",{className:"pointer-events-none absolute -left-20 -top-20 h-64 w-64 rounded-[60%_40%_30%_70%/60%_30%_70%_40%] bg-primary/10"}),u.jsx("div",{className:"pointer-events-none absolute -bottom-20 -right-20 h-64 w-64 rounded-[40%_60%_70%_30%/40%_70%_30%_60%] bg-primary/10"}),u.jsx("div",{className:"container-narrow relative z-10 px-6",children:u.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[u.jsx("p",{className:"mb-3 font-body text-sm font-medium uppercase tracking-[0.2em] text-primary",children:"Stay Connected"}),u.jsx("h2",{id:"newsletter-heading",className:"mb-4 font-display text-3xl font-bold text-cream sm:text-4xl",children:"Join the Monarca Family"}),u.jsx("p",{className:"mb-10 text-lg text-cream/90",children:"Get specials, seasonal dishes, and menu updates."}),n?u.jsxs("div",{className:"inline-flex items-center gap-3 rounded-full bg-primary/20 px-8 py-4 text-cream",children:[u.jsx(ky,{className:"h-6 w-6 text-primary","aria-hidden":"true"}),u.jsx("span",{className:"font-medium",children:"Thanks for subscribing!"})]}):u.jsxs("form",{onSubmit:a,className:"flex flex-col gap-4 sm:flex-row sm:gap-3",children:[u.jsx("label",{htmlFor:"newsletter-email",className:"sr-only",children:"Email address"}),u.jsx(Mh,{id:"newsletter-email",type:"email",placeholder:"Enter your email",value:t,onChange:l=>r(l.target.value),required:!0,className:"h-14 flex-1 rounded-full border-0 bg-white/10 px-6 text-cream placeholder:text-cream/50 focus:bg-white/20 focu
301s:ring-2 focus:ring-primary"}),u.jsx(ir,{type:"submit",className:"h-14 rounded-full bg-primary px-10 font-semibold text-cream transition-all hover:bg-orange-dark hover:shadow-lg",disabled:i,children:i?u.jsx(Cy,{className:"h-5 w-5 animate-spin"}):"Subscribe"})]}),u.jsx("p",{className:"mt-6 text-sm text-cream/90",children:"We respect your privacy. Unsubscribe anytime."})]})})]})}const ON=()=>u.jsxs(u.Fragment,{children:[u.jsx(vi,{}),u.jsxs("main",{id:"main-content",tabIndex:-1,children:[u.jsx(DT,{}),u.jsx(MT,{}),u.jsx(KT,{}),u.jsx(QT,{}),u.jsx(JT,{}),u.jsx(PN,{})]}),u.jsx(yi,{})]});function Fo({badge:e,title:t,description:r}){return u.jsxs("section",{className:"relative overflow-hidden bg-primary py-20 sm:py-24",children:[u.jsx("div",{className:"pointer-events-none absolute left-0 top-0 h-64 w-64 -translate-x-1/2 -translate-y-1/2 rounded-[60%_40%_30%_70%/60%_30%_70%_40%] bg-white/10"}),u.jsx("div",{className:"pointer-events-none absolute bottom-0 right-0 h-48 w-48 translate-x-1/3 translate-y-1/3 rounded-[40%_60%_70%_30%/40%_70%_30%_60%] bg-black/5"}),u.jsx("div",{className:"pointer-events-none absolute right-1/4 top-1/3 h-32 w-32 rounded-[50%_50%_50%_50%/60%_60%_40%_40%] bg-white/5"}),u.jsxs("div",{className:"container-narrow relative px-4 text-center sm:px-6 lg:px-8",children:[u.jsx("span",{className:"mb-4 inline-block rounded-full bg-white/20 px-4 py-2 text-sm font-medium text-white",children:e}),u.jsx("h1",{className:"font-display text-4xl font-bold text-white sm:text-5xl md:text-6xl",children:t}),u.jsx("p",{className:"mx-auto mt-6 max-w-2xl text-lg leading-relaxed text-white/85",children:r})]})]})}function AN(){return C0({queryKey:["menu-categories"],queryFn:async()=>{const{data:e,error:t}=await Vh.from("menu_categories").select("*").order("display_order");if(t)throw t;return e}})}function IN(){return C0({queryKey:["menu-items"],queryFn:async()=>{const{data:e,error:t}=await Vh.from("menu_items").select(`
302          *,
303          menu_categories (*)
304        `).order("display_order");if(t)throw t;return e}})}function LN({className:e,...t}){return u.jsx("div",{className:yt("animate-pulse rounded-md bg-muted",e),...t})}const $N=()=>{const[e,t]=b.useState("all"),[r,n]=b.useState(""),{data:s=[],isLoading:i}=AN(),{data:o=[],isLoading:a}=IN(),l=i||a,c=o.filter(d=>{var f,w;const h=e==="all"||((f=d.menu_categories)==null?void 0:f.slug)===e,p=d.name.toLowerCase().includes(r.toLowerCase())||(((w=d.description)==null?void 0:w.toLowerCase().includes(r.toLowerCase()))??!1);return h&&p});return u.jsxs(u.Fragment,{children:[u.jsx(vi,{}),u.jsxs("main",{id:"main-content",className:"pt-24",tabIndex:-1,children:[u.jsx(Fo,{badge:"Explore Our Flavors",title:"Our Menu",description:"From traditional favorites to signature creations, every dish is made with love and the freshest ingredients."}),u.jsx("section",{className:"sticky top-20 z-40 border-b border-border bg-background/95 py-4 backdrop-blur-md",children:u.jsx("div",{className:"container-narrow px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[u.jsxs("div",{className:"relative w-full sm:max-w-xs",children:[u.jsx(x_,{className:"absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),u.jsx(Mh,{type:"search",placeholder:"Search menu...",value:r,onChange:d=>n(d.target.value),className:"pl-10","aria-label":"Search menu items"})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",role:"tablist","aria-label":"Menu categories",children:[u.jsx("button",{onClick:()=>t("all"),className:`focus-ring rounded-full px-4 py-2 text-sm font-medium transition-colors ${e==="all"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,role:"tab","aria-selected":e==="all",children:"All"}),i?u.jsx("div",{className:"flex gap-2",children:[1,2,3].map(d=>u.jsx(LN,{className:"h-10 w-24 rounded-full"},d))}):s.map(d=>u.jsx("button",{onClick:()=>t(d.slug),className:`focus-ring rounded-full px-4 py-2 text-sm font-medium transition-colors ${e===d.slug?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,role:"tab","aria-selected":e===d.slug,children:d.name},d.id))]})]})})}),u.jsx("section",{className:"section-padding",children:u.jsxs("div",{className:"container-narrow",children:[l?u.jsxs("div",{className:"flex items-center justify-center py-12",role:"status","aria-live":"polite",children:[u.jsx(Cy,{className:"h-8 w-8 animate-spin text-primary","aria-hidden":"true"}),u.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading menu..."})]}):c.length===0?u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-lg text-muted-foreground",children:"No items found matching your search."})}):u.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:c.map(d=>u.jsxs("article",{className:"card-elevated group relative",children:[d.is_featured&&u.jsx("span",{className:"absolute -top-2 right-4 rounded-full bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground shadow-lg","aria-label":"Popular item",children:"Popular"}),u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"heading-card mb-2 text-foreground",children:d.name}),u.jsx("p",{className:"text-sm text-muted-foreground",children:d.description})]}),u.jsx("span",{className:"shrink-0 font-display text-xl font-bold text-primary",children:d.price_label||(d.price?`$${Number(d.price).toFixed(2)}`:"")})]})]},d.id))}),u.jsx("p",{className:"mt-12 text-center text-sm text-muted-foreground",children:"* Prices subject to change. Please inform your server of any allergies."})]})})]}),u.jsx(yi,{})]})},DN="/assets/restaurant-exterior-BwwSCaN3.jpg",MN=[{icon:p_,title:"Hospital
304ity First",description:"Every guest is family. We welcome you with warmth and treat you like our own."},{icon:S_,title:"Tradition on Every Plate",description:"Our recipes are passed down through generations, keeping authentic Mexican flavors alive."},{icon:b_,title:"Quality You Can Taste",description:"We source the freshest ingredients daily because great food starts with great ingredients."}],UN=()=>u.jsxs(u.Fragment,{children:[u.jsx(vi,{}),u.jsxs("main",{id:"main-content",className:"pt-24",tabIndex:-1,children:[u.jsx(Fo,{badge:"Our Heritage",title:"Our Story",description:"Monarca Mexican Restaurant is a family-owned restaurant built on authentic recipes, warm hospitality, and bold flavors."}),u.jsx("section",{className:"section-padding",children:u.jsx("div",{className:"container-narrow",children:u.jsxs("div",{className:"grid items-center gap-12 lg:grid-cols-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"monarch-wing-curve aspect-[4/5] overflow-hidden shadow-elevated",children:u.jsx("img",{src:DN,alt:"Monarca Mexican Restaurant exterior with iconic butterfly sign",className:"h-full w-full object-cover"})}),u.jsx("div",{className:"absolute -bottom-6 -right-6 h-48 w-48 rounded-3xl bg-primary/20"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsx("h2",{className:"heading-section text-foreground",children:"A Family Legacy"}),u.jsxs("div",{className:"space-y-4 text-lg leading-relaxed text-muted-foreground",children:[u.jsx("p",{children:"Our dishes are inspired by the food we grew up with—made fresh, served with care, and meant to be shared. Every plate tells a story of family gatherings, traditional celebrations, and the love that goes into authentic Mexican cuisine."}),u.jsx("p",{children:"The monarch butterfly, our namesake, represents the journey of tradition—the same journey our recipes have taken from generation to generation, bringing the true taste of Mexico to your table."}),u.jsx("p",{children:"When you dine with us, you're not just a customer—you're part of our extended family. We invite you to experience the warmth, the flavors, and the hospitality that makes Monarca special."})]})]})]})})}),u.jsx("section",{className:"section-padding bg-card",children:u.jsxs("div",{className:"container-narrow",children:[u.jsxs("div",{className:"mb-12 text-center",children:[u.jsx("span",{className:"mb-4 inline-block rounded-full bg-primary/10 px-4 py-2 text-sm font-medium text-primary",children:"What We Believe"}),u.jsx("h2",{className:"heading-section text-foreground",children:"Our Values"})]}),u.jsx("div",{className:"grid gap-8 md:grid-cols-3",children:MN.map(e=>u.jsxs("article",{className:"rounded-3xl bg-sage/20 p-8 text-center shadow-card",children:[u.jsx("div",{className:"mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-2xl bg-sage/30",children:u.jsx(e.icon,{className:"h-8 w-8 text-sage","aria-hidden":"true"})}),u.jsx("h3",{className:"heading-card mb-4 text-foreground",children:e.title}),u.jsx("p",{className:"text-body",children:e.description})]},e.title))})]})}),u.jsx("section",{className:"section-padding",children:u.jsx("div",{className:"container-narrow",children:u.jsxs("div",{className:"grid items-center gap-12 lg:grid-cols-2",children:[u.jsxs("div",{className:"order-2 space-y-6 lg:order-1",children:[u.jsx("h2",{className:"heading-section text-foreground",children:"From Our Kitchen"}),u.jsxs("div",{className:"space-y-4 text-lg leading-relaxed text-muted-foreground",children:[u.jsx("p",{children:"Every morning, our kitchen comes alive with the sounds and aromas of authentic Mexican cooking. Our team handcrafts tortillas, simmers salsas, and prepares each dish with the same care and attention our grandmothers taught us."}),u.jsx("p",{children:"We believe in cooking without shortcuts. Our birria braises for hours. Our salsas are made fresh daily. Our ingredients are sourced from local suppliers who share our commitment to quality."})]})]}),u.jsx("div",{className:"order-1 lg:order-2",children:u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsx("img",{src:cw,alt:"Freshly prepared carnitas with traditional seasonings",className:"h-64 w-full rounded-2xl object-cover shadow-card"}),u.jsx("img",{src:uw,alt:"Authentic quesabirria with rich consomé",className:"mt-8 h-64 w-full rounded-2xl object-cover shadow-card"})]})})]})})})]}),u.jsx(yi,{})]}),FN=()=>(b.useEffect(()=>{const e=document.createElement("script");return e.src="//embed.typeform.com/next/embed.js",e.async=!0,document.body.appendChild(e),()=>{const t=document.querySelector('script[src="//embed.typeform.com/next/embed.js"]');t&&t.remove()}},[]),u.jsxs(u.Fragment,{children:[u.jsx(vi,{}),u.jsxs("main",{id:"main-content",className:"pt-24",tabIndex:-1,
304children:[u.jsx(Fo,{badge:"Get in Touch",title:"Contact Us",description:"Have a question about our food, catering, or anything else? We'd love to hear from you."}),u.jsx("section",{className:"section-padding",children:u.jsx("div",{className:"container-narrow",children:u.jsxs("div",{className:"grid gap-12 lg:grid-cols-2",children:[u.jsxs("div",{className:"card-elevated min-h-[500px]",children:[u.jsx("h2",{className:"sr-only",children:"Contact Form"}),u.jsx("div",{"data-tf-live":"01KFE841Z47DH685QFW30Y03SW",className:"w-full","aria-label":"Contact inquiry form powered by Typeform"})]}),u.jsxs("div",{className:"space-y-8",children:[u.jsxs("div",{className:"card-elevated",children:[u.jsx("h2",{className:"heading-section mb-6 text-foreground",children:"Visit Us"}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-accent/20",children:u.jsx(vh,{className:"h-6 w-6 text-accent"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground",children:"Address"}),u.jsxs("p",{className:"text-muted-foreground",children:["22635 Foothill Blvd",u.jsx("br",{}),"Hayward, CA 94541"]}),u.jsx("a",{href:"https://maps.google.com/?q=22635+Foothill+Blvd+Hayward+CA+94541",target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-block text-sm font-medium text-accent hover:underline focus-ring rounded",children:"Get Directions →"})]})]}),u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-accent/20",children:u.jsx(yh,{className:"h-6 w-6 text-accent"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground",children:"Phone"}),u.jsx("a",{href:"tel:+15102745097",className:"text-muted-foreground hover:text-accent transition-colors focus-ring rounded",children:"(510) 274-5097"})]})]}),u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-accent/20",children:u.jsx(Ty,{className:"h-6 w-6 text-accent"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground",children:"Email"}),u.jsx("a",{href:"mailto:[email protected]",className:"text-muted-foreground hover:text-accent transition-colors",children:"[email protected]"})]})]}),u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-accent/20",children:u.jsx(gh,{className:"h-6 w-6 text-accent"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground",children:"Hours"}),u.jsx("div",{className:"space-y-1 text-muted-foreground",children:u.jsx("p",{children:"Open Daily: 9AM - 9PM"})})]})]})]})]}),u.jsx("div",{className:"card-elevated overflow-hidden p-0",children:u.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3159.123456!2d-122.0838!3d37.6688!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2z22635+Foothill+Blvd+Hayward+CA!5e0!3m2!1sen!2sus!4v1234567890",width:"100%",height:"200",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Monarca Mexican Taqueria Location - 22635 Foothill Blvd, Hayward, CA",className:"w-full"})})]})]})})})]}),u.jsx(yi,{})]})),bm=[{number:"1",icon:jy,title:"Choose Pickup or Delivery",description:"Select your preferred way to receive your order."},{number:"2",icon:gh,title:"Select Your Favorites",description:"Browse our menu and add your favorite dishes."},{number:"3",icon:ky,title:"Enjoy!",description:"Pick up your order or have it delivered fresh to your door."}],zN=()=>u.jsxs(u.Fragment,{children:[u.jsx(vi,{}),u.jsxs("main",{id:"main-content",className:"pt-24",tabIndex:-1,children:[u.jsx(Fo,{badge:"Quick & Easy",title:"Order Online",description:"Choose pickup or delivery using the options below. Your favorite Mexican dishes, just a few clicks away."}),u.jsx("section",{className:"section-padding",children:u.jsx("div",{className:"container-narrow",children:u.jsxs("div",{className:"mx-auto grid max-w-3xl gap-8 md:grid-cols-2",children:[u.jsxs("div",{className:"card-elevated group text-center",children:[u.jsx("div",{className:"mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-3xl bg-primary/10 transition-all duration-300 group-hover:bg-primary group-hover:scale-110",children:u.jsx(jy,{className:"h-10 w-10 text-primary transition-colors group-hover:text-primary-foreground","aria-hidden":"true"})}),u.jsx("h2",{className:"heading-section mb-4 text-foreground",children:"Order Pickup"}),u.jsx("p",{className:"mb-8 text-muted-foreground",children:"Skip the wait! Order ahead and pick up your food fresh and ready."}),u.jsx("a",{href:"https://www.ubereats.com/store/monarca-taqueria-hayward/Jw0rxR8kV4K1n2x-64SmFg",target:"_blank",rel:"noopener noreferrer",className:"block",children:u.jsx(ir,{className:"btn-primary w-full",children:"Order Pickup"})})]}),u.jsxs("div",{className:"card-elevated group text-center",children:[u.jsx("div",{className:"mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-3xl bg-primary/10 transition-all duration-300 group-hover:bg-primary group-hover:scale-110",children:u.jsx(__,{className:"h-10 w-10 text-primary transition-colors group-hover:text-primary-foreground","aria-hidden":"true"})}),u.jsx("h2",{className:"heading-section mb-4 text-foreground",children:"Order Delivery"}),u.jsx("p",{className:"mb-8 text-muted-foreground",children:"Can't make it? We'll bring the fiesta to you! Fast delivery available."}),u.jsx("a",{href:"https://www.ubereats.com/store/monarca-taqueria-hayward/Jw0rxR8kV4K1n2x-64SmFg",target:"_blank",rel:"noopener noreferrer",className:"block",children:u.jsx(ir,{className:"btn-primary w-full",children:"Order Delivery"})})]})]})})}),u.jsx("section",{className:"section-padding bg-card",children:u.jsxs("div",{className:"container-narrow",children:[u.jsxs("div",{className:"mb-12 text-center",children:[u.jsx("span",{className:"mb-4 inline-block rounded-full bg-primary/10 px-4 py-2 text-sm font-medium text-primary",children:"Simple & Fast"}),u.jsx("h2",{className:"heading-section text-foreground",children:"How It Works"})]}),u.jsx("div",{className:"mx-auto grid max-w-4xl gap-8 md:grid-cols-3",children:bm.map((e,t)=>u.jsxs("div",{className:"relative text-center",children:[t<bm.length-1&&u.jsx("div",{className:"absolute left-1/2 top-12 hidden h-0.5 w-full bg-border md:block"}),u.jsxs("div",{className:"relative mx-auto mb-6 flex h-24 w-24 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg",children:[u.jsx(e.icon,{className:"h-12 w-12","aria-hidden":"true"}),u.jsx("span",{className:"absolute -right-2 -top-2 flex h-8 w-8 items-center justify-center rounded-full bg-secondary font-display text-lg font-bold text-secondary-foreground shadow-md",children:e.number})]}),u.jsx("h3",{className:"heading-card mb-2 text-foreground",children:e.title}),u.jsx("p",{className:"text-muted-foreground",children:e.description})]},e.number))})]})}),u.jsx("section",{className:"section-padding",children:u.jsx("div",{className:"container-narrow",children:u.jsxs("div",{className:"mx-auto max-w-2xl rounded-3xl bg-muted/50 p-8 text-center",children:[u.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:u.jsx(d_,{className:"h-8 w-8 text-primary"})}),u.jsx("h3",{className:"heading-card mb-4 text-foreground",children:"Secure Payment"}),u.jsx("p",{className:"text-muted-foreground",children:"We accept all major credit cards, Apple Pay, and Google Pay for your convenience. All transactions are encrypted and secure."})]})})})]}),u.jsx(yi,{})]}),BN=()=>u.jsxs(u.Fragment,{children:[u.jsx(vi,{}),u.jsxs("main",{id:"main-content",className:"pt-24",tabIndex:-1,
304children:[u.jsx(Fo,{badge:"Our Commitment",title:"Accessibility Statement",description:"Ensuring an inclusive digital experience for all visitors."}),u.jsx("section",{className:"section-padding",children:u.jsx("div",{className:"container-narrow",children:u.jsxs("div",{className:"mx-auto max-w-3xl",children:[u.jsx("div",{className:"mb-12",children:u.jsxs("div",{className:"space-y-4 text-lg leading-relaxed text-muted-foreground",children:[u.jsx("p",{children:"At Monarca Mexican Restaurant, we are committed to ensuring that our website is accessible to all individuals, including people with disabilities. We strive to meet the standards of the Web Content Accessibility Guidelines (WCAG) 2.2, Level AA to provide a positive and inclusive experience for all visitors."}),u.jsx("p",{children:"We recognize that accessibility is an ongoing process, and we are continuously working to identify and remove barriers so every visitor can easily find information, complete actions, and engage with our website's content."})]})}),u.jsxs("div",{className:"mb-12",children:[u.jsx("h2",{className:"heading-section mb-6 text-foreground",children:"Accessibility Testing"}),u.jsx("p",{className:"mb-4 text-lg text-muted-foreground",children:"We've used the following tools to test and audit our website for accessibility best practices:"}),u.jsxs("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[u.jsx("li",{children:u.jsx("a",{href:"https://wave.webaim.org/",target:"_blank",rel:"noopener noreferrer",className:"focus-ring rounded underline hover:text-primary",children:"WAVE Web Accessibility Evaluation Tools"})}),u.jsx("li",{children:u.jsx("a",{href:"https://www.tpgi.com/arc-platform/",target:"_blank",rel:"noopener noreferrer",className:"focus-ring rounded underline hover:text-primary",children:"ARC Toolkit"})}),u.jsx("li",{children:u.jsx("a",{href:"https://equalizedigital.com/accessibility-checker/",target:"_blank",rel:"noopener noreferrer",className:"focus-ring rounded underline hover:text-primary",children:"Accessibility Checker by Equalize Digital"})})]})]}),u.jsxs("div",{className:"mb-12 rounded-2xl bg-card p-8",children:[u.jsx("h2",{className:"heading-card mb-4 text-foreground",children:"Conformance Status"}),u.jsxs("p",{className:"text-muted-foreground",children:["Our most recent accessibility audit took place on ",u.jsx("strong",{children:"January 15, 2025"}),"."]}),u.jsxs("p",{className:"mt-2 text-muted-foreground",children:["At that time, the website ",u.jsx("strong",{children:"partially conforms"})," to WCAG 2.2 Level AA."]})]}),u.jsxs("div",{className:"mb-12",children:[u.jsx("h2",{className:"heading-section mb-6 text-foreground",children:"Known Limitations"}),u.jsx("p",{className:"text-lg text-muted-foreground",children:"We are conducting an ongoing review to ensure that all images include appropriate alternative text. Any missing or incomplete alt text will be added as identified during this process."})]}),u.jsxs("div",{className:"mb-12",children:[u.jsx("h2",{className:"heading-section mb-6 text-foreground",children:"Third-Party Content"}),u.jsx("p",{className:"mb-4 text-lg text-muted-foreground",children:"Our website may include content from third-party providers that is not fully under our control. The following integrations may present accessibility challenges:"}),u.jsxs("ul",{className:"mb-4 list-inside list-disc space-y-2 text-muted-foreground",children:[u.jsx("li",{children:"Embedded videos from YouTube"}),u.jsx("li",{children:"Google Maps"}),u.jsx("li",{children:"PDF documents used as additional resources"})]}),u.jsx("p",{className:"text-muted-foreground",children:"If you encounter accessibility barriers related to third-party content, please contact us and we will make reasonable efforts to provide an accessible alternative."})]}),u.jsxs("div",{className:"mb-12",children:[u.jsx("h2",{className:"heading-section mb-6 text-foreground",children:"Feedback and Assistance"}),u.jsx("div",{className:"space-y-4 text-lg leading-relaxed text-muted-foreground",children:u.jsx("p",{children:"We welcome feedback on the accessibility of our website. If you encounter any accessibility barriers or need assistance accessing content, please contact us:"})}),u.jsx("div",{className:"mt-6",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ty,{className:"h-5 w-5 text-primary","aria-hidden":"true"}),u.jsx("a",{href:"mailto:[email protected]",className:"focus-ring rounded text-foreground hover:text-primary",children:"[email protected]"})]})}),u.jsx("p",{className:"mt-6 text-muted-foreground",children:"We aim to respond within 3–5 business days and will work with you to provide information in an accessible format whenever possible."})]}),u.jsxs("div",{className:"rounded-2xl border border-border bg-muted/50 p-8",children:[u.jsx("h2",{className:"heading-card mb-4 text-foreground",children:"Assessment and Compliance"}),u.jsxs("p",{className:"text-muted-foreground",children:["This Accessibility Statement was last reviewed and updated on ",u.jsx("strong",{children:"January 15, 2025"}),"."]})]})]})})})]}),u.jsx(yi,{})]}),WN=()=>{const e=wn();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:u.jsxs("main",{id:"main-content",className:"text-center",tabIndex:-1,
304children:[u.jsx("h1",{className:"mb-4 text-4xl font-bold text-foreground",children:"404"}),u.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),u.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90 focus-ring rounded",children:"Return to Home"})]})})},VN=new Fk,HN=()=>u.jsx(Hk,{client:VN,children:u.jsxs(bk,{children:[u.jsx(iS,{}),u.jsx(DS,{}),u.jsxs(ZC,{children:[u.jsx(NT,{}),u.jsxs(qC,{children:[u.jsx(Lr,{path:"/",element:u.jsx(ON,{})}),u.jsx(Lr,{path:"/menu",element:u.jsx($N,{})}),u.jsx(Lr,{path:"/about",element:u.jsx(UN,{})}),u.jsx(Lr,{path:"/contact",element:u.jsx(FN,{})}),u.jsx(Lr,{path:"/order",element:u.jsx(zN,{})}),u.jsx(Lr,{path:"/accessibility",element:u.jsx(BN,{})}),u.jsx(Lr,{path:"*",element:u.jsx(WN,{})})]}),u.jsx(RT,{})]})]})});qv(document.getElementById("root")).render(u.jsx(HN,{}));

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.