PageSourceSearch

https://llamalabs.us/assets/index-bfU6ytvk.js

js llamalabs.us collected 2026-10-04 16:54:40 UTC 640,818 bytes, 300 lines download raw bytes

vendor: 5,694 bytes, lines 1-9
1var Nf=e=>{throw TypeError(e)};var jc=(e,t,r)=>t.has(e)||Nf("Cannot "+r);var N=(e,t,r)=>(jc(e,t,"read from private field"),r?r.call(e):t.get(e)),de=(e,t,r)=>t.has(e)?Nf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ee=(e,t,r,n)=>(jc(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Qe=(e,t,r)=>(jc(e,t,"access private method"),r);var na=(e,t,r,n)=>({set _(s){ee(e,t,s,r)},get _(){return N(e,t,n)}});function Vb(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 bg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sg={exports:{}},Fl={},_g={exports:{}},re={};/**
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 zo=Symbol.for("react.element"),Wb=Symbol.for("react.portal"),qb=Symbol.for("react.fragment"),Kb=Symbol.for("react.strict_mode"),Gb=Symbol.for("react.profiler"),Jb=Symbol.for("react.provider"),Qb=Symbol.for("react.context"),Yb=Symbol.for("react.forward_ref"),Xb=Symbol.for("react.suspense"),Zb=Symbol.for("react.memo"),eS=Symbol.for("react.lazy"),Pf=Symbol.iterator;function tS(e){return e===null||typeof e!="object"?null:(e=Pf&&e[Pf]||e["@@iterator"],typeof e=="function"?e:null)}var Eg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kg=Object.assign,Cg={};function mi(e,t,r){this.props=e,this.context=t,this.refs=Cg,this.updater=r||Eg}mi.prototype.isReactComponent={};mi.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")};mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tg(){}Tg.prototype=mi.prototype;function Qd(e,t,r){this.props=e,this.context=t,this.refs=Cg,this.updater=r||Eg}var Yd=Qd.prototype=new Tg;Yd.constructor=Qd;kg(Yd,mi.prototype);Yd.isPureReactComponent=!0;var Rf=Array.isArray,jg=Object.prototype.hasOwnProperty,Xd={current:null},Ng={key:!0,ref:!0,__self:!0,__source:!0};function Pg(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)jg.call(t,n)&&!Ng.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:zo,type:e,key:i,ref:o,props:s,_owner:Xd.current}}function rS(e,t){return{$$typeof:zo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zd(e){return typeof e=="object"&&e!==null&&e.$$typeof===zo}function nS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Af=/\/+/g;function Nc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nS(""+e.key):t.toString(36)}function $a(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 zo:case Wb:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Nc(o,0):n,Rf(s)?(r="",e!=null&&(r=e.replace(Af,"$&/")+"/"),$a(s,t,r,"",function(u){return u})):s!=null&&(Zd(s)&&(s=rS(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Af,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Rf(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+Nc(i,a);o+=$a(i,t,r,l,s)}else if(l=tS(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+Nc(i,a++),o+=$a(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 sa(e,t,r){if(e==null)return e;var n=[],s=0;return $a(e,n,"","",function(i){return t.call(r,i,s++)}),n}function sS(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 lt={current:null},Fa={transition:null},iS={ReactCurrentDispatcher:lt,ReactCurrentBatchConfig:Fa,ReactCurrentOwner:Xd};function Rg(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,468 bytes, lines 9-25
9re.Children={map:sa,forEach:function(e,t,r){sa(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return sa(e,function(){t++}),t},toArray:function(e){return sa(e,function(t){return t})||[]},only:function(e){if(!Zd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=mi;re.Fragment=qb;re.Profiler=Gb;re.PureComponent=Qd;re.StrictMode=Kb;re.Suspense=Xb;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iS;re.act=Rg;re.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=kg({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Xd.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)jg.call(t,l)&&!Ng.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:zo,type:e.type,key:s,ref:i,props:n,_owner:o}};re.createContext=function(e){return e={$$typeof:Qb,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Jb,_context:e},e.Consumer=e};re.createElement=Pg;re.createFactory=function(e){var t=Pg.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:Yb,render:e}};re.isValidElement=Zd;re.lazy=function(e){return{$$typeof:eS,_payload:{_status:-1,_result:e},_init:sS}};re.memo=function(e,t){return{$$typeof:Zb,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Fa.transition;Fa.transition={};try{e()}finally{Fa.transition=t}};re.unstable_act=Rg;re.useCallback=function(e,t){return lt.current.useCallback(e,t)};re.useContext=function(e){return lt.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return lt.current.useDeferredValue(e)};re.useEffect=function(e,t){return lt.current.useEffect(e,t)};re.useId=function(){return lt.current.useId()};re.useImperativeHandle=function(e,t,r){return lt.current.useImperativeHandle(e,t,r)};re.useInsertionEffect=function(e,t){return lt.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return lt.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return lt.current.useMemo(e,t)};re.useReducer=function(e,t,r){return lt.current.useReducer(e,t,r)};re.useRef=function(e){return lt.current.useRef(e)};re.useState=function(e){return lt.current.useState(e)};re.useSyncExternalStore=function(e,t,r){return lt.current.useSyncExternalStore(e,t,r)};re.useTransition=function(){return lt.current.useTransition()};re.version="18.3.1";_g.exports=re;var p=_g.exports;const L=bg(p),Ag=Vb({__proto__:null,default:L},[p]);/**
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 oS=p,aS=Symbol.for("react.element"),lS=Symbol.for("react.fragment"),cS=Object.prototype.hasOwnProperty,uS=oS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dS={key:!0,ref:!0,__self:!0,__source:!0};function Og(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)cS.call(t,n)&&!dS.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:aS,type:e,key:i,ref:o,props:s,_owner:uS.current}}Fl.Fragment=lS;Fl.jsx=Og;Fl.jsxs=Og;Sg.exports=Fl;var c=Sg.exports,Ig={exports:{}},jt={},Lg={exports:{}},Dg={};/**
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,P){var z=T.length;T.push(P);e:for(;0<z;){var M=z-1>>>1,V=T[M];if(0<s(V,P))T[M]=P,T[z]=V,z=M;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var P=T[0],z=T.pop();if(z!==P){T[0]=z;e:for(var M=0,V=T.length,te=V>>>1;M<te;){var ce=2*(M+1)-1,Be=T[ce],ne=ce+1,W=T[ne];if(0>s(Be,z))ne<V&&0>s(W,Be)?(T[M]=W,T[ne]=z,M=ne):(T[M]=Be,T[ce]=z,M=ce);else if(ne<V&&0>s(W,z))T[M]=W,T[ne]=z,M=ne;else break e}}return P}function s(T,P){var z=T.sortIndex-P.sortIndex;return z!==0?z:T.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,h=null,f=3,y=!1,x=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,v=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 w(T){for(var P=r(u);P!==null;){if(P.callback===null)n(u);else if(P.startTime<=T)n(u),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(u)}}function S(T){if(m=!1,w(T),!x)if(r(l)!==null)x=!0,E(_);else{var P=r(u);P!==null&&B(S,P.startTime-T)}}function _(T,P){x=!1,m&&(m=!1,v(j),j=-1),y=!0;var z=f;try{for(w(P),h=r(l);h!==null&&(!(h.expirationTime>P)||T&&!U());
vendor: 9,177 bytes, lines 25-34
25){var M=h.callback;if(typeof M=="function"){h.callback=null,f=h.priorityLevel;var V=M(h.expirationTime<=P);P=e.unstable_now(),typeof V=="function"?h.callback=V:h===r(l)&&n(l),w(P)}else n(l);h=r(l)}if(h!==null)var te=!0;else{var ce=r(u);ce!==null&&B(S,ce.startTime-P),te=!1}return te}finally{h=null,f=z,y=!1}}var k=!1,C=null,j=-1,A=5,O=-1;function U(){return!(e.unstable_now()-O<A)}function D(){if(C!==null){var T=e.unstable_now();O=T;var P=!0;try{P=C(!0,T)}finally{P?q():(k=!1,C=null)}}else k=!1}var q;if(typeof g=="function")q=function(){g(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,K=I.port2;I.port1.onmessage=D,q=function(){K.postMessage(null)}}else q=function(){b(D,0)};function E(T){C=T,k||(k=!0,q())}function B(T,P){j=b(function(){T(e.unstable_now())},P)}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(){x||y||(x=!0,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"):A=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var z=f;f=P;try{return T()}finally{f=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,P){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var z=f;f=T;try{return P()}finally{f=z}},e.unstable_scheduleCallback=function(T,P,z){var M=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?M+z:M):z=M,T){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=z+V,T={id:d++,callback:P,priorityLevel:T,startTime:z,expirationTime:V,sortIndex:-1},z>M?(T.sortIndex=z,t(u,T),r(l)===null&&T===r(u)&&(m?(v(j),j=-1):m=!0,B(S,z-M))):(T.sortIndex=V,t(l,T),x||y||(x=!0,E(_))),T},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(T){var P=f;return function(){var z=f;f=P;try{return T.apply(this,arguments)}finally{f=z}}}})(Dg);Lg.exports=Dg;var hS=Lg.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 fS=p,Tt=hS;function R(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 Mg=new Set,ro={};function ss(e,t){ii(e,t),ii(e+"Capture",t)}function ii(e,t){for(ro[e]=t,e=0;e<t.length;e++)Mg.add(t[e])}var Tr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=Object.prototype.hasOwnProperty,pS=/^[: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]*$/,Of={},If={};function mS(e){return bu.call(If,e)?!0:bu.call(Of,e)?!1:pS.test(e)?If[e]=!0:(Of[e]=!0,!1)}function gS(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 vS(e,t,r,n){if(t===null||typeof t>"u"||gS(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 ct(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 Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Je[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new ct(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){Je[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(eh,th);Je[t]=new ct(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(eh,th);Je[t]=new ct(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(eh,th);Je[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function rh(e,t,r,n){var s=Je.hasOwnProperty(t)?Je[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(vS(t,r,s,n)&&(r=null),n||s===null?mS(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 Or=fS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ia=Symbol.for("react.element"),Ts=Symbol.for("react.portal"),js=Symbol.for("react.fragment"),nh=Symbol.for("react.strict_mode"),Su=Symbol.for("react.profiler"),$g=Symbol.for("react.provider"),Fg=Symbol.for("react.context"),sh=Symbol.for("react.forward_ref"),_u=Symbol.for("react.suspense"),Eu=Symbol.for("react.suspense_list"),ih=Symbol.for("react.memo"),zr=Symbol.for("react.lazy"),Ug=Symbol.for("react.offscreen"),Lf=Symbol.iterator;function ki(e){return e===null||typeof e!="object"?null:(e=Lf&&e[Lf]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,Pc;function Di(e){if(Pc===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Pc=t&&t[1]||""}return`
34`+Pc+e}var Rc=!1;function Ac(e,t){if(!e||Rc)return"";Rc=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 16,737 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=n.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Rc=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Di(e):""}function yS(e){switch(e.tag){case 5:return Di(e.type);case 16:return Di("Lazy");case 13:return Di("Suspense");case 19:return Di("SuspenseList");case 0:case 2:case 15:return e=Ac(e.type,!1),e;case 11:return e=Ac(e.type.render,!1),e;case 1:return e=Ac(e.type,!0),e;default:return""}}function ku(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case js:return"Fragment";case Ts:return"Portal";case Su:return"Profiler";case nh:return"StrictMode";case _u:return"Suspense";case Eu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fg:return(e.displayName||"Context")+".Consumer";case $g:return(e._context.displayName||"Context")+".Provider";case sh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ih:return t=e.displayName||null,t!==null?t:ku(e.type)||"Memo";case zr:t=e._payload,e=e._init;try{return ku(e(t))}catch{}}return null}function wS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ku(t);case 8:return t===nh?"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 pn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xS(e){var t=Bg(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 oa(e){e._valueTracker||(e._valueTracker=xS(e))}function zg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Bg(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function nl(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 Cu(e,t){var r=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Df(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=pn(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 Hg(e,t){t=t.checked,t!=null&&rh(e,"checked",t,!1)}function Tu(e,t){Hg(e,t);var r=pn(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")?ju(e,t.type,r):t.hasOwnProperty("defaultValue")&&ju(e,t.type,pn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mf(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ju(e,t,r){(t!=="number"||nl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Mi=Array.isArray;function Us(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=""+pn(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 Nu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $f(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(R(92));if(Mi(r)){if(1<r.length)throw Error(R(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:pn(r)}}function Vg(e,t){var r=pn(t.value),n=pn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Ff(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Wg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Pu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var aa,qg=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(aa=aa||document.createElement("div"),aa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=aa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function no(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Hi={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},bS=["Webkit","ms","Moz","O"];Object.keys(Hi).forEach(function(e){bS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hi[t]=Hi[e]})});function Kg(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Hi.hasOwnProperty(e)&&Hi[e]?(""+t).trim():t+"px"}function Gg(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Kg(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var SS=je({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 Ru(e,t){if(t){if(SS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Au(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ou=null;function oh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Iu=null,Bs=null,zs=null;function Uf(e){if(e=Wo(e)){if(typeof Iu!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Vl(t),Iu(e.stateNode,e.type,t))}}function Jg(e){Bs?zs?zs.push(e):zs=[e]:Bs=e}function Qg(){if(Bs){var e=Bs,t=zs;if(zs=Bs=null,Uf(e),t)for(e=0;e<t.length;e++)Uf(t[e])}}function Yg(e,t){return e(t)}function Xg(){}var Oc=!1;function Zg(e,t,r){if(Oc)return e(t,r);Oc=!0;try{return Yg(e,t,r)}finally{Oc=!1,(Bs!==null||zs!==null)&&(Xg(),Qg())}}function so(e,t){var r=e.stateNode;if(r===null)return null;var n=Vl(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(R(231,t,typeof r));return r}var Lu=!1;if(Tr)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){Lu=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{Lu=!1}function _S(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Vi=!1,sl=null,il=!1,Du=null,ES={onError:function(e){Vi=!0,sl=e}};function kS(e,t,r,n,s,i,o,a,l){Vi=!1,sl=null,_S.apply(ES,arguments)}function CS(e,t,r,n,s,i,o,a,l){if(kS.apply(this,arguments),Vi){if(Vi){var u=sl;Vi=!1,sl=null}else throw Error(R(198));il||(il=!0,Du=u)}}function is(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 ev(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Bf(e){if(is(e)!==e)throw Error(R(188))}function TS(e){var t=e.alternate;if(!t){if(t=is(e),t===null)throw Error(R(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 Bf(s),e;if(i===n)return Bf(s),t;i=i.sibling}throw Error(R(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(R(189))}}if(r.alternate!==n)throw Error(R(190))}if(r.tag!==3)throw Error(R(188));return r.stateNode.current===r?e:t}function tv(e){return e=TS(e),e!==null?rv(e):null}function rv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=rv(e);if(t!==null)return t;e=e.sibling}return null}var nv=Tt.unstable_scheduleCallback,zf=Tt.unstable_cancelCallback,jS=Tt.unstable_shouldYield,NS=Tt.unstable_requestPaint,Le=Tt.unstable_now,PS=Tt.unstable_getCurrentPriorityLevel,ah=Tt.unstable_ImmediatePriority,sv=Tt.unstable_UserBlockingPriority,ol=Tt.unstable_NormalPriority,RS=Tt.unstable_LowPriority,iv=Tt.unstable_IdlePriority,Ul=null,fr=null;function AS(e){if(fr&&typeof fr.onCommitFiberRoot=="function")try{fr.onCommitFiberRoot(Ul,e,void 0,(e.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:LS,OS=Math.log,IS=Math.LN2;function LS(e){return e>>>=0,e===0?32:31-(OS(e)/IS|0)|0}var la=64,ca=4194304;function $i(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function al(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=$i(a):(i&=o,i!==0&&(n=$i(i)))}else o=r&~s,o!==0?n=$i(o):i!==0&&(n=$i(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Kt(t),s=1<<r,n|=e[r],t&=~s;return n}function DS(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 MS(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Kt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=DS(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Mu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ov(){var e=la;return la<<=1,!(la&4194240)&&(la=64),e}function Ic(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ho(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Kt(t),e[t]=r}function $S(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-Kt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function lh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Kt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var fe=0;function av(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var lv,ch,cv,uv,dv,$u=!1,ua=[],sn=null,on=null,an=null,io=new Map,oo=new Map,Vr=[],FS="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":sn=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":io.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oo.delete(t.pointerId)}}function Ti(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=Wo(t),t!==null&&ch(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function US(e,t,r,n,s){switch(t){case"focusin":return sn=Ti(sn,e,t,r,n,s),!0;case"dragenter":return on=Ti(on,e,t,r,n,s),!0;case"mouseover":return an=Ti(an,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return io.set(i,Ti(io.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,oo.set(i,Ti(oo.get(i)||null,e,t,r,n,s)),!0}return!1}function hv(e){var t=Ln(e.target);if(t!==null){var r=is(t);if(r!==null){if(t=r.tag,t===13){if(t=ev(r),t!==null){e.blockedOn=t,dv(e.priority,function(){cv(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 Ua(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Fu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ou=n,r.target.dispatchEvent(n),Ou=null}else return t=Wo(r),t!==null&&ch(t),e.blockedOn=r,!1;t.shift()}return!0}function Vf(e,t,r){Ua(e)&&r.delete(t)}function BS(){$u=!1,sn!==null&&Ua(sn)&&(sn=null),on!==null&&Ua(on)&&(on=null),an!==null&&Ua(an)&&(an=null),io.forEac
vendor: 11,841 bytes, line 37
37h(Vf),oo.forEach(Vf)}function ji(e,t){e.blockedOn===t&&(e.blockedOn=null,$u||($u=!0,Tt.unstable_scheduleCallback(Tt.unstable_NormalPriority,BS)))}function ao(e){function t(s){return ji(s,e)}if(0<ua.length){ji(ua[0],e);for(var r=1;r<ua.length;r++){var n=ua[r];n.blockedOn===e&&(n.blockedOn=null)}}for(sn!==null&&ji(sn,e),on!==null&&ji(on,e),an!==null&&ji(an,e),io.forEach(t),oo.forEach(t),r=0;r<Vr.length;r++)n=Vr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vr.length&&(r=Vr[0],r.blockedOn===null);)hv(r),r.blockedOn===null&&Vr.shift()}var Hs=Or.ReactCurrentBatchConfig,ll=!0;function zS(e,t,r,n){var s=fe,i=Hs.transition;Hs.transition=null;try{fe=1,uh(e,t,r,n)}finally{fe=s,Hs.transition=i}}function HS(e,t,r,n){var s=fe,i=Hs.transition;Hs.transition=null;try{fe=4,uh(e,t,r,n)}finally{fe=s,Hs.transition=i}}function uh(e,t,r,n){if(ll){var s=Fu(e,t,r,n);if(s===null)Vc(e,t,n,cl,r),Hf(e,n);else if(US(s,e,t,r,n))n.stopPropagation();else if(Hf(e,n),t&4&&-1<FS.indexOf(e)){for(;s!==null;){var i=Wo(s);if(i!==null&&lv(i),i=Fu(e,t,r,n),i===null&&Vc(e,t,n,cl,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Vc(e,t,n,null,r)}}var cl=null;function Fu(e,t,r,n){if(cl=null,e=oh(n),e=Ln(e),e!==null)if(t=is(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ev(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 cl=e,null}function fv(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(PS()){case ah:return 1;case sv:return 4;case ol:case RS:return 16;case iv:return 536870912;default:return 16}default:return 16}}var Zr=null,dh=null,Ba=null;function pv(){if(Ba)return Ba;var e,t=dh,r=t.length,n,s="value"in Zr?Zr.value:Zr.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 Ba=s.slice(e,1<n?1-n:void 0)}function za(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 da(){return!0}function Wf(){return!1}function Nt(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)?da:Wf,this.isPropagationStopped=Wf,this}return je(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=da)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=da)},persist:function(){},isPersistent:da}),t}var gi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hh=Nt(gi),Vo=je({},gi,{view:0,detail:0}),VS=Nt(Vo),Lc,Dc,Ni,Bl=je({},Vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fh,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!==Ni&&(Ni&&e.type==="mousemove"?(Lc=e.screenX-Ni.screenX,Dc=e.screenY-Ni.screenY):Dc=Lc=0,Ni=e),Lc)},movementY:function(e){return"movementY"in e?e.movementY:Dc}}),qf=Nt(Bl),WS=je({},Bl,{dataTransfer:0}),qS=Nt(WS),KS=je({},Vo,{relatedTarget:0}),Mc=Nt(KS),GS=je({},gi,{animationName:0,elapsedTime:0,pseudoElement:0}),JS=Nt(GS),QS=je({},gi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),YS=Nt(QS),XS=je({},gi,{data:0}),Kf=Nt(XS),ZS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},e1={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"},t1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=t1[e])?!!t[e]:!1}function fh(){return r1}var n1=je({},Vo,{key:function(e){if(e.key){var t=ZS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=za(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?e1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fh,charCode:function(e){return e.type==="keypress"?za(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?za(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),s1=Nt(n1),i1=je({},Bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gf=Nt(i1),o1=je({},Vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fh}),a1=Nt(o1),l1=je({},gi,{propertyName:0,elapsedTime:0,pseudoElement:0}),c1=Nt(l1),u1=je({},Bl,{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}),d1=Nt(u1),h1=[9,13,27,32],ph=Tr&&"CompositionEvent"in window,Wi=null;Tr&&"documentMode"in document&&(Wi=document.documentMode);var f1=Tr&&"TextEvent"in window&&!Wi,mv=Tr&&(!ph||Wi&&8<Wi&&11>=Wi),Jf=" ",Qf=!1;function gv(e,t){switch(e){case"keyup":return h1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ns=!1;function p1(e,t){switch(e){case"compositionend":return vv(t);case"keypress":return t.which!==32?null:(Qf=!0,Jf);case"textInput":return e=t.data,e===Jf&&Qf?null:e;default:return null}}function m1(e,t){if(Ns)return e==="compositionend"||!ph&&gv(e,t)?(e=pv(),Ba=dh=Zr=null,Ns=!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 mv&&t.locale!=="ko"?null:t.data;default:return null}}var g1={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 Yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!g1[e.type]:t==="textarea"}function yv(e,t,r,n){Jg(n),t=ul(t,"onChange"),0<t.length&&(r=new hh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var qi=null,lo=null;function v1(e){Nv(e,0)}function zl(e){var t=As(e);if(zg(t))return e}function y1(e,t){if(e==="change")return t}var wv=!1;if(Tr){var $c;if(Tr){var Fc="oninput"in document;if(!Fc){var Xf=document.createElement("div");Xf.setAttribute("oninput","return;"),Fc=typeof Xf.oninput=="function"}$c=Fc}else $c=!1;wv=$c&&(!document.documentMode||9<document.documentMode)}function Zf(){qi&&(qi.detachEvent("onpropertychange",xv),lo=qi=null)}function xv(e){if(e.propertyName==="value"&&zl(lo)){var t=[];yv(t,lo,e,oh(e)),Zg(v1,t)}}function w1(e,t,r){e==="focusin"?(Zf(),qi=t,lo=r,qi.attachEvent("onpropertychange",xv)):e==="focusout"&&Zf()}function x1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zl(lo)}function b1(e,t){if(e==="click")return zl(t)}function S1(e,t){if(e==="input"||e==="change")return zl(t)}function _1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:_1;function co(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!bu.call(t,s)||!Jt(e[s],t[s]))return!1}return!0}function ep(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tp(e,t){var r=ep(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=ep(r)}}function bv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sv(){for(var e=window,t=nl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=nl(e.document)}return t}function mh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function E1(e){var t=Sv(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bv(r.ownerDocument.documentElement,r)){if(n!==null&&mh(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=tp(r,i);var o=tp(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 k1=Tr&&"documentMode"in document&&11>=document.documentMode,Ps=null,Uu=null,Ki=null,Bu=!1;function rp(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Bu||Ps==null||Ps!==nl(n)||(n=Ps,"selectionStart"in n&&mh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Ki&&co(Ki,n)||(Ki=n,n=ul(Uu,"onSelect"),0<n.length&&(t=new hh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ps)))}function ha(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Rs={animationend:ha("Animation","AnimationEnd"),animationiteration:ha("Animation","AnimationIteration"),animationstart:ha("Animation","AnimationStart"),transitionend:ha("Transition","TransitionEnd")},Uc={},_v={};Tr&&(_v=document.createElement("div").style,"AnimationEvent"in window||(delete Rs.animationend.animation,delete Rs.animationiteration.animation,delete Rs.animationstart.animation),"TransitionEvent"in window||delete Rs.transitionend.transition);function Hl(e){if(Uc[e])return Uc[e];if(!Rs[e])return e;var t=Rs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in _v)return Uc[e]=t[r];return e}var Ev=Hl("animationend"),kv=Hl("animationiteration"),Cv=Hl("animationstart"),Tv=Hl("transitionend"),jv=new Map,np="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 xn(e,t){jv.set(e,t),ss(t,[e])}for(var Bc=0;Bc<np.length;Bc++){var zc=np[Bc],C1=zc.toLowerCase(),T1=zc[0].toUpperCase()+zc.slice(1);xn(C1,"on"+T1)}xn(Ev,"onAnimationEnd");xn(kv,"onAnimationIteration");xn(Cv,"onAnimationStart");xn("dblclick","onDoubleClick");xn("focusin","onFocus");xn("focusout","onBlur");xn(Tv,"onTransitionEnd");ii("onMouseEnter",["mouseout","mouseover"]);ii("onMouseLeave",["mouseout","mouseover"]);ii("onPointerEnter",["pointerout","pointerover"]);ii("onPointerLeave",["pointerout","pointerover"]);ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ss("onBeforeInput",["compositionend","keypress","textInput","paste"]);ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="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(" "),j1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fi));function sp(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,CS(n,t,void 0,e),e.currentTarget=null}function Nv(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;sp(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;sp(s,a,u),i=l}}}if(il)throw e=Du,il=!1,Du=null,e}function xe(e,t){var r=t[qu];r===void 0&&(r=t[qu]=new Set);var n=e+"__bubble";r.has(n)||(Pv(t,e,2,!1),r.add(n))}function Hc(e,t,r){var n=0;t&&(n|=4),Pv(r,e,n,t)}var fa="_reactListening"+Math.random().toString(36).slice(2);function uo(e){if(!e[fa]){e[fa]=!0,Mg.forEach(function(r){r!=="selectionchange"&&(j1.has(r)||Hc(r,!1,e),Hc(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fa]||(t[fa]=!0,Hc("selectionchange",!1,t))}}function Pv(e,t,r,n){switch(fv(t)){case 1:var s=zS;break;case 4:s=HS;break;default:s=uh}r=s.bind(null,t,r,e),s=void 0,!Lu||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 Vc(e,t,r,n,s){var i=n;
vendor: 22,643 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=Ln(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Zg(function(){var u=i,d=oh(r),h=[];e:{var f=jv.get(e);if(f!==void 0){var y=hh,x=e;switch(e){case"keypress":if(za(r)===0)break e;case"keydown":case"keyup":y=s1;break;case"focusin":x="focus",y=Mc;break;case"focusout":x="blur",y=Mc;break;case"beforeblur":case"afterblur":y=Mc;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":y=qf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=qS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=a1;break;case Ev:case kv:case Cv:y=JS;break;case Tv:y=c1;break;case"scroll":y=VS;break;case"wheel":y=d1;break;case"copy":case"cut":case"paste":y=YS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Gf}var m=(t&4)!==0,b=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,w;g!==null;){w=g;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,v!==null&&(S=so(g,v),S!=null&&m.push(ho(g,S,w)))),b)break;g=g.return}0<m.length&&(f=new y(f,x,null,r,d),h.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",f&&r!==Ou&&(x=r.relatedTarget||r.fromElement)&&(Ln(x)||x[jr]))break e;if((y||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,y?(x=r.relatedTarget||r.toElement,y=u,x=x?Ln(x):null,x!==null&&(b=is(x),x!==b||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=u),y!==x)){if(m=qf,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=Gf,S="onPointerLeave",v="onPointerEnter",g="pointer"),b=y==null?f:As(y),w=x==null?f:As(x),f=new m(S,g+"leave",y,r,d),f.target=b,f.relatedTarget=w,S=null,Ln(d)===u&&(m=new m(v,g+"enter",x,r,d),m.target=w,m.relatedTarget=b,S=m),b=S,y&&x)t:{for(m=y,v=x,g=0,w=m;w;w=fs(w))g++;for(w=0,S=v;S;S=fs(S))w++;for(;0<g-w;)m=fs(m),g--;for(;0<w-g;)v=fs(v),w--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=fs(m),v=fs(v)}m=null}else m=null;y!==null&&ip(h,f,y,m,!1),x!==null&&b!==null&&ip(h,b,x,m,!0)}}e:{if(f=u?As(u):window,y=f.nodeName&&f.nodeName.toLowerCase(),y==="select"||y==="input"&&f.type==="file")var _=y1;else if(Yf(f))if(wv)_=S1;else{_=x1;var k=w1}else(y=f.nodeName)&&y.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=b1);if(_&&(_=_(e,u))){yv(h,_,r,d);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&ju(f,"number",f.value)}switch(k=u?As(u):window,e){case"focusin":(Yf(k)||k.contentEditable==="true")&&(Ps=k,Uu=u,Ki=null);break;case"focusout":Ki=Uu=Ps=null;break;case"mousedown":Bu=!0;break;case"contextmenu":case"mouseup":case"dragend":Bu=!1,rp(h,r,d);break;case"selectionchange":if(k1)break;case"keydown":case"keyup":rp(h,r,d)}var C;if(ph)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 Ns?gv(e,r)&&(j="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(j="onCompositionStart");j&&(mv&&r.locale!=="ko"&&(Ns||j!=="onCompositionStart"?j==="onCompositionEnd"&&Ns&&(C=pv()):(Zr=d,dh="value"in Zr?Zr.value:Zr.textContent,Ns=!0)),k=ul(u,j),0<k.length&&(j=new Kf(j,e,null,r,d),h.push({event:j,listeners:k}),C?j.data=C:(C=vv(r),C!==null&&(j.data=C)))),(C=f1?p1(e,r):m1(e,r))&&(u=ul(u,"onBeforeInput"),0<u.length&&(d=new Kf("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=C))}Nv(h,t)})}function ho(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ul(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=so(e,r),i!=null&&n.unshift(ho(e,i,s)),i=so(e,t),i!=null&&n.push(ho(e,i,s))),e=e.return}return n}function fs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ip(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=so(r,i),l!=null&&o.unshift(ho(r,l,a))):s||(l=so(r,i),l!=null&&o.push(ho(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var N1=/\r\n?/g,P1=/\u0000|\uFFFD/g;function op(e){return(typeof e=="string"?e:""+e).replace(N1,`
38`).replace(P1,"")}function pa(e,t,r){if(t=op(t),op(e)!==t&&r)throw Error(R(425))}function dl(){}var zu=null,Hu=null;function Vu(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 Wu=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,ap=typeof Promise=="function"?Promise:void 0,A1=typeof queueMicrotask=="function"?queueMicrotask:typeof ap<"u"?function(e){return ap.resolve(null).then(e).catch(O1)}:Wu;function O1(e){setTimeout(function(){throw e})}function Wc(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),ao(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);ao(t)}function ln(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 lp(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 vi=Math.random().toString(36).slice(2),cr="__reactFiber$"+vi,fo="__reactProps$"+vi,jr="__reactContainer$"+vi,qu="__reactEvents$"+vi,I1="__reactListeners$"+vi,L1="__reactHandles$"+vi;function Ln(e){var t=e[cr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[jr]||r[cr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=lp(e);e!==null;){if(r=e[cr])return r;e=lp(e)}return t}e=r,r=e.parentNode}return null}function Wo(e){return e=e[cr]||e[jr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function As(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function Vl(e){return e[fo]||null}var Ku=[],Os=-1;function bn(e){return{current:e}}function Se(e){0>Os||(e.current=Ku[Os],Ku[Os]=null,Os--)}function ve(e,t){Os++,Ku[Os]=e.current,e.current=t}var mn={},tt=bn(mn),ft=bn(!1),qn=mn;function oi(e,t){var r=e.type.contextTypes;if(!r)return mn;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 pt(e){return e=e.childContextTypes,e!=null}function hl(){Se(ft),Se(tt)}function cp(e,t,r){if(tt.current!==mn)throw Error(R(168));ve(tt,t),ve(ft,r)}function Rv(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(R(108,wS(e)||"Unknown",s));return je({},r,n)}function fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,qn=tt.current,ve(tt,e),ve(ft,ft.current),!0}function up(e,t,r){var n=e.stateNode;if(!n)throw Error(R(169));r?(e=Rv(e,t,qn),n.__reactInternalMemoizedMergedChildContext=e,Se(ft),Se(tt),ve(tt,e)):Se(ft),ve(ft,r)}var Sr=null,Wl=!1,qc=!1;function Av(e){Sr===null?Sr=[e]:Sr.push(e)}function D1(e){Wl=!0,Av(e)}function Sn(){if(!qc&&Sr!==null){qc=!0;var e=0,t=fe;try{var r=Sr;for(fe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Sr=null,Wl=!1}catch(s){throw Sr!==null&&(Sr=Sr.slice(e+1)),nv(ah,Sn),s}finally{fe=t,qc=!1}}return null}var Is=[],Ls=0,pl=null,ml=0,At=[],Ot=0,Kn=null,_r=1,Er="";function Pn(e,t){Is[Ls++]=ml,Is[Ls++]=pl,pl=e,ml=t}function Ov(e,t,r){At[Ot++]=_r,At[Ot++]=Er,At[Ot++]=Kn,Kn=e;var n=_r;e=Er;var s=32-Kt(n)-1;n&=~(1<<s),r+=1;var i=32-Kt(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,_r=1<<32-Kt(t)+s|r<<s|n,Er=i+e}else _r=1<<i|r<<s|n,Er=e}function gh(e){e.return!==null&&(Pn(e,1),Ov(e,1,0))}function vh(e){for(;e===pl;)pl=Is[--Ls],Is[Ls]=null,ml=Is[--Ls],Is[Ls]=null;for(;e===Kn;)Kn=At[--Ot],At[Ot]=null,Er=At[--Ot],At[Ot]=null,_r=At[--Ot],At[Ot]=null}var kt=null,Et=null,_e=!1,qt=null;function Iv(e,t){var r=It(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 dp(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,kt=e,Et=ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,kt=e,Et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Kn!==null?{id:_r,overflow:Er}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=It(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,kt=e,Et=null,!0):!1;default:return!1}}function Gu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ju(e){if(_e){var t=Et;if(t){var r=t;if(!dp(e,t)){if(Gu(e))throw Error(R(418));t=ln(r.nextSibling);var n=kt;t&&dp(e,t)?Iv(n,r):(e.flags=e.flags&-4097|2,_e=!1,kt=e)}}else{if(Gu(e))throw Error(R(418));e.flags=e.flags&-4097|2,_e=!1,kt=e}}}function hp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;kt=e}function ma(e){if(e!==kt)return!1;if(!_e)return hp(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vu(e.type,e.memoizedProps)),t&&(t=Et)){if(Gu(e))throw Lv(),Error(R(418));for(;t;)Iv(e,t),t=ln(t.nextSibling)}if(hp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Et=ln(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Et=null}}else Et=kt?ln(e.stateNode.nextSibling):null;return!0}function Lv(){for(var e=Et;e;)e=ln(e.nextSibling)}function ai(){Et=kt=null,_e=!1}function yh(e){qt===null?qt=[e]:qt.push(e)}var M1=Or.ReactCurrentBatchConfig;function Pi(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(R(309));var n=r.stateNode}if(!n)throw Error(R(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(R(284));if(!r._owner)throw Error(R(290,e))}return e}function ga(e,t){throw e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fp(e){var t=e._init;return t(e._payload)}function Dv(e){function t(v,g){if(e){var w=v.deletions;w===null?(v.deletions=[g],v.flags|=16):w.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function n(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=hn(v,g),v.index=0,v.sibling=null,v}function i(v,g,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<g?(v.flags|=2,g):w):(v.flags|=2,g)):(v.flags|=1048576,g)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,w,S){return g===null||g.tag!==6?(g=Zc(w,v.mode,S),g.return=v,g):(g=s(g,w),g.return=v,g)}function l(v,g,w,S){var _=w.type;return _===js?d(v,g,w.props.children,S,w.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===zr&&fp(_)===g.type)?(S=s(g,w.props),S.ref=Pi(v,g,w),S.return=v,S):(S=Ja(w.type,w.key,w.props,null,v.mode,S),S.ref=Pi(v,g,w),S.return=v,S)}function u(v,g,w,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=eu(w,v.mode,S),g.return=v,g):(g=s(g,w.children||[]),g.return=v,g)}function d(v,g,w,S,_){return g===null||g.tag!==7?(g=Vn(w,v.mode,S,_),g.return=v,g):(g=s(g,w),g.return=v,g)}function h(v,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Zc(""+g,v.mode,w),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ia:return w=Ja(g.type,g.key,g.props,null,v.mode,w),w.ref=Pi(v,null,g),w.return=v,w;case Ts:return g=eu(g,v.mode,w),g.return=v,g;case zr:var S=g._init;return h(v,S(g._payload),w)}if(Mi(g)||ki(g))return g=Vn(g,v.mode,w,null),g.return=v,g;ga(v,g)}return null}function f(v,g,w,S){var _=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:a(v,g,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ia:return w.key===_?l(v,g,w,S):null;case Ts:return w.key===_?u(v,g,w,S):null;case zr:return _=w._init,f(v,g,_(w._payload),S)}if(Mi(w)||ki(w))return _!==null?null:d(v,g,w,S,null);ga(v,w)}return null}function y(v,g,w,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(w)||null,a(g,v,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ia:return v=v.get(S.key===null?w:S.key)||null,l(g,v,S,_);case Ts:return v=v.get(S.key===null?w:S.key)||null,u(g,v,S,_);case zr:var k=S._init;return y(v,g,w,k(S._payload),_)}if(Mi(S)||ki(S))return v=v.get(w)||null,d(g,v,S,_,null);ga(g,S)}return null}function x(v,g,w,S){for(var _=null,k=null,C=g,j=g=0,A=null;C!==null&&j<w.length;j++){C.index>j?(A=C,C=null):A=C.sibling;var O=f(v,C,w[j],S);if(O===null){C===null&&(C=A);break}e&&C&&O.alternate===null&&t(v,C),g=i(O,g,j),k===null?_=O:k.sibling=O,k=O,C=A}if(j===w.length)return r(v,C),_e&&Pn(v,j),_;if(C===null){for(;j<w.length;j++)C=h(v,w[j],S),C!==null&&(g=i(C,g,j),k===null?_=C:k.sibling=C,k=C);return _e&&Pn(v,j),_}for(C=n(v,C);j<w.length;j++)A=y(C,v,j,w[j],S),A!==null&&(e&&A.alternate!==null&&C.delete(A.key===null?j:A.key),g=i(A,g,j),k===null?_=A:k.sibling=A,k=A);return e&&C.forEach(function(U){return t(v,U)}),_e&&Pn(v,j),_}function m(v,g,w,S){var _=ki(w);if(typeof _!="function")throw Error(R(150));if(w=_.call(w),w==null)throw Error(R(151));for(var k=_=null,C=g,j=g=0,A=null,O=w.next();C!==null&&!O.done;j++,O=w.next()){C.index>j?(A=C,C=null):A=C.sibling;var U=f(v,C,O.value,S);if(U===null){C===null&&(C=A);break}e&&C&&U.alternate===null&&t(v,C),g=i(U,g,j),k===null?_=U:k.sibling=U,k=U,C=A}if(O.done)return r(v,C),_e&&Pn(v,j),_;if(C===null){for(;!O.done;j++,O=w.next())O=h(v,O.value,S),O!==null&&(g=i(O,g,j),k===null?_=O:k.sibling=O,k=O);return _e&&Pn(v,j),_}for(C=n(v,C);!O.done;j++,O=w.next())O=y(C,v,j,O.value,S),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?j:O.key),g=i(O,g,j),k===null?_=O:k.sibling=O,k=O);return e&&C.forEach(function(D){return t(v,D)}),_e&&Pn(v,j),_}function b(v,g,w,S){if(typeof w=="object"&&w!==null&&w.type===js&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ia:e:{for(var _=w.key,k=g;k!==null;){if(k.key===_){if(_=w.type,_===js){if(k.tag===7){r(v,k.sibling),g=s(k,w.props.children),g.return=v,v=g;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===zr&&fp(_)===k.type){r(v,k.sibling),g=s(k,w.props),g.ref=Pi(v,k,w),g.return=v,v=g;break e}r(v,k);break}else t(v,k);k=k.sibling}w.type===js?(g=Vn(w.props.children,v.mode,S,w.key),g.return=v,v=g):(S=Ja(w.type,w.key,w.props,null,v.mode,S),S.ref=Pi(v,g,w),S.return=v,v=S)}return o(v);case Ts:e:{for(k=w.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){r(v,g.sibling),g=s(g,w.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=eu(w,v.mode,S),g.return=v,v=g}return o(v);case zr:return k=w._init,b(v,g,k(w._payload),S)}if(Mi(w))return x(v,g,w,S);if(ki(w))return m(v,g,w,S);ga(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(r(v,g.sibling),g=s(g,w),g.return=v,v=g):(r(v,g),g=Zc(w,v.mode,S),g.return=v,v=g),o(v)):r(v,g)}return b}var li=Dv(!0),Mv=Dv(!1),gl=bn(null),vl=null,Ds=null,wh=null;function xh(){wh=Ds=vl=null}function bh(e){var t=gl.current;Se(gl),e._currentValue=t}function Qu(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Vs(e,t){vl=e,wh=Ds=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ht=!0),e.firstContext=null)}function Dt(e){var t=e._currentValue;if(wh!==e)if(e={context:e,memoizedValue:t,next:null},Ds===null){if(vl===null)throw Error(R(308));Ds=e,vl.dependencies={lanes:0,firstContext:e}}else Ds=Ds.next=e;return t}var Dn=null;function Sh(e){Dn===null?Dn=[e]:Dn.push(e)}function $v(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Sh(t)):(r.next=s.next,s.next=r),t.interleaved=r,Nr(e,n)}function Nr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Hr=!1;function _h(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Cr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,se&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Nr(e,r)}return s=n.interleaved,s===null?(t.next=t,Sh(n)):(t.next=s.next,s.next=t),n.interleaved=t,Nr(e,r)}function Ha(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,lh(e,r)}}function pp(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 yl(e,t,r,n){var s=e.updateQueue;Hr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,d=u=l=null,a=i;do{var f=a.lane,y=a.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,m=a;switch(f=t,y=r,m.tag){case 1:if(x=m.payload,typeof x=="function"){h=x.call(y,h,f);break e}h=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=m.payload,f=typeof x=="function"?x.call(y,h,f):x,f==null)break e;h=je({},h,f);break e;case 2:Hr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else y={eventTime:y,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=y,l=h):d=d.next=y,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Jn|=o,e.lanes=o,e.memoizedState=h}}function mp(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(R(191,s));s.call(n)}}}var qo={},pr=bn(qo),po=bn(qo),mo=bn(qo);function Mn(e){if(e===qo)throw Error(R(174));return e}function Eh(e,t){switch(ve(mo,t),ve(po,e),ve(pr,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pu(t,e)}Se(pr),ve(pr,t)}function ci(){Se(pr),Se(po),Se(mo)}function Uv(e){Mn(mo.current);var t=Mn(pr.current),r=Pu(t,e.type);t!==r&&(ve(po,e),ve(pr,r))}function kh(e){po.current===e&&(Se(pr),Se(po))}var Ce=bn(0);function wl(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 Kc=[];function Ch(){for(var e=0;e<Kc.length;e++)Kc[e]._workInProgressVersionPrimary=null;Kc.length=0}var Va=Or.ReactCurrentDispatcher,Gc=Or.ReactCurrentBatchConfig,Gn=0,Te=null,Fe=null,ze=null,xl=!1,Gi=!1,go=0,$1=0;function Ye(){throw Error(R(321))}function Th(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Jt(e[r],t[r]))return!1;return!0}function jh(e,t,r,n,s,i){if(Gn=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Va.current=e===null||e.memoizedState===null?z1:H1,e=r(n,s),Gi){i=0;do{if(Gi=!1,go=0,25<=i)throw Error(R(301));i+=1,ze=Fe=null,t.updateQueue=null,Va.current=V1,e=r(n,s)}while(Gi)}if(Va.current=bl,t=Fe!==null&&Fe.next!==null,Gn=0,ze=Fe=Te=null,xl=!1,t)throw Error(R(300));return e}function Nh(){var e=go!==0;return go=0,e}function nr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?Te.memoizedState=ze=e:ze=ze.next=e,ze}function Mt(){if(Fe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=ze===null?Te.memoizedState:ze.next;if(t!==null)ze=t,Fe=e;else{if(e===null)throw Error(R(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},ze===null?Te.memoizedState=ze=e:ze=ze.next=e}return ze}function vo(e,t){return typeof t=="function"?t(e):t}
vendor: 5,780 bytes, line 38
38function Jc(e){var t=Mt(),r=t.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=e;var n=Fe,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((Gn&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,o=n):l=l.next=h,Te.lanes|=d,Jn|=d}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Jt(n,t.memoizedState)||(ht=!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,Te.lanes|=i,Jn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Qc(e){var t=Mt(),r=t.queue;if(r===null)throw Error(R(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);Jt(i,t.memoizedState)||(ht=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Bv(){}function zv(e,t){var r=Te,n=Mt(),s=t(),i=!Jt(n.memoizedState,s);if(i&&(n.memoizedState=s,ht=!0),n=n.queue,Ph(Wv.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||ze!==null&&ze.memoizedState.tag&1){if(r.flags|=2048,yo(9,Vv.bind(null,r,n,s,t),void 0,null),He===null)throw Error(R(349));Gn&30||Hv(r,t,s)}return s}function Hv(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Vv(e,t,r,n){t.value=r,t.getSnapshot=n,qv(t)&&Kv(e)}function Wv(e,t,r){return r(function(){qv(t)&&Kv(e)})}function qv(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Jt(e,r)}catch{return!0}}function Kv(e){var t=Nr(e,1);t!==null&&Gt(t,e,1,-1)}function gp(e){var t=nr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vo,lastRenderedState:e},t.queue=e,e=e.dispatch=B1.bind(null,Te,e),[t.memoizedState,e]}function yo(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.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 Gv(){return Mt().memoizedState}function Wa(e,t,r,n){var s=nr();Te.flags|=e,s.memoizedState=yo(1|t,r,void 0,n===void 0?null:n)}function ql(e,t,r,n){var s=Mt();n=n===void 0?null:n;var i=void 0;if(Fe!==null){var o=Fe.memoizedState;if(i=o.destroy,n!==null&&Th(n,o.deps)){s.memoizedState=yo(t,r,i,n);return}}Te.flags|=e,s.memoizedState=yo(1|t,r,i,n)}function vp(e,t){return Wa(8390656,8,e,t)}function Ph(e,t){return ql(2048,8,e,t)}function Jv(e,t){return ql(4,2,e,t)}function Qv(e,t){return ql(4,4,e,t)}function Yv(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 Xv(e,t,r){return r=r!=null?r.concat([e]):null,ql(4,4,Yv.bind(null,t,e),r)}function Rh(){}function Zv(e,t){var r=Mt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Th(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function ey(e,t){var r=Mt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Th(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function ty(e,t,r){return Gn&21?(Jt(r,t)||(r=ov(),Te.lanes|=r,Jn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=r)}function F1(e,t){var r=fe;fe=r!==0&&4>r?r:4,e(!0);var n=Gc.transition;Gc.transition={};try{e(!1),t()}finally{fe=r,Gc.transition=n}}function ry(){return Mt().memoizedState}function U1(e,t,r){var n=dn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ny(e))sy(t,r);else if(r=$v(e,t,r,n),r!==null){var s=at();Gt(r,e,n,s),iy(r,t,n)}}function B1(e,t,r){var n=dn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ny(e))sy(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,Jt(a,o)){var l=t.interleaved;l===null?(s.next=s,Sh(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=$v(e,t,s,n),r!==null&&(s=at(),Gt(r,e,n,s),iy(r,t,n))}}function ny(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function sy(e,t){Gi=xl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function iy(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,lh(e,r)}}var bl={readContext:Dt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},z1={readContext:Dt,useCallback:function(e,t){return nr().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:vp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wa(4194308,4,Yv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wa(4,2,e,t)},useMemo:function(e,t){var r=nr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=nr();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=U1.bind(null,Te,e),[n.memoizedState,e]}
vendor: 5,346 bytes, lines 38-40
38,useRef:function(e){var t=nr();return e={current:e},t.memoizedState=e},useState:gp,useDebugValue:Rh,useDeferredValue:function(e){return nr().memoizedState=e},useTransition:function(){var e=gp(!1),t=e[0];return e=F1.bind(null,e[1]),nr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Te,s=nr();if(_e){if(r===void 0)throw Error(R(407));r=r()}else{if(r=t(),He===null)throw Error(R(349));Gn&30||Hv(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,vp(Wv.bind(null,n,i,e),[e]),n.flags|=2048,yo(9,Vv.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=nr(),t=He.identifierPrefix;if(_e){var r=Er,n=_r;r=(n&~(1<<32-Kt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=go++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=$1++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},H1={readContext:Dt,useCallback:Zv,useContext:Dt,useEffect:Ph,useImperativeHandle:Xv,useInsertionEffect:Jv,useLayoutEffect:Qv,useMemo:ey,useReducer:Jc,useRef:Gv,useState:function(){return Jc(vo)},useDebugValue:Rh,useDeferredValue:function(e){var t=Mt();return ty(t,Fe.memoizedState,e)},useTransition:function(){var e=Jc(vo)[0],t=Mt().memoizedState;return[e,t]},useMutableSource:Bv,useSyncExternalStore:zv,useId:ry,unstable_isNewReconciler:!1},V1={readContext:Dt,useCallback:Zv,useContext:Dt,useEffect:Ph,useImperativeHandle:Xv,useInsertionEffect:Jv,useLayoutEffect:Qv,useMemo:ey,useReducer:Qc,useRef:Gv,useState:function(){return Qc(vo)},useDebugValue:Rh,useDeferredValue:function(e){var t=Mt();return Fe===null?t.memoizedState=e:ty(t,Fe.memoizedState,e)},useTransition:function(){var e=Qc(vo)[0],t=Mt().memoizedState;return[e,t]},useMutableSource:Bv,useSyncExternalStore:zv,useId:ry,unstable_isNewReconciler:!1};function Bt(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Yu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:je({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Kl={isMounted:function(e){return(e=e._reactInternals)?is(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=at(),s=dn(e),i=Cr(n,s);i.payload=t,r!=null&&(i.callback=r),t=cn(e,i,s),t!==null&&(Gt(t,e,s,n),Ha(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=at(),s=dn(e),i=Cr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=cn(e,i,s),t!==null&&(Gt(t,e,s,n),Ha(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=at(),n=dn(e),s=Cr(r,n);s.tag=2,t!=null&&(s.callback=t),t=cn(e,s,n),t!==null&&(Gt(t,e,n,r),Ha(t,e,n))}};function yp(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?!co(r,n)||!co(s,i):!0}function oy(e,t,r){var n=!1,s=mn,i=t.contextType;return typeof i=="object"&&i!==null?i=Dt(i):(s=pt(t)?qn:tt.current,n=t.contextTypes,i=(n=n!=null)?oi(e,s):mn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Kl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function wp(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&&Kl.enqueueReplaceState(t,t.state,null)}function Xu(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},_h(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Dt(i):(i=pt(t)?qn:tt.current,s.context=oi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Yu(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&&Kl.enqueueReplaceState(s,s.state,null),yl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ui(e,t){try{var r="",n=t;do r+=yS(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 Yc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Zu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var W1=typeof WeakMap=="function"?WeakMap:Map;function ay(e,t,r){r=Cr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){_l||(_l=!0,cd=n),Zu(e,t)},r}function ly(e,t,r){r=Cr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Zu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Zu(e,t),typeof n!="function"&&(un===null?un=new Set([this]):un.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function xp(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new W1;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));
vendor: 5,636 bytes, line 40
40s.has(r)||(s.add(r),e=i_.bind(null,e,t,r),t.then(e,e))}function bp(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 Sp(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Cr(-1,1),t.tag=2,cn(r,t,1))),r.lanes|=1),e)}var q1=Or.ReactCurrentOwner,ht=!1;function it(e,t,r,n){t.child=e===null?Mv(t,null,r,n):li(t,e.child,r,n)}function _p(e,t,r,n,s){r=r.render;var i=t.ref;return Vs(t,s),n=jh(e,t,r,n,i,s),r=Nh(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Pr(e,t,s)):(_e&&r&&gh(t),t.flags|=1,it(e,t,n,s),t.child)}function Ep(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Fh(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,cy(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:co,r(o,n)&&e.ref===t.ref)return Pr(e,t,s)}return t.flags|=1,e=hn(i,n),e.ref=t.ref,e.return=t,t.child=e}function cy(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(co(i,n)&&e.ref===t.ref)if(ht=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(ht=!0);else return t.lanes=e.lanes,Pr(e,t,s)}return ed(e,t,r,n,s)}function uy(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},ve($s,bt),bt|=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,ve($s,bt),bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,ve($s,bt),bt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,ve($s,bt),bt|=n;return it(e,t,s,r),t.child}function dy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ed(e,t,r,n,s){var i=pt(r)?qn:tt.current;return i=oi(t,i),Vs(t,s),r=jh(e,t,r,n,i,s),n=Nh(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Pr(e,t,s)):(_e&&n&&gh(t),t.flags|=1,it(e,t,r,s),t.child)}function kp(e,t,r,n,s){if(pt(r)){var i=!0;fl(t)}else i=!1;if(Vs(t,s),t.stateNode===null)qa(e,t),oy(t,r,n),Xu(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Dt(u):(u=pt(r)?qn:tt.current,u=oi(t,u));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!==u)&&wp(t,o,n,u),Hr=!1;var f=t.memoizedState;o.state=f,yl(t,n,o,s),l=t.memoizedState,a!==n||f!==l||ft.current||Hr?(typeof d=="function"&&(Yu(t,r,d,n),l=t.memoizedState),(a=Hr||yp(t,r,a,n,f,l,u))?(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=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Fv(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Bt(t.type,a),o.props=u,h=t.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Dt(l):(l=pt(r)?qn:tt.current,l=oi(t,l));var y=r.getDerivedStateFromProps;(d=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||f!==l)&&wp(t,o,n,l),Hr=!1,f=t.memoizedState,o.state=f,yl(t,n,o,s);var x=t.memoizedState;a!==h||f!==x||ft.current||Hr?(typeof y=="function"&&(Yu(t,r,y,n),x=t.memoizedState),(u=Hr||yp(t,r,u,n,f,x,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,x,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,x,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=x),o.props=n,o.state=x,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return td(e,t,r,n,i,s)}function td(e,t,r,n,s,i){dy(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&up(t,r,!1),Pr(e,t,i);n=t.stateNode,q1.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=li(t,e.child,null,i),t.child=li(t,null,a,i)):it(e,t,a,i),t.memoizedState=n.state,s&&up(t,r,!0),t.child}function hy(e){var t=e.stateNode;t.pendingContext?cp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cp(e,t.context,!1),Eh(e,t.containerInfo)}function Cp(e,t,r,n,s){return ai(),yh(s),t.flags|=256,it(e,t,r,n),t.child}var rd={dehydrated:null,treeContext:null,retryLane:0};
vendor: 9,373 bytes, line 40
40function nd(e){return{baseLanes:e,cachePool:null,transitions:null}}function fy(e,t,r){var n=t.pendingProps,s=Ce.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),ve(Ce,s&1),e===null)return Ju(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Ql(o,n,0,null),e=Vn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=nd(r),t.memoizedState=rd,e):Ah(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return K1(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=hn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=hn(a,i):(i=Vn(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?nd(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=rd,n}return i=e.child,e=i.sibling,n=hn(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 Ah(e,t){return t=Ql({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function va(e,t,r,n){return n!==null&&yh(n),li(t,e.child,null,r),e=Ah(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function K1(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=Yc(Error(R(422))),va(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=Ql({mode:"visible",children:n.children},s,0,null),i=Vn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&li(t,e.child,null,o),t.child.memoizedState=nd(o),t.memoizedState=rd,i);if(!(t.mode&1))return va(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(R(419)),n=Yc(i,n,void 0),va(e,t,o,n)}if(a=(o&e.childLanes)!==0,ht||a){if(n=He,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,Nr(e,s),Gt(n,e,s,-1))}return $h(),n=Yc(Error(R(421))),va(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=o_.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Et=ln(s.nextSibling),kt=t,_e=!0,qt=null,e!==null&&(At[Ot++]=_r,At[Ot++]=Er,At[Ot++]=Kn,_r=e.id,Er=e.overflow,Kn=t),t=Ah(t,n.children),t.flags|=4096,t)}function Tp(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Qu(e.return,t,r)}function Xc(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 py(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(it(e,t,n.children,r),n=Ce.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tp(e,r,t);else if(e.tag===19)Tp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ve(Ce,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&&wl(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Xc(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&&wl(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Xc(t,!0,r,null,i);break;case"together":Xc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Pr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,r=hn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=hn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function G1(e,t,r){switch(t.tag){case 3:hy(t),ai();break;case 5:Uv(t);break;case 1:pt(t.type)&&fl(t);break;case 4:Eh(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ve(gl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ve(Ce,Ce.current&1),t.flags|=128,null):r&t.child.childLanes?fy(e,t,r):(ve(Ce,Ce.current&1),e=Pr(e,t,r),e!==null?e.sibling:null);ve(Ce,Ce.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return py(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ve(Ce,Ce.current),n)break;return null;case 22:case 23:return t.lanes=0,uy(e,t,r)}return Pr(e,t,r)}var my,sd,gy,vy;my=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}};sd=function(){};gy=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Mn(pr.current);var i=null;switch(r){case"input":s=Cu(e,s),n=Cu(e,n),i=[];break;case"select":s=je({},s,{value:void 0}),n=je({},n,{value:void 0}),i=[];break;case"textarea":s=Nu(e,s),n=Nu(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=dl)}Ru(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ro.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ro.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&xe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};vy=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ri(e,t){if(!_e)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 Xe(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 J1(e,t,r){var n=t.pendingProps;switch(vh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return pt(t.type)&&hl(),Xe(t),null;case 3:return n=t.stateNode,ci(),Se(ft),Se(tt),Ch(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ma(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qt!==null&&(hd(qt),qt=null))),sd(e,t),Xe(t),null;case 5:kh(t);var s=Mn(mo.current);if(r=t.type,e!==null&&t.stateNode!=null)gy(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(R(166));return Xe(t),null}if(e=Mn(pr.current),ma(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[cr]=t,n[fo]=i,e=(t.mode&1)!==0,r){case"dialog":xe("cancel",n),xe("close",n);break;case"iframe":case"object":case"embed":xe("load",n);break;case"video":case"audio":for(s=0;s<Fi.length;s++)xe(Fi[s],n);break;case"source":xe("error",n);break;case"img":case"image":case"link":xe("error",n),xe("load",n);break;case"details":xe("toggle",n);break;case"input":Df(n,i),xe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},xe("invalid",n);break;case"textarea":$f(n,i),xe("invalid",n)}Ru(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&&pa(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&pa(n.textContent,a,e),s=["children",""+a]):ro.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&xe("scroll",n)}switch(r){case"input":oa(n),Mf(n,i,!0);break;case"textarea":oa(n),Ff(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=dl)}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=Wg(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[cr]=t,e[fo]=n,my(e,t,!1,!1),t.stateNode=e;e:{switch(o=Au(r,n),r){case"dialog":xe("cancel",e),xe("close",e),s=n;break;case"iframe":case"object":case"embed":xe("load",e),s=n;break;case"video":case"audio":for(s=0;s<Fi.length;s++)xe(Fi[s],e);s=n;break;case"source":xe("error",e),s=n;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=n;break;case"details":xe("toggle",e),s=n;break;case"input":Df(e,n),s=Cu(e,n),xe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=je({},n,{value:void 0}),xe("invalid",e);break;case"textarea":$f(e,n),s=Nu(e,n),xe("invalid",e);break;default:s=n}Ru(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Gg(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&qg(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&no(e,l):typeof l=="number"&&no(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ro.hasOwnProperty(i)?l!=null&&i==="onScroll"&&xe("scroll",e):l!=null&&rh(e,i,l,o))}switch(r){case"input":oa(e),Mf(e,n,!1);break;case"textarea":oa(e),Ff(e);break;case"option":n.value!=null&&e.setAttribute("value",""+pn(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Us(e,!!n.multiple,i,!1):n.defaultValue!=null&&Us(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=dl)}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 Xe(t),null;case 6:if(e&&t.stateNode!=null)vy(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(R(166));if(r=Mn(mo.current),Mn(pr.current),ma(t)){if(n=t.stateNode,r=t.memoizedProps,n[cr]=t,(i=n.nodeValue!==r)&&(e=kt,e!==null))switch(e.tag){case 3:pa(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pa(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[cr]=t,t.stateNode=n}return Xe(t),null;case 13:if(Se(Ce),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&Et!==null&&t.mode&1&&!(t.flags&128))Lv(),ai(),t.flags|=98560,i=!1;else if(i=ma(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(R(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(R(317));i[cr]=t}else ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else qt!==null&&(hd(qt),qt=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||Ce.current&1?Ue===0&&(Ue=3):$h())),t.updateQueue!==null&&(t.flags|=4),Xe(t),null);case 4:return ci(),sd(e,t),e===null&&uo(t.stateNode.containerInfo),Xe(t),null;case 10:return bh(t.type._context),Xe(t),null;case 17:return pt(t.type)&&hl(),Xe(t),null;case 19:if(Se(Ce),i=t.memoizedState,i===null)return Xe(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Ri(i,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=wl(e),o!==null){for(t.flags|=128,Ri(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ve(Ce,Ce.current&1|2),t.child}e=e.sibling}i.tail!==null&&Le()>di&&(t.flags|=128,n=!0,Ri(i,!1),t.lanes=4194304)}else{if(!n)if(e=wl(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ri(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!_e)return Xe(t),null}else 2*Le()-i.renderingStartTime>di&&r!==1073741824&&(t.flags|=128,n=!0,Ri(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Le(),t.sibling=null,r=Ce.current,ve(Ce,n?r&1|2:r&1),t):(Xe(t),null);case 22:case 23:return Mh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?bt&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function Q1(e,t){switch(vh(t),t.tag){case 1:return pt(t.type)&&hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ci(),Se(ft),Se(tt),Ch(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return kh(t),null;case 13:if(Se(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ce),null;case 4:return ci(),null;case 10:return bh(t.type._context),null;case 22:case 23:return Mh(),null;case 24:return null;default:return null}}var ya=!1,et=!1,Y1=typeof WeakSet=="function"?WeakSet:Set,$=null;function Ms(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ae(e,t,n)}else r.current=null}function id(e,t,r){try{r()}catch(n){Ae(e,t,n)}}var jp=!1;function X1(e,t){if(zu=ll,e=Sv(),mh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var y;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),(y=h.firstChild)!==null;)f=h,h=y;for(;;){if(h===e)break t;if(f===r&&++u===s&&(a=o),f===i&&++d===n&&(l=o),(y=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=y}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Hu={focusedElem:e,selectionRange:r},ll=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var m=x.memoizedProps,b=x.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Bt(t.type,m),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(S){Ae(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return x=jp,jp=!1,x}function Ji(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&&id(t,r,i)}s=s.next}while(s!==n)}}function Gl(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 od(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 yy(e){var t=e.alternate;t!==null&&(e.alternate=null,yy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cr],delete t[fo],delete t[qu],delete t[I1],delete t[L1])),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 wy(e){return e.tag===5||e.tag===3||e.tag===4}function Np(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wy(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 ad(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=dl));else if(n!==4&&(e=e.child,e!==null))for(ad(e,t,r),e=e.sibling;e!==null;)ad(e,t,r),e=e.sibling}function ld(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(ld(e,t,r),e=e.sibling;e!==null;)ld(e,t,r),e=e.sibling}var Ke=null,Wt=!1;function Mr(e,t,r){for(r=r.child;r!==null;)xy(e,t,r),r=r.sibling}function xy(e,t,r){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(Ul,r)}catch{}switch(r.tag){case 5:et||Ms(r,t);case 6:var n=Ke,s=Wt;Ke=null,Mr(e,t,r),Ke=n,Wt=s,Ke!==null&&(Wt?(e=Ke,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ke.removeChild(r.stateNode));break;case 18:Ke!==null&&(Wt?(e=Ke,r=r.stateNode,e.nodeType===8?Wc(e.parentNode,r):e.nodeType===1&&Wc(e,r),ao(e)):Wc(Ke,r.stateNode));break;case 4:n=Ke,s=Wt,Ke=r.stateNode.containerInfo,Wt=!0,Mr(e,t,r),Ke=n,Wt=s;break;case 0:case 11:case 14:case 15:if(!et&&(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)&&id(r,t,o),s=s.next}while(s!==n)}Mr(e,t,r);break;case 1:if(!et&&(Ms(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ae(r,t,a)}Mr(e,t,r);break;case 21:Mr(e,t,r);break;case 22:r.mode&1?(et=(n=et)||r.memoizedState!==null,Mr(e,t,r),et=n):Mr(e,t,r);break;default:Mr(e,t,r)}}function Pp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Y1),t.forEach(function(n){var s=a_.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function $t(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:Ke=a.stateNode,Wt=!1;break e;case 3:Ke=a.stateNode.containerInfo,Wt=!0;break e;case 4:Ke=a.stateNode.containerInfo,Wt=!0;break e}a=a.return}if(Ke===null)throw Error(R(160));xy(i,o,s),Ke=null,Wt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Ae(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)by(t,e),t=t.sibling}function by(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if($t(t,e),tr(e),n&4){try{Ji(3,e,e.return),Gl(3,e)}catch(m){Ae(e,e.return,m)}try{Ji(5,e,e.return)}catch(m){Ae(e,e.return,m)}}break;case 1:$t(t,e),tr(e),n&512&&r!==null&&Ms(r,r.return);break;case 5:if($t(t,e),tr(e),n&512&&r!==null&&Ms(r,r.return),e.flags&32){var s=e.stateNode;try{no(s,"")}catch(m){Ae(e,e.return,m)}}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&&Hg(s,i),Au(a,o);var u=Au(a,i);for(o=0;o<l.length;o+=2){var d=l[o],h=l[o+1];d==="style"?Gg(s,h):d==="dangerouslySetInnerHTML"?qg(s,h):d==="children"?no(s,h):rh(s,d,h,u)}switch(a){case"input":Tu(s,i);break;case"textarea":Vg(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?Us(s,!!i.multiple,y,!1):f!==!!i.multiple&&(i.defaultValue!=null?Us(s,!!i.multiple,i.defaultValue,!0):Us(s,!!i.multiple,i.multiple?[]:"",!1))}s[fo]=i}catch(m){Ae(e,e.return,m)}}break;case 6:if($t(t,e),tr(e),n&4){if(e.stateNode===null)throw Error(R(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){Ae(e,e.return,m)}}break;case 3:if($t(t,e),tr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ao(t.containerInfo)}catch(m){Ae(e,e.return,m)}break;case 4:$t(t,e),tr(e);break;case 13:$t(t,e),tr(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Lh=Le())),n&4&&Pp(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(et=(u=et)||d,$t(t,e),et=u):$t(t,e),tr(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for($=e,d=e.child;d!==null;){for(h=$=d;$!==null;){switch(f=$,y=f.child,f.tag){case 0:case 11:case 14:case 15:Ji(4,f,f.return);break;case 1:Ms(f,f.return);var x=f.stateNode;if(typeof x.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(m){Ae(n,r,m)}}break;case 5:Ms(f,f.return);break;case 22:if(f.memoizedState!==null){Ap(h);continue}}y!==null?(y.return=f,$=y):Ap(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(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=Kg("display",o))}catch(m){Ae(e,e.return,m)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){Ae(e,e.return,m)}}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:$t(t,e),tr(e),n&4&&Pp(e);break;case 21:break;default:$t(t,e),tr(e)}}function tr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(wy(r)){var n=r;break e}r=r.return}throw Error(R(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(no(s,""),n.flags&=-33);var i=Np(e);ld(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Np(e);ad(e,a,o);break;default:throw Error(R(161))}}catch(l){Ae(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Z1(e,t,r){$=e,Sy(e)}function Sy(e,t,r){for(var n=(e.mode&1)!==0;$!==null;){var s=$,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||ya;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||et;a=ya;var u=et;if(ya=o,(et=l)&&!u)for($=s;$!==null;)o=$,l=o.child,o.tag===22&&o.memoizedState!==null?Op(s):l!==null?(l.return=o,$=l):Op(s);for(;i!==null;)$=i,Sy(i),i=i.sibling;$=s,ya=a,et=u}Rp(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,$=i):Rp(e)}}function Rp(e){for(;$!==null;){var t=$;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:et||Gl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!et)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Bt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&mp(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}mp(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&ao(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}et||t.flags&512&&od(t)}catch(f){Ae(t,t.return,f)}}if(t===e){$=null;break}if(r=t.sibling,r!==null){r.return=t.return,$=r;break}$=t.return}}function Ap(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$=r;break}$=t.return}}function Op(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Gl(4,t)}catch(l){Ae(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Ae(t,s,l)}}var i=t.return;try{od(t)}catch(l){Ae(t,i,l)}break;case 5:var o=t.return;try{od(t)}catch(l){Ae(t,o,l)}}}catch(l){Ae(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var e_=Math.ceil,Sl=Or.ReactCurrentDispatcher,Oh=Or.ReactCurrentOwner,Lt=Or.ReactCurrentBatchConfig,se=0,He=null,Me=null,Ge=0,bt=0,$s=bn(0),Ue=0,wo=null,Jn=0,Jl=0,Ih=0,Qi=null,dt=null,Lh=0,di=1/0,wr=null,_l=!1,cd=null,un=null,wa=!1,en=null,El=0,Yi=0,ud=null,Ka=-1,Ga=0;function at(){return se&6?Le():Ka!==-1?Ka:Ka=Le()}function dn(e){return e.mode&1?se&2&&Ge!==0?Ge&-Ge:M1.transition!==null?(Ga===0&&(Ga=ov()),Ga):(e=fe,e!==0||(e=window.event,e=e===void 0?16:fv(e.type)),e):1}function Gt(e,t,r,n){if(50<Yi)throw Yi=0,ud=null,Error(R(185));Ho(e,r,n),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Jl|=r),Ue===4&&Wr(e,Ge)),mt(e,n),r===1&&se===0&&!(t.mode&1)&&(di=Le()+500,Wl&&Sn()))}function mt(e,t){var r=e.callbackNode;MS(e,t);var n=al(e,e===He?Ge:0);if(n===0)r!==null&&zf(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&zf(r),t===1)e.tag===0?D1(Ip.bind(null,e)):Av(Ip.bind(null,e)),A1(function(){!(se&6)&&Sn()}),r=null;else{switch(av(n)){case 1:r=ah;break;case 4:r=sv;break;case 16:r=ol;break;case 536870912:r=iv;break;default:r=ol}r=Py(r,_y.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function _y(e,t){if(Ka=-1,Ga=0,se&6)throw Error(R(327));var r=e.callbackNode;if(Ws()&&e.callbackNode!==r)return null;var n=al(e,e===He?Ge:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=kl(e,n);else{t=n;var s=se;se|=2;var i=ky();(He!==e||Ge!==t)&&(wr=null,di=Le()+500,Hn(e,t));do try{n_();break}catch(a){Ey(e,a)}while(!0);xh(),Sl.current=i,se=s,Me!==null?t=0:(He=null,Ge=0,t=Ue)}if(t!==0){if(t===2&&(s=Mu(e),s!==0&&(n=s,t=dd(e,s))),t===1)throw r=wo,Hn(e,0),Wr(e,n),mt(e,Le()),r;if(t===6)Wr(e,n);else{if(s=e.current.alternate,!(n&30)&&!t_(s)&&(t=kl(e,n),t===2&&(i=Mu(e),i!==0&&(n=i,t=dd(e,i))),t===1))throw r=wo,Hn(e,0),Wr(e,n),mt(e,Le()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(R(345));case 2:Rn(e,dt,wr);break;case 3:if(Wr(e,n),(n&130023424)===n&&(t=Lh+500-Le(),10<t)){if(al(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){at(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Wu(Rn.bind(null,e,dt,wr),t);break}Rn(e,dt,wr);break;case 4:if(Wr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-Kt(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*e_(n/1960))-n,10<n){e.timeoutHandle=Wu(Rn.bind(null,e,dt,wr),n);break}Rn(e,dt,wr);break;case 5:Rn(e,dt,wr);break;default:throw Error(R(329))}}}return mt(e,Le()),e.callbackNode===r?_y.bind(null,e):null}function dd(e,t){var r=Qi;return e.current.memoizedState.isDehydrated&&(Hn(e,t).flags|=256),e=kl(e,t),e!==2&&(t=dt,dt=r,t!==null&&hd(t)),e}function hd(e){dt===null?dt=e:dt.push.apply(dt,e)}function t_(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Jt(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 Wr(e,t){for(t&=~Ih,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Kt(t),n=1<<r;e[r]=-1,t&=~n}}function Ip(e){if(se&6)throw Error(R(327));Ws();var t=al(e,0);if(!(t&1))return mt(e,Le()),null;var r=kl(e,t);if(e.tag!==0&&r===2){var n=Mu(e);n!==0&&(t=n,r=dd(e,n))}if(r===1)throw r=wo,Hn(e,0),Wr(e,t),mt(e,Le()),r;if(r===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rn(e,dt,wr),mt(e,Le()),null}function Dh(e,t){var r=se;se|=1;try{return e(t)}finally{se=r,se===0&&(di=Le()+500,Wl&&Sn())}}function Qn(e){en!==null&&en.tag===0&&!(se&6)&&Ws();var t=se;se|=1;var r=Lt.transition,n=fe;try{if(Lt.transition=null,fe=1,e)return e()}finally{fe=n,Lt.transition=r,se=t,!(se&6)&&Sn()}}function Mh(){bt=$s.current,Se($s)}function Hn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,R1(r)),Me!==null)for(r=Me.return;r!==null;){var n=r;switch(vh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&hl();break;case 3:ci(),Se(ft),Se(tt),Ch();break;case 5:kh(n);break;case 4:ci();break;case 13:Se(Ce);break;case 19:Se(Ce);break;case 10:bh(n.type._context);break;case 22:case 23:Mh()}r=r.return}if(He=e,Me=e=hn(e.current,null),Ge=bt=t,Ue=0,wo=null,Ih=Jl=Jn=0,dt=Qi=null,Dn!==null){for(t=0;t<Dn.length;t++)if(r=Dn[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}Dn=null}return e}function Ey(e,t){do{var r=Me;try{if(xh(),Va.current=bl,xl){for(var n=Te.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}xl=!1}if(Gn=0,ze=Fe=Te=null,Gi=!1,go=0,Oh.current=null,r===null||r.return===null){Ue=1,wo=t,Me=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Ge,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=bp(o);if(y!==null){y.flags&=-257,Sp(y,o,a,i,t),y.mode&1&&xp(i,u,t),t=y,l=u;var x=t.updateQueue;if(x===null){var m=new Set;m.add(l),t.updateQueue=m}else x.add(l);break e}else{if(!(t&1)){xp(i,u,t),$h();break e}l=Error(R(426))}}else if(_e&&a.mode&1){var b=bp(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Sp(b,o,a,i,t),yh(ui(l,a));break e}}i=l=ui(l,a),Ue!==4&&(Ue=2),Qi===null?Qi=[i]:Qi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=ay(i,l,t);pp(i,v);break e;case 1:a=l;var g=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(un===null||!un.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=ly(i,a,t);pp(i,S);break e}}i=i.return}while(i!==null)}Ty(r)}catch(_){t=_,Me===r&&r!==null&&(Me=r=r.return);continue}break}while(!0)}function ky(){var e=Sl.current;return Sl.current=bl,e===null?bl:e}function $h(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),He===null||!(Jn&268435455)&&!(Jl&268435455)||Wr(He,Ge)}function kl(e,t){var r=se;se|=2;var n=ky();(He!==e||Ge!==t)&&(wr=null,Hn(e,t));do try{r_();break}catch(s){Ey(e,s)}while(!0);if(xh(),se=r,Sl.current=n,Me!==null)throw Error(R(261));return He=null,Ge=0,Ue}function r_(){for(;Me!==null;)Cy(Me)}function n_(){for(;Me!==null&&!jS();)Cy(Me)}function Cy(e){var t=Ny(e.alternate,e,bt);e.memoizedProps=e.pendingProps,t===null?Ty(e):Me=t,Oh.current=null}function Ty(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Q1(r,t),r!==null){r.flags&=32767,Me=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,Me=null;return}}else if(r=J1(r,t,bt),r!==null){Me=r;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Ue===0&&(Ue=5)}function Rn(e,t,r){var n=fe,s=Lt.transition;try{Lt.transition=null,fe=1,s_(e,t,r,n)}finally{Lt.transition=s,fe=n}return null}function s_(e,t,r,n){do Ws();while(en!==null);if(se&6)throw Error(R(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(R(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if($S(e,i),e===He&&(Me=He=null,Ge=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||wa||(wa=!0,Py(ol,function(){return Ws(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Lt.transition,Lt.transition=null;var o=fe;fe=1;var a=se;se|=4,Oh.current=null,X1(e,r),by(r,e),E1(Hu),ll=!!zu,Hu=zu=null,e.current=r,Z1(r),NS(),se=a,fe=o,Lt.transition=i}else e.current=r;if(wa&&(wa=!1,en=e,El=s),i=e.pendingLanes,i===0&&(un=null),AS(r.stateNode),mt(e,Le()),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(_l)throw _l=!1,e=cd,cd=null,e;return El&1&&e.tag!==0&&Ws(),i=e.pendingLanes,i&1?e===ud?Yi++:(Yi=0,ud=e):Yi=0,Sn(),null}function Ws(){if(en!==null){var e=av(El),t=Lt.transition,r=fe;try{if(Lt.transition=null,fe=16>e?16:e,en===null)var n=!1;else{if(e=en,en=null,El=0,se&6)throw Error(R(331));var s=se;for(se|=4,$=e.current;$!==null;){var i=$,o=i.child;if($.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for($=u;$!==null;){var d=$;switch(d.tag){case 0:case 11:case 15:Ji(8,d,i)}var h=d.child;if(h!==null)h.return=d,$=h;else for(;$!==null;){d=$;var f=d.sibling,y=d.return;if(yy(d),d===u){$=null;break}if(f!==null){f.return=y,$=f;break}$=y}}}var x=i.alternate;if(x!==null){var m=x.child;if(m!==null){x.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}$=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,$=o;else e:for(;$!==null;){if(i=$,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ji(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,$=v;break e}$=i.return}}var g=e.current;for($=g;$!==null;){o=$;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,$=w;else e:for(o=g;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Gl(9,a)}}catch(_){Ae(a,a.return,_)}if(a===o){$=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,$=S;break e}$=a.return}}if(se=s,Sn(),fr&&typeof fr.onPostCommitFiberRoot=="function")try{fr.onPostCommitFiberRoot(Ul,e)}catch{}n=!0}return n}finally{fe=r,Lt.transition=t}}return!1}function Lp(e,t,r){t=ui(r,t),t=ay(e,t,1),e=cn(e,t,1),t=at(),e!==null&&(Ho(e,1,t),mt(e,t))}function Ae(e,t,r){if(e.tag===3)Lp(e,e,r);else for(;t!==null;){if(t.tag===3){Lp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(un===null||!un.has(n))){e=ui(r,e),e=ly(t,e,1),t=cn(t,e,1),e=at(),t!==null&&(Ho(t,1,e),mt(t,e));break}}t=t.return}}function i_(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&r,He===e&&(Ge&r)===r&&(Ue===4||Ue===3&&(Ge&130023424)===Ge&&500>Le()-Lh?Hn(e,0):Ih|=r),mt(e,t)}function jy(e,t){t===0&&(e.mode&1?(t=ca,ca<<=1,!(ca&130023424)&&(ca=4194304)):t=1);var r=at();e=Nr(e,t),e!==null&&(Ho(e,t,r),mt(e,r))}function o_(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),jy(e,r)}function a_(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(R(314))}n!==null&&n.delete(t),jy(e,r)}var Ny;Ny=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)ht=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ht=!1,G1(e,t,r);ht=!!(e.flags&131072)}else ht=!1,_e&&t.flags&1048576&&Ov(t,ml,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;qa(e,t),e=t.pendingProps;var s=oi(t,tt.current);Vs(t,r),s=jh(null,t,n,e,s,r);var i=Nh();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,pt(n)?(i=!0,fl(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,_h(t),s.updater=Kl,t.stateNode=s,s._reactInternals=t,Xu(t,n,e,r),t=td(null,t,n,!0,i,r)):(t.tag=0,_e&&i&&gh(t),it(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(qa(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=c_(n),e=Bt(n,e),s){case 0:t=ed(null,t,n,e,r);break e;case 1:t=kp(null,t,n,e,r);break e;case 11:t=_p(null,t,n,e,r);break e;case 14:t=Ep(null,t,n,Bt(n.type,e),r);break e}throw Error(R(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),ed(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),kp(e,t,n,s,r);case 3:e:{if(hy(t),e===null)throw Error(R(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Fv(e,t),yl(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=ui(Error(R(423)),t),t=Cp(e,t,n,r,s);break e}else if(n!==s){s=ui(Error(R(424)),t),t=Cp(e,t,n,r,s);break e}else for(Et=ln(t.stateNode.containerInfo.firstChild),kt=t,_e=!0,qt=null,r=Mv(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ai(),n===s){t=Pr(e,t,r);break e}it(e,t,n,r)}t=t.child}return t;case 5:return Uv(t),e===null&&Ju(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Vu(n,s)?o=null:i!==null&&Vu(n,i)&&(t.flags|=32),dy(e,t),it(e,t,o,r),t.child;case 6:return e===null&&Ju(t),null;case 13:return fy(e,t,r);case 4:return Eh(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=li(t,null,n,r):it(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),_p(e,t,n,s,r);case 7:return it(e,t,t.pendingProps,r),t.child;case 8:return it(e,t,t.pendingProps.children,r),t.child;case 12:return it(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,ve(gl,n._currentValue),n._currentValue=o,i!==null)if(Jt(i.value,o)){if(i.children===s.children&&!ft.current){t=Pr(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Cr(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Qu(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(R(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Qu(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}it(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Vs(t,r),s=Dt(s),n=n(s),t.flags|=1,it(e,t,n,r),t.child;case 14:return n=t.type,s=Bt(n,t.pendingProps),s=Bt(n.type,s),Ep(e,t,n,s,r);case 15:return cy(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),qa(e,t),t.tag=1,pt(n)?(e=!0,fl(t)):e=!1,Vs(t,r),oy(t,n,s),Xu(t,n,s,r),td(null,t,n,!0,e,r);case 19:return py(e,t,r);case 22:return uy(e,t,r)}throw Error(R(156,t.tag))};function Py(e,t){return nv(e,t)}function l_(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 It(e,t,r,n){return new l_(e,t,r,n)}function Fh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function c_(e){if(typeof e=="function")return Fh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sh)return 11;if(e===ih)return 14}return 2}function hn(e,t){var r=e.alternate;return r===null?(r=It(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")Fh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case js:return Vn(r.children,s,i,t);case nh:o=8,s|=8;break;case Su:return e=It(12,r,t,s|2),e.elementType=Su,e.lanes=i,e;case _u:return e=It(13,r,t,s),e.elementType=_u,e.lanes=i,e;case Eu:return e=It(19,r,t,s),e.elementType=Eu,e.lanes=i,e;case Ug:return Ql(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $g:o=10;break e;case Fg:o=9;break e;case sh:o=11;break e;case ih:o=14;break e;case zr:o=16,n=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=It(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Vn(e,t,r,n){return e=It(7,e,n,t),e.lanes=r,e}function Ql(e,t,r,n){return e=It(22,e,n,t),e.elementType=Ug,e.lanes=r,e.stateNode={isHidden:!1},e}function Zc(e,t,r){return e=It(6,e,null,t),e.lanes=r,e}function eu(e,t,r){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function u_(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=Ic(0),this.expirationTimes=Ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ic(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Uh(e,t,r,n,s,i,o,a,l){return e=new u_(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=It(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},_h(i),e}function d_(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ts,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Ry(e){if(!e)return mn;e=e._reactInternals;e:{if(is(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var r=e.type;if(pt(r))return Rv(e,r,t)}return t}function Ay(e,t,r,n,s,i,o,a,l){return e=Uh(r,n,!0,e,s,i,o,a,l),e.context=Ry(null),r=e.current,n=at(),s=dn(r),i=Cr(n,s),i.callback=t??null,cn(r,i,s),e.current.lanes=s,Ho(e,s,n),mt(e,n),e}function Yl(e,t,r,n){var s=t.current,i=at(),o=dn(s);return r=Ry(r),t.context===null?t.context=r:t.pendingContext=r,t=Cr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=cn(s,t,o),e!==null&&(Gt(e,s,o,i),Ha(e,s,o)),o}function Cl(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 Dp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Bh(e,t){Dp(e,t),(e=e.alternate)&&Dp(e,t)}function h_(){return null}var Oy=typeof reportError=="function"?reportError:function(e){console.error(e)};function zh(e){this._internalRoot=e}Xl.prototype.render=zh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));Yl(e,t,null,null)};Xl.prototype.unmount=zh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qn(function(){Yl(null,e,null,null)}),t[jr]=null}};function Xl(e){this._internalRoot=e}Xl.prototype.unstable_scheduleHydration=function(e){if(e){var t=uv();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Vr.length&&t!==0&&t<Vr[r].priority;r++);Vr.splice(r,0,e),r===0&&hv(e)}};function Hh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mp(){}function f_(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Cl(o);i.call(u)}}var o=Ay(t,n,e,0,null,!1,!1,"",Mp);return e._reactRootContainer=o,e[jr]=o.current,uo(e.nodeType===8?e.parentNode:e),Qn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Cl(l);a.call(u)}}var l=Uh(e,0,!1,null,null,!1,!1,"",Mp);return e._reactRootContainer=l,e[jr]=l.current,uo(e.nodeType===8?e.parentNode:e),Qn(function(){Yl(t,l,r,n)}),l}function ec(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=Cl(o);a.call(l)}}Yl(t,o,e,s)}else o=f_(r,t,e,s,n);return Cl(o)}lv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$i(t.pendingLanes);r!==0&&(lh(t,r|1),mt(t,Le()),!(se&6)&&(di=Le()+500,Sn()))}break;case 13:Qn(function(){var n=Nr(e,1);if(n!==null){var s=at();Gt(n,e,1,s)}}),Bh(e,1)}};ch=function(e){if(e.tag===13){var t=Nr(e,134217728);if(t!==null){var r=at();Gt(t,e,134217728,r)}Bh(e,134217728)}};cv=function(e){if(e.tag===13){var t=dn(e),r=Nr(e,t);if(r!==null){var n=at();Gt(r,e,t,n)}Bh(e,t)}};uv=function(){return fe};dv=function(e,t){var r=fe;try{return fe=e,t()}finally{fe=r}};Iu=function(e,t,r){switch(t){case"input":if(Tu(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Vl(n);if(!s)throw Error(R(90));zg(n),Tu(n,s)}}}break;case"textarea":Vg(e,r);break;case"select":t=r.value,t!=null&&Us(e,!!r.multiple,t,!1)}};Yg=Dh;Xg=Qn;var p_={usingClientEntryPoint:!1,Events:[Wo,As,Vl,Jg,Qg,Dh]},Ai={findFiberByHostInstance:Ln,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m_={bundleType:Ai.bundleType,version:Ai.version,rendererPackageName:Ai.rendererPackageName,rendererConfig:Ai.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Or.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tv(e),e===null?null:e.stateNode},findFiberByHostInstance:Ai.findFiberByHostInstance||h_,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 xa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xa.isDisabled&&xa.supportsFiber)try{Ul=xa.inject(m_),fr=xa}catch{}}jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p_;jt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hh(t))throw Error(R(200));return d_(e,t,null,r)};jt.createRoot=function(e,t){if(!Hh(e))throw Error(R(299));var r=!1,n="",s=Oy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Uh(e,1,!1,null,null,r,!1,n,s),e[jr]=t.current,uo(e.nodeType===8?e.parentNode:e),new zh(t)};jt.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(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=tv(t),e=e===null?null:e.stateNode,e};jt.flushSync=function(e){return Qn(e)};jt.hydrate=function(e,t,r){if(!Zl(t))throw Error(R(200));return ec(null,e,t,!0,r)};jt.hydrateRoot=function(e,t,r){if(!Hh(e))throw Error(R(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Oy;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Ay(t,null,e,1,r??null,s,!1,i,o),e[jr]=t.current,uo(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 Xl(t)};jt.render=function(e,t,r){if(!Zl(t))throw Error(R(200));return ec(null,e,t,!1,r)};jt.unmountComponentAtNode=function(e){if(!Zl(e))throw Error(R(40));return e._reactRootContainer?(Qn(function(){ec(null,null,e,!1,function(){e._reactRootContainer=null,e[jr]=null})}),!0):!1};jt.unstable_batchedUpdates=Dh;jt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Zl(r))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return ec(e,t,r,!1,n)};jt.version="18.3.1-next-f1338f8080-20240426";function Iy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Iy)}catch(e){console.error(e)}}Iy(),Ig.exports=jt;var os=Ig.exports;const Ly=bg(os);var Dy,$p=os;Dy=$p.createRoot,$p.hydrateRoot;const g_=1,v_=1e6;let tu=0;function y_(){return tu=(tu+1)%Number.MAX_SAFE_INTEGER,tu.toString()}const ru=new Map,Fp=e=>{if(ru.has(e))return;const t=setTimeout(()=>{ru.delete(e),Xi({type:"REMOVE_TOAST",toastId:e})},v_);ru.set(e,t)},w_=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,g_)};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?Fp(r):e.toasts.forEach(n=>{Fp(n.id)}),{...e,toasts:e.toasts.map(n=>
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)}}},Qa=[];let Ya={toasts:[]};function Xi(e){Ya=w_(Ya,e),Qa.forEach(t=>{t(Ya)})}function x_({...e}){const t=y_(),r=s=>Xi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Xi({type:"DISMISS_TOAST",toastId:t});return Xi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function _n(){const[e,t]=p.useState(Ya);return p.useEffect(()=>(Qa.push(t),()=>{const r=Qa.indexOf(t);r>-1&&Qa.splice(r,1)}),[e]),{...e,toast:x_,dismiss:r=>Xi({type:"DISMISS_TOAST",toastId:r})}}function G(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 b_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function My(...e){return t=>e.forEach(r=>b_(r,t))}function pe(...e){return p.useCallback(My(...e),e)}function S_(e,t=[]){let r=[];function n(i,o){const a=p.createContext(o),l=r.length;r=[...r,o];function u(h){const{scope:f,children:y,...x}=h,m=(f==null?void 0:f[e][l])||a,b=p.useMemo(()=>x,Object.values(x));return c.jsx(m.Provider,{value:b,children:y})}function d(h,f){const y=(f==null?void 0:f[e][l])||a,x=p.useContext(y);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,__(s,...t)]}function __(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var Yn=p.forwardRef((e,t)=>{const{children:r,...n}=e,s=p.Children.toArray(r),i=s.find(E_);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return c.jsx(fd,{...n,ref:t,children:p.isValidElement(o)?p.cloneElement(o,void 0,a):null})}return c.jsx(fd,{...n,ref:t,children:r})});Yn.displayName="Slot";var fd=p.forwardRef((e,t)=>{const{children:r,...n}=e;if(p.isValidElement(r)){const s=C_(r);return p.cloneElement(r,{...k_(n,r.props),ref:t?My(t,s):s})}return p.Children.count(r)>1?p.Children.only(null):null});fd.displayName="SlotClone";var $y=({children:e})=>c.jsx(c.Fragment,{children:e});function E_(e){return p.isValidElement(e)&&e.type===$y}function k_(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)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function C_(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 Vh(e){const t=e+"CollectionProvider",[r,n]=S_(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:x,children:m}=y,b=L.useRef(null),v=L.useRef(new Map).current;return c.jsx(s,{scope:x,itemMap:v,collectionRef:b,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=L.forwardRef((y,x)=>{const{scope:m,children:b}=y,v=i(a,m),g=pe(x,v.collectionRef);return c.jsx(Yn,{ref:g,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=L.forwardRef((y,x)=>{const{scope:m,children:b,...v}=y,g=L.useRef(null),w=pe(x,g),S=i(u,m);return L.useEffect(()=>(S.itemMap.set(g,{ref:g,...v}),()=>void S.itemMap.delete(g))),c.jsx(Yn,{[d]:"",ref:w,children:b})});h.displayName=u;function f(y){const x=i(e+"CollectionConsumer",y);return L.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const v=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((S,_)=>v.indexOf(S.ref.current)-v.indexOf(_.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},f,n]}function T_(e,t){const r=p.createContext(t),n=i=>{const{children:o,...a}=i,l=p.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function s(i){const o=p.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,s]}function yi(e,t=[]){let r=[];function n(i,o){const a=p.createContext(o),l=r.length;r=[...r,o];const u=h=>{var v;const{scope:f,children:y,...x}=h,m=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,b=p.useMemo(()=>x,Object.values(x));return c.jsx(m.Provider,{value:b,children:y})};u.displayName=i+"Provider";function d(h,f){var m;const y=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,x=p.useContext(y);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,j_(s,...t)]}function j_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var N_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=N_.reduce((e,t)=>
vendor: 4,230 bytes, line 40
40{const r=p.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Yn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fy(e,t){e&&os.flushSync(()=>e.dispatchEvent(t))}function gt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function P_(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e);p.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 R_="DismissableLayer",pd="dismissableLayer.update",A_="dismissableLayer.pointerDownOutside",O_="dismissableLayer.focusOutside",Up,Uy=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ko=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=p.useContext(Uy),[d,h]=p.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=p.useState({}),x=pe(t,C=>h(C)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(b),g=d?m.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,_=L_(C=>{const j=C.target,A=[...u.branches].some(O=>O.contains(j));!S||A||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},f),k=D_(C=>{const j=C.target;[...u.branches].some(O=>O.contains(j))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},f);return P_(C=>{g===u.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),p.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Up=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Bp(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Up)}},[d,f,r,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Bp())},[d,u]),p.useEffect(()=>{const C=()=>y({});return document.addEventListener(pd,C),()=>document.removeEventListener(pd,C)},[]),c.jsx(Z.div,{...l,ref:x,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,k.onFocusCapture),onBlurCapture:G(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,_.onPointerDownCapture)})});Ko.displayName=R_;var I_="DismissableLayerBranch",By=p.forwardRef((e,t)=>{const r=p.useContext(Uy),n=p.useRef(null),s=pe(t,n);return p.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Z.div,{...e,ref:s})});By.displayName=I_;function L_(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){zy(A_,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function D_(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e),n=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!n.current&&zy(O_,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 Bp(){const e=new CustomEvent(pd);document.dispatchEvent(e)}function zy(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?Fy(s,i):s.dispatchEvent(i)}var M_=Ko,$_=By,rt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},F_="Portal",tc=p.forwardRef((e,t)=>
40{var a;const{container:r,...n}=e,[s,i]=p.useState(!1);rt(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Ly.createPortal(c.jsx(Z.div,{...n,ref:t}),o):null});tc.displayName=F_;function U_(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var as=e=>{const{present:t,children:r}=e,n=B_(t),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=pe(n.ref,z_(s));return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:i}):null};as.displayName="Presence";function B_(e){const[t,r]=p.useState(),n=p.useRef({}),s=p.useRef(e),i=p.useRef("none"),o=e?"mounted":"unmounted",[a,l]=U_(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=ba(n.current);i.current=a==="mounted"?u:"none"},[a]),rt(()=>{const u=n.current,d=s.current;if(d!==e){const f=i.current,y=ba(u);e?l("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),rt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=y=>{const m=ba(n.current).includes(y.animationName);if(y.target===t&&m&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=y=>{y.target===t&&(i.current=ba(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function ba(e){return(e==null?void 0:e.animationName)||"none"}function z_(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 Xn({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=H_({defaultProp:t,onChange:r}),i=e!==void 0,o=i?e:n,a=gt(r),l=p.useCallback(u=>{if(i){const h=typeof u=="function"?u(e):u;h!==e&&a(h)}else s(u)},[i,e,s,a]);return[o,l]}function H_({defaultProp:e,onChange:t}){const r=p.useState(e),[n]=r,s=p.useRef(n),i=gt(t);return p.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var V_="VisuallyHidden",Go=p.forwardRef((e,t)=>c.jsx(Z.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Go.displayName=V_;var W_=Go,Wh="ToastProvider",[qh,q_,K_]=Vh("Toast"),[Hy,bO]=yi("Toast",[K_]),[G_,rc]=Hy(Wh),Vy=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=p.useState(null),[u,d]=p.useState(0),h=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Wh}\`. Expected non-empty \`string\`.`),c.jsx(qh.Provider,{scope:t,children:c.jsx(G_,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:p.useCallback(()=>d(y=>y+1),[]),onToastRemove:p.useCallback(()=>d(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};Vy.displayName=Wh;var Wy="ToastViewport",J_=["F8"],md="toast.viewportPause",gd="toast.viewportResume",qy=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=J_,label:s="Notifications ({hotkey})",...i}=e,o=rc(Wy,r),a=q_(r),l=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=p.useRef(null),f=pe(t,h,o.onViewportChange),y=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=o.toastCount>0;p.useEffect(()=>{const b=v=>{var w;n.length!==0&&n.every(S=>v[S]||v.code===S)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),p.useEffect(()=>{const b=l.current,v=h.current;if(x&&b&&v){const g=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(md);v.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>
40{if(o.isClosePausedRef.current){const k=new CustomEvent(gd);v.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!b.contains(k.relatedTarget)&&w()},_=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",g),b.addEventListener("focusout",S),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",_),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",_),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[x,o.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:b})=>{const g=a().map(w=>{const S=w.ref.current,_=[S,...lE(S)];return b==="forwards"?_:_.reverse()});return(b==="forwards"?g.reverse():g).flat()},[a]);return p.useEffect(()=>{const b=h.current;if(b){const v=g=>{var _,k,C;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const j=document.activeElement,A=g.shiftKey;if(g.target===b&&A){(_=u.current)==null||_.focus();return}const D=m({tabbingDirection:A?"backwards":"forwards"}),q=D.findIndex(I=>I===j);nu(D.slice(q+1))?g.preventDefault():A?(k=u.current)==null||k.focus():(C=d.current)==null||C.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,m]),c.jsxs($_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&c.jsx(vd,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});nu(b)}}),c.jsx(qh.Slot,{scope:r,children:c.jsx(Z.ol,{tabIndex:-1,...i,ref:f})}),x&&c.jsx(vd,{ref:d,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});nu(b)}})]})});qy.displayName=Wy;var Ky="ToastFocusProxy",vd=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=rc(Ky,r);return c.jsx(Go,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});vd.displayName=Ky;var nc="Toast",Q_="toast.swipeStart",Y_="toast.swipeMove",X_="toast.swipeCancel",Z_="toast.swipeEnd",Gy=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=Xn({prop:n,defaultProp:s,onChange:i});return c.jsx(as,{present:r||a,children:c.jsx(rE,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:gt(e.onPause),onResume:gt(e.onResume),onSwipeStart:G(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:G(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:G(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:G(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});Gy.displayName=nc;var[eE,tE]=Hy(nc,{onClose(){}}),rE=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:y,...x}=e,m=rc(nc,r),[b,v]=p.useState(null),g=pe(t,I=>v(I)),w=p.useRef(null),S=p.useRef(null),_=s||m.duration,k=p.useRef(0),C=p.useRef(_),j=p.useRef(0),{onToastAdd:A,onToastRemove:O}=m,U=gt(()=>{var K;(b==null?void 0:b.contains(document.activeElement))&&((K=m.viewport)==null||K.focus()),o()}),D=p.useCallback(I=>
vendor: 4,518 bytes, line 40
40{!I||I===1/0||(window.clearTimeout(j.current),k.current=new Date().getTime(),j.current=window.setTimeout(U,I))},[U]);p.useEffect(()=>{const I=m.viewport;if(I){const K=()=>{D(C.current),u==null||u()},E=()=>{const B=new Date().getTime()-k.current;C.current=C.current-B,window.clearTimeout(j.current),l==null||l()};return I.addEventListener(md,E),I.addEventListener(gd,K),()=>{I.removeEventListener(md,E),I.removeEventListener(gd,K)}}},[m.viewport,_,l,u,D]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(_)},[i,_,m.isClosePausedRef,D]),p.useEffect(()=>(A(),()=>O()),[A,O]);const q=p.useMemo(()=>b?t0(b):null,[b]);return m.viewport?c.jsxs(c.Fragment,{children:[q&&c.jsx(nE,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:q}),c.jsx(eE,{scope:r,onClose:U,children:os.createPortal(c.jsx(qh.ItemSlot,{scope:r,children:c.jsx(M_,{asChild:!0,onEscapeKeyDown:G(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||U(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Z.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...x,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:G(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:G(e.onPointerDown,I=>{I.button===0&&(w.current={x:I.clientX,y:I.clientY})}),onPointerMove:G(e.onPointerMove,I=>{if(!w.current)return;const K=I.clientX-w.current.x,E=I.clientY-w.current.y,B=!!S.current,T=["left","right"].includes(m.swipeDirection),P=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,z=T?P(0,K):0,M=T?0:P(0,E),V=I.pointerType==="touch"?10:2,te={x:z,y:M},ce={originalEvent:I,delta:te};B?(S.current=te,Sa(Y_,h,ce,{discrete:!1})):zp(te,m.swipeDirection,V)?(S.current=te,Sa(Q_,d,ce,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(K)>V||Math.abs(E)>V)&&(w.current=null)}),onPointerUp:G(e.onPointerUp,I=>{const K=S.current,E=I.target;if(E.hasPointerCapture(I.pointerId)&&E.releasePointerCapture(I.pointerId),S.current=null,w.current=null,K){const B=I.currentTarget,T={originalEvent:I,delta:K};zp(K,m.swipeDirection,m.swipeThreshold)?Sa(Z_,y,T,{discrete:!0}):Sa(X_,f,T,{discrete:!0}),B.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),nE=e=>{const{__scopeToast:t,children:r,...n}=e,s=rc(nc,t),[i,o]=p.useState(!1),[a,l]=p.useState(!1);return oE(()=>o(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(tc,{asChild:!0,children:c.jsx(Go,{...n,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},sE="ToastTitle",Jy=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Z.div,{...n,ref:t})});Jy.displayName=sE;var iE="ToastDescription",Qy=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Z.div,{...n,ref:t})});Qy.displayName=iE;var Yy="ToastAction",Xy=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(e0,{altText:r,asChild:!0,children:c.jsx(Kh,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yy}\`. Expected non-empty \`string\`.`),null)});Xy.displayName=Yy;var Zy="ToastClose",Kh=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=tE(Zy,r);return c.jsx(e0,{asChild:!0,children:c.jsx(Z.button,{type:"button",...n,ref:t,onClick:G(e.onClick,s.onClose)})})});Kh.displayName=Zy;var e0=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Z.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function t0(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),aE(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(...t0(n))}}),t}function Sa(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?Fy(s,i):s.dispatchEvent(i)}var zp=(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 oE(e=()=>{}){const t=gt(e);rt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}
vendor: 5,068 bytes, lines 40-94
40function aE(e){return e.nodeType===e.ELEMENT_NODE}function lE(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 nu(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var cE=Vy,r0=qy,n0=Gy,s0=Jy,i0=Qy,o0=Xy,a0=Kh;function l0(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=l0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function c0(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=l0(e))&&(n&&(n+=" "),n+=t);return n}const Hp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vp=c0,sc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Vp(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],h=i==null?void 0:i[u];if(d===null)return null;const f=Hp(d)||Hp(h);return s[u][f]}),a=r&&Object.entries(r).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:h,className:f,...y}=d;return Object.entries(y).every(x=>{let[m,b]=x;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...u,h,f]:u},[]);return Vp(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 uE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),u0=(...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 dE={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 hE=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>p.createElement("svg",{ref:l,...dE,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:u0("lucide",s),...a},[...o.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Ee=(e,t)=>{const r=p.forwardRef(({className:n,...s},i)=>p.createElement(hE,{ref:i,iconNode:t,className:u0(`lucide-${uE(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 d0=Ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
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 h0=Ee("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const fE=Ee("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
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 f0=Ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 p0=Ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 pE=Ee("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 mE=Ee("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 gE=Ee("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
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 Wp=Ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
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 m0=Ee("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
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 vE=Ee("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/**
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 yE=Ee("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"}]]);/**
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 g0=Ee("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"}]]);/**
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 wE=Ee("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
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 xE=Ee("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"}]]);/**
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 qp=Ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 bE=Ee("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
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 SE=Ee("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
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 Kp=Ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 Gp=Ee("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
vendor: 7,618 bytes, lines 160-180
160],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
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 Jp=Ee("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
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 Qp=Ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
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 v0=Ee("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
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 ic=Ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gh="-",_E=e=>{const t=kE(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Gh);return a[0]===""&&a.length!==1&&a.shift(),y0(a,t)||EE(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},y0=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?y0(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Gh);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Yp=/^\[(.+)\]$/,EE=e=>{if(Yp.test(e)){const t=Yp.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},kE=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return TE(Object.entries(e.classGroups),r).forEach(([i,o])=>{yd(o,n,i,t)}),n},yd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Xp(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(CE(s)){yd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{yd(o,Xp(t,i),r,n)})})},Xp=(e,t)=>{let r=e;return t.split(Gh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},CE=e=>e.isThemeGetter,TE=(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,jE=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)}}},w0="!",NE=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,h;for(let b=0;b<a.length;b++){let v=a[b];if(u===0){if(v===s&&(n||a.slice(b,b+i)===t)){l.push(a.slice(d,b)),d=b+i;continue}if(v==="/"){h=b;continue}}v==="["?u++:v==="]"&&u--}const f=l.length===0?a:a.substring(d),y=f.startsWith(w0),x=y?f.substring(1):f,m=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},PE=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},RE=e=>({cache:jE(e.cacheSize),parseClassName:NE(e),..._E(e)}),AE=/\s+/,OE=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(AE);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:y}=r(u);let x=!!y,m=n(x?f.substring(0,y):f);if(!m){if(!x){a=u+(a.length>0?" "+a:a);continue}if(m=n(f),!m){a=u+(a.length>0?" "+a:a);continue}x=!1}const b=PE(d).join(":"),v=h?b+w0:b,g=v+m;if(i.includes(g))continue;i.push(g);const w=s(m,x);for(let S=0;S<w.length;++S){const _=w[S];i.push(v+_)}a=u+(a.length>0?" "+a:a)}return a};function IE(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=x0(t))&&(n&&(n+=" "),n+=r);return n}const x0=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=x0(e[n]))&&(r&&(r+=" "),r+=t);return r};function LE(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((d,h)=>h(d),e());return r=RE(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const d=OE(l,r);return s(l,d),d}return function(){return i(IE.apply(null,arguments))}}const we=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},b0=/^\[(?:([a-z-]+):)?(.+)\]$/i,DE=/^\d+\/\d+$/,ME=new Set(["px","full","screen"]),$E=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FE=/\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$/,UE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vr=e=>qs(e)||ME.has(e)||DE.test(e),$r=e=>wi(e,"length",QE),qs=e=>!!e&&!Number.isNaN(Number(e)),su=e=>wi(e,"number",qs),Oi=e=>!!e&&Number.isInteger(Number(e)),HE=e=>e.endsWith("%")&&qs(e.slice(0,-1)),X=e=>b0.test(e),Fr=e=>$E.test(e),VE=new Set(["length","size","percentage"]),WE=e=>wi(e,VE,S0),qE=e=>wi(e,"position",S0),KE=new Set(["image","url"]),GE=e=>wi(e,KE,XE),JE=e=>wi(e,"",YE),Ii=()=>!0,wi=(e,t,r)=>{const n=b0.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},QE=e=>FE.test(e)&&!UE.test(e),S0=()=>!1,YE=e=>BE.test(e),XE=e=>zE.test(e),ZE=()=>{const e=we("colors"),t=we("spacing"),r=we("blur"),n=we("brightness"),s=we("borderColor"),i=we("borderRadius"),o=we("borderSpacing"),a=we("borderWidth"),l=we("contrast"),u=we("grayscale"),d=we("hueRotate"),h=we("invert"),f=we("gap"),y=we("gradientColorStops"),x=we("gradientColorStopPositions"),m=we("inset"),b=we("margin"),v=we("opacity"),g=we("padding"),w=we("saturate"),S=we("scale"),_=we("sepia"),k=we("skew"),C=we("space"),j=we("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",X,t],D=()=>[X,t],q=()=>["",vr,$r],I=()=>["auto",qs,X],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],B=()=>["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"],P=()=>["","0",X],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[qs,X];return{cacheSize:500,separator:":",theme:{colors:[Ii],spacing:[vr,$r],blur:["none","",Fr,X],brightness:M(),borderColor:[e],borderRadius:["n
180one","","full",Fr,X],borderSpacing:D(),borderWidth:q(),contrast:M(),grayscale:P(),hueRotate:M(),invert:P(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[HE,$r],inset:U(),margin:U(),opacity:M(),padding:D(),saturate:M(),scale:M(),sepia:P(),skew:M(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[Fr]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),X]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oi,X]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Oi,X]}],"grid-cols":[{"grid-cols":[Ii]}],"col-start-end":[{col:["auto",{span:["full",Oi,X]},X]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Ii]}],"row-start-end":[{row:["auto",{span:[Oi,X]},X]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",X]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",X]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[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",X,t]}],"min-w":[{"min-w":[X,t,"min","max","fit"]}],"max-w":[{"max-w":[X,t,"none","full","min","max","fit","prose",{screen:[Fr]},Fr]}],h:[{h:[X,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fr,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",su]}],"font-family":[{font:[Ii]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",qs,su]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vr,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vr,$r]}],"underline-offset":[{"underline-offset":["auto",vr,X]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],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",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),qE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",WE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}
vendor: 5,172 bytes, line 180
180],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],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":[v]}],"border-style":[{border:[...E(),"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":[v]}],"divide-style":[{divide:E()}],"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:["",...E()]}],"outline-offset":[{"outline-offset":[vr,X]}],"outline-w":[{outline:[vr,$r]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[vr,$r]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fr,JE]}],"shadow-color":[{shadow:[Ii]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Fr,X]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",X]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Oi,X]}],"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",X]}],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",X]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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,513 bytes, line 180
180],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",X]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vr,$r,su]}],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"]}}},ek=LE(ZE);function Q(...e){return ek(c0(e))}const tk=cE,_0=p.forwardRef(({className:e,...t},r)=>c.jsx(r0,{ref:r,className:Q("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}));_0.displayName=r0.displayName;const rk=sc("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"}}),E0=p.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(n0,{ref:n,className:Q(rk({variant:t}),e),...r}));E0.displayName=n0.displayName;const nk=p.forwardRef(({className:e,...t},r)=>c.jsx(o0,{ref:r,className:Q("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));nk.displayName=o0.displayName;
180const k0=p.forwardRef(({className:e,...t},r)=>c.jsx(a0,{ref:r,className:Q("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(ic,{className:"h-4 w-4"})}));k0.displayName=a0.displayName;const C0=p.forwardRef(({className:e,...t},r)=>c.jsx(s0,{ref:r,className:Q("text-sm font-semibold",e),...t}));C0.displayName=s0.displayName;const T0=p.forwardRef(({className:e,...t},r)=>c.jsx(i0,{ref:r,className:Q("text-sm opacity-90",e),...t}));T0.displayName=i0.displayName;function sk(){const{toasts:e}=_n();return c.jsxs(tk,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return c.jsxs(E0,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(C0,{children:r}),n&&c.jsx(T0,{children:n})]}),s,c.jsx(k0,{})]},t)}),c.jsx(_0,{})]})}var Zp=["light","dark"],ik="(prefers-color-scheme: dark)",ok=p.createContext(void 0),ak={setTheme:e=>{},themes:[]},lk=()=>{var e;return(e=p.useContext(ok))!=null?e:ak};p.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?Zp.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(x,m=!1,b=!0)=>{let v=o?o[x]:x,g=m?x+"|| ''":`'${v}'`,w="";return s&&b&&!m&&Zp.includes(x)&&(w+=`d.style.colorScheme = '${x}';`),r==="class"?m||v?w+=`c.add(${g})`:w+="null":v&&(w+=`d[s](n,${g})`),w},y=e?`!function(){${d}${f(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${ik}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:y}})});var ck=e=>{switch(e){case"success":return hk;case"info":return pk;case"warning":return fk;case"error":return mk;default:return null}},uk=Array(12).fill(0),dk=({visible:e})=>L.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},L.createElement("div",{className:"sonner-spinner"},uk.map((t,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hk=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),fk=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),pk=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),mk=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),gk=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},wd=1,vk=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
180{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:wd++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return 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=>(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)=>this.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;return n.then(async i=>{if(wk(i)&&!i.ok){s=!1;let o=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,a=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:r,type:"error",message:o,description:a})}else if(t.success!==void 0){s=!1;let o=typeof t.success=="function"?await t.success(i):t.success,a=typeof t.description=="function"?await t.description(i):t.description;this.create({id:r,type:"success",message:o,description:a})}}).catch(async i=>{if(t.error!==void 0){s=!1;let o=typeof t.error=="function"?await t.error(i):t.error,a=typeof t.description=="function"?await t.description(i):t.description;this.create({id:r,type:"error",message:o,description:a})}}).finally(()=>{var i;s&&(this.dismiss(r),r=void 0),(i=t.finally)==null||i.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||wd++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},xt=new vk,yk=(e,t)=>{let r=(t==null?void 0:t.id)||wd++;return xt.addToast({title:e,...t,id:r}),r},wk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xk=yk,bk=()=>xt.toasts;Object.assign(xk,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:bk});function Sk(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))}Sk(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
180left: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;background:var(--gray1);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}: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:0;right:0;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}
180: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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%);--error-text: hsl(358, 100%, 81%)}[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%)}
181`);function _a(e){return e.label!==void 0}var _k=3,Ek="32px",kk=4e3,Ck=356,Tk=14,jk=20,Nk=200;function Pk(...e){return e.filter(Boolean).join(" ")}var Rk=e=>{var t,r,n,s,i,o,a,l,u,d;let{invert:h,toast:f,unstyled:y,interacting:x,setHeights:m,visibleToasts:b,heights:v,index:g,toasts:w,expanded:S,removeToast:_,defaultRichColors:k,closeButton:C,style:j,cancelButtonStyle:A,actionButtonStyle:O,className:U="",descriptionClassName:D="",duration:q,position:I,gap:K,loadingIcon:E,exp
181andByDefault:B,classNames:T,icons:P,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:M,cn:V}=e,[te,ce]=L.useState(!1),[Be,ne]=L.useState(!1),[W,ae]=L.useState(!1),[Ne,ie]=L.useState(!1),[ue,oe]=L.useState(0),[nt,vt]=L.useState(0),Lr=L.useRef(null),Pt=L.useRef(null),Tn=g===0,kc=g+1<=b,Ve=f.type,us=f.dismissible!==!1,Mb=f.className||"",$b=f.descriptionClassName||"",ta=L.useMemo(()=>v.findIndex(Y=>Y.toastId===f.id)||0,[v,f.id]),Fb=L.useMemo(()=>{var Y;return(Y=f.closeButton)!=null?Y:C},[f.closeButton,C]),Ef=L.useMemo(()=>f.duration||q||kk,[f.duration,q]),Cc=L.useRef(0),ds=L.useRef(0),kf=L.useRef(0),hs=L.useRef(null),[Cf,Ub]=I.split("-"),Tf=L.useMemo(()=>v.reduce((Y,ye,me)=>me>=ta?Y:Y+ye.height,0),[v,ta]),jf=gk(),Bb=f.invert||h,Tc=Ve==="loading";ds.current=L.useMemo(()=>ta*K+Tf,[ta,Tf]),L.useEffect(()=>{ce(!0)},[]),L.useLayoutEffect(()=>{if(!te)return;let Y=Pt.current,ye=Y.style.height;Y.style.height="auto";let me=Y.getBoundingClientRect().height;Y.style.height=ye,vt(me),m(Zt=>Zt.find(er=>er.toastId===f.id)?Zt.map(er=>er.toastId===f.id?{...er,height:me}:er):[{toastId:f.id,height:me,position:f.position},...Zt])},[te,f.title,f.description,m,f.id]);let Dr=L.useCallback(()=>{ne(!0),oe(ds.current),m(Y=>Y.filter(ye=>ye.toastId!==f.id)),setTimeout(()=>{_(f)},Nk)},[f,_,m,ds]);L.useEffect(()=>{if(f.promise&&Ve==="loading"||f.duration===1/0||f.type==="loading")return;let Y,ye=Ef;return S||x||M&&jf?(()=>{if(kf.current<Cc.current){let me=new Date().getTime()-Cc.current;ye=ye-me}kf.current=new Date().getTime()})():ye!==1/0&&(Cc.current=new Date().getTime(),Y=setTimeout(()=>{var me;(me=f.onAutoClose)==null||me.call(f,f),Dr()},ye)),()=>clearTimeout(Y)},[S,x,B,f,Ef,Dr,f.promise,Ve,M,jf]),L.useEffect(()=>{let Y=Pt.current;if(Y){let ye=Y.getBoundingClientRect().height;return vt(ye),m(me=>[{toastId:f.id,height:ye,position:f.position},...me]),()=>m(me=>me.filter(Zt=>Zt.toastId!==f.id))}},[m,f.id]),L.useEffect(()=>{f.delete&&Dr()},[Dr,f.delete]);function zb(){return P!=null&&P.loading?L.createElement("div",{className:"sonner-loader","data-visible":Ve==="loading"},P.loading):E?L.createElement("div",{className:"sonner-loader","data-visible":Ve==="loading"},E):L.createElement(dk,{visible:Ve==="loading"})}return L.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Pt,className:V(U,Mb,T==null?void 0:T.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Ve],(r=f==null?void 0:f.classNames)==null?void 0:r[Ve]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:k,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":te,"data-promise":!!f.promise,"data-removed":Be,"data-visible":kc,"data-y-position":Cf,"data-x-position":Ub,"data-index":g,"data-front":Tn,"data-swiping":W,"data-dismissible":us,"data-type":Ve,"data-invert":Bb,"data-swipe-out":Ne,"data-expanded":!!(S||B&&te),style:{"--index":g,"--toasts-before":g,"--z-index":w.length-g,"--offset":`${Be?ue:ds.current}px`,"--initial-height":B?"auto":`${nt}px`,...j,...f.style},onPointerDown:Y=>{Tc||!us||(Lr.current=new Date,oe(ds.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(ae(!0),hs.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,ye,me,Zt;if(Ne||!us)return;hs.current=null;let er=Number(((Y=Pt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ra=new Date().getTime()-((ye=Lr.current)==null?void 0:ye.getTime()),Hb=Math.abs(er)/ra;if(Math.abs(er)>=jk||Hb>.11){oe(ds.current),(me=f.onDismiss)==null||me.call(f,f),Dr(),ie(!0);return}(Zt=Pt.current)==null||Zt.style.setProperty("--swipe-amount","0px"),ae(!1)},onPointerMove:Y=>{var ye;if(!hs.current||!us)return;let me=Y.clientY-hs.current.y,Zt=Y.clientX-hs.current.x,er=(Cf==="top"?Math.min:Math.max)(0,me),ra=Y.pointerType==="touch"?10:2;Math.abs(er)>ra?(ye=Pt.current)==null||ye.style.setProperty("--swipe-amount",`${me}px`):Math.abs(Zt)>ra&&(hs.current=null)}},Fb&&!f.jsx?L.createElement("button",{"aria-label":z,"data-disabled":Tc,"data-close-button":!0,onClick:Tc||!us?()=>{}:()=>{var Y;Dr(),(Y=f.onDismiss)==null||Y.call(f,f)},className:V(T==null?void 0:T.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||L.isValidElement(f.title)?f.jsx||f.title:L.createElement(L.Fragment,null,Ve||f.icon||f.promise?L.createElement("div",{"data-icon":"",className:V(T==null?void 0:T.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||zb():null,f.type!=="loading"?f.icon||(P==null?void 0:P[Ve])||ck(Ve):null):null,
181L.createElement("div",{"data-content":"",className:V(T==null?void 0:T.content,(o=f==null?void 0:f.classNames)==null?void 0:o.content)},L.createElement("div",{"data-title":"",className:V(T==null?void 0:T.title,(a=f==null?void 0:f.classNames)==null?void 0:a.title)},f.title),f.description?L.createElement("div",{"data-description":"",className:V(D,$b,T==null?void 0:T.description,(l=f==null?void 0:f.classNames)==null?void 0:l.description)},f.description):null),L.isValidElement(f.cancel)?f.cancel:f.cancel&&_a(f.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||A,onClick:Y=>{var ye,me;_a(f.cancel)&&us&&((me=(ye=f.cancel).onClick)==null||me.call(ye,Y),Dr())},className:V(T==null?void 0:T.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,L.isValidElement(f.action)?f.action:f.action&&_a(f.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||O,onClick:Y=>{var ye,me;_a(f.action)&&(Y.defaultPrevented||((me=(ye=f.action).onClick)==null||me.call(ye,Y),Dr()))},className:V(T==null?void 0:T.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function em(){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}var Ak=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:s,closeButton:i,className:o,offset:a,theme:l="light",richColors:u,duration:d,style:h,visibleToasts:f=_k,toastOptions:y,dir:x=em(),gap:m=Tk,loadingIcon:b,icons:v,containerAriaLabel:g="Notifications",pauseWhenPageIsHidden:w,cn:S=Pk}=e,[_,k]=L.useState([]),C=L.useMemo(()=>Array.from(new Set([r].concat(_.filter(M=>M.position).map(M=>M.position)))),[_,r]),[j,A]=L.useState([]),[O,U]=L.useState(!1),[D,q]=L.useState(!1),[I,K]=L.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),E=L.useRef(null),B=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=L.useRef(null),P=L.useRef(!1),z=L.useCallback(M=>{var V;(V=_.find(te=>te.id===M.id))!=null&&V.delete||xt.dismiss(M.id),k(te=>te.filter(({id:ce})=>ce!==M.id))},[_]);return L.useEffect(()=>xt.subscribe(M=>{if(M.dismiss){k(V=>V.map(te=>te.id===M.id?{...te,delete:!0}:te));return}setTimeout(()=>{Ly.flushSync(()=>{k(V=>{let te=V.findIndex(ce=>ce.id===M.id);return te!==-1?[...V.slice(0,te),{...V[te],...M},...V.slice(te+1)]:[M,...V]})})})}),[]),L.useEffect(()=>{if(l!=="system"){K(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:M})=>{K(M?"dark":"light")})},[l]),L.useEffect(()=>{_.length<=1&&U(!1)},[_]),L.useEffect(()=>{let M=V=>{var te,ce;n.every(Be=>V[Be]||V.code===Be)&&(U(!0),(te=E.current)==null||te.focus()),V.code==="Escape"&&(document.activeElement===E.current||(ce=E.current)!=null&&ce.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[n]),L.useEffect(()=>{if(E.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,P.current=!1)}},[E.current]),_.length?L.createElement("section",{"aria-label":`${g} ${B}`,tabIndex:-1},C.map((M,V)=>{var te;let[ce,Be]=M.split("-");return L.createElement("ol",{key:M,dir:x==="auto"?em():x,tabIndex:-1,ref:E,className:o,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":ce,"data-x-position":Be,style:{"--front-toast-height":`${((te=j[0])==null?void 0:te.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||Ek,"--width":`${Ck}px`,"--gap":`${m}px`,...h},onBlur:ne=>{P.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(P.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||P.current||(P.current=!0,T.current=ne.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{D||U(!1)},onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},_.filter(ne=>!ne.position&&V===0||ne.position===M).map((ne,W)=>{var ae,Ne;return L.createElement(Rk,{key:ne.id,icons:v,index:W,toast:ne,defaultRichColors:u,duration:(ae=y==null?void 0:y.duration)!=null?ae:d,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:t,visibleToasts:f,closeButton:(Ne=y==null?void 0:y.closeButton)!=null?Ne:i,interacting:D,position:M,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:z,toasts:_.filter(ie=>ie.position==ne.position),heights:j.filter(ie=>ie.position==ne.position),setHeights:A,expandByDefault:s,gap:m,loadingIcon:b,expanded:O,pauseWhenPageIsHidden:w,cn:S})}))})):null};const Ok=({...e})=>{const{theme:t="system"}=lk();return c.jsx(Ak,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Ik=Ag.useId||(()=>{}),Lk=0;function fn(e){const[t,r]=p.useState(Ik());return rt(()=>{e||r(n=>n??String(Lk++))},[e]),e||(t?`radix-${t}`:"")}const Dk=["top","right","bottom","left"],gn=Math.min,St=Math.max,Tl=Math.round,Ea=Math.floor,vn=e=>({x:e,y:e}
vendor: 5,419 bytes, line 181
181),Mk={left:"right",right:"left",bottom:"top",top:"bottom"},$k={start:"end",end:"start"};function xd(e,t,r){return St(e,gn(t,r))}function Rr(e,t){return typeof e=="function"?e(t):e}function Ar(e){return e.split("-")[0]}function xi(e){return e.split("-")[1]}function Jh(e){return e==="x"?"y":"x"}function Qh(e){return e==="y"?"height":"width"}function yn(e){return["top","bottom"].includes(Ar(e))?"y":"x"}function Yh(e){return Jh(yn(e))}function Fk(e,t,r){r===void 0&&(r=!1);const n=xi(e),s=Yh(e),i=Qh(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=jl(o)),[o,jl(o)]}function Uk(e){const t=jl(e);return[bd(e),t,bd(t)]}function bd(e){return e.replace(/start|end/g,t=>$k[t])}function Bk(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function zk(e,t,r,n){const s=xi(e);let i=Bk(Ar(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(bd)))),i}function jl(e){return e.replace(/left|right|bottom|top/g,t=>Mk[t])}function Hk(e){return{top:0,right:0,bottom:0,left:0,...e}}function j0(e){return typeof e!="number"?Hk(e):{top:e,right:e,bottom:e,left:e}}function Nl(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 tm(e,t,r){let{reference:n,floating:s}=e;const i=yn(t),o=Yh(t),a=Qh(o),l=Ar(t),u=i==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let y;switch(l){case"top":y={x:d,y:n.y-s.height};break;case"bottom":y={x:d,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:h};break;case"left":y={x:n.x-s.width,y:h};break;default:y={x:n.x,y:n.y}}switch(xi(t)){case"start":y[o]-=f*(r&&u?-1:1);break;case"end":y[o]+=f*(r&&u?-1:1);break}return y}const Vk=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=tm(u,n,l),f=n,y={},x=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:g,y:w,data:S,reset:_}=await v({x:d,y:h,initialPlacement:n,placement:f,strategy:s,middlewareData:y,rects:u,platform:o,elements:{reference:e,floating:t}});d=g??d,h=w??h,y={...y,[b]:{...y[b],...S}},_&&x<=50&&(x++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:d,y:h}=tm(u,f,l)),m=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:y}};async function xo(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:y=0}=Rr(t,e),x=j0(y),b=a[f?h==="floating"?"reference":"floating":h],v=Nl(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),g=h==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},_=Nl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:(v.top-_.top+x.top)/S.y,bottom:(_.bottom-v.bottom+x.bottom)/S.y,left:(v.left-_.left+x.left)/S.x,right:(_.right-v.right+x.right)/S.x}}const Wk=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Rr(e,t)||{};if(u==null)return{};const h=j0(d),f={x:r,y:n},y=Yh(s),x=Qh(y),m=await o.getDimensions(u),b=y==="y",v=b?"top":"left",g=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=i.reference[x]+i.reference[y]-f[y]-i.floating[x],_=f[y]-i.reference[y],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=a.floating[w]||i.floating[x]);const j=S/2-_/2,A=C/2-m[x]/2-1,O=gn(h[v],A),U=gn(h[g],A),D=O,q=C-m[x]-U,I=C/2-m[x]/2+j,K=xd(D,I,q),E=!l.arrow&&xi(s)!=null&&I!==K&&i.reference[x]/2-(I<D?O:U)-m[x]/2<0,B=E?I<D?I-D:I-q:0;return{[y]:f[y]+B,data:{[y]:K,centerOffset:I-K-B,...E&&{alignmentOffset:B}},reset:E}}}),qk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...b}=Rr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=Ar(s),g=yn(a),w=Ar(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(w||!m?[jl(a)]:Uk(a)),k=x!=="none";!f&&k&&_.push(...zk(a,m,x,S));const C=[a,..._],j=await xo(t,b),A=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&A.push(j[v]),h){const I=Fk(s,o,S);A.push(j[I[0]],j[I[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(I=>I<=0)){var U,D;const I=(((U=i.flip)==null?void 0:U.index)||0)+1,K=C[I];if(K)return{data:{index:I,overflows:O},reset:{placement:K}
vendor: 5,025 bytes, line 181
181};let E=(D=O.filter(B=>B.overflows[0]<=0).sort((B,T)=>B.overflows[1]-T.overflows[1])[0])==null?void 0:D.placement;if(!E)switch(y){case"bestFit":{var q;const B=(q=O.filter(T=>{if(k){const P=yn(T.placement);return P===g||P==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(P=>P>0).reduce((P,z)=>P+z,0)]).sort((T,P)=>T[1]-P[1])[0])==null?void 0:q[0];B&&(E=B);break}case"initialPlacement":E=a;break}if(s!==E)return{reset:{placement:E}}}return{}}}};function rm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nm(e){return Dk.some(t=>e[t]>=0)}const Kk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Rr(e,t);switch(n){case"referenceHidden":{const i=await xo(t,{...s,elementContext:"reference"}),o=rm(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:nm(o)}}}case"escaped":{const i=await xo(t,{...s,altBoundary:!0}),o=rm(i,r.floating);return{data:{escapedOffsets:o,escaped:nm(o)}}}default:return{}}}}};async function Gk(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ar(r),a=xi(r),l=yn(r)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,h=Rr(t,e);let{mainAxis:f,crossAxis:y,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(y=a==="end"?x*-1:x),l?{x:y*d,y:f*u}:{x:f*u,y:y*d}}const Jk=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 Gk(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}}}}},Qk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:v,y:g}=b;return{x:v,y:g}}},...l}=Rr(e,t),u={x:r,y:n},d=await xo(t,l),h=yn(Ar(s)),f=Jh(h);let y=u[f],x=u[h];if(i){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=y+d[b],w=y-d[v];y=xd(g,y,w)}if(o){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=x+d[b],w=x-d[v];x=xd(g,x,w)}const m=a.fn({...t,[f]:y,[h]:x});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:i,[h]:o}}}}}},Yk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Rr(e,t),d={x:r,y:n},h=yn(s),f=Jh(h);let y=d[f],x=d[h];const m=Rr(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",S=i.reference[f]-i.floating[w]+b.mainAxis,_=i.reference[f]+i.reference[w]-b.mainAxis;y<S?y=S:y>_&&(y=_)}if(u){var v,g;const w=f==="y"?"width":"height",S=["top","left"].includes(Ar(s)),_=i.reference[h]-i.floating[w]+(S&&((v=o.offset)==null?void 0:v[h])||0)+(S?0:b.crossAxis),k=i.reference[h]+i.reference[w]+(S?0:((g=o.offset)==null?void 0:g[h])||0)-(S?b.crossAxis:0);x<_?x=_:x>k&&(x=k)}return{[f]:y,[h]:x}}}},Xk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Rr(e,t),d=await xo(t,u),h=Ar(s),f=xi(s),y=yn(s)==="y",{width:x,height:m}=i.floating;let b,v;h==="top"||h==="bottom"?(b=h,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,b=f==="end"?"top":"bottom");const g=m-d.top-d.bottom,w=x-d.left-d.right,S=gn(m-d[b],g),_=gn(x-d[v],w),k=!t.middlewareData.shift;let C=S,j=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=g),k&&!f){const O=St(d.left,0),U=St(d.right,0),D=St(d.top,0),q=St(d.bottom,0);y?j=x-2*(O!==0||U!==0?O+U:St(d.left,d.right)):C=m-2*(D!==0||q!==0?D+q:St(d.top,d.bottom))}await l({...t,availableWidth:j,availableHeight:C});const A=await o.getDimensions(a.floating);return x!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function oc(){return typeof window<"u"}function bi(e){return N0(e)?(e.nodeName||"").toLowerCase():"#document"}function Ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){var t;return(t=(N0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N0(e){return oc()?e instanceof Node||e instanceof Ct(e).Node:!1}function Qt(e){return oc()?e instanceof Element||e instanceof Ct(e).Element:!1}function mr(e){return oc()?e instanceof HTMLElement||e instanceof Ct(e).HTMLElement:!1}function sm(e){return!oc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ct(e).ShadowRoot}function Jo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function Zk(e){return["table","td","th"].includes(bi(e))}function ac(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}
vendor: 4,846 bytes, line 181
181function Xh(e){const t=Zh(),r=Qt(e)?Yt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function eC(e){let t=wn(e);for(;mr(t)&&!hi(t);){if(Xh(t))return t;if(ac(t))return null;t=wn(t)}return null}function Zh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hi(e){return["html","body","#document"].includes(bi(e))}function Yt(e){return Ct(e).getComputedStyle(e)}function lc(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wn(e){if(bi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sm(e)&&e.host||gr(e);return sm(t)?t.host:t}function P0(e){const t=wn(e);return hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&Jo(t)?t:P0(t)}function bo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=P0(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Ct(s);if(i){const a=Sd(o);return t.concat(o,o.visualViewport||[],Jo(s)?s:[],a&&r?bo(a):[])}return t.concat(s,bo(s,[],r))}function Sd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function R0(e){const t=Yt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=mr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Tl(r)!==i||Tl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function ef(e){return Qt(e)?e:e.contextElement}function Ks(e){const t=ef(e);if(!mr(t))return vn(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=R0(t);let o=(i?Tl(r.width):r.width)/n,a=(i?Tl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const tC=vn(0);function A0(e){const t=Ct(e);return!Zh()||!t.visualViewport?tC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rC(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ct(e)?!1:t}function Zn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=ef(e);let o=vn(1);t&&(n?Qt(n)&&(o=Ks(n)):o=Ks(e));const a=rC(i,r,n)?A0(i):vn(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=Ct(i),y=n&&Qt(n)?Ct(n):n;let x=f,m=Sd(x);for(;m&&n&&y!==x;){const b=Ks(m),v=m.getBoundingClientRect(),g=Yt(m),w=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*b.x,S=v.top+(m.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,h*=b.y,l+=w,u+=S,x=Ct(m),m=Sd(x)}}return Nl({width:d,height:h,x:l,y:u})}function nC(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=gr(n),a=t?ac(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=vn(1);const d=vn(0),h=mr(n);if((h||!h&&!i)&&((bi(n)!=="body"||Jo(o))&&(l=lc(n)),mr(n))){const f=Zn(n);u=Ks(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function sC(e){return Array.from(e.getClientRects())}function _d(e,t){const r=lc(e).scrollLeft;return t?t.left+r:Zn(gr(e)).left+r}function iC(e){const t=gr(e),r=lc(e),n=e.ownerDocument.body,s=St(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=St(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+_d(e);const a=-r.scrollTop;return Yt(n).direction==="rtl"&&(o+=St(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function oC(e,t){const r=Ct(e),n=gr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Zh();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function aC(e,t){const r=Zn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=mr(e)?Ks(e):vn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function im(e,t,r){let n;if(t==="viewport")n=oC(e,r);else if(t==="document")n=iC(gr(e));else if(Qt(t))n=aC(t,r);else{const s=A0(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return Nl(n)}function O0(e,t){const r=wn(e);return r===t||!Qt(r)||hi(r)?!1:Yt(r).position==="fixed"||O0(r,t)}function lC(e,t){const r=t.get(e);if(r)return r;let n=bo(e,[],!1).filter(a=>Qt(a)&&bi(a)!=="body"),s=null;const i=Yt(e).position==="fixed";let o=i?wn(e):e;for(;Qt(o)&&!hi(o);){const a=Yt(o),l=Xh(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Jo(o)&&!l&&O0(e,o))?n=n.filter(d=>d!==o):s=a,o=wn(o)}return t.set(e,n),n}function cC(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?ac(t)?[]:lC(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,d)=>{const h=im(t,d,s);
vendor: 9,182 bytes, line 181
181return u.top=St(h.top,u.top),u.right=gn(h.right,u.right),u.bottom=gn(h.bottom,u.bottom),u.left=St(h.left,u.left),u},im(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uC(e){const{width:t,height:r}=R0(e);return{width:t,height:r}}function dC(e,t,r){const n=mr(t),s=gr(t),i=r==="fixed",o=Zn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=vn(0);if(n||!n&&!i)if((bi(t)!=="body"||Jo(s))&&(a=lc(t)),n){const y=Zn(t,!0,i,t);l.x=y.x+t.clientLeft,l.y=y.y+t.clientTop}else s&&(l.x=_d(s));let u=0,d=0;if(s&&!n&&!i){const y=s.getBoundingClientRect();d=y.top+a.scrollTop,u=y.left+a.scrollLeft-_d(s,y)}const h=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-d;return{x:h,y:f,width:o.width,height:o.height}}function iu(e){return Yt(e).position==="static"}function om(e,t){if(!mr(e)||Yt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return gr(e)===r&&(r=r.ownerDocument.body),r}function I0(e,t){const r=Ct(e);if(ac(e))return r;if(!mr(e)){let s=wn(e);for(;s&&!hi(s);){if(Qt(s)&&!iu(s))return s;s=wn(s)}return r}let n=om(e,t);for(;n&&Zk(n)&&iu(n);)n=om(n,t);return n&&hi(n)&&iu(n)&&!Xh(n)?r:n||eC(e)||r}const hC=async function(e){const t=this.getOffsetParent||I0,r=this.getDimensions,n=await r(e.floating);return{reference:dC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fC(e){return Yt(e).direction==="rtl"}const pC={convertOffsetParentRelativeRectToViewportRelativeRect:nC,getDocumentElement:gr,getClippingRect:cC,getOffsetParent:I0,getElementRects:hC,getClientRects:sC,getDimensions:uC,getScale:Ks,isElement:Qt,isRTL:fC};function mC(e,t){let r=null,n;const s=gr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:h,height:f}=e.getBoundingClientRect();if(a||t(),!h||!f)return;const y=Ea(d),x=Ea(s.clientWidth-(u+h)),m=Ea(s.clientHeight-(d+f)),b=Ea(u),g={rootMargin:-y+"px "+-x+"px "+-m+"px "+-b+"px",threshold:St(0,gn(1,l))||1};let w=!0;function S(_){const k=_[0].intersectionRatio;if(k!==l){if(!w)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(S,{...g,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,g)}r.observe(e)}return o(!0),i}function gC(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=ef(e),d=s||i?[...u?bo(u):[],...bo(t)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const h=u&&a?mC(u,r):null;let f=-1,y=null;o&&(y=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),r()}),u&&!l&&y.observe(u),y.observe(t));let x,m=l?Zn(e):null;l&&b();function b(){const v=Zn(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&r(),m=v,x=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),h==null||h(),(v=y)==null||v.disconnect(),y=null,l&&cancelAnimationFrame(x)}}const vC=Jk,yC=Qk,wC=qk,xC=Xk,bC=Kk,am=Wk,SC=Yk,_C=(e,t,r)=>{const n=new Map,s={platform:pC,...r},i={...s.platform,_c:n};return Vk(e,t,{...s,platform:i})};var Xa=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Pl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Pl(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)&&!Pl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function L0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lm(e,t){const r=L0(e);return Math.round(t*r)/r}function ou(e){const t=p.useRef(e);return Xa(()=>{t.current=e}),t}function EC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,h]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,y]=p.useState(n);Pl(f,n)||y(n);const[x,m]=p.useState(null),[b,v]=p.useState(null),g=p.useCallback(T=>{T!==k.current&&(k.current=T,m(T))},[]),w=p.useCallback(T=>{T!==C.current&&(C.current=T,v(T))},[]),S=i||x,_=o||b,k=p.useRef(null),C=p.useRef(null),j=p.useRef(d),A=l!=null,O=ou(l),U=ou(s),D=ou(u),q=p.useCallback(()=>{if(!k.current||!C.current)return;const T={placement:t,strategy:r,middleware:f};U.current&&(T.platform=U.current),_C(k.current,C.current,T).then(P=>{const z={...P,isPositioned:D.current!==!1};I.current&&!Pl(j.current,z)&&(j.current=z,os.flushSync(()=>{h(z)}))})},[f,t,r,U,D]);Xa(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(T=>({...T,isPositioned:!1})))},[u]);const I=p.useRef(!1);Xa(()=>(I.current=!0,()=>{I.current=!1}),[]),Xa(()=>{if(S&&(k.current=S),_&&(C.current=_),S&&_){if(O.current)return O.current(S,_,q);q()}},[S,_,q,O,A]);const K=p.useMemo(()=>({reference:k,floating:C,setReference:g,setFloating:w}),[g,w]),E=p.useMemo(()=>({reference:S,floating:_}),[S,_]),B=p.useMemo(()=>{const T={position:r,left:0,top:0};if(!E.floating)return T;const P=lm(E.floating,d.x),z=lm(E.floating,d.y);return a?{...T,transform:"translate("+P+"px, "+z+"px)",...L0(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:z}},[r,a,E.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:q,refs:K,elements:E,floatingStyles:B}),[d,q,K,E,B])}const kC=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?am({element:n.current,padding:s}).fn(r):{}:n?am({element:n,padding:s}).fn(r):{}}}},CC=(e,t)=>({...vC(e),options:[e,t]}),TC=(e,t)=>({...yC(e),options:[e,t]}),jC=(e,t)=>({...SC(e),options:[e,t]}),NC=(e,t)=>({...wC(e),options:[e,t]}),PC=(e,t)=>({...xC(e),options:[e,t]}),RC=(e,t)=>({...bC(e),options:[e,t]}),AC=(e,t)=>({...kC(e),options:[e,t]});var OC="Arrow",D0=p.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return c.jsx(Z.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});D0.displayName=OC;var IC=D0;function LC(e,t=[]){let r=[];function n(i,o){const a=p.createContext(o),l=r.length;r=[...r,o];function u(h){const{scope:f,children:y,...x}=h,m=(f==null?void 0:f[e][l])||a,b=p.useMemo(()=>x,Object.values(x));return c.jsx(m.Provider,{value:b,children:y})}function d(h,f){const y=(f==null?void 0:f[e][l])||a,x=p.useContext(y);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,DC(s,...t)]}function DC(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function M0(e){const[t,r]=p.useState(void 0);return rt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var tf="Popper",[$0,cc]=LC(tf),[MC,F0]=$0(tf),U0=e=>{const{__scopePopper:t,children:r}=e,[n,s]=p.useState(null);return c.jsx(MC,{scope:t,anchor:n,onAnchorChange:s,children:r})};U0.displayName=tf;var B0="PopperAnchor",z0=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=F0(B0,r),o=p.useRef(null),a=pe(t,o);return p.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:c.jsx(Z.div,{...s,ref:a})});z0.displayName=B0;var rf="PopperContent",[$C,FC]=$0(rf),H0=p.forwardRef((e,t)=>{var W,ae,Ne,ie,ue,oe;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:y="optimized",onPlaced:x,...m}=e,b=F0(rf,r),[v,g]=p.useState(null),w=pe(t,nt=>g(nt)),[S,_]=p.useState(null),k=M0(S),C=(k==null?void 0:k.width)??0,j=(k==null?void 0:k.height)??0,A=n+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},U=Array.isArray(u)?u:[u],D=U.length>
vendor: 9,430 bytes, line 181
1810,q={padding:O,boundary:U.filter(BC),altBoundary:D},{refs:I,floatingStyles:K,placement:E,isPositioned:B,middlewareData:T}=EC({strategy:"fixed",placement:A,whileElementsMounted:(...nt)=>gC(...nt,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[CC({mainAxis:s+j,alignmentAxis:o}),l&&TC({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?jC():void 0,...q}),l&&NC({...q}),PC({...q,apply:({elements:nt,rects:vt,availableWidth:Lr,availableHeight:Pt})=>{const{width:Tn,height:kc}=vt.reference,Ve=nt.floating.style;Ve.setProperty("--radix-popper-available-width",`${Lr}px`),Ve.setProperty("--radix-popper-available-height",`${Pt}px`),Ve.setProperty("--radix-popper-anchor-width",`${Tn}px`),Ve.setProperty("--radix-popper-anchor-height",`${kc}px`)}}),S&&AC({element:S,padding:a}),zC({arrowWidth:C,arrowHeight:j}),f&&RC({strategy:"referenceHidden",...q})]}),[P,z]=q0(E),M=gt(x);rt(()=>{B&&(M==null||M())},[B,M]);const V=(W=T.arrow)==null?void 0:W.x,te=(ae=T.arrow)==null?void 0:ae.y,ce=((Ne=T.arrow)==null?void 0:Ne.centerOffset)!==0,[Be,ne]=p.useState();return rt(()=>{v&&ne(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:B?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Be,"--radix-popper-transform-origin":[(ie=T.transformOrigin)==null?void 0:ie.x,(ue=T.transformOrigin)==null?void 0:ue.y].join(" "),...((oe=T.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx($C,{scope:r,placedSide:P,onArrowChange:_,arrowX:V,arrowY:te,shouldHideArrow:ce,children:c.jsx(Z.div,{"data-side":P,"data-align":z,...m,ref:w,style:{...m.style,animation:B?void 0:"none"}})})})});H0.displayName=rf;var V0="PopperArrow",UC={top:"bottom",right:"left",bottom:"top",left:"right"},W0=p.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=FC(V0,n),o=UC[i.placedSide];return c.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:c.jsx(IC,{...s,ref:r,style:{...s.style,display:"block"}})})});W0.displayName=V0;function BC(e){return e!==null}var zC=e=>({name:"transformOrigin",options:e,fn(t){var b,v,g;const{placement:r,rects:n,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=q0(r),h={start:"0%",center:"50%",end:"100%"}[d],f=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,y=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let x="",m="";return u==="bottom"?(x=o?h:`${f}px`,m=`${-l}px`):u==="top"?(x=o?h:`${f}px`,m=`${n.floating.height+l}px`):u==="right"?(x=`${-l}px`,m=o?h:`${y}px`):u==="left"&&(x=`${n.floating.width+l}px`,m=o?h:`${y}px`),{data:{x,y:m}}}});function q0(e){const[t,r="center"]=e.split("-");return[t,r]}var HC=U0,K0=z0,G0=H0,J0=W0,[uc,SO]=yi("Tooltip",[cc]),nf=cc(),Q0="TooltipProvider",VC=700,cm="tooltip.open",[WC,Y0]=uc(Q0),X0=e=>{const{__scopeTooltip:t,delayDuration:r=VC,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=p.useState(!0),l=p.useRef(!1),u=p.useRef(0);return p.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(WC,{scope:t,isOpenDelayed:o,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:i})};X0.displayName=Q0;var Z0="Tooltip",[_O,dc]=uc(Z0),Ed="TooltipTrigger",qC=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=dc(Ed,r),i=Y0(Ed,r),o=nf(r),a=p.useRef(null),l=pe(t,a,s.onTriggerChange),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(K0,{asChild:!0,...o,children:c.jsx(Z.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:G(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:G(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:G(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:G(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:G(e.onBlur,s.onClose),onClick:G(e.onClick,s.onClose)})})});qC.displayName=Ed;var KC="TooltipPortal",[EO,GC]=uc(KC,{forceMount:void 0}),fi="TooltipContent",ew=p.forwardRef((e,t)=>{const r=GC(fi,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=dc(fi,e.__scopeTooltip);return c.jsx(as,{present:n||o.open,children:o.disableHoverableContent?c.jsx(tw,{side:s,...i,ref:t}):c.jsx(JC,{side:s,...i,ref:t})})}),JC=p.forwardRef((e,t)=>{const r=dc(fi,e.__scopeTooltip),n=Y0(fi,e.__scopeTooltip),s=p.useRef(null),i=pe(t,s),[o,a]=p.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:h}=n,f=p.useCallback(()=>{a(null),h(!1)},[h]),y=p.useCallback((x,m)=>{const b=x.currentTarget,v={x:x.clientX,y:x.clientY},g=ZC(v,b.getBoundingClientRect()),w=eT(v,g),S=tT(m.getBoundingClientRect()),_=nT([...w,...S]);a(_),h(!0)},[h]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&d){const x=b=>y(b,d),m=b=>y(b,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",m)}}},[l,d,y,f]),p.useEffect(()=>{if(o){const x=m=>{const b=m.target,v={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),w=!rT(v,o);g?f():w&&(f(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,o,u,f]),c.jsx(tw,{...e,ref:i})}),[QC,YC]=uc(Z0,{isInside:!1}),tw=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=dc(fi,r),u=nf(r),{onClose:d}=l;return p.useEffect(()=>(document.addEventListener(cm,d),()=>document.removeEventListener(cm,d)),[d]),p.useEffect(()=>{if(l.trigger){const h=f=>{const y=f.target;y!=null&&y.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),c.jsx(Ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:c.jsxs(G0,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx($y,{children:n}),c.jsx(QC,{scope:r,isInside:!0,children:c.jsx(W_,{id:l.contentId,role:"tooltip",children:s||n})})]})})});ew.displayName=fi;var rw="TooltipArrow",XC=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=nf(r);return YC(rw,r).isInside?null:c.jsx(J0,{...s,...n,ref:t})});XC.displayName=rw;function ZC(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 eT(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 tT(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 rT(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].x,l=t[i].y,u=t[o].x,d=t[o].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function nT(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),sT(t)}function sT(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 iT=X0,nw=ew;const oT=iT,aT=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(nw,{ref:n,sideOffset:t,className:Q("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
181de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));aT.displayName=nw.displayName;var hc=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(){}},fc=typeof window>"u"||"Deno"in globalThis;function zt(){}function lT(e,t){return typeof e=="function"?e(t):e}function cT(e){return typeof e=="number"&&e>=0&&e!==1/0}function uT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function um(e,t){return typeof e=="function"?e(t):e}function dT(e,t){return typeof e=="function"?e(t):e}function dm(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==sf(o,t.options))return!1}else if(!_o(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 hm(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(So(t.options.mutationKey)!==So(i))return!1}else if(!_o(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function sf(e,t){return((t==null?void 0:t.queryKeyHashFn)||So)(e)}function So(e){return JSON.stringify(e,(t,r)=>kd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function _o(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!_o(e[r],t[r])):!1}function sw(e,t){if(e===t)return e;const r=fm(e)&&fm(t);if(r||kd(e)&&kd(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{};let l=0;for(let u=0;u<o;u++){const d=r?u:i[u];(!r&&n.includes(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=sw(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function fm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kd(e){if(!pm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!pm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function pm(e){return Object.prototype.toString.call(e)==="[object Object]"}function hT(e){return new Promise(t=>{setTimeout(t,e)})}function fT(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?sw(e,t):t}function pT(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function mT(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var of=Symbol();function iw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===of?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Fn,Gr,Qs,fg,gT=(fg=class extends hc{constructor(){super();de(this,Fn);de(this,Gr);de(this,Qs);ee(this,Qs,t=>{if(!fc&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,Gr)||this.setEventListener(N(this,Qs))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Gr))==null||t.call(this),ee(this,Gr,void 0))}setEventListener(t){var r;ee(this,Qs,t),(r=N(this,Gr))==null||r.call(this),ee(this,Gr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,Fn)!==t&&(ee(this,Fn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,Fn)=="boolean"?N(this,Fn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fn=new WeakMap,Gr=new WeakMap,Qs=new WeakMap,fg),ow=new gT,Ys,Jr,Xs,pg,vT=(pg=class extends hc{constructor(){super();de(this,Ys,!0);de(this,Jr);de(this,Xs);ee(this,Xs,t=>{if(!fc&&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: 19,613 bytes, line 181
181)}}})}onSubscribe(){N(this,Jr)||this.setEventListener(N(this,Xs))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Jr))==null||t.call(this),ee(this,Jr,void 0))}setEventListener(t){var r;ee(this,Xs,t),(r=N(this,Jr))==null||r.call(this),ee(this,Jr,t(this.setOnline.bind(this)))}setOnline(t){N(this,Ys)!==t&&(ee(this,Ys,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,Ys)}},Ys=new WeakMap,Jr=new WeakMap,Xs=new WeakMap,pg),Rl=new vT;function yT(){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 wT(e){return Math.min(1e3*2**e,3e4)}function aw(e){return(e??"online")==="online"?Rl.isOnline():!0}var lw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function au(e){return e instanceof lw}function cw(e){let t=!1,r=0,n=!1,s;const i=yT(),o=m=>{var b;n||(f(new lw(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>ow.isFocused()&&(e.networkMode==="always"||Rl.isOnline())&&e.canRun(),d=()=>aw(e.networkMode)&&e.canRun(),h=m=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,m),s==null||s(),i.resolve(m))},f=m=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,m),s==null||s(),i.reject(m))},y=()=>new Promise(m=>{var b;s=v=>{(n||u())&&m(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;s=void 0,n||(m=e.onContinue)==null||m.call(e)}),x=()=>{if(n)return;let m;const b=r===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(h).catch(v=>{var k;if(n)return;const g=e.retry??(fc?0:3),w=e.retryDelay??wT,S=typeof w=="function"?w(r,v):w,_=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!_){f(v);return}r++,(k=e.onFail)==null||k.call(e,r,v),hT(S).then(()=>u()?void 0:y()).then(()=>{t?f(v):x()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?x():y().then(x),i)}}function xT(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=a=>setTimeout(a,0);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 ot=xT(),Un,mg,uw=(mg=class{constructor(){de(this,Un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cT(this.gcTime)&&ee(this,Un,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fc?1/0:5*60*1e3))}clearGcTimeout(){N(this,Un)&&(clearTimeout(N(this,Un)),ee(this,Un,void 0))}},Un=new WeakMap,mg),Zs,ei,Rt,Ze,Uo,Bn,Vt,yr,gg,bT=(gg=class extends uw{constructor(t){super();de(this,Vt);de(this,Zs);de(this,ei);de(this,Rt);de(this,Ze);de(this,Uo);de(this,Bn);ee(this,Bn,!1),ee(this,Uo,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Rt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Zs,_T(this.options)),this.state=t.state??N(this,Zs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,Ze))==null?void 0:t.promise}setOptions(t){this.options={...N(this,Uo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Rt).remove(this)}setData(t,r){const n=fT(this.state.data,t,this.options);return Qe(this,Vt,yr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Qe(this,Vt,yr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,Ze))==null?void 0:n.promise;return(s=N(this,Ze))==null||s.cancel(t),r?r.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,Zs))}isActive(){return this.observers.some(t=>dT(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===of||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!uT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Ze))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Ze))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Rt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(N(this,Ze)&&(N(this,Bn)?N(this,Ze).cancel({revert:!0}):N(this,Ze).cancelRetry()),this.scheduleGc()),N(this,Rt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Qe(this,Vt,yr).call(this,{type:"invalidate"})}fetch(t,r){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,Ze))return N(this,Ze).continueRetry(),N(this,Ze).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ee(this,Bn,!0),n.signal)})},i=()=>{const h=iw(this.options,r),f={queryKey:this.queryKey,meta:this.meta};return s(f),ee(this,Bn,!1),this.options.persister?this.options.persister(h,f,this):h(f)},o={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),ee(this,ei,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&Qe(this,Vt,yr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=h=>{var f,y,x,m;au(h)&&h.silent||Qe(this,Vt,yr).call(this,{type:"error",error:h}),au(h)||((y=(f=N(this,Rt).config).onError)==null||y.call(f,h,this),(m=(x=N(this,Rt).config).onSettled)==null||m.call(x,this.state.data,h,this)),this.scheduleGc()};return ee(this,Ze,cw({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var f,y,x,m;if(h===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(b){a(b);return}(y=(f=N(this,Rt).config).onSuccess)==null||y.call(f,h,this),(m=(x=N(this,Rt).config).onSettled)==null||m.call(x,h,this.state.error,this),this.scheduleGc()},onError:a,onFail:(h,f)=>{Qe(this,Vt,yr).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{Qe(this,Vt,yr).call(this,{type:"pause"})},onContinue:()=>{Qe(this,Vt,yr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),N(this,Ze).start()}},Zs=new WeakMap,ei=new WeakMap,Rt=new WeakMap,Ze=new WeakMap,Uo=new WeakMap,Bn=new WeakMap,Vt=new WeakSet,yr=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,...ST(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...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 au(s)&&s.revert&&N(this,ei)?{...N(this,ei),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),ot.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,Rt).notify({query:this,type:"updated",action:t})})},gg);function ST(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _T(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 ir,vg,ET=(vg=class extends hc{constructor(t={}){super();de(this,ir);this.config=t,ee(this,ir,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??sf(s,r);let o=this.get(i);return o||(o=new bT({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,ir).has(t.queryHash)||(N(this,ir).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,ir).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,ir).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,ir).get(t)}getAll(){return[...N(this,ir).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>dm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>dm(t,n)):r}notify(t){ot.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ot.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ot.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ir=new WeakMap,vg),or,st,zn,ar,Ur,yg,kT=(yg=class extends uw{constructor(t){super();de(this,ar);de(this,or);de(this,st);de(this,zn);this.mutationId=t.mutationId,ee(this,st,t.mutationCache),ee(this,or,[]),this.state=t.state||CT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,or).includes(t)||(N(this,or).push(t),this.clearGcTimeout(),N(this,st).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,or,N(this,or).filter(r=>r!==t)),this.scheduleGc(),N(this,st).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,or).length||(this.state.status==="pending"?this.scheduleGc():N(this,st).remove(this))}continue(){var t;return((t=N(this,zn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,d,h,f,y,x,m,b,v,g,w,S,_,k,C;ee(this,zn,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,A)=>{Qe(this,ar,Ur).call(this,{type:"failed",failureCount:j,error:A})},onPause:()=>{Qe(this,ar,Ur).call(this,{type:"pause"})},onContinue:()=>{Qe(this,ar,Ur).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,st).canRun(this)}));const r=this.state.status==="pending",n=!N(this,zn).canStart();try{if(!r){Qe(this,ar,Ur).call(this,{type:"pending",variables:t,isPaused:n}),await((i=(s=N(this,st).config).onMutate)==null?void 0:i.call(s,t,this));const A=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));A!==this.state.context&&Qe(this,ar,Ur).call(this,{type:"pending",context:A,variables:t,isPaused:n})}const j=await N(this,zn).start();return await((u=(l=N(this,st).config).onSuccess)==null?void 0:u.call(l,j,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,j,t,this.state.context)),await((y=(f=N(this,st).config).onSettled)==null?void 0:y.call(f,j,null,this.state.variables,this.state.context,this)),await((m=(x=this.options).onSettled)==null?void 0:m.call(x,j,null,t,this.state.context)),Qe(this,ar,Ur).call(this,{type:"success",data:j}),j}catch(j){try{throw await((v=(b=N(this,st).config).onError)==null?void 0:v.call(b,j,t,this.state.context,this)),await((w=(g=this.options).onError)==null?void 0:w.call(g,j,t,this.state.context)),await((_=(S=N(this,st).config).onSettled)==null?void 0:_.call(S,void 0,j,this.state.variables,this.state.context,this)),await((C=(k=this.options).onSettled)==null?void 0:C.call(k,void 0,j,t,this.state.context)),j}finally{Qe(this,ar,Ur).call(this,{type:"error",error:j})}}finally{N(this,st).runNext(this)}}},or=new WeakMap,st=new WeakMap,zn=new WeakMap,ar=new WeakSet,Ur=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};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),ot.batch(()=>{N(this,or).forEach(n=>{n.onMutationUpdate(t)}),N(this,st).notify({mutation:this,type:"updated",action:t})})},yg);function CT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wt,Bo,wg,TT=(wg=class extends hc{constructor(t={}){super();de(this,wt);de(this,Bo);this.config=t,ee(this,wt,new Map),ee(this,Bo,Date.now())}build(t,r,n){const s=new kT({mutationCache:this,mutationId:++na(this,Bo)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){const r=ka(t),n=N(this,wt).get(r)??[];n.push(t),N(this,wt).set(r,n),this.notify({type:"added",mutation:t})}remove(t){var n;const r=ka(t);if(N(this,wt).has(r)){const s=(n=N(this,wt).get(r))==null?void 0:n.filter(i=>i!==t);s&&(s.length===0?N(this,wt).delete(r):N(this,wt).set(r,s))}this.notify({type:"removed",mutation:t})}canRun(t){var n;const r=(n=N(this,wt).get(ka(t)))==null?void 0:n.find(s=>s.state.status==="pending");return!r||r===t}runNext(t){var n;const r=(n=N(this,wt).get(ka(t)))==null?void 0:n.find(s=>s!==t&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...N(this,wt).values()].flat()}find(t){const r={exact:!0,...t};return this.getAll().find(n=>hm(r,n))}findAll(t={}){return this.getAll().filter(r=>hm(t,r))}notify(t){ot.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ot.batch(()=>Promise.all(t.map(r=>r.continue().catch(zt))))}},wt=new WeakMap,Bo=new WeakMap,wg);function ka(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function mm(e){return{onFetch:(t,r)=>{var d,h,f,y,x;const n=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((y=t.state.data)==null?void 0:y.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=iw(t.options,t.fetchOptions),g=async(w,S,_)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const k={queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};b(k);const C=await v(k),{maxPages:j}=t.options,A=_?mT:pT;return{pages:A(w.pages,C,j),pageParams:A(w.pageParams,S,j)}};if(s&&i.length){const w=s==="backward",S=w?jT:gm,_={pages:i,pageParams:o},k=S(n,_);a=await g(_,k,w)}else{const w=e??i.length;do{const S=l===0?o[0]??n.initialPageParam:gm(n,a);if(l>0&&S==null)break;a=await g(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function gm(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 jT(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 Pe,Qr,Yr,ti,ri,Xr,ni,si,xg,NT=(xg=class{constructor(e={}){de(this,Pe);de(this,Qr);de(this,Yr);de(this,ti);de(this,ri);de(this,Xr);de(this,ni);de(this,si);ee(this,Pe,e.queryCache||new ET),ee(this,Qr,e.mutationCache||new TT),ee(this,Yr,e.defaultOptions||{}),ee(this,ti,new Map),ee(this,ri,new Map),ee(this,Xr,0)}mount(){na(this,Xr)._++,N(this,Xr)===1&&(ee(this,ni,ow.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,Pe).onFocus())})),ee(this,si,Rl.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,Pe).onOnline())})))}unmount(){var e,t;na(this,Xr)._--,N(this,Xr)===0&&((e=N(this,ni))==null||e.call(this),ee(this,ni,void 0),(t=N(this,si))==null||t.call(this),ee(this,si,void 0))}isFetching(e){return N(this,Pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Qr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,Pe).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=N(this,Pe).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(um(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return N(this,Pe).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=N(this,Pe).get(n.queryHash),i=s==null?void 0:s.state.data,o=lT(t,i);if(o!==void 0)return N(this,Pe).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return ot.batch(()=>N(this,Pe).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,Pe).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,Pe);ot.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,Pe),n={type:"active",...e};return ot.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=ot.batch(()=>N(this,Pe).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(zt).catch(zt)}invalidateQueries(e={},t={}){return ot.batch(()=>{if(N(this,Pe).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=ot.batch(()=>N(this,Pe).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(zt)),s.state.fetchStatus==="paused"?Promise.resolve():i}
181));return Promise.all(n).then(zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,Pe).build(this,t);return r.isStaleByTime(um(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(zt).catch(zt)}fetchInfiniteQuery(e){return e.behavior=mm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zt).catch(zt)}ensureInfiniteQueryData(e){return e.behavior=mm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rl.isOnline()?N(this,Qr).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Pe)}getMutationCache(){return N(this,Qr)}getDefaultOptions(){return N(this,Yr)}setDefaultOptions(e){ee(this,Yr,e)}setQueryDefaults(e,t){N(this,ti).set(So(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,ti).values()];let r={};return t.forEach(n=>{_o(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){N(this,ri).set(So(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,ri).values()];let r={};return t.forEach(n=>{_o(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,Yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sf(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.enabled!==!0&&t.queryFn===of&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,Pe).clear(),N(this,Qr).clear()}},Pe=new WeakMap,Qr=new WeakMap,Yr=new WeakMap,ti=new WeakMap,ri=new WeakMap,Xr=new WeakMap,ni=new WeakMap,si=new WeakMap,xg),PT=p.createContext(void 0),RT=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(PT.Provider,{value:e,children:t}));/**
182 * @remix-run/router v1.20.0
183 *
184 * Copyright (c) Remix Software Inc.
185 *
186 * This source code is licensed under the MIT license found in the
187 * LICENSE.md file in the root directory of this source tree.
188 *
189 * @license MIT
190 */function Eo(){return Eo=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},Eo.apply(this,arguments)}var tn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(tn||(tn={}));const vm="popstate";function AT(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return Cd("",{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:hw(s)}return IT(t,r,null,e)}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dw(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function OT(){return Math.random().toString(36).substr(2,8)}function ym(e,t){return{usr:e.state,key:e.key,idx:t}}function Cd(e,t,r,n){return r===void 0&&(r=null),Eo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Si(t):t,{state:r,key:t&&t.key||n||OT()})}function hw(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 Si(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 IT(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=tn.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Eo({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=tn.Pop;let b=d(),v=b==null?null:b-u;u=b,l&&l({action:a,location:m.location,delta:v})}function f(b,v){a=tn.Push;let g=Cd(m.location,b,v);u=d()+1;let w=ym(g,u),S=m.createHref(g);try{o.pushState(w,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(S)}i&&l&&l({action:a,location:m.location,delta:1})}function y(b,v){a=tn.Replace;let g=Cd(m.location,b,v);u=d();let w=ym(g,u),S=m.createHref(g);o.replaceState(w,"",S),i&&l&&l({action:a,location:m.location,delta:0})}function x(b){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:hw(b);return g=g.replace(/ $/,"%20"),$e(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let m={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(vm,h),l=b,()=>{s.removeEventListener(vm,h),l=null}},createHref(b){return t(s,b)},createURL:x,encodeLocation(b){let v=x(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:y,go(b){return o.go(b)}};return m}var wm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wm||(wm={}));function LT(e,t,r){return r===void 0&&(r="/"),DT(e,t,r,!1)}function DT(e,t,r,n){let s=typeof t=="string"?Si(t):t,i=mw(s.pathname||"/",r);if(i==null)return null;let o=fw(e);MT(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=GT(i);a=qT(o[l],u,n)}return a}function fw(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("/")&&($e(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
190id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Wn([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&($e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),fw(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:VT(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of pw(i.path))s(i,o,l)}),t}function pw(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=pw(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 MT(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:WT(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const $T=/^:[\w-]+$/,FT=3,UT=2,BT=1,zT=10,HT=-2,xm=e=>e==="*";function VT(e,t){let r=e.split("/"),n=r.length;return r.some(xm)&&(n+=HT),t&&(n+=UT),r.filter(s=>!xm(s)).reduce((s,i)=>s+($T.test(i)?FT:i===""?BT:zT),n)}function WT(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 qT(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=bm({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=bm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 8,702 bytes, lines 190-199
190Object.assign(s,h.params),o.push({params:s,pathname:Wn([i,h.pathname]),pathnameBase:XT(Wn([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Wn([i,h.pathnameBase]))}return o}function bm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=KT(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:f,isOptional:y}=d;if(f==="*"){let m=a[h]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const x=a[h];return y&&!x?u[f]=void 0:u[f]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function KT(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),dw(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 GT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dw(!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 mw(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 JT(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Si(e):e;return{pathname:r?r.startsWith("/")?r:QT(r,t):t,search:ZT(n),hash:ej(s)}}function QT(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 lu(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 YT(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function gw(e,t){let r=YT(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function vw(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Si(e):(s=Eo({},e),$e(!s.pathname||!s.pathname.includes("?"),lu("?","pathname","search",s)),$e(!s.pathname||!s.pathname.includes("#"),lu("#","pathname","hash",s)),$e(!s.search||!s.search.includes("#"),lu("#","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 f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?t[h]:"/"}let l=JT(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Wn=e=>e.join("/").replace(/\/\/+/g,"/"),XT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ZT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ej=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function tj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yw=["post","put","patch","delete"];new Set(yw);const rj=["get",...yw];new Set(rj);/**
191 * React Router v6.27.0
192 *
193 * Copyright (c) Remix Software Inc.
194 *
195 * This source code is licensed under the MIT license found in the
196 * LICENSE.md file in the root directory of this source tree.
197 *
198 * @license MIT
199 */function ko(){return ko=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},ko.apply(this,arguments)}const af=p.createContext(null),nj=p.createContext(null),Qo=p.createContext(null),pc=p.createContext(null),ls=p.createContext({outlet:null,matches:[],isDataRoute:!1}),ww=p.createContext(null);function Yo(){return p.useContext(pc)!=null}function Xo(){return Yo()||$e(!1),p.useContext(pc).location}function xw(e){p.useContext(Qo).static||p.useLayoutEffect(e)}function En(){let{isDataRoute:e}=p.useContext(ls);return e?gj():sj()}function sj(){Yo()||$e(!1);let e=p.useContext(af),{basename:t,future:r,navigator:n}=p.useContext(Qo),{matches:s}=p.useContext(ls),{pathname:i}=Xo(),o=JSON.stringify(gw(s,r.v7_relativeSplatPath)),a=p.useRef(!1);return xw(()=>{a.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let h=vw(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Wn([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,o,i,e])}function ij(e,t){return oj(e,t)}function oj(e,t,r,n){Yo()||$e(!1);let{navigator:s}=p.useContext(Qo),{matches:i}=p.useContext(ls),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Xo(),d;if(t){var h;let b=typeof t=="string"?Si(t):t;l==="/"||(h=b.pathname)!=null&&h.startsWith(l)||$e(!1),d=b}else d=u;let f=d.pathname||"/",y=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");y="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=LT(e,{pathname:y}),m=dj(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Wn([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Wn([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n);return t&&m?p.createElement(pc.Provider,{value:{location:ko({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:tn.Pop}},m):m}function aj(){let e=mj(),t=tj(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 p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:s},r):null,null)}const lj=p.createElement(aj,null);class cj extends p.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?p.createElement(ls.Provider,{value:this.props.routeContext},p.createElement(ww.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function uj(e){let{routeContext:t,match:r,children:n}=e,s=p.useContext(af);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(ls.Provider,{value:t},n)}function dj(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||$e(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:y}=r,x=h.route.loader&&f[h.route.id]===void 0&&(!y||y[h.route.id]===void 0);if(h.route.lazy||x){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let y,x=!1,m=null,b=null;r&&(y=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||lj,l&&(u<0&&f===0?(x=!0,b=null):u===f&&(x=!0,b=h.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,f+1)),g=()=>{let w;return y?w=m:x?w=b:h.route.Component?w=p.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,p.createElement(uj,{match:h,routeC
199ontext:{outlet:d,matches:v,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?p.createElement(cj,{location:r.location,revalidation:r.revalidation,component:m,error:y,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var bw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bw||{}),Al=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}(Al||{});function hj(e){let t=p.useContext(af);return t||$e(!1),t}function fj(e){let t=p.useContext(nj);return t||$e(!1),t}function pj(e){let t=p.useContext(ls);return t||$e(!1),t}function Sw(e){let t=pj(),r=t.matches[t.matches.length-1];return r.route.id||$e(!1),r.route.id}function mj(){var e;let t=p.useContext(ww),r=fj(Al.UseRouteError),n=Sw(Al.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function gj(){let{router:e}=hj(bw.UseNavigateStable),t=Sw(Al.UseNavigateStable),r=p.useRef(!1);return xw(()=>{r.current=!0}),p.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ko({fromRouteId:t},i)))},[e,t])}function vj(e){let{to:t,replace:r,state:n,relative:s}=e;Yo()||$e(!1);let{future:i,static:o}=p.useContext(Qo),{matches:a}=p.useContext(ls),{pathname:l}=Xo(),u=En(),d=vw(t,gw(a,i.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(h),{replace:r,state:n,relative:s}),[u,h,s,r,n]),null}function An(e){$e(!1)}function yj(e){let{basename:t="/",children:r=null,location:n,navigationType:s=tn.Pop,navigator:i,static:o=!1,future:a}=e;Yo()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:l,navigator:i,static:o,future:ko({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Si(n));let{pathname:d="/",search:h="",hash:f="",state:y=null,key:x="default"}=n,m=p.useMemo(()=>{let b=mw(d,l);return b==null?null:{location:{pathname:b,search:h,hash:f,state:y,key:x},navigationType:s}},[l,d,h,f,y,x,s]);return m==null?null:p.createElement(Qo.Provider,{value:u},p.createElement(pc.Provider,{children:r,value:m}))}function wj(e){let{children:t,location:r}=e;return ij(Td(t),r)}new Promise(()=>{});function Td(e,t){t===void 0&&(t=[]);let r=[];return p.Children.forEach(e,(n,s)=>{if(!p.isValidElement(n))return;let i=[...t,s];if(n.type===p.Fragment){r.push.apply(r,Td(n.props.children,i));return}n.type!==An&&$e(!1),!n.props.index||!n.props.children||$e(!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=Td(n.props.children,i)),r.push(o)}),r}/**
200 * React Router DOM v6.27.0
201 *
202 * Copyright (c) Remix Software Inc.
203 *
204 * This source code is licensed under the MIT license found in the
205 * LICENSE.md file in the root directory of this source tree.
206 *
207 * @license MIT
208 */function jd(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function xj(e,t){let r=jd(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const bj="6";try{window.__reactRouterVersion=bj}catch{}const Sj="startTransition",Sm=Ag[Sj];function _j(e){let{basename:t,children:r,future:n,window:s}=e,i=p.useRef();i.current==null&&(i.current=AT({window:s,v5Compat:!0}));let o=i.current,[a,l]=p.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=p.useCallback(h=>{u&&Sm?Sm(()=>l(h)):l(h)},[l,u]);return p.useLayoutEffect(()=>o.listen(d),[o,d]),p.createElement(yj,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}var _m;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_m||(_m={}));var Em;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Em||(Em={}));function Ej(e){let t=p.useRef(jd(e)),r=p.useRef(!1),n=Xo(),s=p.useMemo(()=>xj(n.search,r.current?null:t.current),[n.search]),i=En(),o=p.useCallback((a,l)=>{const u=jd(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,o]}const _w=p.createContext(void 0),Nd=()=>{const e=p.useContext(_w);if(!e)throw new Error("useCart must be used within a CartProvider");return e},kj=.0875,Cj=({children:e})=>{const[t,r]=p.useState([]),n=d=>{r(h=>h.find(y=>y.id===d.id)?h:[...h,d])},s=d=>{r(h=>h.filter(f=>f.id!==d))},i=()=>{r([])},o=()=>t.reduce((d,h)=>d+h.price,0),a=()=>o()*kj,l=()=>
208o()+a(),u=t.length;return c.jsx(_w.Provider,{value:{items:t,addItem:n,removeItem:s,clearCart:i,getTotalAmount:o,getTaxAmount:a,getFinalTotal:l,itemCount:u},children:e})};function Tj(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(d){try{u(n.next(d))}catch(h){o(h)}}function l(d){try{u(n.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const jj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class lf extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Nj extends lf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class km extends lf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Cm extends lf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Pd;(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"})(Pd||(Pd={}));class Pj{constructor(t,{headers:r={},customFetch:n,region:s=Pd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=jj(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Tj(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:d,timeout:h}=n;let f={},{region:y}=n;y||(y=this.region);const x=new URL(`${this.url}/${r}`);y&&y!=="any"&&(f["x-region"]=y,x.searchParams.set("forceFunctionRegion",y));let m;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(f["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(f["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let b=d;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),d?(b=o.signal,d.addEventListener("abort",()=>o.abort())):b=o.signal);const v=yield this.fetch(x.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:m,signal:b}).catch(_=>{throw new Nj(_)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new km(v);if(!v.ok)throw new Cm(v);let w=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return w==="application/json"?S=yield v.json():w==="application/octet-stream"||w==="application/pdf"?S=yield v.blob():w==="text/event-stream"?S=v:w==="multipart/form-data"?S=yield v.formData():S=yield v.text(),{data:S,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Cm||a instanceof km?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Ew=3,Tm=e=>Math.min(1e3*2**e,3e4),Rj=[520,503],kw=["GET","HEAD","OPTIONS"];var Aj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
208de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function jm(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function Oj(e,t,r,n){return!(!n||r>=Ew||!kw.includes(e)||!Rj.includes(t))}var Ij=class{constructor(e){var t,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const u=new Headers(r.headers);o>0&&u.set("X-Retry-Count",String(o));let d;try{d=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body,(h,f)=>typeof f=="bigint"?f.toString():f),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!kw.includes(r.method))throw h;if(r.retryEnabled&&o<Ew){const f=Tm(o);o++,await jm(f,r.signal);continue}throw h}if(Oj(r.method,d.status,o,r.retryEnabled)){var a,l;const h=(a=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:Tm(o);await d.text(),o++,await jm(f,r.signal);continue}return await r.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",d="";const h=o==null?void 0:o.cause;if(h){var f,y,x,m;const g=(f=h==null?void 0:h.message)!==null&&f!==void 0?f:"",w=(y=h==null?void 0:h.code)!==null&&y!==void 0?y:"";l=`${(x=o==null?void 0:o.name)!==null&&x!==void 0?x:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
209
210Caused by: ${(m=h==null?void 0:h.name)!==null&&m!==void 0?m:"Error"}: ${g}`,w&&(l+=` (${w})`),h!=null&&h.stack&&(l+=`
211${h.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(u+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
211)),i.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=f:n=JSON.parse(f))}const d=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&h&&h.length>1&&(s=parseInt(h[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const d=await e.text();try{r=JSON.parse(d),Array.isArray(r)&&e.status===404&&(n=[],r=null,i=200,o="OK")}catch{e.status===404&&d===""?(i=204,o="No Content"):r={message:d}}if(r&&t.shouldThrowOnError)throw new Aj(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Lj=class extends Ij{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Nm=new RegExp("[,()]");var _s=class extends Lj{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"&&Nm.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"&&Nm.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
211r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},Dj=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new _s({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
2110){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new _s({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new _s({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new _s({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new _s({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Co(e){"@babel/helpers - typeof";return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(e)}function Mj(e,t){if(Co(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Co(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $j(e){var t=Mj(e,"string");return Co(t)=="symbol"?t:t+""}function Fj(e,t,r){return(t=$j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pm(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 Ca(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pm(Object(r),!0).forEach(function(n){Fj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Uj=class Cw{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const h=new AbortController,f=setTimeout(()=>h.abort(),i),y=d==null?void 0:d.signal;if(y){if(y.aborted)return clearTimeout(f),l(u,d);const x=()=>{clearTimeout(f),h.abort()};return y.addEventListener("abort",x,{once:!0}),l(u,Ca(Ca({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(f),y.removeEventListener("abort",x)})}return l(u,Ca(Ca({},d),{},{signal:h.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Dj(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new Cw(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=y=>y!==null&&typeof y=="object"&&(!Array.isArray(y)||y.some(d)),h=n&&Object.values(r).some(d);h?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([y,x])=>x!==void 0).map(([y,x])=>[y,Array.isArray(x)?`{${x.join(",")}}`:`${x}
211`]).forEach(([y,x])=>{l.searchParams.append(y,x)})):(a="POST",u=r);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new _s({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Bj{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:
212import ws from "ws"
213new 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+=`
214
215Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const zj="2.104.0",Hj=`realtime-js/${zj}`,Vj="1.0.0",Tw="2.0.0",Wj=Tw,qj=1e4,Kj=100,qr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},jw={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Rd={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class Gj{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},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(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+h.length,y=new ArrayBuffer(this.HEADER_LENGTH+f);let x=new DataView(y),m=0;x.setUint8(m++,this.KINDS.userBroadcastPush),x.setUint8(m++,l.length),x.setUint8(m++,a.length),x.setUint8(m++,o.length),x.setUint8(m++,u.length),x.setUint8(m++,h.length),x.setUint8(m++,r),Array.from(l,v=>x.setUint8(m++,v.charCodeAt(0))),Array.from(a,v=>
215x.setUint8(m++,v.charCodeAt(0))),Array.from(o,v=>x.setUint8(m++,v.charCodeAt(0))),Array.from(u,v=>x.setUint8(m++,v.charCodeAt(0))),Array.from(h,v=>x.setUint8(m++,v.charCodeAt(0)));var b=new Uint8Array(y.byteLength+n.byteLength);return b.set(new Uint8Array(y),0),b.set(new Uint8Array(n),y.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+i));l=l+i;const h=n.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),y=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,x={type:this.BROADCAST_EVENT,event:d,payload:y};return o>0&&(x.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var ge;(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"})(ge||(ge={}));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]=Jj(o,e,t,s),i),{}):{}},Jj=(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)?Nw(i,o):Ad(o)},Nw=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Zj(t,r)}switch(e){case ge.bool:return Qj(t);case ge.float4:case ge.float8:case ge.int2:case ge.int4:case ge.int8:case ge.numeric:case ge.oid:return Yj(t);case ge.json:case ge.jsonb:return Xj(t);case ge.timestamp:return eN(t);case ge.abstime:case ge.date:case ge.daterange:case ge.int4range:case ge.int8range:case ge.money:case ge.reltime:case ge.text:case ge.time:case ge.timestamptz:case ge.timetz:case ge.tsrange:case ge.tstzrange:return Ad(t);default:return Ad(t)}},Ad=e=>e,Qj=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Yj=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Xj=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Zj=(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=>Nw(t,a))}return e},eN=e=>typeof e=="string"?e.replace(" ","T"):e,Pw=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Zi=e=>typeof e=="function"?e:function(){return e},tN=typeof self<"u"?self:null,Es=typeof window<"u"?window:null,sr=tN||Es||globalThis,rN="2.0.0",nN=1e4,sN=1e3,lr={connecting:0,open:1,closing:2,closed:3},ut={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},xr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Od={longpoll:"longpoll",websocket:"websocket"},iN={complete:4},Id="base64url.bearer.phx.",Ta=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 215
215oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Rw=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},oN=class{constructor(e,t,r){this.state=ut.closed,this.topic=e,this.params=Zi(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ta(this,xr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Rw(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=ut.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=ut.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=ut.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=ut.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Ta(this,xr.leave,Zi({}),this.timeout).send(),this.state=ut.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(xr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ut.closed,this.bindings=[]}onClose(e){this.on(xr.close,e)}onError(e){return this.on(xr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Ta(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ut.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(xr.close,"leave")},r=new Ta(this,xr.leave,Zi({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ut.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===ut.closed}isErrored(){return this.state===ut.errored}isJoined(){return this.state===ut.joined}isJoining(){return this.state===ut.joining}isLeaving(){return this.state===ut.leaving}},Ol=class{static request(e,t,r,n,s,i,o){if(sr.XDomainRequest){let a=new sr.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(sr.XMLHttpRequest){let a=new sr.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(sr.fetch&&sr.AbortController)return this.fetchRequest(e,t,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,i,o){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),sr.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,s,i,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,i,o,a){e.open(t,r,!0),e.timeout=i;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===iN.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},aN=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},ps=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Id)&&(this.authToken=atob(t[1].slice(Id.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=lr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Od.websocket),"$1/"+Od.longpoll)}endpointURL(){return Ol.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=lr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===lr.open||this.readyState===lr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=lr.open,this.onopen({}),this.poll();break;
215case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=aN(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
216`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=lr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=Ol.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},lN=class Ui{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ui.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ui.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ui.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ui.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let i=this.clone(t),o={},a={};return this.map(i,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let d=i[l];if(d){let h=u.metas.map(m=>m.phx_ref),f=d.metas.map(m=>m.phx_ref),y=u.metas.filter(m=>f.indexOf(m.phx_ref)<0),x=d.metas.filter(m=>h.indexOf(m.phx_ref)<0);y.length>0&&(o[l]=u,o[l].metas=y),x.length>0&&(a[l]=this.clone(d),a[l].metas=x)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let d=t[a].metas.map(f=>f.phx_ref),h=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);t[a].metas.unshift(...h)}n(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let d=l.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},ja={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(t,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(a.byteLength+i.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(i),a.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,595 bytes, line 216
216switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let u=r.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:d}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let u=r.decode(e.slice(a,a+s));a=a+s;let d=r.decode(e.slice(a,a+i));a=a+i;let h=r.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength),y={status:h,response:f};return{join_ref:l,ref:u,topic:d,event:xr.reply,payload:y}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let a=r.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},cN=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||nN,this.transport=t.transport||sr.WebSocket||ps,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||sr&&sr.sessionStorage,this.establishedConnections=0,this.defaultEncoder=ja.encode.bind(ja),this.defaultDecoder=ja.decode.bind(ja),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ps?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Es&&Es.addEventListener&&(Es.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Es.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),Es.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,s,i)=>{console.log(`${n}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Zi(t.params||{}),this.endPoint=`${e}/${Od.websocket}`,this.vsn=t.vsn||rN,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Rw(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ps}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Ol.appendParams(Ol.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Zi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ps?this.connectWithFallback(ps,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case ps:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Id}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),sN,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===lr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
216triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(xr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case lr.connecting:return"connecting";case lr.open:return"open";case lr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new oN(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class eo{constructor(t,r){const n=dN(r);this.presence=new lN(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=eo.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=eo.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return eo.transformState(this.presence.state)}static transformState(t){return t=uN(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=Za(s),r},{})}static onJoinPayload(t,r,n){const s=Am(r),i=Za(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Am(r),i=Za(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function Za(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function uN(e){return JSON.parse(JSON.stringify(e))}function dN(e){return(e==null?void 0:e.events)&&{events:e.events}}function Am(e){return e!=null&&e.metas?Za(e):[]}var Om;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Om||(Om={}));class hN{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new eo(this.channel.channelAdapter,r)}}class fN{constructor(t,r,n){const s=pN(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>Kj){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===qr.joined}isJoined(){return this.state===qr.joined}isJoining(){return this.state===qr.joining}isClosed(){return this.state===qr.closed}isLeaving(){return this.state===qr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function pN(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Im;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Im||(Im={}));var Fs;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Fs||(Fs={}));var br;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(br||(br={}));class to{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new fN(this.socket.socketAdapter,t,this.params),this.presence=new hN(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Pw(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(y=>y.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Fs.PRESENCE]&&this.bindings[Fs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(y=>{t==null||t(br.CHANNEL_ERROR,y)}),this._onClose(()=>t==null?void 0:t(br.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:y})=>{if(this.socket._isManualToken()||this.socket.setAuth(),y===void 0){t==null||t(br.SUBSCRIBED);return}this._updatePostgresBindings(y,t)}).receive("error",y=>{this.state=qr.errored,t==null||t(br.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(y).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(br.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:d,table:h,filter:f}}=l,y=t&&t[a];if(y&&y.event===u&&to.isFilterValueEqual(y.schema,d)&&to.isFilterValueEqual(y.table,h)&&to.isFilterValueEqual(y.filter,f))o.push(Object.assign(Object.assign({},l),{id:y.id}));else{this.unsubscribe(),this.state=qr.errored,r==null||r(br.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=qr.errored&&r&&r(br.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Fs.PRESENCE||t===Fs.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
216try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 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 u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const f=(s=this.bindings[h])===null||s===void 0?void 0:s.find(y=>y.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const y=f.id,x=(i=f.filter)===null||i===void 0?void 0:i.event;return y&&((o=r.ids)===null||o===void 0?void 0:o.includes(y))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const y=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return y==="*"||y===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=jw;return r&&[n,s,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Rm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Rm(t.columns,t.old_record)),r}}class mN{constructor(t,r){this.socket=new cN(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Rd.connecting}isDisconnecting(){return this.socket.connectionState()==Rd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const gN={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},vN=[1e3,2e3,5e3,1e4],yN=1e4,wN=`
217  addEventListener("message", (e) => {
218    if (e.data.event === "start") {
219      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
220    }
221  });`;class xN{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
221,this.ref=0,this.serializer=new Gj,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new mN(t,s),this.httpEndpoint=Pw(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
222
223To use Realtime in Node.js, you need to provide a WebSocket implementation:
224
225Option 1: Use Node.js 22+ which has native WebSocket support
226Option 2: Install and provide the "ws" package:
227
228  npm install ws
229
230  import ws from "ws"
231  const client = new RealtimeClient(url, {
232    ...options,
233    transport: ws
234  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||Rd.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new to(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}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:Hj};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(jw.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([wN],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,d;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const h={};
234h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:qj,h.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:gN.HEARTBEAT_INTERVAL,h.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:Bj.getWebSocketConstructor(),h.params=t==null?void 0:t.params,h.logger=t==null?void 0:t.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),h.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:m=>vN[m-1]||yN;let f,y;const x=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:Wj;switch(x){case Vj:f=(m,b)=>b(JSON.stringify(m)),y=(m,b)=>b(JSON.parse(m));break;case Tw:f=this.serializer.encode.bind(this.serializer),y=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=x,h.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,h.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:y,h.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,h.params=Object.assign(Object.assign({},h.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var To=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 bN(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 SN(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 _N(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=bN(e.baseUrl,n,s),l=await SN(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const y=h?f:void 0,x=y==null?void 0:y.error;throw new To((x==null?void 0:x.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:y})}return{status:u.status,headers:u.headers,data:f}}}}function Na(e){return e.join("�")}var EN=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Na(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/${Na(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Na(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Na(e.namespace)}`}),!0}catch(t){if(t instanceof To&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof To&&r.status===409)return;throw r}}};function ms(e){return e.join("�")}var kN=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/${ms(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/${ms(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/${ms(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/${ms(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/${ms(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/${ms(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof To&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof To&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},CN=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=_N({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new EN(this.client,t),this.tableOps=new kN(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)}
234async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function jo(e){"@babel/helpers - typeof";return jo=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},jo(e)}function TN(e,t){if(jo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jN(e){var t=TN(e,"string");return jo(t)=="symbol"?t:t+""}function NN(e,t,r){return(t=jN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lm(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 J(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lm(Object(r),!0).forEach(function(n){NN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mc=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function gc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Ld=class extends mc{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return J({},super.toJSON())}},Aw=class extends mc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function cf(e,t,r){const n=J({},e),s=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function PN(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const RN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),AN=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)},Dd=e=>{if(Array.isArray(e))return e.map(r=>Dd(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]=Dd(n)}),t},ON=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Dm=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)},IN=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Ld(Dm(o),i,a,n))}).catch(()=>{const o=i+"";t(new Ld(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new Aw(Dm(e),e,n))},LN=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return J(J({},s),r);if(AN(n)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=cf(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),J(J({},s),r)};async function Li(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,LN(t,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>IN(u,l,n,o))})}function Ow(e="storage"){return{get:async(t,r,n,s)=>Li(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>Li(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>Li(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>Li(t,"HEAD",r,J(J({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>Li(t,"DELETE",r,s,i,n,e)}}const DN=Ow("storage"),{get:No,post:Ht,put:Md,head:MN,remove:uf}=DN,_t=Ow("vectors");var _i=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=PN(t),this.fetch=RN(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=cf(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(gc(r))return{data:null,error:r};throw r}}},$N=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(gc(t))return{data:null,error:t};throw t}}};let Iw;Iw=Symbol.toStringTag;var FN=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Iw]="BlobDownloadBuilder",this.promise=null}asStream(){return new $N(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(gc(t))return{data:null,error:t};throw t}}};const UN={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Mm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var BN=class extends _i{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=J(J({},Mm),n);let a=J(J({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[f,y]of Object.entries(n.headers))a=cf(a,f,y);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?Md:Ht)(s.fetch,`${s.url}/object/${d}`,i,J({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=J(J({},Mm),n),d=J(J({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:i,fullPath:(await Md(s.fetch,a.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=J({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Ht(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 mc("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Ht(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
234stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Ht(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Ht(n.fetch,`${n.url}/object/sign/${s}`,J({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Ht(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return s.map(a=>J(J({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>No(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new FN(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Dd(await No(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await MN(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(gc(s)){var n;const i=s instanceof Ld?s.status:s instanceof Aw?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await uf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=J(J(J({},UN),t),{},{prefix:e||""});return await Ht(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=J({},e);return await Ht(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const zN="2.104.0",Zo={"X-Client-Info":`storage-js/${zN}`};var HN=class extends _i{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=J(J({},Zo),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await No(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await No(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Ht(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Md(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Ht(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await uf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},VN=class extends _i{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=J(J({},Zo),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ht(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
234{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await No(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await uf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!ON(e))throw new mc("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 CN({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}}}}})}},WN=class extends _i{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=J(J({},Zo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await _t.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await _t.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},qN=class extends _i{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=J(J({},Zo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},KN=class extends _i{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=J(J({},Zo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await _t.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},GN=class extends KN{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new JN(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)}},JN=class extends WN{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,J(J({},e),{},{vectorBucketName:r.vectorBucketName}))}
234async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,J(J({},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 QN(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},QN=class extends qN{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,J(J({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,J(J({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,J(J({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,J(J({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,J(J({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},YN=class extends HN{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new BN(this.url,this.headers,e,this.fetch)}get vectors(){return new GN(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new VN(this.url+"/iceberg",this.headers,this.fetch)}};function vc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}const Lw="2.104.0",ks=30*1e3,$d=3,cu=$d*ks,XN="http://localhost:9999",ZN="supabase.auth.token",eP={"X-Client-Info":`gotrue-js/${Lw}`},Fd="X-Supabase-Api-Version",Dw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},tP=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,rP=10*60*1e3;class Po extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function F(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class nP extends Po{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function sP(e){return F(e)&&e.name==="AuthApiError"}class In extends Po{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Ir extends Po{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class yt extends Ir{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Pa(e){return F(e)&&e.name==="AuthSessionMissingError"}class gs extends Ir{constructor(){super("Auth session or user missing","AuthInvalidToken
234ResponseError",500,void 0)}}class Ra extends Ir{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Aa extends Ir{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function iP(e){return F(e)&&e.name==="AuthImplicitGrantRedirectError"}class $m extends Ir{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class oP extends Ir{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 Ud extends Ir{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function uu(e){return F(e)&&e.name==="AuthRetryableFetchError"}class Fm extends Ir{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Bd extends Ir{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Um=` 	
235\r=`.split(""),aP=(()=>{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<Il.length;t+=1)e[Il[t].charCodeAt(0)]=t;return e})();function Bm(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(Il[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(Il[n]),t.queuedBits-=6}}function Mw(e,t,r){const n=aP[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 zm(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{uP(o,n,r)};for(let o=0;o<e.length;o+=1)Mw(e.charCodeAt(o),s,i);return t.join("")}function lP(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 cP(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}lP(n,t)}}function uP(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Gs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Mw(e.charCodeAt(s),r,n);return new Uint8Array(t)}function dP(e){const t=[];return cP(e,r=>t.push(r)),new Uint8Array(t)}function $n(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Bm(s,r,n)),Bm(null,r,n),t.join("")}function hP(e){return Math.round(Date.now()/1e3)+e}function fP(){return Symbol("auth-callback")}const qe=()=>typeof window<"u"&&typeof document<"u",jn={tested:!1,writable:!1},$w=()=>{if(!qe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(jn.tested)return jn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),jn.tested=!0,jn.writable=!0}catch{jn.tested=!0,jn.writable=!1}return jn.writable};function pP(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
235h((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Fw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),mP=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Cs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Nn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},We=async(e,t)=>{await e.removeItem(t)};class yc{constructor(){this.promise=new yc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}yc.promiseConstructor=Promise;function Oa(e){const t=e.split(".");if(t.length!==3)throw new Bd("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!tP.test(t[n]))throw new Bd("JWT not in base64url format");return{header:JSON.parse(zm(t[0])),payload:JSON.parse(zm(t[1])),signature:Gs(t[2]),raw:{header:t[0],payload:t[1]}}}async function gP(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function vP(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 yP(e){return("0"+e.toString(16)).substr(-2)}function wP(){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,yP).join("")}async function xP(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 bP(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 xP(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function vs(e,t,r=!1){const n=wP();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Cs(e,`${t}-code-verifier`,s);const i=await bP(n);return[i,n===i?"plain":"s256"]}const SP=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function _P(e){const t=e.headers.get(Fd);if(!t||!t.match(SP))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function EP(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 kP(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 CP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ys(e){if(!CP.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function du(){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 TP(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 Hm(e){return JSON.parse(JSON.stringify(e))}
235const On=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),jP=[502,503,504,520,521,522,523,524,530];async function Vm(e){var t;if(!mP(e))throw new Ud(On(e),0);if(jP.includes(e.status))throw new Ud(On(e),e.status);let r;try{r=await e.json()}catch(i){throw new In(On(i),i)}let n;const s=_P(e);if(s&&s.getTime()>=Dw["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 Fm(On(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new yt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new Fm(On(r),e.status,r.weak_password.reasons);throw new nP(On(r),e.status||500,n)}const NP=(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 H(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Fd]||(i[Fd]=Dw["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 PP(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 PP(e,t,r,n,s,i){const o=NP(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new Ud(On(l),0)}if(a.ok||await Vm(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Vm(l)}}function Ft(e){var t;let r=null;OP(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=hP(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Wm(e){const t=Ft(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 Kr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function RP(e){return{data:e,error:null}}function AP(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=vc(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 qm(e){return e}function OP(e){return e.access_token&&e.refresh_token&&e.expires_in}const hu=["global","local","others"];class IP{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Fw(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,r=hu[0]){if(hu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${hu.join(", ")}`);try{return await H(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 H(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Kr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=vc(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 H(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:AP,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 H(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Kr})}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 u={nextPage:null,lastPage:0,total:0},d=await H(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:qm});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,y=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return y.length>0&&(y.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);u[`${b}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(F(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ys(t);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Kr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){ys(t);try{return await H(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Kr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){ys(t);
235try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Kr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){ys(t.userId);try{const{data:r,error:n}=await H(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){ys(t.userId),ys(t.id);try{return{data:await H(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 u={nextPage:null,lastPage:0,total:0},d=await H(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:qm});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,y=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return y.length>0&&(y.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);u[`${b}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(F(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await H(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 H(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 H(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 H(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 H(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}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await H(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(F(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await H(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await H(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await H(this.fetch,"PUT",`${this.url}/admin/custom-providers/${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 _deleteCustomProvider(t){try{return await H(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}}function Km(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const rr={debug:!!(globalThis&&$w()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
235class Uw extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Gm extends Uw{}async function LP(e,t,r){rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),rr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(s),rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Gm(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(rr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await r()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(n.signal.aborted)return rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Gm(`Lock "${e}" was released because another request stole it`)}throw i}}function DP(){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 Bw(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function MP(e){return parseInt(e,16)}function $P(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function FP(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
236`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const y=Bw(e.address),x=d?`${d}://${n}`:n,m=e.statement?`${e.statement}
237`:"",b=`${x} wants you to sign in with your Ethereum account:
238${y}
239
240${m}`;let v=`URI: ${h}
241Version: ${f}
242Chain ID: ${r}${o?`
243Nonce: ${o}`:""}
244Issued At: ${i.toISOString()}`;if(s&&(v+=`
245Expiration Time: ${s.toISOString()}`),a&&(v+=`
246Not Before: ${a.toISOString()}`),l&&(v+=`
247Request ID: ${l}`),u){let g=`
248Resources:`;
248for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);g+=`
249- ${w}`}v+=g}return`${b}
250${v}`}class De 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 Ll extends De{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function UP({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 De({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 De({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 De({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 De({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 De({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new De({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 De({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new De({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(zw(o)){if(i.rp.id!==o)return new De({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new De({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 De({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 De({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 De({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function BP({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 De({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new De({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(zw(n)){if(r.rpId!==n)return new De({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new De({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new De({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
250ROR",cause:e})}return new De({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class zP{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 HP=new zP;function VP(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=vc(e,["challenge","user","excludeCredentials"]),i=Gs(t).buffer,o=Object.assign(Object.assign({},r),{id:Gs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Gs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function WP(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=vc(e,["challenge","allowCredentials"]),s=Gs(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:Gs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function qP(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:$n(new Uint8Array(e.response.attestationObject)),clientDataJSON:$n(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function KP(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:$n(new Uint8Array(s.authenticatorData)),clientDataJSON:$n(new Uint8Array(s.clientDataJSON)),signature:$n(new Uint8Array(s.signature)),userHandle:s.userHandle?$n(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function zw(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Jm(){var e,t;return!!(qe()&&"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 GP(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ll("Browser returned unexpected credential type",t)}:{data:null,error:new Ll("Empty credential response",t)}}catch(t){return{data:null,error:UP({error:t,options:e})}}}async function JP(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ll("Browser returned unexpected credential type",t)}:{data:null,error:new Ll("Empty credential response",t)}}catch(t){return{data:null,error:BP({error:t,options:e})}}}const QP={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},YP={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Dl(...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]=Dl(a,o):n[i]=Dl(o)}else n[i]=o}return n}function XP(e,t){return Dl(QP,e,t||{})}function ZP(e,t){return Dl(YP,e,t||{})}class eR{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const u=s??HP.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const h=n;if(h)d.name=`${d.id}:${h}`;else{const y=(await this.client.getUser()).data.user,x=((o=y==null?void 0:y.user_metadata)===null||o===void 0?void 0:o.name)||(y==null?void 0:y.email)||(y==null?void 0:y.id)||"User";d.name=`${d.id}:${x}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=XP(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:f}=await GP({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const d=ZP(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:f}=await JP(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(a){return F(a)?{data:null,error:a}:{data:null,error:new In("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Po("rpId is required for WebAuthn authentication")};try{if(!Jm())return{data:null,error:new In("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 In("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 Po("rpId is required for WebAuthn registration")};try{if(!Jm())return{data:null,error:new In("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;
250return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new In("Unexpected error in register",o)}}}}DP();const tR={url:XN,storageKey:ZN,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:eP,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function Qm(e,t,r){return await r()}const ws={};class Ro{get jwks(){var t,r;return(r=(t=ws[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ws[this.storageKey]=Object.assign(Object.assign({},ws[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ws[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ws[this.storageKey]=Object.assign(Object.assign({},ws[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({},tR),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Ro.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ro.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&qe()){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 IP({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Fw(i.fetch),this.lock=i.lock||Qm,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&&qe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=LP:this.lock=Qm,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 eR(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:$w()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Km(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Km(this.memoryStorage)),qe()&&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);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Lw}) ${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";
250if(qe()&&(r=pP(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),qe()&&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),iP(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 In("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await H(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:Ft}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(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:f}=t;let y=null,x=null;this.flowType==="pkce"&&([y,x]=await vs(this.storage,this.storageKey)),i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:y,code_challenge_method:x},xform:Ft})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Ft})}else throw new Ra("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await We(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await We(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 H(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:Wm})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await H(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:Wm})}else throw new Ra("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 gs;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,u,d,h,f;let y,x;if("message"in t)y=t.message,x=t.signature;else{const{chain:m,wallet:b,statement:v,options:g}=t;let w;if(qe())if(typeof b=="object")w=b;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")w=A.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const S=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),_=await w.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=Bw(_[0]);let C=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const A=await w.request({method:"eth_chainId"});C=MP(A)}const j={domain:S.host,address:k,statement:v,uri:S.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:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};y=FP(j),x=await w.request({method:"personal_sign",params:[$P(y),k]})}try{const{data:m,error:b}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:y,signature:x}
250,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ft});if(b)throw b;if(!m||!m.session||!m.user){const v=new gs;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:b})}catch(m){if(F(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,d,h,f,y;let x,m;if("message"in t)x=t.message,m=t.signature;else{const{chain:b,wallet:v,statement:g,options:w}=t;let S;if(qe())if(typeof v=="object")S=v;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"))S=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 v!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=v}const _=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:_.host,uri:_.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)x=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
251`);const k=await S.signMessage(new TextEncoder().encode(x),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:b,error:v}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:$n(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(y=t.options)===null||y===void 0?void 0:y.captchaToken}}:null),xform:Ft});if(v)throw v;if(!b||!b.session||!b.user){const g=new gs;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:v})}catch(b){if(F(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await Nn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new oP;const{data:i,error:o}=await H(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Ft});if(await We(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new gs;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 We(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 H(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:Ft}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new gs;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(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 u=null,d=null;this.flowType==="pkce"&&([u,d]=await vs(this.storage,this.storageKey));const{error:h}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:d}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Ra("You must provide either an email or phone number.")}catch(a){if(await We(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 H(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Ft});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(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 vs(this.storage,this.storageKey));const u=await H(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:RP});return!((i=u.data)===null||i===void 0)&&i.url&&qe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await We(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 yt;const{error:s}=await H(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 H(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 H(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 Ra("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 Nn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
251id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<cu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Nn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=du()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=TP(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 H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Kr}):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 yt}:await H(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:Kr})})}catch(r){if(F(r))return Pa(r)&&(await this._removeSession(),await We(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 yt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await vs(this.storage,this.storageKey));const{data:u,error:d}=await H(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:Kr});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await We(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 yt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Oa(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(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 yt;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(!qe())throw new Aa("No browser detected.");
251if(t.error||t.error_description||t.error_code)throw new Aa(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new $m("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Aa("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new $m("No code detected.");const{data:g,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.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:u}=t;if(!i||!a||!o||!u)throw new Aa("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let f=d+h;l&&(f=parseInt(l));const y=f-d;y*1e3<=ks&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${h}s`);const x=f-h;d-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,f,d):d-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,f,d);const{data:m,error:b}=await this._getUser(i);if(b)throw b;const v={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,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 Nn(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&&!Pa(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&&!(sP(a)&&(a.status===404||a.status===401||a.status===403)||Pa(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await We(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=fP(),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),Pa(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await vs(this.storage,this.storageKey,!0));try{return await H(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 We(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,u,d;const{data:h,error:f}=i;if(f)throw f;const y=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 H(this.fetch,"GET",y,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return qe()&&!(!((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:u,nonce:d}=t,h=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Ft}),{data:f,error:y}=h;return y?this._returnResult({data:{user:null,session:null},error:y}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new gs}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:y}))}catch(s){if(await We(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;
251return await H(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 vP(async s=>(s>0&&await gP(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await H(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ft})),(s,i)=>{const o=200*Math.pow(2,s);return i&&uu(i)&&Date.now()+o-n<ks})}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),qe()&&!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 Nn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Nn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Cs(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:du()}else if(s&&!s.user&&!s.user){const o=await Nn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await We(this.storage,this.storageKey+"-user"),await Cs(this.storage,this.storageKey,s)):s.user=du()}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()<cu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${cu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),uu(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 yt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new yc;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new yt;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 uu(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 We(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 Cs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Hm(s);await Cs(this.storage,this.storageKey,i)}else{const s=Hm(r);await Cs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await We(this.storage,this.storageKey),await We(this.storage,this.storageKey+"-code-verifier"),await We(this.storage,this.storageKey+"-user"),this.userStorage&&await We(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
251catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ks);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)/ks);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ks}ms, refresh threshold is ${$d} ticks`),s<=$d&&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 Uw)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!qe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await vs(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 H(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:u}=await H(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(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"?qP(t.webauthn.credential_response):KP(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await H(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 H(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:VP(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:WP(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(t){var r,n,s,i;if(t)try{const{payload:y}=Oa(t);let x=null;y.aal&&(x=y.aal);let m=x;const{data:{user:b},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(S=>S.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const w=y.amr||[];return{data:{currentLevel:x,nextLevel:m,currentAuthenticationMethods:w},error:null}}catch(y){if(F(y))return this._returnResult({data:null,error:y});throw y}const{data:{session:o},error:a}
251=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Oa(o.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(y=>y.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await H(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 yt})})}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 yt});const o=await H(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&&qe()&&!(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 yt});const o=await H(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&&qe()&&!(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 H(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 yt})})}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 H(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 yt})})}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+rP>s)return n;const{data:i,error:o}=await H(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:y,error:x}
251=await this.getSession();if(x||!y.session)return this._returnResult({data:null,error:x});n=y.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Oa(n);r!=null&&r.allowExpired||EP(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:y}=await this.getUser(n);if(y)throw y;return{data:{claims:i,header:s,signature:o},error:null}}const d=kP(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,dP(`${a}.${l}`)))throw new Bd("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}}}Ro.nextInstanceID={};const rR=Ro,nR="2.104.0";let Bi="";typeof Deno<"u"?Bi="deno":typeof document<"u"?Bi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Bi="react-native":Bi="node";const sR={"X-Client-Info":`supabase-js-${Bi}/${nR}`},iR={headers:sR},oR={schema:"public"},aR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},lR={};function Ao(e){"@babel/helpers - typeof";return Ao=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},Ao(e)}function cR(e,t){if(Ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uR(e){var t=cR(e,"string");return Ao(t)=="symbol"?t:t+""}function dR(e,t,r){return(t=uR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ym(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 Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ym(Object(r),!0).forEach(function(n){dR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ym(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const hR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),fR=()=>Headers,pR=(e,t,r)=>{const n=hR(r),s=fR();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,Re(Re({},o),{},{headers:u}))}};function mR(e){return e.endsWith("/")?e:e+"/"}function gR(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:d,global:h}=t,f={db:Re(Re({},l),s),auth:Re(Re({},u),i),realtime:Re(Re({},d),o),storage:{},global:Re(Re(Re({},h),a),{},{headers:Re(Re({},(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?f.accessToken=e.accessToken:delete f.accessToken,f}function vR(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(mR(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var yR=class extends rR{constructor(e){super(e)}},wR=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=vR(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:oR,realtime:lR,auth:Re(Re({},aR),{},{storageKey:o}),global:iR},l=gR(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 u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=pR(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Re({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new Uj(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new YN(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new Pj(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)}
251channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u},d,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new yR({url:this.authUrl.href,headers:Re(Re({},f),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new xN(this.realtimeUrl.href,Re(Re({},e),{},{params:Re(Re({},{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 xR=(e,t,r)=>new wR(e,t,r);function bR(){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}bR()&&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 SR="https://ixnkaerbrmuqozhdstla.supabase.co",_R="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Iml4bmthZXJicm11cW96aGRzdGxhIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM5MTI3MTEsImV4cCI6MjA2OTQ4ODcxMX0.U-8AULX1sO5Pb1BuHYL8aGgycCjBXb9WdrfqAMYeO9c",ke=xR(SR,_R,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),ER=sc("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"}}),le=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?Yn:"button";return c.jsx(o,{className:Q(ER({variant:t,size:r,className:e})),ref:i,...s})});le.displayName="Button";const cs=()=>{const[e,t]=p.useState(null),[r,n]=p.useState(null),[s,i]=p.useState(!0);return p.useEffect(()=>{const{data:{subscription:u}}=ke.auth.onAuthStateChange((d,h)=>{n(h),t((h==null?void 0:h.user)??null),i(!1)});return ke.auth.getSession().then(({data:{session:d}})=>{n(d),t((d==null?void 0:d.user)??null),i(!1)}),()=>u.unsubscribe()},[]),{user:e,session:r,loading:s,signUp:async(u,d,h)=>{const f=`${window.location.origin}/`,{error:y}=await ke.auth.signUp({email:u,password:d,options:{emailRedirectTo:f,data:{display_name:h}}});return{error:y}},signIn:async(u,d)=>{const{error:h}=await ke.auth.signInWithPassword({email:u,password:d});return{error:h}},signOut:async()=>{const{error:u}=await ke.auth.signOut();return{error:u}}}},kR="/assets/llama_logo-BVvLXa7W.png",Xm=[{href:"#about",label:"About"},{href:"#impact",label:"Impact"},{href:"#speakers",label:"Speakers"},{href:"#sponsors",label:"Partners"},{href:"#community",label:"Community"}],Hw=()=>{const{user:e,signOut:t}=cs(),r=En(),[n,s]=p.useState(!1),i=()=>{e?window.open("https://www.linkedin.com/company/llamalabsai","_blank"):r("/auth")},o=()=>{e?t():i()},a=()=>{s(!1)};return c.jsxs("nav",{className:"fixed top-0 w-full bg-background/80 backdrop-blur-lg border-b border-border z-50",children:[c.jsx("div",{className:"container mx-auto px-6 py-3",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("a",{href:"#",className:"flex items-center gap-2",children:[c.jsx("img",{src:kR,alt:"LLamalabs logo",className:"h-9 w-9"}),c.jsx("span",{className:"text-2xl font-bold bg-text-gradient bg-clip-text text-transparent",children:"LLamalabs"})]}),c.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[Xm.map(l=>c.jsx("a",{href:l.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.label},l.href)),c.jsx(le,{variant:"default",className:"bg-hero-gradient hover:opacity-90 transition-opacity",onClick:o,children:e?"Sign Out":"Join Us"})]}),c.jsx("button",{className:"md:hidden p-2 text-foreground",onClick:()=>s(!n),"aria-label":"Toggle menu",children:n?c.jsx(ic,{className:"h-6 w-6"}):c.jsx(xE,{className:"h-6 w-6"})})]})}),n&&c.jsx("div",{className:"md:hidden bg-background/95 backdrop-blur-lg border-t border-border",children:c.jsxs("div",{className:"container mx-auto px-6 py-4 flex flex-col space-y-4",children:[Xm.map(l=>c.jsx("a",{href:l.href,className:"text-muted-foreground hover:text-foreground transition-colors text-lg py-1",onClick:a,children:l.label},l.href)),c.jsx(le,{variant:"default",className:"bg-hero-gradient hover:opacity-90 transition-opacity w-full",onClick:()=>{o(),s(!1)},children:e?"Sign Out":"Join Us"})]})})]})},CR="/assets/hero-image-8oKUQNvv.jpg";var fu="focusScope.autoFocusOnMount",pu="focusScope.autoFocusOnUnmount",Zm={bubbles:!1,cancelable:!0},TR="FocusScope",df=p.forwardRef((e,t)=>
vendor: 5,003 bytes, line 251
251{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=p.useState(null),u=gt(s),d=gt(i),h=p.useRef(null),f=pe(t,m=>l(m)),y=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let m=function(w){if(y.paused||!a)return;const S=w.target;a.contains(S)?h.current=S:Br(h.current,{select:!0})},b=function(w){if(y.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Br(h.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const _ of w)_.removedNodes.length>0&&Br(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),g.disconnect()}}},[n,a,y.paused]),p.useEffect(()=>{if(a){tg.add(y);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(fu,Zm);a.addEventListener(fu,u),a.dispatchEvent(v),v.defaultPrevented||(jR(OR(Vw(a)),{select:!0}),document.activeElement===m&&Br(a))}return()=>{a.removeEventListener(fu,u),setTimeout(()=>{const v=new CustomEvent(pu,Zm);a.addEventListener(pu,d),a.dispatchEvent(v),v.defaultPrevented||Br(m??document.body,{select:!0}),a.removeEventListener(pu,d),tg.remove(y)},0)}}},[a,u,d,y]);const x=p.useCallback(m=>{if(!r&&!n||y.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(b&&v){const g=m.currentTarget,[w,S]=NR(g);w&&S?!m.shiftKey&&v===S?(m.preventDefault(),r&&Br(w,{select:!0})):m.shiftKey&&v===w&&(m.preventDefault(),r&&Br(S,{select:!0})):v===g&&m.preventDefault()}},[r,n,y.paused]);return c.jsx(Z.div,{tabIndex:-1,...o,ref:f,onKeyDown:x})});df.displayName=TR;function jR(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Br(n,{select:t}),document.activeElement!==r)return}function NR(e){const t=Vw(e),r=eg(t,e),n=eg(t.reverse(),e);return[r,n]}function Vw(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 eg(e,t){for(const r of e)if(!PR(r,{upTo:t}))return r}function PR(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function RR(e){return e instanceof HTMLInputElement&&"select"in e}function Br(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&RR(e)&&t&&e.select()}}var tg=AR();function AR(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=rg(e,t),e.unshift(t)},remove(t){var r;e=rg(e,t),(r=e[0])==null||r.resume()}}}function rg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function OR(e){return e.filter(t=>t.tagName!=="A")}var mu=0;function Ww(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ng()),document.body.insertAdjacentElement("beforeend",e[1]??ng()),mu++,()=>{mu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),mu--}},[])}function ng(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ur=function(){return ur=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ur.apply(this,arguments)};function qw(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 IR(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var el="right-scroll-bar-position",tl="width-before-scroll-bar",LR="with-scroll-bars-hidden",DR="--removed-body-scroll-bar-size";function gu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function MR(e,t){var r=p.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var $R=typeof window<"u"?p.useLayoutEffect:p.useEffect,sg=new WeakMap;function FR(e,t){var r=MR(null,function(n){return e.forEach(function(s){return gu(s,n)})});return $R(function(){var n=sg.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;
vendor: 4,155 bytes, lines 251-266
251s.forEach(function(a){i.has(a)||gu(a,null)}),i.forEach(function(a){s.has(a)||gu(a,o)})}sg.set(r,e)},[e]),r}function UR(e){return e}function BR(e,t){t===void 0&&(t=UR);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return s}function zR(e){e===void 0&&(e={});var t=BR(null);return t.options=ur({async:!0,ssr:!1},e),t}var Kw=function(e){var t=e.sideCar,r=qw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,ur({},r))};Kw.isSideCarExport=!0;function HR(e,t){return e.useMedium(t),Kw}var Gw=zR(),vu=function(){},wc=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:vu,onWheelCapture:vu,onTouchMoveCapture:vu}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,y=e.noIsolation,x=e.inert,m=e.allowPinchZoom,b=e.as,v=b===void 0?"div":b,g=e.gapMode,w=qw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,_=FR([r,t]),k=ur(ur({},w),s);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:Gw,removeScrollBar:u,shards:h,noIsolation:y,inert:x,setCallbacks:i,allowPinchZoom:!!m,lockRef:r,gapMode:g}),o?p.cloneElement(p.Children.only(a),ur(ur({},k),{ref:_})):p.createElement(v,ur({},k,{className:l,ref:_}),a))});wc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wc.classNames={fullWidth:tl,zeroRight:el};var VR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=VR();return t&&e.setAttribute("nonce",t),e}function qR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function KR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=WR())&&(qR(t,r),KR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},JR=function(){var e=GR();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Jw=function(){var e=JR(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},QR={left:0,top:0,right:0,gap:0},yu=function(e){return parseInt(e||"",10)||0},YR=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[yu(r),yu(n),yu(s)]},XR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return QR;var t=YR(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ZR=Jw(),Js="data-scroll-locked",eA=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),`
252  .`.concat(LR,` {
253   overflow: hidden `).concat(n,`;
254   padding-right: `).concat(a,"px ").concat(n,`;
255  }
256  body[`).concat(Js,`] {
257    overflow: hidden `).concat(n,`;
258    overscroll-behavior: contain;
259    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
260    padding-left: `.concat(s,`px;
261    padding-top: `).concat(i,`px;
262    padding-right: `).concat(o,`px;
263    margin-left:0;
264    margin-top:0;
265    margin-right: `).concat(a,"px ").concat(n,`;
266    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
266")].filter(Boolean).join(""),`
267  }
268  
269  .`).concat(el,` {
270    right: `).concat(a,"px ").concat(n,`;
271  }
272  
273  .`).concat(tl,` {
274    margin-right: `).concat(a,"px ").concat(n,`;
275  }
276  
277  .`).concat(el," .").concat(el,` {
278    right: 0 `).concat(n,`;
279  }
280  
281  .`).concat(tl," .").concat(tl,` {
282    margin-right: 0 `).concat(n,`;
283  }
284  
285  body[`).concat(Js,`] {
286    `).concat(DR,": ").concat(a,`px;
287  }
288`)},ig=function(){var e=parseInt(document.body.getAttribute(Js)||"0",10);return isFinite(e)?e:0},tA=function(){p.useEffect(function(){return document.body.setAttribute(Js,(ig()+1).toString()),function(){var e=ig()-1;e<=0?document.body.removeAttribute(Js):document.body.setAttribute(Js,e.toString())}},[])},rA=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;tA();var i=p.useMemo(function(){return XR(s)},[s]);return p.createElement(ZR,{styles:eA(i,!t,s,r?"":"!important")})},zd=!1;if(typeof window<"u")try{var Ia=Object.defineProperty({},"passive",{get:function(){return zd=!0,!0}});window.addEventListener("test",Ia,Ia),window.removeEventListener("test",Ia,Ia)}catch{zd=!1}var xs=zd?{passive:!1}:!1,nA=function(e){return e.tagName==="TEXTAREA"},Qw=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!nA(e)&&r[t]==="visible")},sA=function(e){return Qw(e,"overflowY")},iA=function(e){return Qw(e,"overflowX")},og=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Yw(e,n);if(s){var i=Xw(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},oA=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},aA=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Yw=function(e,t){return e==="v"?sA(t):iA(t)},Xw=function(e,t){return e==="v"?oA(t):aA(t)},lA=function(e,t){return e==="h"&&t==="rtl"?-1:1},cA=function(e,t,r,n,s){var i=lA(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,d=o>0,h=0,f=0;do{var y=Xw(e,a),x=y[0],m=y[1],b=y[2],v=m-b-i*x;(x||v)&&Yw(e,a)&&(h+=v,f+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},La=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ag=function(e){return[e.deltaX,e.deltaY]},lg=function(e){return e&&"current"in e?e.current:e},uA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dA=function(e){return`
289  .block-interactivity-`.concat(e,` {pointer-events: none;}
290  .allow-interactivity-`).concat(e,` {pointer-events: all;}
291`)},hA=0,bs=[];function fA(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(hA++)[0],i=p.useState(Jw)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=IR([e.lockRef.current],(e.shards||[]).map(lg),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=La(m),g=r.current,w="deltaX"in m?m.deltaX:g[0]-v[0],S="deltaY"in m?m.deltaY:g[1]-v[1],_,k=m.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&k.type==="range")return!1;var j=og(C,k);if(!j)return!0;if(j?_=C:(_=C==="v"?"h":"v",j=og(C,k)),!j)return!1;if(!n.current&&"changedTouches"in m&&(w||S)&&(n.current=_),!_)return!0;var A=n.current||_;return cA(A,b,m,A==="h"?w:S,!0)},[]),l=p.useCallback(function(m){var b=m;if(!(!bs.length||bs[bs.length-1]!==i)){var v="deltaY"in b?ag(b):La(b),g=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&uA(_.delta,v)}
vendor: 8,952 bytes, lines 291-295
291)[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var w=(o.current.shards||[]).map(lg).filter(Boolean).filter(function(_){return _.contains(b.target)}),S=w.length>0?a(b,w[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(m,b,v,g){var w={name:m,delta:b,target:v,should:g,shadowParent:pA(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=p.useCallback(function(m){r.current=La(m),n.current=void 0},[]),h=p.useCallback(function(m){u(m.type,ag(m),m.target,a(m,e.lockRef.current))},[]),f=p.useCallback(function(m){u(m.type,La(m),m.target,a(m,e.lockRef.current))},[]);p.useEffect(function(){return bs.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",l,xs),document.addEventListener("touchmove",l,xs),document.addEventListener("touchstart",d,xs),function(){bs=bs.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,xs),document.removeEventListener("touchmove",l,xs),document.removeEventListener("touchstart",d,xs)}},[]);var y=e.removeScrollBar,x=e.inert;return p.createElement(p.Fragment,null,x?p.createElement(i,{styles:dA(s)}):null,y?p.createElement(rA,{gapMode:e.gapMode}):null)}function pA(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mA=HR(Gw,fA);var hf=p.forwardRef(function(e,t){return p.createElement(wc,ur({},e,{ref:t,sideCar:mA}))});hf.classNames=wc.classNames;var gA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ss=new WeakMap,Da=new WeakMap,Ma={},wu=0,Zw=function(e){return e&&(e.host||Zw(e.parentNode))},vA=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Zw(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},yA=function(e,t,r,n){var s=vA(t,Array.isArray(e)?e:[e]);Ma[r]||(Ma[r]=new WeakMap);var i=Ma[r],o=[],a=new Set,l=new Set(s),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(f){if(a.has(f))d(f);else try{var y=f.getAttribute(n),x=y!==null&&y!=="false",m=(Ss.get(f)||0)+1,b=(i.get(f)||0)+1;Ss.set(f,m),i.set(f,b),o.push(f),m===1&&x&&Da.set(f,!0),b===1&&f.setAttribute(r,"true"),x||f.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return d(t),a.clear(),wu++,function(){o.forEach(function(h){var f=Ss.get(h)-1,y=i.get(h)-1;Ss.set(h,f),i.set(h,y),f||(Da.has(h)||h.removeAttribute(n),Da.delete(h)),y||h.removeAttribute(r)}),wu--,wu||(Ss=new WeakMap,Ss=new WeakMap,Da=new WeakMap,Ma={})}},ex=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=gA(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),yA(n,s,r,"aria-hidden")):function(){return null}},ff="Dialog",[tx,kO]=yi(ff),[wA,Xt]=tx(ff),rx=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=p.useRef(null),l=p.useRef(null),[u=!1,d]=Xn({prop:n,defaultProp:s,onChange:i});return c.jsx(wA,{scope:t,triggerRef:a,contentRef:l,contentId:fn(),titleId:fn(),descriptionId:fn(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),modal:o,children:r})};rx.displayName=ff;var nx="DialogTrigger",sx=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(nx,r),i=pe(t,s.triggerRef);return c.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":gf(s.open),...n,ref:i,onClick:G(e.onClick,s.onOpenToggle)})});sx.displayName=nx;var pf="DialogPortal",[xA,ix]=tx(pf,{forceMount:void 0}),ox=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=Xt(pf,t);return c.jsx(xA,{scope:t,forceMount:r,children:p.Children.map(n,o=>c.jsx(as,{present:r||i.open,children:c.jsx(tc,{asChild:!0,container:s,children:o})}))})};ox.displayName=pf;var Ml="DialogOverlay",ax=p.forwardRef((e,t)=>{const r=ix(Ml,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Xt(Ml,e.__scopeDialog);return i.modal?c.jsx(as,{present:n||i.open,children:c.jsx(bA,{...s,ref:t})}):null});ax.displayName=Ml;var bA=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(Ml,r);return c.jsx(hf,{as:Yn,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Z.div,{"data-state":gf(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),es="DialogContent",lx=p.forwardRef((e,t)=>{const r=ix(es,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Xt(es,e.__scopeDialog);return c.jsx(as,{present:n||i.open,children:i.modal?c.jsx(SA,{...s,ref:t}):c.jsx(_A,{...s,ref:t})})});lx.displayName=es;var SA=p.forwardRef((e,t)=>{const r=Xt(es,e.__scopeDialog),n=p.useRef(null),s=pe(t,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return ex(i)},[]),c.jsx(cx,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:G(e.onFocusOutside,i=>i.preventDefault())})}),_A=p.forwardRef((e,t)=>{const r=Xt(es,e.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return c.jsx(cx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),cx=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Xt(es,r),l=p.useRef(null),u=pe(t,l);return Ww(),c.jsxs(c.Fragment,{children:[c.jsx(df,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(Ko,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":gf(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(EA,{titleId:a.titleId}),c.jsx(CA,{contentRef:l,descriptionId:a.descriptionId})]})]})}),mf="DialogTitle",ux=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(mf,r);return c.jsx(Z.h2,{id:s.titleId,...n,ref:t})});ux.displayName=mf;var dx="DialogDescription",hx=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(dx,r);return c.jsx(Z.p,{id:s.descriptionId,...n,ref:t})});hx.displayName=dx;var fx="DialogClose",px=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(fx,r);return c.jsx(Z.button,{type:"button",...n,ref:t,onClick:G(e.onClick,()=>s.onOpenChange(!1))})});px.displayName=fx;function gf(e){return e?"open":"closed"}var mx="DialogTitleWarning",[CO,gx]=T_(mx,{contentName:es,titleName:mf,docsSlug:"dialog"}),EA=({titleId:e})=>{const t=gx(mx),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
292
293If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
294
295For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},kA="DialogDescriptionWarning",CA=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gx(kA).contentName}}.`;return p.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},TA=rx,jA=sx,NA=ox,vx=ax,yx=lx,wx=ux,xx=hx,PA=px;const Oo=TA,cg=jA,RA=NA,bx=p.forwardRef(({className:e,...t},r)=>c.jsx(vx,{ref:r,className:Q("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bx.displayName=vx.displayName;const pi=p.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(RA,{children:[c.jsx(bx,{}),c.jsxs(yx,{ref:n,className:Q("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
295nded-lg",e),...r,children:[t,c.jsxs(PA,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(ic,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pi.displayName=yx.displayName;const Io=({className:e,...t})=>c.jsx("div",{className:Q("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Io.displayName="DialogHeader";const Lo=p.forwardRef(({className:e,...t},r)=>c.jsx(wx,{ref:r,className:Q("text-lg font-semibold leading-none tracking-tight",e),...t}));Lo.displayName=wx.displayName;const vf=p.forwardRef(({className:e,...t},r)=>c.jsx(xx,{ref:r,className:Q("text-sm text-muted-foreground",e),...t}));vf.displayName=xx.displayName;const he=p.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:Q("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}));he.displayName="Input";const Do=p.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:Q("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
295ing-offset-background 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",e),ref:r,...t}));Do.displayName="Textarea";const AA=()=>{const{user:e}=cs(),t=En(),{toast:r}=_n(),[n,s]=p.useState(!1),[i,o]=p.useState(""),[a,l]=p.useState(""),[u,d]=p.useState(""),[h,f]=p.useState(""),[y,x]=p.useState(!1),m=()=>{e?window.open("https://www.linkedin.com/company/llamalabsai","_blank"):t("/auth")},b=()=>{o(""),l(""),d(""),f("")},v=async g=>{if(g.preventDefault(),!(!i.trim()||!a.trim())){x(!0);try{const{error:w}=await ke.from("sponsor_leads").insert({name:i.trim(),email:a.trim(),company:u.trim()||null,message:h.trim()||null});if(w)throw w;r({title:"Inquiry Submitted!",description:"We'll be in touch soon."}),b(),s(!1)}catch{r({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}finally{x(!1)}}};return c.jsxs("section",{className:"relative min-h-screen flex items-center justify-center overflow-hidden",style:{background:"linear-gradient(160deg, hsl(220 20% 4%) 0%, hsl(220 18% 8%) 40%, hsl(85 40% 10%) 70%, hsl(72 50% 8%) 100%)"},children:[c.jsxs("div",{className:"absolute inset-0 z-0",children:[c.jsx("img",{src:CR,alt:"AI Thought Leadership",className:"w-full h-full object-cover opacity-10"}),c.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(ellipse at 70% 50%, hsl(72 100% 50% / 0.08) 0%, transparent 60%)"}})]}),c.jsx("div",{className:"container mx-auto px-6 py-32 relative z-10",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsxs("h1",{className:"text-5xl md:text-7xl font-bold mb-6 text-foreground animate-fade-in",children:["Leading AI Thought Leadership in"," ",c.jsx("span",{className:"bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(135deg, hsl(72 100% 50%), hsl(90 80% 60%))"},children:"Silicon Valley"})]}),c.jsx("p",{className:"text-xl md:text-2xl text-white/90 mb-8 animate-fade-in max-w-3xl mx-auto",children:"LLamalabs brings together the brightest minds in AI to shape the future through thought leadership panels, exclusive meetups, and cutting-edge content."}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center animate-fade-in",children:[c.jsx(le,{size:"lg",className:"bg-white/20 backdrop-blur-sm text-white border border-white/30 hover:bg-white/30 transition-all duration-300 shadow-elegant",onClick:m,children:"Join Our Community"}),c.jsx(le,{size:"lg",variant:"outline",className:"bg-transparent text-white border-white/50 hover:bg-white/10 transition-all duration-300",onClick:()=>{var g;return(g=document.getElementById("sponsors"))==null?void 0:g.scrollIntoView({behavior:"smooth"})},children:"Partner With Us"})]})]})}),c.jsx("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-float",children:c.jsx("div",{className:"w-6 h-10 border-2 border-white/50 rounded-full flex justify-center",children:c.jsx("div",{className:"w-1 h-3 bg-white/70 rounded-full mt-2 animate-pulse"})})}),c.jsx(Oo,{open:n,onOpenChange:s,children:c.jsxs(pi,{className:"sm:max-w-md",children:[c.jsxs(Io,{children:[c.jsx(Lo,{children:"Become a Sponsor"}),c.jsx(vf,{children:"Fill out the form below and our team will get in touch with sponsorship details."})]}),c.jsxs("form",{onSubmit:v,className:"space-y-4",children:[c.jsx(he,{placeholder:"Your Name *",value:i,onChange:g=>o(g.target.value),required:!0,maxLength:100}),c.jsx(he,{type:"email",placeholder:"Email Address *",value:a,onChange:g=>l(g.target.value),required:!0,maxLength:255}),c.jsx(he,{placeholder:"Company",value:u,onChange:g=>d(g.target.value),maxLength:100}),c.jsx(Do,{placeholder:"Tell us about your sponsorship interests...",value:h,onChange:g=>f(g.target.value),maxLength:1e3,rows:3}),c.jsx(le,{type:"submit",className:"w-full bg-hero-gradient hover:opacity-90 text-primary-foreground",disabled:y,children:y?"Submitting...":"Submit Inquiry"})]})]})})]})},OA=()=>c.jsx("section",{id:"about",className:"py-24 bg-background",children:c.jsx("div",{className:"container mx-auto px-6",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-8 text-foreground",children:["Pioneering AI",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:" Thought Leadership"})]}),c.jsx("p",{className:"text-xl text-muted-foreground mb-12 leading-relaxed",children:"LLamalabs is Silicon Valley's premier AI thought leadership community, connecting industry pioneers, researchers, and innovators who are shaping the future of artificial intelligence."}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[c.jsxs("div",{className:"bg-card-gradient p-8 rounded-2xl shadow-card hover:shadow-elegant transition-all duration-300 animate-fade-in",children:[c.jsx("div",{className:"w-16 h-16 bg-hero-gradient rounded-2xl flex items-center justify-center mb-6 mx-auto",children:c.jsx("svg",{className:"w-8 h-8 text-white",f
295ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),c.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:"Innovation Focus"}),c.jsx("p",{className:"text-muted-foreground",children:"Driving cutting-edge discussions on AI breakthroughs, ethical considerations, and future technological landscapes."})]}),c.jsxs("div",{className:"bg-card-gradient p-8 rounded-2xl shadow-card hover:shadow-elegant transition-all duration-300 animate-fade-in",children:[c.jsx("div",{className:"w-16 h-16 bg-hero-gradient rounded-2xl flex items-center justify-center mb-6 mx-auto",children:c.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})})}),c.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:"Community Driven"}),c.jsx("p",{className:"text-muted-foreground",children:"Building meaningful connections between AI leaders, fostering collaboration and knowledge sharing across the ecosystem."})]}),c.jsxs("div",{className:"bg-card-gradient p-8 rounded-2xl shadow-card hover:shadow-elegant transition-all duration-300 animate-fade-in",children:[c.jsx("div",{className:"w-16 h-16 bg-hero-gradient rounded-2xl flex items-center justify-center mb-6 mx-auto",children:c.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}),c.jsx("h3",{className:"text-2xl font-semibold mb-4 text-foreground",children:"Thought Leadership"}),c.jsx("p",{className:"text-muted-foreground",children:"Creating platforms for industry experts to share insights, trends, and strategic visions for AI's transformative potential."})]})]})]})})}),IA="/assets/tiecon-networking-CNh14rs1.png",LA="/assets/llms-panel-DbsLKPoC.png",DA="/assets/ai-trailblazers-panel-DgDqC-nI.png",MA="/assets/tiecon-audience-Mb8ihbz7.png",$A="/assets/tiecon2023-crowd-DRgJFB3y.jpg",ug="/assets/startup-genome-team-CMtX4aK9.jpg",FA="/assets/enterprise-deep-dive-VtWIL6x2.jpg",UA="/assets/vc-fireside-GU2O00tN.jpg",BA="/assets/gen-ai-meetup-Deot_B5F.jpg",zA="/assets/hackathon-group-CU043iVP.jpg",HA=[{src:DA,alt:"AI Trailblazers Panel at TiECon 2024",caption:"AI Trailblazers Panel — TiECon 2024"},{src:LA,alt:"LLMs in the Enterprise Panel",caption:"LLMs in the Enterprise — Who is Responsible?"},{src:MA,alt:"TiECon 2024 Audience",caption:"Packed House at TiECon 2024"},{src:IA,alt:"Networking at TiECon",caption:"Networking with AI Leaders"},{src:FA,alt:"Enterprise Deep Dive with AWS & Palo Alto Networks",caption:"Enterprise Deep Dive — AWS & Palo Alto Networks"},{src:UA,alt:"VC Fireside Chat at Mayfield Fund",caption:"VC Fireside — Mayfield Fund"},{src:$A,alt:"TiECon 2023 Audience",caption:"Gen AI Track — TiECon 2023"},{src:BA,alt:"Gen AI Meetup at SVB Palo Alto",caption:"Gen AI Meetup — Silicon Valley"},{src:zA,alt:"Hackathon in San Francisco",caption:"AI Hackathon — San Francisco"}],VA=()=>{const[e,t]=p.useState(null);return c.jsxs("section",{id:"conversations",className:"py-24 bg-background",children:[c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["THE CONVERSATIONS"," ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"THAT MATTER"})]}),c.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"From enterprise AI deep dives to VC firesides and hackathons — a glimpse into the conversations shaping the future of AI in Silicon Valley."})]}),c.jsx("div",{className:"max-w-6xl mx-auto mb-8 cursor-pointer group",onClick:()=>t({src:ug,alt:"Packed keynote audience at LLamaLabs event",caption:"Keynote Session — Packed House"}),children:c.jsxs("div",{className:"relative overflow-hidden rounded-2xl shadow-elegant",children:[c.jsx("img",{src:ug,alt:"Packed keynote audience at LLamaLabs event",className:"w-full object-cover max-h-[400px] group-hover:scale-105 transition-transform duration-500"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-trans
295parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end",children:c.jsx("p",{className:"text-white text-sm font-medium p-4",children:"Keynote Session — Packed House"})})]})}),c.jsx("div",{className:"columns-1 sm:columns-2 lg:columns-3 gap-4 max-w-6xl mx-auto",children:HA.map((r,n)=>c.jsx("div",{className:"break-inside-avoid mb-4 group cursor-pointer",onClick:()=>t(r),children:c.jsxs("div",{className:"relative overflow-hidden rounded-2xl shadow-card hover:shadow-elegant transition-all duration-500",children:[c.jsx("img",{src:r.src,alt:r.alt,className:"w-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end",children:c.jsx("p",{className:"text-white text-sm font-medium p-4",children:r.caption})})]})},n))})]}),c.jsx(Oo,{open:!!e,onOpenChange:()=>t(null),children:c.jsx(pi,{className:"max-w-4xl p-2 bg-card border-border",children:e&&c.jsxs("div",{children:[c.jsx("img",{src:e.src,alt:e.alt,className:"w-full rounded-lg object-contain max-h-[80vh]"}),c.jsx("p",{className:"text-center text-sm text-muted-foreground mt-3 pb-2",children:e.caption})]})})})]})},WA=[{value:"500+",label:"Community Members"},{value:"10K+",label:"Outreach"},{value:"20+",label:"Events Hosted"},{value:"50+",label:"Expert Speakers"},{value:"3yr+",label:"Track Record"}],qA=()=>c.jsx("section",{id:"impact",className:"py-24 bg-primary text-primary-foreground",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsx("div",{className:"text-center mb-16",children:c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6",children:["THE NUMBERS"," ",c.jsx("span",{className:"opacity-40",children:"SPEAK"})]})}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-px bg-primary-foreground/10",children:WA.map(e=>c.jsxs("div",{className:"bg-primary p-8 text-center",children:[c.jsx("div",{className:"text-5xl md:text-6xl font-bold leading-none mb-2",children:e.value}),c.jsx("div",{className:"text-xs uppercase tracking-widest opacity-60",children:e.label})]},e.label))})]})}),KA=[{name:"Ali Arsanjani",role:"Director, Applied AI",org:"Google Cloud",initials:"AA",photo:"https://aiconference.com/wp-content/uploads/2025/04/Dr.-Ali-Arsanjani.jpg"},{name:"Rama Akkiraju",role:"VP, AI/ML",org:"NVIDIA",initials:"RA",photo:"https://research.nvidia.com/sites/default/files/person/rama-akkiraju-catalog-200x200.jpg"},{name:"Sy Choudhury",role:"Director, AI Partnerships",org:"Meta",initials:"SC",photo:"https://epces26reintsfprdwestus.blob.core.windows.net/images/8b17a952-5821-409d-b56c-3a159f955767/DN2JTOJ7X9LVYW17CD09KT0AN.jpg"},{name:"Kavitha Prasad",role:"VP & GM, Datacenter AI",org:"AWS",initials:"KP",photo:"https://assets.swoogo.com/uploads/medium/1641823-622a5c49b69eb.png"},{name:"Patrick Salyer",role:"Partner",org:"Mayfield Fund",initials:"PS",photo:"https://www.mayfield.com/wp-content/uploads/2024/07/Patrick-Headshot.png"},{name:"Manu Sharma",role:"Co-Founder & CEO",org:"Labelbox",initials:"MS",photo:"https://images.ctfassets.net/j20krz61k3rk/6iUHKMDh1rF5eeaYVjFoGx/b2a9e0b05eb6c69d1b71e1b6d5b5d8de/manu-sharma-labelbox.jpg"},{name:"Rohan Sathe",role:"Co-Founder & CEO",org:"Nightfall AI",initials:"RS",photo:"https://cdn.prod.website-files.com/636a8097561787193a27789e/67e7c71f536b1d6220921286_nf-rohan-sathe.png"},{name:"Ping Wu",role:"CEO",org:"Cresta.AI",initials:"PW",photo:"https://www.agentconference.com/images/s_PingWu.jpg"},{name:"Siddhanth Trivedi",role:"Partner",org:"Foundation Capital",initials:"ST",photo:"https://framerusercontent.com/images/rUy8JgvuWTTvvDaIYXHznhkHl0.jpg"},{name:"Amit Singh",role:"Chief Business Officer",org:"Palo Alto Networks",initials:"AS",photo:"https://www.paloaltonetworks.com/content/dam/pan/en_US/images/company/leadership/amit-singh.jpg"},{name:"Vijay Reddy",role:"Partner, AI Start Fund",org:"Mayfield Fund",initials:"VR",photo:"https://www.mayfield.com/w
295p-content/uploads/2024/07/MAY-WebsiteRefresh-Banners-Bio-Hero-Vijay-Reddy.webp"},{name:"Ashish Kakran",role:"Partner",org:"Sierra Ventures",initials:"AK",photo:"https://scet.berkeley.edu/wp-content/uploads/ashish-kakran-1.jpg"}],GA=["Shomit Ghose · ClearVision Ventures","Deepam Misra · AWS","Jeremiah Owyang · Catalyst Companies","Alex Bates · Zero Systems","Krishnaram Kenthapadi · Fiddler AI","Ganesh Bali · Insight Partners","Ravnaj Jain · Lightspeed","Sandhya Hegde · Unusual Ventures","Shalou Durg · Microsoft","Shruti Gandhi · Array VC","Sonal Panda · Tau Ventures","Will Uppington · True Era","Nikunj Bajaj · TrueFoundry","Girish Muckai · RockFish Data","Niken Patel · Neuron7.ai","Roger Rappoport · Access SV / Procopio"],JA=()=>c.jsx("section",{id:"speakers",className:"py-24 bg-background",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("p",{className:"text-sm uppercase tracking-widest text-primary mb-4",children:"Past Speakers"}),c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["VOICES FROM THE"," ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"FRONTIER"})]}),c.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"LLamaLabs has convened leaders from the world's most influential AI organizations."})]}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-6 max-w-6xl mx-auto mb-12",children:KA.map(e=>c.jsxs("div",{className:"flex flex-col items-center text-center group",children:[c.jsx("div",{className:"w-20 h-20 rounded-full overflow-hidden mb-3 border-2 border-border group-hover:border-primary transition-colors duration-300 bg-muted",children:c.jsx("img",{src:e.photo,alt:e.name,className:"w-full h-full object-cover",onError:t=>{const r=t.target;r.style.display="none",r.parentElement.innerHTML=`<div class="w-full h-full flex items-center justify-center bg-primary/20 text-primary font-bold text-lg">${e.initials}</div>`}})}),c.jsx("h4",{className:"text-sm font-semibold text-foreground leading-tight",children:e.name}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.role}),c.jsx("span",{className:"text-xs text-primary font-medium mt-1",children:e.org})]},e.name))}),c.jsxs("div",{className:"max-w-5xl mx-auto",children:[c.jsx("p",{className:"text-sm text-muted-foreground text-center mb-4 uppercase tracking-wider",children:"Also Featured at TIECON 2023 & Other Events"}),c.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:GA.map(e=>c.jsx("span",{className:"px-3 py-1.5 text-xs rounded-full bg-muted text-muted-foreground border border-border",children:e},e))})]})]})}),QA=[{text:"The AI Trailblazers track at TIECON 2024 was a phenomenal success — immensely grateful to Matt for his outstanding leadership and for hosting the Llama3 Workshop.",initials:"TS",name:"TiE Silicon Valley",role:"TIECON 2024 Official Post"},{text:"Matt's ability to curate conversations that move the needle on AI in the enterprise is unmatched — every LLamaLabs event sets a new standard for signal-to-noise ratio.",initials:"SV",name:"Silicon Valley Leader",role:"LLamaLabs Community Member"}],YA=()=>c.jsx("section",{id:"testimonials",className:"py-24 bg-section-gradient",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("p",{className:"text-sm uppercase tracking-widest text-primary mb-4",children:"Community Voices"}),c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["WHAT LEADERS"," ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"SAY"})]}),c.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"LLamaLabs events consistently deliver the substantive AI conversations Silicon Valley relies on."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-4xl mx-auto",children:QA.map(e=>c.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-card hover:shadow-elegant transition-all duration-300",children:[c.jsx(bE,{className:"w-8 h-8 text-primary/40 mb-4"}),c.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:e.text}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/20 text-primary font-bold text-sm flex items-center justify-center",children:e.initials}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-semibold text-foreground",children:e.name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:e.role})]})]})]},e.name))})]})}),XA=[{name:"TiE Silicon Valley",type:"Entrepreneur Network",description:"The world's largest network of entrepreneurs, investors, and professionals. LLamaLabs is the official Gen AI community under TiE SV's umbrella.",link:"https://sv.tie.org",linkLabel:"sv.tie.org",logo:"https://sv.tie.org/wp-content/uploads/2020/07/TiE-Logo.png",fallback:"TiE"}
295,{name:"AIify.io",type:"AI Community · Steven Echtman",description:"A forward-thinking AI community led by Steven Echtman, making AI accessible and actionable for practitioners and business leaders.",link:"https://aiify.io",linkLabel:"aiify.io",fallback:"AIify"},{name:"Mayfield Fund",type:"Venture Capital Partner",description:"One of Silicon Valley's storied early-stage VC firms. Mayfield co-hosted our Fireside Unleashed series and manages the $250M AI Start Seed Fund.",link:"https://mayfield.com",linkLabel:"mayfield.com",logo:"https://www.mayfield.com/wp-content/uploads/2024/06/mayfield-dark-logo.png",fallback:"MF"},{name:"SV Gen AI Community",type:"Meetup Group · Silicon Valley",description:"The official Silicon Valley Gen AI Community group on Meetup — join thousands of AI enthusiasts, founders, and practitioners at our Bay Area events.",link:"https://www.meetup.com/silicon-valley-gen-ai-community/",linkLabel:"Join on Meetup",fallback:"SV"},{name:"TechFest × RadioZindagi",type:"Media & Events Partner",description:"TechFest partners with RadioZindagi 1550 AM — Silicon Valley's South Asian radio voice — to amplify LLamaLabs events to a broader multicultural tech audience.",link:"https://luma.com/rztechfest",linkLabel:"TechFest",fallback:"📻"},{name:"Berkeley Haas",type:"Academic Partner",description:'Co-hosted "Skilling for the AI Generation" — a panel on what AI companies look for in skills, talent, and leadership in 2024 and beyond.',link:"https://haas.berkeley.edu",linkLabel:"haas.berkeley.edu",logo:"https://haas.berkeley.edu/wp-content/uploads/Haas_horizontal_no_pad.png",fallback:"Haas"}
295,{name:"Access Silicon Valley",type:"Startup Enablement",description:"Partnership with Roger Rappoport and Procopio to co-host enterprise AI events in Palo Alto, connecting global founders to Silicon Valley.",link:"#",linkLabel:"View Partnership",fallback:"ASV"},{name:"Nexus Venture Partners",type:"VC Partner",description:"Co-hosted the AI Startups Showcase on Sand Hill Road, bringing together pre-traction AI companies with enterprise buyers and investors.",link:"https://nexusvp.com",linkLabel:"nexusvp.com",logo:"https://nexusvp.com/wp-content/uploads/2022/10/nexus-logo-white.svg",fallback:"NX"}],ZA=()=>c.jsx("section",{id:"communities",className:"py-24 bg-section-gradient",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("p",{className:"text-sm uppercase tracking-widest text-primary mb-4",children:"Partner Communities"}),c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["THE"," ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"ECOSYSTEM"})]}),c.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"LLamaLabs collaborates with leading AI communities, networks, and organizations across Silicon Valley and beyond."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl mx-auto",children:XA.map(e=>c.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 shadow-card hover:shadow-elegant transition-all duration-300 flex flex-col",children:[c.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted border border-border flex items-center justify-center mb-4 overflow-hidden",children:e.logo?c.jsx("img",{src:e.logo,alt:e.name,className:"w-8 h-8 object-contain",onError:t=>{t.target.style.display="none",t.target.parentElement.innerHTML=`<span class="text-sm font-bold text-primary">${e.fallback}</span>`}}):c.jsx("span",{className:"text-sm font-bold text-primary",children:e.fallback})}),c.jsx("h4",{className:"text-sm font-semibold text-foreground mb-1",children:e.name}),c.jsx("p",{className:"text-xs text-primary mb-2",children:e.type}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed flex-1",children:e.description}),c.jsxs("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"mt-4 text-xs text-primary hover:underline flex items-center gap-1",children:[e.linkLabel," ",c.jsx(m0,{className:"w-3 h-3"})]})]},e.name))})]})}),e2=["Logo on all event materials","Social media mentions","Newsletter access","Event passes","Co-branded content & posts","Networking access","Attendee list"],t2=["Everything in Branding","Co-host a dedicated event","Custom content series","Full attendee data list","ICP introductions"],r2=["1:1 Fireside","Panel","Workshop"],n2=[{name:"Branding",featured:!1,perks:e2,cta:"Get in Touch"},{name:"Co-Host",featured:!0,perks:t2,cta:"Become a Co-Host"}],s2=()=>{const{toast:e}=_n(),[t,r]=p.useState(!1),[n,s]=p.useState(""),[i,o]=p.useState(""),[a,l]=p.useState(""),[u,d]=p.useState(""),[h,f]=p.useState(!1),y=()=>{s(""),o(""),l(""),d("")},x=async m=>{if(m.preventDefault(),!(!n.trim()||!i.trim())){f(!0);try{const{error:b}=await ke.from("sponsor_leads").insert({name:n.trim(),email:i.trim(),company:a.trim()||null,message:u.trim()||null});if(b)throw b;e({title:"Inquiry Submitted!",description:"We'll be in touch soon."}),y(),r(!1)}catch{e({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}finally{f(!1)}}};return c.jsxs("section",{id:"sponsors",className:"py-24 bg-section-gradient",children:[c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["PARTNER WITH"," ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"LLAMALABS"})]}),c.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Reach a curated audience of AI decision-makers, builders, and investors across Silicon Valley's most engaged Gen AI community."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mb-12 max-w-4xl mx-auto",children:n2.map(m=>c.jsxs("div",{className:`rounded-2xl p-8 transition-all duration-300 hover:shadow-elegant ${m.featured?"bg-card border-2 border-primary shadow-elegant":"bg-card border border-border shadow-card hover:border-primary"}`,children:[c.jsx("h3",{className:"text-3xl font-bold text-foreground mb-6",children:m.name}),c.jsx("ul",{className:"space-y-3 mb-8",children:m.perks.map(b=>c.jsxs("li",{className:"text-sm text-muted-foreground flex gap-3 items-start",children:[c.jsx(f0,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),b]},b))}),c.jsxs("div",{className:"mb-6",children:[c.jsx("p",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-2",children:"Formats"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:r2.map(b=>c.jsx("span",{className:"bg-primary/10 text-primary text-xs font-medium px-3 py-1 rounded-full",children:b},b))})]}),c.jsx(le,{className:`w-full ${m.featured?"bg-hero-gradient hover:opacity-90 text-primary-foreground":"bg-card border border-border text-foreground hover:border-primary hover:text-primary"}`,onClick:()=>r(!0),children:m.cta})]},m.name))})]}),c.jsx(Oo,{open:t,onOpenChange:r,children:c.jsxs(pi,{className:"sm:max-w-md",children:[c.jsxs(Io,{children:[c.jsx(Lo,{children:"Become a Sponsor"}),c.jsx(vf,{children:"Fill out the form below and our team will get in touch with sponsorship details."})]}),c.jsxs("form",{onSubmit:x,className:"space-y-4",children:[c.jsx(he,{placeholder:"Your Name *",value:n,onChange:m=>s(m.target.value),required:!0,maxLength:100}),c.jsx(he,{type:"email",placeholder:"Email Address *",value:i,onChange:m=>o(m.target.value),required:!0,maxLength:255}),c.jsx(he,{placeholder:"Company",value:a,onChange:m=>l(m.target.value),maxLength:100}),c.jsx(Do,{placeholder:"Tell us about your sponsorship interests...",value:u,onChange:m=>d(m.target.value),maxLength:1e3,rows:3}),c.jsx(le,{type:"submit",className:"w-full bg-hero-gradient hover:opacity-90 text-primary-foreground",disabled:h,children:h?"Submitting...":"Submit Inquiry"})]})]})})]})},i2=()=>{const{toast:e}=_n(),[t,r]=p.useState(""),[n,s]=p.useState(""),[i,o]=p.useState(!1),[a,l]=
295p.useState(!1),u=async d=>{if(d.preventDefault(),!(!t.trim()||!n.trim())){o(!0);try{const{error:h}=await ke.from("community_signups").insert({name:t.trim(),email:n.trim()});if(h)throw h;l(!0),e({title:"Welcome to LLamalabs!",description:"Your application has been received. We'll be in touch soon."})}catch(h){console.error("Signup error:",h),e({title:"Something went wrong",description:"Please try again later.",variant:"destructive"})}finally{o(!1)}}};return c.jsx("section",{id:"community",className:"py-24 bg-section-gradient",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground",children:["Join Our ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"Community"})]}),c.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Connect with Silicon Valley's most influential AI thought leaders, researchers, and innovators shaping the future of artificial intelligence."})]}),c.jsxs("div",{className:"bg-card rounded-3xl p-12 shadow-elegant text-center max-w-2xl mx-auto",children:[c.jsx("h3",{className:"text-3xl font-bold mb-6 text-foreground",children:"Ready to Shape the Future of AI?"}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-6 justify-center items-center mb-10",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"500+"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Community Members"})]}),c.jsx("div",{className:"hidden sm:block w-px h-16 bg-border"}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"50+"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Expert Speakers"})]}),c.jsx("div",{className:"hidden sm:block w-px h-16 bg-border"}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-3xl font-bold text-primary mb-2",children:"25+"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Events Hosted"})]})]}),a?c.jsxs("div",{className:"text-center py-4",children:[c.jsx("p",{className:"text-lg font-semibold text-primary",children:"🎉 Application Received!"}),c.jsx("p",{className:"text-muted-foreground mt-2",children:"We'll reach out to you shortly."})]}):c.jsxs("form",{onSubmit:u,className:"max-w-md mx-auto flex flex-col gap-4",children:[c.jsx(he,{placeholder:"Your name",value:t,onChange:d=>r(d.target.value),required:!0,maxLength:100}),c.jsx(he,{type:"email",placeholder:"Your email",value:n,onChange:d=>s(d.target.value),required:!0,maxLength:255}),c.jsx(le,{type:"submit",size:"lg",className:"bg-hero-gradient hover:opacity-90 text-white shadow-elegant transition-all duration-300",disabled:i,children:i?"Submitting...":"Apply to Join LLamalabs"})]})]})]})})},Sx=()=>c.jsx("footer",{className:"py-16",style:{background:"hsl(220 25% 3%)"},children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[c.jsxs("div",{className:"md:col-span-2",children:[c.jsx("h3",{className:"text-3xl font-bold mb-4 bg-text-gradient bg-clip-text text-transparent",children:"LLamalabs"}),c.jsx("p",{className:"text-white/80 mb-6 leading-relaxed max-w-md",children:"Silicon Valley's premier AI thought leadership community, connecting innovators and shaping the future of artificial intelligence."}),c.jsxs("div",{className:"flex space-x-4",children:[c.jsx("a",{href:"#",className:"w-10 h-10 bg-white/10 rounded-full flex items-center justify-center hover:bg-white/20 transition-colors",children:c.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{d:"M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"})})}),c.jsx("a",{href:"#",className:"w-10 h-10 bg-white/10 rounded-full flex items-center justify-center hover:bg-white/20 transition-colors",children:c.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}),c.jsx("a",{href:"#",className:"w-10 h-10 bg-white/10 rounded-full flex items-center justify-center hover:bg-white/20 transition-colors",children:c.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{d:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.174-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.747.099.12.112.225.085.347-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.402.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.357-.629-2.746-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24.009 12.017 24c6.624 0 11.99-5.367 11.99-11.987C24.007 5.367 18.641.001 12.017.001z"})})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-semibold mb-6",children:"Community"}),c.jsxs("ul",{className:"space-y-3 text-white/80",children:[c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Join Us"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Events"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Speakers"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Resources"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-semibold mb-6",children:"Contact"}),c.jsxs("ul",{className:"space-y-3 text-white/80",children:[c.jsx("li",{children:c.jsx("a",{href:"mailto:[email protected]",className:"hover:text-white transition-colors",children:"[email protected]"})}),c.jsx("li",{children:c.jsx("span",{children:"San Francisco, CA"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Press Kit"})}),c.jsx("li",{children:c.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Partnership Inquiries"})})]})]})]}),c.jsxs("div",{className:"border-t border-white/20 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center",children:[c.jsx("p",{className:"text-white/60 text-sm",children:"© 2024 LLamalabs. All rights reserved."}),c.jsxs("div",{className:"flex space-x-6 mt-4 md:mt-0",children:[c.jsx("a",{href:"#",className:"text-white/60 hover:text-white text-sm transition-colors",children:"Privacy Policy"}),c.jsx("a",{href:"#",className:"text-white/60 hover:text-white text-sm transition-colors",children:"Terms of Service"})]})]})]})}),dr=p.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:Q("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
295dr.displayName="Card";const rn=p.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:Q("flex flex-col space-y-1.5 p-6",e),...t}));rn.displayName="CardHeader";const nn=p.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:Q("text-2xl font-semibold leading-none tracking-tight",e),...t}));nn.displayName="CardTitle";const _x=p.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:Q("text-sm text-muted-foreground",e),...t}));_x.displayName="CardDescription";const hr=p.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:Q("p-6 pt-0",e),...t}));hr.displayName="CardContent";const o2=p.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:Q("flex items-center p-6 pt-0",e),...t}));o2.displayName="CardFooter";const a2=sc("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ex({className:e,variant:t,...r}){return c.jsx("div",{className:Q(a2({variant:t}),e),...r})}const l2=()=>{const{items:e,removeItem:t,clearCart:r,getTotalAmount:n,getTaxAmount:s,getFinalTotal:i}=Nd(),{user:o}=cs(),a=En(),{toast:l}=_n(),u=async()=>{if(!o){a("/auth");return}try{const{data:d,error:h}=await ke.functions.invoke("create-event-checkout",{body:{events:e.map(f=>({id:f.id,name:f.name,date:f.date,time:f.time,price:f.price})),subtotal:n(),tax:s(),total:i()}});if(h)throw h;d!=null&&d.url&&window.open(d.url,"_blank")}catch(d){console.error("Checkout error:",d),l({title:"Checkout Error",description:"Failed to initiate checkout. Please try again.",variant:"destructive"})}};return e.length===0?c.jsxs(dr,{className:"w-full max-w-md",children:[c.jsx(rn,{children:c.jsxs(nn,{className:"flex items-center space-x-2",children:[c.jsx(Gp,{className:"w-5 h-5"}),c.jsx("span",{children:"Cart"})]})}),c.jsx(hr,{children:c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Your cart is empty"})})]}):c.jsxs(dr,{className:"w-full max-w-md",children:[c.jsx(rn,{children:c.jsxs(nn,{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(Gp,{className:"w-5 h-5"}),c.jsxs("span",{children:["Cart (",e.length,")"]})]}),c.jsx(le,{variant:"outline",size:"sm",onClick:r,children:"Clear All"})]})}),c.jsxs(hr,{className:"space-y-4",children:[e.map(d=>c.jsxs("div",{className:"flex justify-between items-start p-3 border rounded-lg",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("h4",{className:"font-medium text-sm",children:d.name}),d.tagline&&c.jsx("p",{className:"text-xs text-muted-foreground",children:d.tagline}),c.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[c.jsx(h0,{className:"w-3 h-3"}),c.jsxs("span",{className:"text-xs",children:[d.date," at ",d.time]})]}),c.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[c.jsx(g0,{className:"w-3 h-3"}),c.jsx("span",{className:"text-xs",children:d.location})]}),c.jsx("div",{className:"mt-2",children:c.jsxs(Ex,{variant:"secondary",children:["$",d.price.toFixed(2)]})})]}),c.jsx(le,{variant:"ghost",size:"sm",onClick:()=>t(d.id),className:"text-red-500 hover:text-red-700",children:c.jsx(ic,{className:"w-4 h-4"})})]},d.id)),c.jsxs("div",{className:"border-t pt-4 space-y-2",children:[c.jsxs("div",{className:"flex justify-between text-sm",children:[c.jsx("span",{children:"Subtotal:"}),c.jsxs("span",{children:["$",n().toFixed(2)]})]}),c.jsxs("div",{className:"flex justify-between text-sm",children:[c.jsx("span",{children:"CA Tax (8.75%):"}),c.jsxs("span",{children:["$",s().toFixed(2)]})]}),c.jsxs("div",{className:"flex justify-between font-medium border-t pt-2",children:[c.jsx("span",{children:"Total:"}),c.jsxs("span",{children:["$",i().toFixed(2)]})]})]}),c.jsxs(le,{onClick:u,className:"w-full bg-primary hover:bg-primary/90",disabled:e.length===0,children:[c.jsx(mE,{className:"w-4 h-4 mr-2"}),o?"Proceed to Checkout":"Login to Checkout"]})]})]})},c2=()=>{const[e]=Ej(),{clearCart:t}=Nd(),{toast:r}=_n();p.useEffect(()=>
295{const s=e.get("checkout"),i=e.get("session_id");s==="success"&&i?(ke.functions.invoke("send-receipt",{body:{sessionId:i}}),t(),r({title:"Payment Successful!",description:"Your event registration is confirmed. Check your email for receipt."})):s==="cancel"&&r({title:"Payment Cancelled",description:"Your payment was cancelled. Items remain in cart.",variant:"destructive"})},[e,t,r]);const{itemCount:n}=Nd();return c.jsxs("div",{className:"min-h-screen",children:[c.jsx(Hw,{}),n>0&&c.jsx("div",{className:"fixed top-20 right-4 z-50",children:c.jsx(l2,{})}),c.jsx(AA,{}),c.jsx(OA,{}),c.jsx(VA,{}),c.jsx(qA,{}),c.jsx(JA,{}),c.jsx(YA,{}),c.jsx(ZA,{}),c.jsx(s2,{}),c.jsx(i2,{}),c.jsx(Sx,{})]})},u2=()=>{const e=Xo();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),c.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),c.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})};var d2="Label",kx=p.forwardRef((e,t)=>c.jsx(Z.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));kx.displayName=d2;var Cx=kx;const h2=sc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),be=p.forwardRef(({className:e,...t},r)=>c.jsx(Cx,{ref:r,className:Q(h2(),e),...t}));be.displayName=Cx.displayName;function f2(e,t=[]){let r=[];function n(i,o){const a=p.createContext(o),l=r.length;r=[...r,o];function u(h){const{scope:f,children:y,...x}=h,m=(f==null?void 0:f[e][l])||a,b=p.useMemo(()=>x,Object.values(x));return c.jsx(m.Provider,{value:b,children:y})}function d(h,f){const y=(f==null?void 0:f[e][l])||a,x=p.useContext(y);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,p2(s,...t)]}function p2(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var m2=p.createContext(void 0);function yf(e){const t=p.useContext(m2);return e||t||"ltr"}var xu="rovingFocusGroup.onEntryFocus",g2={bubbles:!1,cancelable:!0},xc="RovingFocusGroup",[Hd,Tx,v2]=Vh(xc),[y2,jx]=f2(xc,[v2]),[w2,x2]=y2(xc),Nx=p.forwardRef((e,t)=>c.jsx(Hd.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Hd.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(b2,{...e,ref:t})})}));Nx.displayName=xc;var b2=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=p.useRef(null),y=pe(t,f),x=yf(i),[m=null,b]=Xn({prop:o,defaultProp:a,onChange:l}),[v,g]=p.useState(!1),w=gt(u),S=Tx(r),_=p.useRef(!1),[k,C]=p.useState(0);return p.useEffect(()=>{const j=f.current;if(j)return j.addEventListener(xu,w),()=>j.removeEventListener(xu,w)},[w]),c.jsx(w2,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:m,onItemFocus:p.useCallback(j=>b(j),[b]),onItemShiftTab:p.useCallback(()=>g(!0),[]),onFocusableItemAdd:p.useCallback(()=>C(j=>j+1),[]),onFocusableItemRemove:p.useCallback(()=>C(j=>j-1),[]),children:c.jsx(Z.div,{tabIndex:v||k===0?-1:0,"data-orientation":n,...h,ref:y,style:{outline:"none",...e.style},onMouseDown:G(e.onMouseDown,()=>{_.current=!0}),onFocus:G(e.onFocus,j=>{const A=!_.current;if(j.target===j.currentTarget&&A&&!v){const O=new CustomEvent(xu,g2);if(j.currentTarget.dispatchEvent(O),!O.defaultPrevented){const U=S().filter(E=>E.focusable),D=U.find(E=>E.active),q=U.find(E=>
vendor: 11,651 bytes, line 295
295E.id===m),K=[D,q,...U].filter(Boolean).map(E=>E.ref.current);Ax(K,d)}}_.current=!1}),onBlur:G(e.onBlur,()=>g(!1))})})}),Px="RovingFocusGroupItem",Rx=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=e,a=fn(),l=i||a,u=x2(Px,r),d=u.currentTabStopId===l,h=Tx(r),{onFocusableItemAdd:f,onFocusableItemRemove:y}=u;return p.useEffect(()=>{if(n)return f(),()=>y()},[n,f,y]),c.jsx(Hd.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:c.jsx(Z.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:G(e.onMouseDown,x=>{n?u.onItemFocus(l):x.preventDefault()}),onFocus:G(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:G(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const m=E2(x,u.orientation,u.dir);if(m!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let v=h().filter(g=>g.focusable).map(g=>g.ref.current);if(m==="last")v.reverse();else if(m==="prev"||m==="next"){m==="prev"&&v.reverse();const g=v.indexOf(x.currentTarget);v=u.loop?k2(v,g+1):v.slice(g+1)}setTimeout(()=>Ax(v))}})})})});Rx.displayName=Px;var S2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function E2(e,t,r){const n=_2(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return S2[n]}function Ax(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function k2(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var C2=Nx,T2=Rx,wf="Tabs",[j2,TO]=yi(wf,[jx]),Ox=jx(),[N2,xf]=j2(wf),Ix=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=yf(a),[h,f]=Xn({prop:n,onChange:s,defaultProp:i});return c.jsx(N2,{scope:r,baseId:fn(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:l,children:c.jsx(Z.div,{dir:d,"data-orientation":o,...u,ref:t})})});Ix.displayName=wf;var Lx="TabsList",Dx=p.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,i=xf(Lx,r),o=Ox(r);return c.jsx(C2,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:c.jsx(Z.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});Dx.displayName=Lx;var Mx="TabsTrigger",$x=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=e,o=xf(Mx,r),a=Ox(r),l=Bx(o.baseId,n),u=zx(o.baseId,n),d=n===o.value;return c.jsx(T2,{asChild:!0,...a,focusable:!s,active:d,children:c.jsx(Z.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:G(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(n):h.preventDefault()}),onKeyDown:G(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(n)}),onFocus:G(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!s&&h&&o.onValueChange(n)})})})});$x.displayName=Mx;var Fx="TabsContent",Ux=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=e,a=xf(Fx,r),l=Bx(a.baseId,n),u=zx(a.baseId,n),d=n===a.value,h=p.useRef(d);return p.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),c.jsx(as,{present:s||d,children:({present:f})=>c.jsx(Z.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&i})})});Ux.displayName=Fx;function Bx(e,t){return`${e}-trigger-${t}`}function zx(e,t){return`${e}-content-${t}`}var P2=Ix,Hx=Dx,Vx=$x,Wx=Ux;const bf=P2,bc=p.forwardRef(({className:e,...t},r)=>c.jsx(Hx,{ref:r,className:Q("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));bc.displayName=Hx.displayName;const ts=p.forwardRef(({className:e,...t},r)=>c.jsx(Vx,{ref:r,className:Q("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));ts.displayName=Vx.displayName;const rs=p.forwardRef(({className:e,...t},r)=>c.jsx(Wx,{ref:r,className:Q("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));rs.displayName=Wx.displayName;const R2=()=>{const[e,t]=p.useState(""),[r,n]=p.useState(""),[s,i]=p.useState(""),[o,a]=p.useState(!1),{signUp:l,signIn:u,user:d}=cs(),{toast:h}=_n(),f=En();p.useEffect(()=>{d&&f("/")},[d,f]);const y=async m=>{m.preventDefault(),a(!0);const{error:b}=await l(e,r,s);h(b?{variant:"destructive",title:"Sign up failed",description:b.message}:{title:"Check your email",description:"We've sent you a confirmation link to complete your registration."}),a(!1)},x=async m=>{m.preventDefault(),a(!0);const{error:b}=await u(e,r);h(b?{variant:"destructive",title:"Sign in failed",description:b.message}:{title:"Welcome back!",description:"You've been signed in successfully."}),a(!1)};return c.jsx("div",{className:"min-h-screen bg-gradient-subtle flex items-center justify-center p-6",children:c.jsxs(dr,{className:"w-full max-w-md",children:[c.jsxs(rn,{className:"text-center",children:[c.jsx(nn,{className:"text-2xl font-bold bg-text-gradient bg-clip-text text-transparent",children:"LLamalabs"}),c.jsx(_x,{children:"Join our AI community"})]}),c.jsx(hr,{children:c.jsxs(bf,{defaultValue:"signin",className:"w-full",children:[c.jsxs(bc,{className:"grid w-full grid-cols-2",children:[c.jsx(ts,{value:"signin",children:"Sign In"}),c.jsx(ts,{value:"signup",children:"Sign Up"})]}),c.jsx(rs,{value:"signin",children:c.jsxs("form",{onSubmit:x,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(be,{htmlFor:"signin-email",children:"Email"}),c.jsx(he,{id:"signin-email",type:"email",placeholder:"Enter your email",value:e,onChange:m=>t(m.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(be,{htmlFor:"signin-password",children:"Password"}),c.jsx(he,{id:"signin-password",type:"password",placeholder:"Enter your password",value:r,onChange:m=>n(m.target.value),required:!0})]}),c.jsx(le,{type:"submit",className:"w-full bg-hero-gradient hover:opacity-90",disabled:o,children:o?"Signing in...":"Sign In"})]})}),c.jsx(rs,{value:"signup",children:c.jsxs("form",{onSubmit:y,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(be,{htmlFor:"signup-name",children:"Display Name"}),c.jsx(he,{id:"signup-name",type:"text",placeholder:"Enter your display name",value:s,onChange:m=>i(m.target.value)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(be,{htmlFor:"signup-email",children:"Email"}),c.jsx(he,{id:"signup-email",type:"email",placeholder:"Enter your email",value:e,onChange:m=>t(m.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(be,{htmlFor:"signup-password",children:"Password"}),c.jsx(he,{id:"signup-password",type:"password",placeholder:"Create a password",value:r,onChange:m=>n(m.target.value),required:!0})]}),c.jsx(le,{type:"submit",className:"w-full bg-hero-gradient hover:opacity-90",disabled:o,children:o?"Creating account...":"Sign Up"})]})})]})})]})})};function qx(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Sf="Switch",[A2,jO]=yi(Sf),[O2,I2]=A2(Sf),Kx=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,form:d,...h}=e,[f,y]=p.useState(null),x=pe(t,w=>y(w)),m=p.useRef(!1),b=f?d||!!f.closest("form"):!0,[v=!1,g]=Xn({prop:s,defaultProp:i,onChange:u});return c.jsxs(O2,{scope:r,checked:v,disabled:a,children:[c.jsx(Z.button,{type:"button",role:"switch","aria-checked":v,"aria-required":o,"data-state":Qx(v),"data-disabled":a?"":void 0,disabled:a,value:l,...h,ref:x,onClick:G(e.onClick,w=>{g(S=>!S),b&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),b&&c.jsx(L2,{control:f,bubbles:!m.current,name:n,value:l,checked:v,required:o,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Kx.displayName=Sf;var Gx="SwitchThumb",Jx=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=I2(Gx,r);return c.jsx(Z.span,{"data-state":Qx(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Jx.displayName=Gx;var L2=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,i=p.useRef(null),o=qx(r),a=M0(t);return p.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&h){const f=new Event("click",{bubbles:n});h.call(l,r),l.dispatchEvent(f)}},[o,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Qx(e){return e?"checked":"unchecked"}var Yx=Kx,D2=Jx;const rl=p.forwardRef(({className:e,...t},r)=>c.jsx(Yx,{className:Q("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors 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 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:c.jsx(D2,{className:Q("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")})}));rl.displayName=Yx.displayName;function dg(e,[t,r]){return Math.min(r,Math.max(t,e))}var M2=[" ","Enter","ArrowUp","ArrowDown"],$2=[" ","Enter"],ea="Select",[Sc,_c,F2]=Vh(ea),[Ei,NO]=yi(ea,[F2,cc]),Ec=cc(),[U2,kn]=Ei(ea),[B2,z2]=Ei(ea),Xx=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:h,disabled:f,required:y,form:x}=e,m=Ec(t),[b,v]=p.useState(null),[g,w]=p.useState(null),[S,_]=p.useState(!1),k=yf(u),[C=!1,j]=Xn({prop:n,defaultProp:s,onChange:i}),[A,O]=Xn({prop:o,defaultProp:a,onChange:l}),U=p.useRef(null),D=b?x||!!b.closest("form"):!0,[q,I]=p.useState(new Set),K=Array.from(q).map(E=>E.props.value).join(";");return c.jsx(HC,{...m,children:c.jsxs(U2,{required:y,scope:t,trigger:b,onTriggerChange:v,valueNode:g,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:fn(),value:A,onValueChange:O,open:C,onOpenChange:j,dir:k,triggerPointerDownPosRef:U,disabled:f,children:[c.jsx(Sc.Provider,{scope:t,children:c.jsx(B2,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(E=>{I(B=>new Set(B).add(E))},[]),onNativeOptionRemove:p.useCallback(E=>{I(B=>{const T=new Set(B);return T.delete(E),T})},[]),children:r})}),D?c.jsxs(_b,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:h,value:A,onChange:E=>O(E.target.value),disabled:f,form:x,children:[A===void 0?c.jsx("option",{value:""}):null,Array.from(q)]},K):null]})})};Xx.displayName=ea;var Zx="SelectTrigger",eb=p.forwardRef((e,t)=>
vendor: 16,720 bytes, line 295
295{const{__scopeSelect:r,disabled:n=!1,...s}=e,i=Ec(r),o=kn(Zx,r),a=o.disabled||n,l=pe(t,o.onTriggerChange),u=_c(r),d=p.useRef("touch"),[h,f,y]=Eb(m=>{const b=u().filter(w=>!w.disabled),v=b.find(w=>w.value===o.value),g=kb(b,m,v);g!==void 0&&o.onValueChange(g.value)}),x=m=>{a||(o.onOpenChange(!0),y()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(K0,{asChild:!0,...i,children:c.jsx(Z.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Sb(o.value)?"":void 0,...s,ref:l,onClick:G(s.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&x(m)}),onPointerDown:G(s.onPointerDown,m=>{d.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(x(m),m.preventDefault())}),onKeyDown:G(s.onKeyDown,m=>{const b=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(b&&m.key===" ")&&M2.includes(m.key)&&(x(),m.preventDefault())})})})});eb.displayName=Zx;var tb="SelectValue",rb=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=e,l=kn(tb,r),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,h=pe(t,l.onValueNodeChange);return rt(()=>{u(d)},[u,d]),c.jsx(Z.span,{...a,ref:h,style:{pointerEvents:"none"},children:Sb(l.value)?c.jsx(c.Fragment,{children:o}):i})});rb.displayName=tb;var H2="SelectIcon",nb=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return c.jsx(Z.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});nb.displayName=H2;var V2="SelectPortal",sb=e=>c.jsx(tc,{asChild:!0,...e});sb.displayName=V2;var ns="SelectContent",ib=p.forwardRef((e,t)=>{const r=kn(ns,e.__scopeSelect),[n,s]=p.useState();if(rt(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?os.createPortal(c.jsx(ob,{scope:e.__scopeSelect,children:c.jsx(Sc.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(ab,{...e,ref:t})});ib.displayName=ns;var Ut=10,[ob,Cn]=Ei(ns),W2="SelectContentImpl",ab=p.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:y,sticky:x,hideWhenDetached:m,avoidCollisions:b,...v}=e,g=kn(ns,r),[w,S]=p.useState(null),[_,k]=p.useState(null),C=pe(t,W=>S(W)),[j,A]=p.useState(null),[O,U]=p.useState(null),D=_c(r),[q,I]=p.useState(!1),K=p.useRef(!1);p.useEffect(()=>{if(w)return ex(w)},[w]),Ww();const E=p.useCallback(W=>{const[ae,...Ne]=D().map(oe=>oe.ref.current),[ie]=Ne.slice(-1),ue=document.activeElement;for(const oe of W)if(oe===ue||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===ae&&_&&(_.scrollTop=0),oe===ie&&_&&(_.scrollTop=_.scrollHeight),oe==null||oe.focus(),document.activeElement!==ue))return},[D,_]),B=p.useCallback(()=>E([j,w]),[E,j,w]);p.useEffect(()=>{q&&B()},[q,B]);const{onOpenChange:T,triggerPointerDownPosRef:P}=g;p.useEffect(()=>{if(w){let W={x:0,y:0};const ae=ie=>{var ue,oe;W={x:Math.abs(Math.round(ie.pageX)-(((ue=P.current)==null?void 0:ue.x)??0)),y:Math.abs(Math.round(ie.pageY)-(((oe=P.current)==null?void 0:oe.y)??0))}},Ne=ie=>{W.x<=10&&W.y<=10?ie.preventDefault():w.contains(ie.target)||T(!1),document.removeEventListener("pointermove",ae),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",Ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",Ne,{capture:!0})}}},[w,T,P]),p.useEffect(()=>{const W=()=>T(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[T]);const[z,M]=Eb(W=>{const ae=D().filter(ue=>!ue.disabled),Ne=ae.find(ue=>ue.ref.current===document.activeElement),ie=kb(ae,W,Ne);ie&&setTimeout(()=>ie.ref.current.focus())}),V=p.useCallback((W,ae,Ne)=>{const ie=!K.current&&!Ne;(g.value!==void 0&&g.value===ae||ie)&&(A(W),ie&&(K.current=!0))},[g.value]),te=p.useCallback(()=>w==null?void 0:w.focus(),[w]),ce=p.useCallback((W,ae,Ne)=>{const ie=!K.current&&!Ne;(g.value!==void 0&&g.value===ae||ie)&&U(W)},[g.value]),Be=n==="popper"?Vd:lb,ne=Be===Vd?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:y,sticky:x,hideWhenDetached:m,avoidCollisions:b}:{};return c.jsx(ob,{scope:r,content:w,viewport:_,onViewportChange:k,itemRefCallback:V,selectedItem:j,onItemLeave:te,itemTextRefCallback:ce,focusSelectedItem:B,selectedItemText:O,position:n,isPositioned:q,searchRef:z,children:c.jsx(hf,{as:Yn,allowPinchZoom:!0,children:c.jsx(df,{asChild:!0,trapped:g.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:G(s,W=>{var ae;(ae=g.trigger)==null||ae.focus({preventScroll:!0}),W.preventDefault()}),children:c.jsx(Ko,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:c.jsx(Be,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:W=>W.preventDefault(),...v,...ne,onPlaced:()=>I(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:G(v.onKeyDown,W=>{const ae=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!ae&&W.key.length===1&&M(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ie=D().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ue=W.target,oe=ie.indexOf(ue);ie=ie.slice(oe+1)}setTimeout(()=>E(ie)),W.preventDefault()}})})})})})})});ab.displayName=W2;var q2="SelectItemAlignedPosition",lb=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,i=kn(ns,r),o=Cn(ns,r),[a,l]=p.useState(null),[u,d]=p.useState(null),h=pe(t,C=>d(C)),f=_c(r),y=p.useRef(!1),x=p.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:v,focusSelectedItem:g}=o,w=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&m&&b&&v){const C=i.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),O=v.getBoundingClientRect();if(i.dir!=="rtl"){const ue=O.left-j.left,oe=A.left-ue,nt=C.left-oe,vt=C.width+nt,Lr=Math.max(vt,j.width),Pt=window.innerWidth-Ut,Tn=dg(oe,[Ut,Math.max(Ut,Pt-Lr)]);a.style.minWidth=vt+"px",a.style.left=Tn+"px"}else{const ue=j.right-O.right,oe=window.innerWidth-A.right-ue,nt=window.innerWidth-C.right-oe,vt=C.width+nt,Lr=Math.max(vt,j.width),Pt=window.innerWidth-Ut,Tn=dg(oe,[Ut,Math.max(Ut,Pt-Lr)]);a.style.minWidth=vt+"px",a.style.right=Tn+"px"}const U=f(),D=window.innerHeight-Ut*2,q=m.scrollHeight,I=window.getComputedStyle(u),K=parseInt(I.borderTopWidth,10),E=parseInt(I.paddingTop,10),B=parseInt(I.borderBottomWidth,10),T=parseInt(I.paddingBottom,10),P=K+E+q+T+B,z=Math.min(b.offsetHeight*5,P),M=window.getComputedStyle(m),V=parseInt(M.paddingTop,10),te=parseInt(M.paddingBottom,10),ce=C.top+C.height/2-Ut,Be=D-ce,ne=b.offsetHeight/2,W=b.offsetTop+ne,ae=K+E+W,Ne=P-ae;if(ae<=ce){const ue=U.length>0&&b===U[U.length-1].ref.current;a.style.bottom="0px";const oe=u.clientHeight-m.offsetTop-m.offsetHeight,nt=Math.max(Be,ne+(ue?te:0)+oe+B),vt=ae+nt;a.style.height=vt+"px"}else{const ue=U.length>0&&b===U[0].ref.current;a.style.top="0px";const nt=Math.max(ce,K+m.offsetTop+(ue?V:0)+ne)+Ne;a.style.height=nt+"px",m.scrollTop=ae-ce+m.offsetTop}a.style.margin=`${Ut}px 0`,a.style.minHeight=z+"px",a.style.maxHeight=D+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[f,i.trigger,i.valueNode,a,u,m,b,v,i.dir,n]);rt(()=>w(),[w]);const[S,_]=p.useState();rt(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const k=p.useCallback(C=>{C&&x.current===!0&&(w(),g==null||g(),x.current=!1)},[w,g]);return c.jsx(G2,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:k,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(Z.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});lb.displayName=q2;var K2="SelectPopperPosition",Vd=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ut,...i}=e,o=Ec(r);return c.jsx(G0,{...o,...i,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vd.displayName=K2;var[G2,_f]=Ei(ns,{}),Wd="SelectViewport",cb=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,i=Cn(Wd,r),o=_f(Wd,r),a=pe(t,i.onViewportChange),l=p.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Sc.Slot,{scope:r,children:c.jsx(Z.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:G(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const y=Math.abs(l.current-d.scrollTop);if(y>0){const x=window.innerHeight-Ut*2,m=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),v=Math.max(m,b);if(v<x){const g=v+y,w=Math.min(x,g),S=g-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});cb.displayName=Wd;var ub="SelectGroup",[J2,Q2]=Ei(ub),Y2=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=fn();return c.jsx(J2,{scope:r,id:s,children:c.jsx(Z.div,{role:"group","aria-labelledby":s,...n,ref:t})})});Y2.displayName=ub;var db="SelectLabel",hb=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Q2(db,r);return c.jsx(Z.div,{id:s.id,...n,ref:t})});hb.displayName=db;var $l="SelectItem",[X2,fb]=Ei($l),pb=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=e,a=kn($l,r),l=Cn($l,r),u=a.value===n,[d,h]=p.useState(i??""),[f,y]=p.useState(!1),x=pe(t,g=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,g,n,s)}),m=fn(),b=p.useRef("touch"),v=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(X2,{scope:r,value:n,disabled:s,textId:m,isSelected:u,onItemTextChange:p.useCallback(g=>{h(w=>w||((g==null?void 0:g.textContent)??"").trim())},[]),children:c.jsx(Sc.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:c.jsx(Z.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:x,onFocus:G(o.onFocus,()=>y(!0)),onBlur:G(o.onBlur,()=>y(!1)),onClick:G(o.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:G(o.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:G(o.onPointerDown,g=>{b.current=g.pointerType}),onPointerMove:G(o.onPointerMove,g=>{var w;b.current=g.pointerType,s?(w=l.onItemLeave)==null||w.call(l):b.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(o.onPointerLeave,g=>{var w;g.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:G(o.onKeyDown,g=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&g.key===" "||($2.includes(g.key)&&v(),g.key===" "&&g.preventDefault())})})})})});pb.displayName=$l;var zi="SelectItemText",mb=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...i}=e,o=kn(zi,r),a=Cn(zi,r),l=fb(zi,r),u=z2(zi,r),[d,h]=p.useState(null),f=pe(t,v=>h(v),l.onItemTextChange,v=>{var g;return(g=a.itemTextRefCallback)==null?void 0:g.call(a,v,l.value,l.disabled)}),y=d==null?void 0:d.textContent,x=p.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:y},l.value),[l.disabled,l.value,y]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=u;return rt(()=>(m(x),()=>b(x)),[m,b,x]),c.jsxs(c.Fragment,{children:[c.jsx(Z.span,{id:l.textId,...i,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?os.createPortal(i.children,o.valueNode):null]})});mb.displayName=zi;var gb="SelectItemIndicator",vb=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return fb(gb,r).isSelected?c.jsx(Z.span,{"aria-hidden":!0,...n,ref:t}):null});vb.displayName=gb;var qd="SelectScrollUpButton",yb=p.forwardRef((e,t)=>{const r=Cn(qd,e.__scopeSelect),n=_f(qd,e.__scopeSelect),[s,i]=p.useState(!1),o=pe(t,n.onScrollButtonChange);return rt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(xb,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});yb.displayName=qd;var Kd="SelectScrollDownButton",wb=p.forwardRef((e,t)=>{const r=Cn(Kd,e.__scopeSelect),n=_f(Kd,e.__scopeSelect),[s,i]=p.useState(!1),o=pe(t,n.onScrollButtonChange);return rt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(xb,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});wb.displayName=Kd;var xb=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,i=Cn("SelectScrollButton",r),o=p.useRef(null),a=_c(r),l=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),rt(()=>{var d;const u=a().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(Z.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:G(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:G(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:G(s.onPointerLeave,()=>{l()})})}),Z2="SelectSeparator",bb=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Z.div,{"aria-hidden":!0,...n,ref:t})});bb.displayName=Z2;var Gd="SelectArrow",eO=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Ec(r),i=kn(Gd,r),o=Cn(Gd,r);return i.open&&o.position==="popper"?c.jsx(J0,{...s,...n,ref:t}):null});eO.displayName=Gd;function Sb(e){return e===""||e===void 0}var _b=p.forwardRef((e,t)=>{const{value:r,...n}=e,s=p.useRef(null),i=pe(t,s),o=qx(r);return p.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&d){const h=new Event("change",{bubbles:!0});d.call(a,r),a.dispatchEvent(h)}},[o,r]),c.jsx(Go,{asChild:!0,children:c.jsx("select",{...n,ref:i,defaultValue:r})})});_b.displayName="BubbleSelect";function Eb(e){const t=gt(e),r=p.useRef(""),n=p.useRef(0),s=p.useCallback(o=>{const a=r.current+o;t(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function kb(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=tO(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function tO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var rO=Xx,Cb=eb,nO=rb,sO=nb,iO=sb,Tb=ib,oO=cb,jb=hb,Nb=pb,aO=mb,lO=vb,Pb=yb,Rb=wb,Ab=bb;const cO=rO,uO=nO,Ob=p.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Cb,{ref:n,className:Q("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
295ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,c.jsx(sO,{asChild:!0,children:c.jsx(p0,{className:"h-4 w-4 opacity-50"})})]}));Ob.displayName=Cb.displayName;const Ib=p.forwardRef(({className:e,...t},r)=>c.jsx(Pb,{ref:r,className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(pE,{className:"h-4 w-4"})}));Ib.displayName=Pb.displayName;const Lb=p.forwardRef(({className:e,...t},r)=>c.jsx(Rb,{ref:r,className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(p0,{className:"h-4 w-4"})}));Lb.displayName=Rb.displayName;const Db=p.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>c.jsx(iO,{children:c.jsxs(Tb,{ref:s,className:Q("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[c.jsx(Ib,{}),c.jsx(oO,{className:Q("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(Lb,{})]})}));Db.displayName=Tb.displayName;const dO=p.forwardRef(({className:e,...t},r)=>c.jsx(jb,{ref:r,className:Q("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));dO.displayName=jb.displayName;const Jd=p.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Nb,{ref:n,className:Q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(lO,{children:c.jsx(f0,{className:"h-4 w-4"})})}),c.jsx(aO,{children:t})]}));Jd.displayName=Nb.displayName;const hO=p.forwardRef(({className:e,...t},r)=>c.jsx(Ab,{ref:r,className:Q("-mx-1 my-1 h-px bg-muted",e),...t}));hO.displayName=Ab.displayName;const Mo=p.forwardRef(({className:e,...t},r)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:r,className:Q("w-full caption-bottom text-sm",e),...t})}));Mo.displayName="Table";const $o=p.forwardRef(({className:e,...t},r)=>c.jsx("thead",{ref:r,className:Q("[&_tr]:border-b",e),...t}));$o.displayName="TableHeader";const Fo=p.forwardRef(({className:e,...t},r)=>c.jsx("tbody",{ref:r,className:Q("[&_tr:last-child]:border-0",e),...t}));Fo.displayName="TableBody";const fO=p.forwardRef(({className:e,...t},r)=>c.jsx("tfoot",{ref:r,className:Q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));fO.displayName="TableFooter";const kr=p.forwardRef(({className:e,...t},r)=>c.jsx("tr",{ref:r,className:Q("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));kr.displayName="TableRow";const Oe=p.forwardRef(({className:e,...t},r)=>c.jsx("th",{ref:r,className:Q("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Oe.displayName="TableHead";const Ie=p.forwardRef(({className:e,...t},r)=>c.jsx("td",{ref:r,className:Q("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Ie.displayName="TableCell";const pO=p.forwardRef(({className:e,...t},r)=>c.jsx("caption",{ref:r,className:Q("mt-4 text-sm text-muted-foreground",e),...t}));pO.displayName="TableCaption";const mO=()=>{const[e,t]=p.useState([]),[r,n]=p.useState([]),[s,i]=p.useState(!1),[o,a]=p.useState(!1),[l,u]=p.useState(null),[d,h]=p.useState(null),[f,y]=p.useState(!1),[x,m]=p.useState(null),{user:b}=cs(),{toast:v}=_n(),[g,w]=p.useState({name:"",tagline:"",date:"",time:"",location:"",event_logo_url:"",event_image_url:"",partner_logos:"",price:0,notes:"",is_featured:!1,is_active:!0}),[S,_]=p.useState({name:"",description:"",logo_url:"",website_url:"",tier:"current",display_order:0,is_active:!0});p.useEffect(()=>{(async()=>
295{if(!b){m(!1);return}const{data:B}=await ke.from("user_roles").select("role").eq("user_id",b.id).eq("role","admin").maybeSingle();m(!!B)})()},[b]),p.useEffect(()=>{x&&(k(),C())},[x]);const k=async()=>{const{data:E,error:B}=await ke.from("events").select("*").order("date",{ascending:!0});B||t((E||[]).map(T=>({...T,partner_logos:Array.isArray(T.partner_logos)?T.partner_logos:[]})))},C=async()=>{const{data:E,error:B}=await ke.from("sponsors").select("*").order("display_order",{ascending:!0});B||n(E||[])},j=()=>{w({name:"",tagline:"",date:"",time:"",location:"",event_logo_url:"",event_image_url:"",partner_logos:"",price:0,notes:"",is_featured:!1,is_active:!0}),u(null)},A=()=>{_({name:"",description:"",logo_url:"",website_url:"",tier:"current",display_order:0,is_active:!0}),h(null)},O=async E=>{if(E.preventDefault(),!!b){y(!0);try{const B=g.partner_logos?g.partner_logos.split(",").map(P=>P.trim()).filter(Boolean):[],T={...g,partner_logos:B,created_by:b.id};if(l){const{error:P}=await ke.from("events").update(T).eq("id",l.id);if(P)throw P;v({title:"Success",description:"Event updated successfully"})}else{const{error:P}=await ke.from("events").insert([T]);if(P)throw P;v({title:"Success",description:"Event created successfully"})}j(),i(!1),k()}catch{v({title:"Error",description:"Failed to save event",variant:"destructive"})}finally{y(!1)}}},U=async E=>{if(E.preventDefault(),!!b){y(!0);try{const B={...S,created_by:b.id};if(d){const{error:T}=await ke.from("sponsors").update(B).eq("id",d.id);if(T)throw T;v({title:"Success",description:"Sponsor updated successfully"})}else{const{error:T}=await ke.from("sponsors").insert([B]);if(T)throw T;v({title:"Success",description:"Sponsor created successfully"})}A(),a(!1),C()}catch{v({title:"Error",description:"Failed to save sponsor",variant:"destructive"})}finally{y(!1)}}},D=E=>{u(E),w({name:E.name,tagline:E.tagline||"",date:E.date,time:E.time,location:E.location,event_logo_url:E.event_logo_url||"",event_image_url:E.event_image_url||"",partner_logos:E.partner_logos.join(", "),price:E.price,notes:E.notes||"",is_featured:E.is_featured,is_active:E.is_active}),i(!0)},q=E=>{h(E),_({name:E.name,description:E.description||"",logo_url:E.logo_url||"",website_url:E.website_url||"",tier:E.tier,display_order:E.display_order,is_active:E.is_active}),a(!0)},I=async E=>{if(!confirm("Are you sure you want to delete this event?"))return;const{error:B}=await ke.from("events").delete().eq("id",E);B||(v({title:"Success",description:"Event deleted"}),k())},K=async E=>{if(!confirm("Are you sure you want to delete this sponsor?"))return;const{error:B}=await ke.from("sponsors").delete().eq("id",E);B||(v({title:"Success",description:"Sponsor deleted"}),C())};return!b||x===null?c.jsx("div",{className:"flex items-center justify-center min-h-screen text-muted-foreground",children:"Loading..."}):x?c.jsxs("div",{className:"p-6 space-y-6",children:[c.jsx("h1",{className:"text-3xl font-bold",children:"CRM Dashboard"}),c.jsxs(bf,{defaultValue:"events",children:[c.jsxs(bc,{children:[c.jsxs(ts,{value:"events",children:["Events (",e.length,")"]}),c.jsxs(ts,{value:"sponsors",children:["Sponsors (",r.length,")"]})]}),c.jsxs(rs,{value:"events",children:[c.jsx("div",{className:"flex justify-end mb-4",children:c.jsxs(Oo,{open:s,onOpenChange:i,children:[c.jsx(cg,{asChild:!0,children:c.jsxs(le,{onClick:j,children:[c.jsx(qp,{className:"w-4 h-4 mr-2"}),"Add Event"]})}),c.jsxs(pi,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[c.jsx(Io,{children:c.jsx(Lo,{children:l?"Edit Event":"Create New Event"})}),c.jsxs("form",{onSubmit:O,className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(be,{htmlFor:"name",children:"Event Name *"}),c.jsx(he,{id:"name",value:g.name,onChange:E=>w({...g,name:E.target.value}),required:!0})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"tagline",children:"Tagline"}),c.jsx(he,{id:"tagline",value:g.tagline,onChange:E=>w({...g,tagline:E.target.value})})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(be,{htmlFor:"date",children:"Date *"}),c.jsx(he,{id:"date",type:"date",value:g.date,onChange:E=>w({...g,date:E.target.value}),required:!0})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"time",children:"Time *"}),c.jsx(he,{id:"time",type:"time",value:g.time,onChange:E=>w({...g,time:E.target.value}),required:!0})]})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"location",children:"Location *"}),c.jsx(he,{id:"location",value:g.location,onChange:E=>w({...g,location:E.target.value}),required:!0})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(be,{htmlFor:"event_logo_url",children:"Event Logo URL"}),c.jsx(he,{id:"event_logo_url",value:g.event_logo_url,onChange:E=>w({...g,event_logo_url:E.target.value})})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"event_image_url",children:"Event Image URL"}),c.jsx(he,{id:"event_image_url",value:g.event_image_url,onChange:E=>w({...g,event_image_url:E.target.value})})]})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"partner_logos",children:"Partner Logo URLs (comma-separated)"}),c.jsx(he,{id:"partner_logos",value:g.partner_logos,onChange:E=>w({...g,partner_logos:E.target.value}),placeholder:"https://logo1.com, https://logo2.com"})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"price",children:"Price ($) *"}),c.jsx(he,{id:"price",type:"number",step:"0.01",min:"0",value:g.price,onChange:E=>w({...g,price:parseFloat(E.target.value)||0}),required:!0})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"notes",children:"Notes"}),c.jsx(Do,{id:"notes",value:g.notes,onChange:E=>w({...g,notes:E.target.value}),rows:3})]}),c.jsxs("div",{className:"flex items-center space-x-4",children:[c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(rl,{id:"is_featured",checked:g.is_featured,onCheckedChange:E=>w({...g,is_featured:E})}),c.jsx(be,{htmlFor:"is_featured",children:"Featured"})]}),c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(rl,{id:"is_active",checked:g.is_active,onCheckedChange:E=>w({...g,is_active:E})}),c.jsx(be,{htmlFor:"is_active",children:"Active"})]})]}),c.jsxs("div",{className:"flex justify-end space-x-2",children:[c.jsx(le,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}
295),c.jsx(le,{type:"submit",disabled:f,children:f?"Saving...":l?"Update":"Create"})]})]})]})]})}),c.jsx(dr,{children:c.jsx(hr,{className:"pt-6",children:c.jsxs(Mo,{children:[c.jsx($o,{children:c.jsxs(kr,{children:[c.jsx(Oe,{children:"Event"}),c.jsx(Oe,{children:"Date & Time"}),c.jsx(Oe,{children:"Location"}),c.jsx(Oe,{children:"Price"}),c.jsx(Oe,{children:"Status"}),c.jsx(Oe,{children:"Actions"})]})}),c.jsx(Fo,{children:e.map(E=>c.jsxs(kr,{children:[c.jsxs(Ie,{children:[c.jsx("div",{className:"font-medium",children:E.name}),E.tagline&&c.jsx("div",{className:"text-sm text-muted-foreground",children:E.tagline})]}),c.jsx(Ie,{children:c.jsxs("div",{className:"flex items-center space-x-1",children:[c.jsx(h0,{className:"w-4 h-4"}),c.jsxs("span",{children:[E.date," at ",E.time]})]})}),c.jsx(Ie,{children:c.jsxs("div",{className:"flex items-center space-x-1",children:[c.jsx(g0,{className:"w-4 h-4"}),c.jsx("span",{children:E.location})]})}),c.jsx(Ie,{children:c.jsxs("div",{className:"flex items-center space-x-1",children:[c.jsx(gE,{className:"w-4 h-4"}),c.jsxs("span",{children:["$",E.price]})]})}),c.jsx(Ie,{children:c.jsxs("div",{className:"flex space-x-2",children:[E.is_featured&&c.jsx("span",{className:"px-2 py-1 bg-primary/10 text-primary text-xs rounded",children:"Featured"}),c.jsx("span",{className:`px-2 py-1 text-xs rounded ${E.is_active?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:E.is_active?"Active":"Inactive"})]})}),c.jsx(Ie,{children:c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(le,{variant:"outline",size:"sm",onClick:()=>D(E),children:c.jsx(Jp,{className:"w-4 h-4"})}),c.jsx(le,{variant:"outline",size:"sm",onClick:()=>I(E.id),children:c.jsx(Qp,{className:"w-4 h-4"})})]})})]},E.id))})]})})})]}),c.jsxs(rs,{value:"sponsors",children:[c.jsx("div",{className:"flex justify-end mb-4",children:c.jsxs(Oo,{open:o,onOpenChange:a,children:[c.jsx(cg,{asChild:!0,children:c.jsxs(le,{onClick:A,children:[c.jsx(qp,{className:"w-4 h-4 mr-2"}),"Add Sponsor"]})}),c.jsxs(pi,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[c.jsx(Io,{children:c.jsx(Lo,{children:d?"Edit Sponsor":"Add New Sponsor"})}),c.jsxs("form",{onSubmit:U,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(be,{htmlFor:"s_name",children:"Sponsor Name *"}),c.jsx(he,{id:"s_name",value:S.name,onChange:E=>_({...S,name:E.target.value}),required:!0})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"s_desc",children:"Description"}),c.jsx(Do,{id:"s_desc",value:S.description,onChange:E=>_({...S,description:E.target.value}),rows:3})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"s_logo",children:"Logo URL"}),c.jsx(he,{id:"s_logo",value:S.logo_url,onChange:E=>_({...S,logo_url:E.target.value})})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"s_website",children:"Website URL"}),c.jsx(he,{id:"s_website",value:S.website_url,onChange:E=>_({...S,website_url:E.target.value})})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(be,{htmlFor:"s_tier",children:"Tier *"}),c.jsxs(cO,{value:S.tier,onValueChange:E=>_({...S,tier:E}),children:[c.jsx(Ob,{children:c.jsx(uO,{})}),c.jsxs(Db,{children:[c.jsx(Jd,{value:"current",children:"Current"}),c.jsx(Jd,{value:"past",children:"Past"})]})]})]}),c.jsxs("div",{children:[c.jsx(be,{htmlFor:"s_order",children:"Display Order"}),c.jsx(he,{id:"s_order",type:"number",value:S.display_order,onChange:E=>_({...S,display_order:parseInt(E.target.value)||0})})]})]}),c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(rl,{id:"s_active",checked:S.is_active,onCheckedChange:E=>_({...S,is_active:E})}),c.jsx(be,{htmlFor:"s_active",children:"Active"})]}),c.jsxs("div",{className:"flex justify-end space-x-2",children:[c.jsx(le,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),c.jsx(le,{type:"submit",disabled:f,children:f?"Saving...":d?"Update":"Create"})]})]})]})]})}),c.jsx(dr,{children:c.jsx(hr,{className:"pt-6",children:c.jsxs(Mo,{children:[c.jsx($o,{children:c.jsxs(kr,{children:[c.jsx(Oe,{children:"Logo"}),c.jsx(Oe,{children:"Name"}),c.jsx(Oe,{children:"Tier"}),c.jsx(Oe,{children:"Order"}),c.jsx(Oe,{children:"Status"}),c.jsx(Oe,{children:"Actions"})]})}),c.jsx(Fo,{children:r.map(E=>c.jsxs(kr,{children:[c.jsx(Ie,{children:E.logo_url?c.jsx("img",{src:E.logo_url,alt:E.name,className:"h-8 object-contain"}):"—"}),c.jsxs(Ie,{children:[c.jsx("div",{className:"font-medium",children:E.name}),E.description&&c.jsx("div",{className:"text-sm text-muted-foreground truncate max-w-xs",children:E.description})]}),c.jsx(Ie,{children:c.jsx("span",{className:`px-2 py-1 text-xs rounded ${E.tier==="current"?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:E.tier})}),c.jsx(Ie,{children:E.display_order}),c.jsx(Ie,{children:c.jsx("span",{className:`px-2 py-1 text-xs rounded ${E.is_active?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:E.is_active?"Active":"Inactive"})}),c.jsx(Ie,{children:c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(le,{variant:"outline",size:"sm",onClick:()=>q(E),children:c.jsx(Jp,{className:"w-4 h-4"})}),c.jsx(le,{variant:"outline",size:"sm",onClick:()=>K(E.id),children:c.jsx(Qp,{className:"w-4 h-4"})})]})})]},E.id))})]})})})]})]})]}):c.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen gap-4",children:[c.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Access Denied"}),c.jsx("p",{className:"text-muted-foreground",children:"You do not have permission to access this page."}),c.jsx("a",{href:"/",className:"text-primary hover:underline",children:"Return to Homepage"})]})},gO=()=>{const[e,t]=p.useState([]),[r,n]=p.useState([]),s=En();p.useEffect(()=>{(async()=>{const{data:a}=await ke.from("sponsors").select("*").eq("is_active",!0).order("display_order",{ascending:!0});a&&(t(a.filter(l=>l.tier==="current")),n(a.filter(l=>l.tier==="past")))})()},[]);const i=()=>{const o=encodeURIComponent("Sponsorship Inquiry - LLamalabs"),a=encodeURIComponent(`Hi LLamalabs team,
296
297I'm interested in sponsorship opportunities. Please share more details.
298
299Best regards`);window.open(`mailto:[email protected]?subject=${o}&body=${a}`,"_blank")};return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Hw,{}),c.jsxs("section",{className:"relative pt-32 pb-20 bg-hero-gradient overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",children:c.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 20% 50%, hsl(280 100% 85% / 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, hsl(230 81% 60% / 0.3) 0%, transparent 50%)"}})}),c.jsxs("div",{className:"container mx-auto px-6 relative z-10",children:[c.jsxs("button",{onClick:()=>s("/"),className:"inline-flex items-center text-white/70 hover:text-white mb-8 transition-colors",children:[c.jsx(d0,{className:"w-4 h-4 mr-2"}),"Back to Home"]}),c.jsxs("div",{className:"max-w-3xl",children:[c.jsxs("h1",{className:"text-5xl md:text-6xl font-bold text-white mb-6",children:["Our"," ",c.jsx("span",{className:"bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(135deg, hsl(280 100% 85%), hsl(0 0% 100%))"},children:"Sponsors"})]}),c.jsx("p",{className:"text-xl text-white/80 leading-relaxed max-w-2xl",children:"Our events are made possible through the generous support of industry-leading organizations committed to advancing AI innovation and leadership."})]})]})]}),e.length>0&&c.jsx("section",{className:"py-20 bg-section-gradient",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-14",children:[c.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full text-sm font-semibold bg-primary/10 text-primary mb-4",children:"Current Partners"}),c.jsx("h2",{className:"text-4xl font-bold text-foreground",children:"Current Sponsors"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 max-w-5xl mx-auto",children:e.map(o=>c.jsx("div",{className:"group bg-card rounded-2xl p-10 shadow-card hover:shadow-elegant transition-all duration-500 border border-border/50",children:c.jsxs("div",{className:"flex flex-col items-center text-center",children:[o.logo_url&&c.jsx("a",{href:o.website_url||"#",target:"_blank",rel:"noopener noreferrer",className:"mb-8 block",children:c.jsx("img",{src:o.logo_url,alt:o.name,className:"h-20 object-contain group-hover:scale-105 transition-transform duration-300"})}),c.jsx("h3",{className:"text-xl font-bold text-foreground mb-3",children:o.name}),o.description&&c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:o.description}),o.website_url&&c.jsxs("a",{href:o.website_url,target:"_blank",rel:"noopener noreferrer",className:"mt-6 inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Visit Website ",c.jsx(m0,{className:"w-3.5 h-3.5"})]})]})},o.id))})]})}),r.length>0&&c.jsx("section",{className:"py-20 bg-background",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full text-sm font-semibold bg-muted text-muted-foreground mb-4",children:"Previous Partners"}),c.jsx("h2",{className:"text-4xl font-bold text-foreground mb-4",children:"Past Sponsors"}),c.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Our events are made possible through the generous support of industry-leading organizations committed to advancing responsible AI innovation and leadership."})]}),c.jsx("div",{className:"flex flex-wrap justify-center items-center gap-10 max-w-5xl mx-auto mt-12",children:r.map(o=>c.jsx("a",{href:o.website_url||"#",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center justify-center p-4",children:o.logo_url?c.jsx("img",{src:o.logo_url,alt:o.name,className:"h-14 object-contain opacity-50 group-hover:opacity-100 transition-all duration-300 grayscale group-hover:grayscale-0"}):c.jsx("span",{className:"text-lg text-muted-foreground font-semibold group-hover:text-foreground transition-colors",children:o.name})},o.id))})]})}),c.jsx("section",{className:"py-20 bg-section-gradient",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-14",children:[c.jsxs("h2",{className:"text-4xl font-bold text-foreground mb-4",children:["Why ",c.jsx("span",{className:"bg-text-gradient bg-clip-text text-transparent",children:"Sponsor"})," Us?"]}),c.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Partner with LLamalabs to reach a highly curated audience of senior AI executives and technology leaders."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:[{icon:v0,title:"Curated Audience",description:"Direct access to C-suite executives, AI directors, and senior technology leaders from Fortune 500 companies and innovative startups."},{icon:wE,title:"Brand Visibility",description:"Prominent logo placement, speaking opportunities, and branded materials at our exclusive quarterly events in the Bay Area."},{icon:fE,title:"Thought Leadership",description:"Position your organization at the forefront of AI innovation through panel discussions and content co-creation."}].map(o=>c.jsxs("div",{className:"bg-card rounded-2xl p-8 shadow-card border border-border/50 text-center hover:shadow-elegant transition-all duration-300",children:[c.jsx("div",{className:"w-14 h-14 roun
299ded-xl bg-primary/10 flex items-center justify-center mx-auto mb-6",children:c.jsx(o.icon,{className:"w-7 h-7 text-primary"})}),c.jsx("h3",{className:"text-lg font-bold text-foreground mb-3",children:o.title}),c.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:o.description})]},o.title))})]})}),c.jsxs("section",{className:"py-24 bg-hero-gradient relative overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-20",children:c.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 30% 70%, hsl(280 100% 85% / 0.4) 0%, transparent 50%)"}})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[c.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white mb-6",children:"Become a Sponsor"}),c.jsx("p",{className:"text-xl text-white/80 mb-10 leading-relaxed",children:"Support our mission and reach a targeted audience of AI leaders. Partner with us to showcase your brand at our exclusive events."}),c.jsxs(le,{size:"lg",onClick:i,className:"bg-white text-primary hover:bg-white/90 transition-all duration-300 text-base px-8 py-6 shadow-elegant",children:[c.jsx(yE,{className:"w-5 h-5 mr-2"}),"Get in Touch"]})]})})]}),c.jsx(Sx,{})]})},vO=()=>{const{signOut:e}=cs(),t=En(),[r,n]=p.useState([]),[s,i]=p.useState([]),[o,a]=p.useState(!0),[l,u]=p.useState(""),[d,h]=p.useState(""),f=async()=>{a(!0);const[v,g]=await Promise.all([ke.from("community_signups").select("*").order("created_at",{ascending:!1}),ke.from("sponsor_leads").select("*").order("created_at",{ascending:!1})]);v.data&&n(v.data),g.data&&i(g.data),a(!1)};p.useEffect(()=>{f()},[]);const y=v=>new Date(v).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),x=(v,g)=>{if(!v.length)return;const w=Object.keys(v[0]),S=[w.join(","),...v.map(j=>w.map(A=>`"${String(j[A]??"").replace(/"/g,'""')}"`).join(","))].join(`
300`),_=new Blob([S],{type:"text/csv"}),k=URL.createObjectURL(_),C=document.createElement("a");C.href=k,C.download=`${g}.csv`,C.click(),URL.revokeObjectURL(k)},m=r.filter(v=>v.name.toLowerCase().includes(l.toLowerCase())||v.email.toLowerCase().includes(l.toLowerCase())),b=s.filter(v=>v.name.toLowerCase().includes(d.toLowerCase())||v.email.toLowerCase().includes(d.toLowerCase())||(v.company??"").toLowerCase().includes(d.toLowerCase()));return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("header",{className:"border-b border-border bg-card",children:c.jsxs("div",{className:"container mx-auto px-6 py-4 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx(le,{variant:"ghost",size:"icon",onClick:()=>t("/"),children:c.jsx(d0,{className:"h-5 w-5"})}),c.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Lead Management"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs(le,{variant:"outline",size:"sm",onClick:f,disabled:o,children:[c.jsx(SE,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),"Refresh"]}),c.jsx(le,{variant:"ghost",size:"sm",onClick:()=>t("/crm"),children:"Event CRM"}),c.jsx(le,{variant:"ghost",size:"sm",onClick:e,children:"Sign Out"})]})]})}),c.jsxs("main",{className:"container mx-auto px-6 py-8",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6 mb-8",children:[c.jsxs(dr,{children:[c.jsxs(rn,{className:"flex flex-row items-center justify-between pb-2",children:[c.jsx(nn,{className:"text-sm font-medium text-muted-foreground",children:"Community Signups"}),c.jsx(v0,{className:"h-5 w-5 text-primary"})]}),c.jsx(hr,{children:c.jsx("div",{className:"text-3xl font-bold text-foreground",children:r.length})})]}),c.jsxs(dr,{children:[c.jsxs(rn,{className:"flex flex-row items-center justify-between pb-2",children:[c.jsx(nn,{className:"text-sm font-medium text-muted-foreground",children:"Sponsor Inquiries"}),c.jsx(vE,{className:"h-5 w-5 text-primary"})]}),c.jsx(hr,{children:c.jsx("div",{className:"text-3xl font-bold text-foreground",children:s.length})})]})]}),c.jsxs(bf,{defaultValue:"community",children:[c.jsxs(bc,{className:"mb-6",children:[c.jsx(ts,{value:"community",children:"Community Signups"}),c.jsx(ts,{value:"sponsors",children:"Sponsor Leads"})]}),c.jsx(rs,{value:"community",children:c.jsxs(dr,{children:[c.jsxs(rn,{className:"flex flex-row items-center justify-between",children:[c.jsx(nn,{children:"Community Signups"}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Kp,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(he,{placeholder:"Search by name or email...",value:l,onCh
300ange:v=>u(v.target.value),className:"pl-9 w-64"})]}),c.jsxs(le,{variant:"outline",size:"sm",onClick:()=>x(m,"community-signups"),disabled:!m.length,children:[c.jsx(Wp,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]})]}),c.jsx(hr,{children:o?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Loading..."}):m.length===0?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No signups found."}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Mo,{children:[c.jsx($o,{children:c.jsxs(kr,{children:[c.jsx(Oe,{children:"Name"}),c.jsx(Oe,{children:"Email"}),c.jsx(Oe,{children:"Signed Up"})]})}),c.jsx(Fo,{children:m.map(v=>c.jsxs(kr,{children:[c.jsx(Ie,{className:"font-medium",children:v.name}),c.jsx(Ie,{children:v.email}),c.jsx(Ie,{className:"text-muted-foreground text-sm",children:y(v.created_at)})]},v.id))})]})})})]})}),c.jsx(rs,{value:"sponsors",children:c.jsxs(dr,{children:[c.jsxs(rn,{className:"flex flex-row items-center justify-between",children:[c.jsx(nn,{children:"Sponsor Inquiries"}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Kp,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(he,{placeholder:"Search by name, email, or company...",value:d,onChange:v=>h(v.target.value),className:"pl-9 w-72"})]}),c.jsxs(le,{variant:"outline",size:"sm",onClick:()=>x(b,"sponsor-leads"),disabled:!b.length,children:[c.jsx(Wp,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]})]}),c.jsx(hr,{children:o?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Loading..."}):b.length===0?c.jsx("p",{className:"text-muted-foreground text-center py-8",children:"No sponsor inquiries found."}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Mo,{children:[c.jsx($o,{children:c.jsxs(kr,{children:[c.jsx(Oe,{children:"Name"}),c.jsx(Oe,{children:"Email"}),c.jsx(Oe,{children:"Company"}),c.jsx(Oe,{children:"Message"}),c.jsx(Oe,{children:"Submitted"})]})}),c.jsx(Fo,{children:b.map(v=>c.jsxs(kr,{children:[c.jsx(Ie,{className:"font-medium",children:v.name}),c.jsx(Ie,{children:v.email}),c.jsx(Ie,{children:v.company?c.jsx(Ex,{variant:"secondary",children:v.company}):c.jsx("span",{className:"text-muted-foreground",children:"—"})}),c.jsx(Ie,{className:"max-w-xs truncate text-sm",children:v.message||c.jsx("span",{className:"text-muted-foreground",children:"—"})}),c.jsx(Ie,{className:"text-muted-foreground text-sm",children:y(v.created_at)})]},v.id))})]})})})]})})]})]})]})},hg=({children:e,requireRole:t})=>{const{user:r,loading:n}=cs(),[s,i]=p.useState(null);return p.useEffect(()=>{n||(async()=>{if(!r){i(!1);return}if(!t){i(!0);return}const{data:a}=await ke.from("user_roles").select("role").eq("user_id",r.id).eq("role",t).maybeSingle();i(!!a)})()},[r,n,t]),n||s===null?c.jsx("div",{className:"flex items-center justify-center min-h-screen text-muted-foreground",children:"Loading..."}):s?c.jsx(c.Fragment,{children:e}):c.jsx(vj,{to:"/",replace:!0})},yO=new NT,wO=()=>c.jsx(RT,{client:yO,children:c.jsx(oT,{children:c.jsxs(Cj,{children:[c.jsx(sk,{}),c.jsx(Ok,{}),c.jsx(_j,{children:c.jsxs(wj,{children:[c.jsx(An,{path:"/",element:c.jsx(c2,{})}),c.jsx(An,{path:"/auth",element:c.jsx(R2,{})}),c.jsx(An,{path:"/sponsors",element:c.jsx(gO,{})}),c.jsx(An,{path:"/crm",element:c.jsx(hg,{requireRole:"admin",children:c.jsx(mO,{})})}),c.jsx(An,{path:"/admin/leads",element:c.jsx(hg,{requireRole:"admin",children:c.jsx(vO,{})})}),c.jsx(An,{path:"*",element:c.jsx(u2,{})})]})})]})})});Dy(document.getElementById("root")).render(c.jsx(wO,{}));

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.