vendor: 5,692 bytes, lines 1-9
1var Bf=e=>{throw TypeError(e)};var Kc=(e,t,r)=>t.has(e)||Bf("Cannot "+r);var j=(e,t,r)=>(Kc(e,t,"read from private field"),r?r.call(e):t.get(e)),ie=(e,t,r)=>t.has(e)?Bf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Y=(e,t,r,n)=>(Kc(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ve=(e,t,r)=>(Kc(e,t,"access private method"),r);var va=(e,t,r,n)=>({set _(s){Y(e,t,s,r)},get _(){return j(e,t,n)}});function $x(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 jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ng={exports:{}},rc={},Pg={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 ra=Symbol.for("react.element"),Mx=Symbol.for("react.portal"),Ux=Symbol.for("react.fragment"),Bx=Symbol.for("react.strict_mode"),Fx=Symbol.for("react.profiler"),zx=Symbol.for("react.provider"),Hx=Symbol.for("react.context"),Wx=Symbol.for("react.forward_ref"),Vx=Symbol.for("react.suspense"),qx=Symbol.for("react.memo"),Kx=Symbol.for("react.lazy"),Ff=Symbol.iterator;function Gx(e){return e===null||typeof e!="object"?null:(e=Ff&&e[Ff]||e["@@iterator"],typeof e=="function"?e:null)}var Rg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ag=Object.assign,Og={};function Ni(e,t,r){this.props=e,this.context=t,this.refs=Og,this.updater=r||Rg}Ni.prototype.isReactComponent={};Ni.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")};Ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ig(){}Ig.prototype=Ni.prototype;function dh(e,t,r){this.props=e,this.context=t,this.refs=Og,this.updater=r||Rg}var hh=dh.prototype=new Ig;hh.constructor=dh;Ag(hh,Ni.prototype);hh.isPureReactComponent=!0;var zf=Array.isArray,Lg=Object.prototype.hasOwnProperty,fh={current:null},Dg={key:!0,ref:!0,__self:!0,__source:!0};function $g(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)Lg.call(t,n)&&!Dg.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:ra,type:e,key:i,ref:o,props:s,_owner:fh.current}}function Jx(e,t){return{$$typeof:ra,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ph(e){return typeof e=="object"&&e!==null&&e.$$typeof===ra}function Qx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Hf=/\/+/g;function Gc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Qx(""+e.key):t.toString(36)}function Xa(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 ra:case Mx:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Gc(o,0):n,zf(s)?(r="",e!=null&&(r=e.replace(Hf,"$&/")+"/"),Xa(s,t,r,"",function(c){return c})):s!=null&&(ph(s)&&(s=Jx(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Hf,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",zf(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+Gc(i,a);o+=Xa(i,t,r,l,s)}else if(l=Gx(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+Gc(i,a++),o+=Xa(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 ya(e,t,r){if(e==null)return e;var n=[],s=0;return Xa(e,n,"","",function(i){return t.call(r,i,s++)}),n}function Yx(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 nt={current:null},Za={transition:null},Xx={ReactCurrentDispatcher:nt,ReactCurrentBatchConfig:Za,ReactCurrentOwner:fh};function Mg(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 6,137 bytes, lines 9-25
9re.Children={map:ya,forEach:function(e,t,r){ya(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ya(e,function(){t++}),t},toArray:function(e){return ya(e,function(t){return t})||[]},only:function(e){if(!ph(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=Ni;re.Fragment=Ux;re.Profiler=Fx;re.PureComponent=dh;re.StrictMode=Bx;re.Suspense=Vx;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xx;re.act=Mg;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=Ag({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=fh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Lg.call(t,l)&&!Dg.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:ra,type:e.type,key:s,ref:i,props:n,_owner:o}};re.createContext=function(e){return e={$$typeof:Hx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zx,_context:e},e.Consumer=e};re.createElement=$g;re.createFactory=function(e){var t=$g.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:Wx,render:e}};re.isValidElement=ph;re.lazy=function(e){return{$$typeof:Kx,_payload:{_status:-1,_result:e},_init:Yx}};re.memo=function(e,t){return{$$typeof:qx,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Za.transition;Za.transition={};try{e()}finally{Za.transition=t}};re.unstable_act=Mg;re.useCallback=function(e,t){return nt.current.useCallback(e,t)};re.useContext=function(e){return nt.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return nt.current.useDeferredValue(e)};re.useEffect=function(e,t){return nt.current.useEffect(e,t)};re.useId=function(){return nt.current.useId()};re.useImperativeHandle=function(e,t,r){return nt.current.useImperativeHandle(e,t,r)};re.useInsertionEffect=function(e,t){return nt.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return nt.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return nt.current.useMemo(e,t)};re.useReducer=function(e,t,r){return nt.current.useReducer(e,t,r)};re.useRef=function(e){return nt.current.useRef(e)};re.useState=function(e){return nt.current.useState(e)};re.useSyncExternalStore=function(e,t,r){return nt.current.useSyncExternalStore(e,t,r)};re.useTransition=function(){return nt.current.useTransition()};re.version="18.3.1";Pg.exports=re;var g=Pg.exports;const I=jg(g),mh=$x({__proto__:null,default:I},[g]);/** 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 Zx=g,eb=Symbol.for("react.element"),tb=Symbol.for("react.fragment"),rb=Object.prototype.hasOwnProperty,nb=Zx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sb={key:!0,ref:!0,__self:!0,__source:!0};function Ug(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)rb.call(t,n)&&!sb.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:eb,type:e,key:i,ref:o,props:s,_owner:nb.current}}rc.Fragment=tb;rc.jsx=Ug;rc.jsxs=Ug;Ng.exports=rc;var u=Ng.exports,Bg={exports:{}},bt={},Fg={exports:{}},zg={};/** 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 $=T.length;T.push(P);e:for(;0<$;){var J=$-1>>>1,F=T[J];if(0<s(F,P))T[J]=P,T[$]=F,$=J;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],$=T.pop();if($!==P){T[0]=$;e:for(var J=0,F=T.length,X=F>>>1;J<X;){var ee=2*(J+1)-1,ye=T[ee],Oe=ee+1,ne=T[Oe];if(0>s(ye,$))Oe<F&&0>s(ne,ye)?(T[J]=ne,T[Oe]=$,J=Oe):(T[J]=ye,T[ee]=$,J=ee);else if(Oe<F&&0>s(ne,$))T[J]=ne,T[Oe]=$,J=Oe;else break e}}return P}function s(T,P){var $=T.sortIndex-P.sortIndex;return $!==0?$: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=[],c=[],d=1,h=null,p=3,f=!1,b=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=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(c);P!==null;){if(P.callback===null)n(c);else if(P.startTime<=T)n(c),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(c)}}function _(T){if(m=!1,w(T),!b)if(r(l)!==null)b=!0,V(S);else{var P=r(c);P!==null&&K(_,P.startTime-T)}}function S(T,P){b=!1,m&&(m=!1,y(N),N=-1),f=!0;var $=p;try{for(w(P),h=r(l);h!==null&&(!(h.expirationTime>P)||T&&!B());){var J=h.callback;if(typeof J=="function"){h.callback=null,p=h.priorityLevel;var F=J(h.expirationTime<=P);P=e.unstable_now(),typeof F=="function"?h.callback=F:h===r(l)&&n(l),w(P)}else n(l);h=r(l)}if(h!==null)var X=!0;else{var ee=r(c);ee!==null&&K(_,ee.startTime-P),X=!1}return X}finally{h=null,p=$,f=!1}}var k=!1,E=null,N=-1,R=5,O=-1;function B(){return!(e.unstable_now()-O<R)}function D(){if(E!==null){var T=e.unstable_now();O=T;var P=!0;try{P=E(!0,T)}finally{P?W():(k=!1,E=null)}}else k=!1}var W;if(typeof v=="function")W=function(){v(D)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,q=L.port2;L.port1.onmessage=D,W=function(){q.postMessage(null)}}
vendor: 8,508 bytes, lines 25-34
25else W=function(){x(D,0)};function V(T){E=T,k||(k=!0,W())}function K(T,P){N=x(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(){b||f||(b=!0,V(S))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(p){case 1:case 2:case 3:var P=3;break;default:P=p}var $=p;p=P;try{return T()}finally{p=$}},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 $=p;p=T;try{return P()}finally{p=$}},e.unstable_scheduleCallback=function(T,P,$){var J=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?J+$:J):$=J,T){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=$+F,T={id:d++,callback:P,priorityLevel:T,startTime:$,expirationTime:F,sortIndex:-1},$>J?(T.sortIndex=$,t(c,T),r(l)===null&&T===r(c)&&(m?(y(N),N=-1):m=!0,K(_,$-J))):(T.sortIndex=F,t(l,T),b||f||(b=!0,V(S))),T},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(T){var P=p;return function(){var $=p;p=P;try{return T.apply(this,arguments)}finally{p=$}}}})(zg);Fg.exports=zg;var ib=Fg.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 ob=g,xt=ib;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hg=new Set,So={};function ps(e,t){wi(e,t),wi(e+"Capture",t)}function wi(e,t){for(So[e]=t,e=0;e<t.length;e++)Hg.add(t[e])}var Fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bu=Object.prototype.hasOwnProperty,ab=/^[: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]*$/,Wf={},Vf={};function lb(e){return Bu.call(Vf,e)?!0:Bu.call(Wf,e)?!1:ab.test(e)?Vf[e]=!0:(Wf[e]=!0,!1)}function cb(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 ub(e,t,r,n){if(t===null||typeof t>"u"||cb(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 st(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ze[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var gh=/[\-:]([a-z])/g;function vh(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(gh,vh);ze[t]=new st(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(gh,vh);ze[t]=new st(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(gh,vh);ze[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function yh(e,t,r,n){var s=ze.hasOwnProperty(t)?ze[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ub(t,r,s,n)&&(r=null),n||s===null?lb(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 Gr=ob.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wa=Symbol.for("react.element"),Fs=Symbol.for("react.portal"),zs=Symbol.for("react.fragment"),wh=Symbol.for("react.strict_mode"),Fu=Symbol.for("react.profiler"),Wg=Symbol.for("react.provider"),Vg=Symbol.for("react.context"),xh=Symbol.for("react.forward_ref"),zu=Symbol.for("react.suspense"),Hu=Symbol.for("react.suspense_list"),bh=Symbol.for("react.memo"),nn=Symbol.for("react.lazy"),qg=Symbol.for("react.offscreen"),qf=Symbol.iterator;function qi(e){return e===null||typeof e!="object"?null:(e=qf&&e[qf]||e["@@iterator"],typeof e=="function"?e:null)}var be=Object.assign,Jc;function no(e){if(Jc===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Jc=t&&t[1]||""}return` 34`+Jc+e}var Qc=!1;function Yc(e,t){if(!e||Qc)return"";Qc=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 16,737 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=n.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Qc=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?no(e):""}function db(e){switch(e.tag){case 5:return no(e.type);case 16:return no("Lazy");case 13:return no("Suspense");case 19:return no("SuspenseList");case 0:case 2:case 15:return e=Yc(e.type,!1),e;case 11:return e=Yc(e.type.render,!1),e;case 1:return e=Yc(e.type,!0),e;default:return""}}function Wu(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 zs:return"Fragment";case Fs:return"Portal";case Fu:return"Profiler";case wh:return"StrictMode";case zu:return"Suspense";case Hu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vg:return(e.displayName||"Context")+".Consumer";case Wg:return(e._context.displayName||"Context")+".Provider";case xh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bh:return t=e.displayName||null,t!==null?t:Wu(e.type)||"Memo";case nn:t=e._payload,e=e._init;try{return Wu(e(t))}catch{}}return null}function hb(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 Wu(t);case 8:return t===wh?"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 jn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fb(e){var t=Kg(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 xa(e){e._valueTracker||(e._valueTracker=fb(e))}function Gg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Kg(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function gl(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 Vu(e,t){var r=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Kf(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=jn(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 Jg(e,t){t=t.checked,t!=null&&yh(e,"checked",t,!1)}function qu(e,t){Jg(e,t);var r=jn(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")?Ku(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ku(e,t.type,jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gf(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 Ku(e,t,r){(t!=="number"||gl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var so=Array.isArray;function ti(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=""+jn(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 Gu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return be({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jf(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(A(92));if(so(r)){if(1<r.length)throw Error(A(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:jn(r)}}function Qg(e,t){var r=jn(t.value),n=jn(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 Qf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Yg(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 Ju(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ba,Xg=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(ba=ba||document.createElement("div"),ba.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ba.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ko(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var co={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},pb=["Webkit","ms","Moz","O"];Object.keys(co).forEach(function(e){pb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),co[t]=co[e]})});function Zg(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||co.hasOwnProperty(e)&&co[e]?(""+t).trim():t+"px"}function ev(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Zg(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var mb=be({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 Qu(e,t){if(t){if(mb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Yu(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 Xu=null;function _h(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zu=null,ri=null,ni=null;function Yf(e){if(e=ia(e)){if(typeof Zu!="function")throw Error(A(280));var t=e.stateNode;t&&(t=ac(t),Zu(e.stateNode,e.type,t))}}function tv(e){ri?ni?ni.push(e):ni=[e]:ri=e}function rv(){if(ri){var e=ri,t=ni;if(ni=ri=null,Yf(e),t)for(e=0;e<t.length;e++)Yf(t[e])}}function nv(e,t){return e(t)}function sv(){}var Xc=!1;function iv(e,t,r){if(Xc)return e(t,r);Xc=!0;try{return nv(e,t,r)}finally{Xc=!1,(ri!==null||ni!==null)&&(sv(),rv())}}function Eo(e,t){var r=e.stateNode;if(r===null)return null;var n=ac(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(A(231,t,typeof r));return r}var ed=!1;if(Fr)try{var Ki={};Object.defineProperty(Ki,"passive",{get:function(){ed=!0}}),window.addEventListener("test",Ki,Ki),window.removeEventListener("test",Ki,Ki)}catch{ed=!1}function gb(e,t,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var uo=!1,vl=null,yl=!1,td=null,vb={onError:function(e){uo=!0,vl=e}};function yb(e,t,r,n,s,i,o,a,l){uo=!1,vl=null,gb.apply(vb,arguments)}function wb(e,t,r,n,s,i,o,a,l){if(yb.apply(this,arguments),uo){if(uo){var c=vl;uo=!1,vl=null}else throw Error(A(198));yl||(yl=!0,td=c)}}function ms(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 ov(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 Xf(e){if(ms(e)!==e)throw Error(A(188))}function xb(e){var t=e.alternate;if(!t){if(t=ms(e),t===null)throw Error(A(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Xf(s),e;if(i===n)return Xf(s),t;i=i.sibling}throw Error(A(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(A(189))}}if(r.alternate!==n)throw Error(A(190))}if(r.tag!==3)throw Error(A(188));return r.stateNode.current===r?e:t}function av(e){return e=xb(e),e!==null?lv(e):null}function lv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lv(e);if(t!==null)return t;e=e.sibling}return null}var cv=xt.unstable_scheduleCallback,Zf=xt.unstable_cancelCallback,bb=xt.unstable_shouldYield,_b=xt.unstable_requestPaint,Ne=xt.unstable_now,Sb=xt.unstable_getCurrentPriorityLevel,Sh=xt.unstable_ImmediatePriority,uv=xt.unstable_UserBlockingPriority,wl=xt.unstable_NormalPriority,kb=xt.unstable_LowPriority,dv=xt.unstable_IdlePriority,nc=null,_r=null;function Eb(e){if(_r&&typeof _r.onCommitFiberRoot=="function")try{_r.onCommitFiberRoot(nc,e,void 0,(e.current.flags&128)===128)}catch{}}var er=Math.clz32?Math.clz32:jb,Cb=Math.log,Tb=Math.LN2;function jb(e){return e>>>=0,e===0?32:31-(Cb(e)/Tb|0)|0}var _a=64,Sa=4194304;function io(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 xl(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=io(a):(i&=o,i!==0&&(n=io(i)))}else o=r&~s,o!==0?n=io(o):i!==0&&(n=io(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-er(t),s=1<<r,n|=e[r],t&=~s;return n}function Nb(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 Pb(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-er(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Nb(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function rd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hv(){var e=_a;return _a<<=1,!(_a&4194240)&&(_a=64),e}function Zc(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function na(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-er(t),e[t]=r}function Rb(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-er(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function kh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-er(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ce=0;function fv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var pv,Eh,mv,gv,vv,nd=!1,ka=[],wn=null,xn=null,bn=null,Co=new Map,To=new Map,on=[],Ab="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 ep(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":xn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":Co.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":To.delete(t.pointerId)}}function Gi(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=ia(t),t!==null&&Eh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Ob(e,t,r,n,s){switch(t){case"focusin":return wn=Gi(wn,e,t,r,n,s),!0;case"dragenter":return xn=Gi(xn,e,t,r,n,s),!0;case"mouseover":return bn=Gi(bn,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Co.set(i,Gi(Co.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,To.set(i,Gi(To.get(i)||null,e,t,r,n,s)),!0}return!1}function yv(e){var t=Jn(e.target);if(t!==null){var r=ms(t);if(r!==null){if(t=r.tag,t===13){if(t=ov(r),t!==null){e.blockedOn=t,vv(e.priority,function(){mv(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 el(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=sd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Xu=n,r.target.dispatchEvent(n),Xu=null}else return t=ia(r),t!==null&&Eh(t),e.blockedOn=r,!1;t.shift()}return!0}function tp(e,t,r){el(e)&&r.delete(t)}function Ib(){nd=!1,wn!==null&&el(wn)&&(wn=null),xn!==null&&el(xn)&&(xn=null),bn!==null&&el(bn)&&(bn=null),Co.forEac
vendor: 11,841 bytes, line 37
37h(tp),To.forEach(tp)}function Ji(e,t){e.blockedOn===t&&(e.blockedOn=null,nd||(nd=!0,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,Ib)))}function jo(e){function t(s){return Ji(s,e)}if(0<ka.length){Ji(ka[0],e);for(var r=1;r<ka.length;r++){var n=ka[r];n.blockedOn===e&&(n.blockedOn=null)}}for(wn!==null&&Ji(wn,e),xn!==null&&Ji(xn,e),bn!==null&&Ji(bn,e),Co.forEach(t),To.forEach(t),r=0;r<on.length;r++)n=on[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<on.length&&(r=on[0],r.blockedOn===null);)yv(r),r.blockedOn===null&&on.shift()}var si=Gr.ReactCurrentBatchConfig,bl=!0;function Lb(e,t,r,n){var s=ce,i=si.transition;si.transition=null;try{ce=1,Ch(e,t,r,n)}finally{ce=s,si.transition=i}}function Db(e,t,r,n){var s=ce,i=si.transition;si.transition=null;try{ce=4,Ch(e,t,r,n)}finally{ce=s,si.transition=i}}function Ch(e,t,r,n){if(bl){var s=sd(e,t,r,n);if(s===null)cu(e,t,n,_l,r),ep(e,n);else if(Ob(s,e,t,r,n))n.stopPropagation();else if(ep(e,n),t&4&&-1<Ab.indexOf(e)){for(;s!==null;){var i=ia(s);if(i!==null&&pv(i),i=sd(e,t,r,n),i===null&&cu(e,t,n,_l,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else cu(e,t,n,null,r)}}var _l=null;function sd(e,t,r,n){if(_l=null,e=_h(n),e=Jn(e),e!==null)if(t=ms(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ov(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 _l=e,null}function wv(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(Sb()){case Sh:return 1;case uv:return 4;case wl:case kb:return 16;case dv:return 536870912;default:return 16}default:return 16}}var gn=null,Th=null,tl=null;function xv(){if(tl)return tl;var e,t=Th,r=t.length,n,s="value"in gn?gn.value:gn.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 tl=s.slice(e,1<n?1-n:void 0)}function rl(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 Ea(){return!0}function rp(){return!1}function _t(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)?Ea:rp,this.isPropagationStopped=rp,this}return be(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=Ea)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ea)},persist:function(){},isPersistent:Ea}),t}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jh=_t(Pi),sa=be({},Pi,{view:0,detail:0}),$b=_t(sa),eu,tu,Qi,sc=be({},sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nh,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!==Qi&&(Qi&&e.type==="mousemove"?(eu=e.screenX-Qi.screenX,tu=e.screenY-Qi.screenY):tu=eu=0,Qi=e),eu)},movementY:function(e){return"movementY"in e?e.movementY:tu}}),np=_t(sc),Mb=be({},sc,{dataTransfer:0}),Ub=_t(Mb),Bb=be({},sa,{relatedTarget:0}),ru=_t(Bb),Fb=be({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),zb=_t(Fb),Hb=be({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wb=_t(Hb),Vb=be({},Pi,{data:0}),sp=_t(Vb),qb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kb={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"},Gb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gb[e])?!!t[e]:!1}function Nh(){return Jb}var Qb=be({},sa,{key:function(e){if(e.key){var t=qb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nh,charCode:function(e){return e.type==="keypress"?rl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yb=_t(Qb),Xb=be({},sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=_t(Xb),Zb=be({},sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nh}),e1=_t(Zb),t1=be({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),r1=_t(t1),n1=be({},sc,{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}),s1=_t(n1),i1=[9,13,27,32],Ph=Fr&&"CompositionEvent"in window,ho=null;Fr&&"documentMode"in document&&(ho=document.documentMode);var o1=Fr&&"TextEvent"in window&&!ho,bv=Fr&&(!Ph||ho&&8<ho&&11>=ho),op=" ",ap=!1;function _v(e,t){switch(e){case"keyup":return i1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hs=!1;function a1(e,t){switch(e){case"compositionend":return Sv(t);case"keypress":return t.which!==32?null:(ap=!0,op);case"textInput":return e=t.data,e===op&&ap?null:e;default:return null}}function l1(e,t){if(Hs)return e==="compositionend"||!Ph&&_v(e,t)?(e=xv(),tl=Th=gn=null,Hs=!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 bv&&t.locale!=="ko"?null:t.data;default:return null}}var c1={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 lp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!c1[e.type]:t==="textarea"}function kv(e,t,r,n){tv(n),t=Sl(t,"onChange"),0<t.length&&(r=new jh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var fo=null,No=null;function u1(e){Lv(e,0)}function ic(e){var t=qs(e);if(Gg(t))return e}function d1(e,t){if(e==="change")return t}var Ev=!1;if(Fr){var nu;if(Fr){var su="oninput"in document;if(!su){var cp=document.createElement("div");cp.setAttribute("oninput","return;"),su=typeof cp.oninput=="function"}nu=su}else nu=!1;Ev=nu&&(!document.documentMode||9<document.documentMode)}function up(){fo&&(fo.detachEvent("onpropertychange",Cv),No=fo=null)}function Cv(e){if(e.propertyName==="value"&&ic(No)){var t=[];kv(t,No,e,_h(e)),iv(u1,t)}}function h1(e,t,r){e==="focusin"?(up(),fo=t,No=r,fo.attachEvent("onpropertychange",Cv)):e==="focusout"&&up()}function f1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic(No)}function p1(e,t){if(e==="click")return ic(t)}function m1(e,t){if(e==="input"||e==="change")return ic(t)}function g1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rr=typeof Object.is=="function"?Object.is:g1;function Po(e,t){if(rr(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)||!rr(e[s],t[s]))return!1}return!0}function dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hp(e,t){var r=dp(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=dp(r)}}function Tv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jv(){for(var e=window,t=gl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=gl(e.document)}return t}function Rh(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 v1(e){var t=jv(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Tv(r.ownerDocument.documentElement,r)){if(n!==null&&Rh(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=hp(r,i);var o=hp(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 y1=Fr&&"documentMode"in document&&11>=document.documentMode,Ws=null,id=null,po=null,od=!1;function fp(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;od||Ws==null||Ws!==gl(n)||(n=Ws,"selectionStart"in n&&Rh(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}),po&&Po(po,n)||(po=n,n=Sl(id,"onSelect"),0<n.length&&(t=new jh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ws)))}function Ca(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vs={animationend:Ca("Animation","AnimationEnd"),animationiteration:Ca("Animation","AnimationIteration"),animationstart:Ca("Animation","AnimationStart"),transitionend:Ca("Transition","TransitionEnd")},iu={},Nv={};Fr&&(Nv=document.createElement("div").style,"AnimationEvent"in window||(delete Vs.animationend.animation,delete Vs.animationiteration.animation,delete Vs.animationstart.animation),"TransitionEvent"in window||delete Vs.transitionend.transition);function oc(e){if(iu[e])return iu[e];if(!Vs[e])return e;var t=Vs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Nv)return iu[e]=t[r];return e}var Pv=oc("animationend"),Rv=oc("animationiteration"),Av=oc("animationstart"),Ov=oc("transitionend"),Iv=new Map,pp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function An(e,t){Iv.set(e,t),ps(t,[e])}for(var ou=0;ou<pp.length;ou++){var au=pp[ou],w1=au.toLowerCase(),x1=au[0].toUpperCase()+au.slice(1);An(w1,"on"+x1)}An(Pv,"onAnimationEnd");An(Rv,"onAnimationIteration");An(Av,"onAnimationStart");An("dblclick","onDoubleClick");An("focusin","onFocus");An("focusout","onBlur");An(Ov,"onTransitionEnd");wi("onMouseEnter",["mouseout","mouseover"]);wi("onMouseLeave",["mouseout","mouseover"]);wi("onPointerEnter",["pointerout","pointerover"]);wi("onPointerLeave",["pointerout","pointerover"]);ps("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ps("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ps("onBeforeInput",["compositionend","keypress","textInput","paste"]);ps("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ps("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ps("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oo="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(" "),b1=new Set("cancel close invalid load scroll toggle".split(" ").concat(oo));function mp(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,wb(n,t,void 0,e),e.currentTarget=null}function Lv(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;mp(s,a,c),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;mp(s,a,c),i=l}}}if(yl)throw e=td,yl=!1,td=null,e}function pe(e,t){var r=t[dd];r===void 0&&(r=t[dd]=new Set);var n=e+"__bubble";r.has(n)||(Dv(t,e,2,!1),r.add(n))}function lu(e,t,r){var n=0;t&&(n|=4),Dv(r,e,n,t)}var Ta="_reactListening"+Math.random().toString(36).slice(2);function Ro(e){if(!e[Ta]){e[Ta]=!0,Hg.forEach(function(r){r!=="selectionchange"&&(b1.has(r)||lu(r,!1,e),lu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ta]||(t[Ta]=!0,lu("selectionchange",!1,t))}}function Dv(e,t,r,n){switch(wv(t)){case 1:var s=Lb;break;case 4:s=Db;break;default:s=Ch}r=s.bind(null,t,r,e),s=void 0,!ed||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 cu(e,t,r,n,s){var i=n;
vendor: 22,310 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=Jn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}iv(function(){var c=i,d=_h(r),h=[];e:{var p=Iv.get(e);if(p!==void 0){var f=jh,b=e;switch(e){case"keypress":if(rl(r)===0)break e;case"keydown":case"keyup":f=Yb;break;case"focusin":b="focus",f=ru;break;case"focusout":b="blur",f=ru;break;case"beforeblur":case"afterblur":f=ru;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Ub;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=e1;break;case Pv:case Rv:case Av:f=zb;break;case Ov:f=r1;break;case"scroll":f=$b;break;case"wheel":f=s1;break;case"copy":case"cut":case"paste":f=Wb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=ip}var m=(t&4)!==0,x=!m&&e==="scroll",y=m?p!==null?p+"Capture":null:p;m=[];for(var v=c,w;v!==null;){w=v;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,y!==null&&(_=Eo(v,y),_!=null&&m.push(Ao(v,_,w)))),x)break;v=v.return}0<m.length&&(p=new f(p,b,null,r,d),h.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==Xu&&(b=r.relatedTarget||r.fromElement)&&(Jn(b)||b[zr]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(b=r.relatedTarget||r.toElement,f=c,b=b?Jn(b):null,b!==null&&(x=ms(b),b!==x||b.tag!==5&&b.tag!==6)&&(b=null)):(f=null,b=c),f!==b)){if(m=np,_="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=ip,_="onPointerLeave",y="onPointerEnter",v="pointer"),x=f==null?p:qs(f),w=b==null?p:qs(b),p=new m(_,v+"leave",f,r,d),p.target=x,p.relatedTarget=w,_=null,Jn(d)===c&&(m=new m(y,v+"enter",b,r,d),m.target=w,m.relatedTarget=x,_=m),x=_,f&&b)t:{for(m=f,y=b,v=0,w=m;w;w=Cs(w))v++;for(w=0,_=y;_;_=Cs(_))w++;for(;0<v-w;)m=Cs(m),v--;for(;0<w-v;)y=Cs(y),w--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=Cs(m),y=Cs(y)}m=null}else m=null;f!==null&&gp(h,p,f,m,!1),b!==null&&x!==null&&gp(h,x,b,m,!0)}}e:{if(p=c?qs(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var S=d1;else if(lp(p))if(Ev)S=m1;else{S=f1;var k=h1}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=p1);if(S&&(S=S(e,c))){kv(h,S,r,d);break e}k&&k(e,p,c),e==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&Ku(p,"number",p.value)}switch(k=c?qs(c):window,e){case"focusin":(lp(k)||k.contentEditable==="true")&&(Ws=k,id=c,po=null);break;case"focusout":po=id=Ws=null;break;case"mousedown":od=!0;break;case"contextmenu":case"mouseup":case"dragend":od=!1,fp(h,r,d);break;case"selectionchange":if(y1)break;case"keydown":case"keyup":fp(h,r,d)}var E;if(Ph)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Hs?_v(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(bv&&r.locale!=="ko"&&(Hs||N!=="onCompositionStart"?N==="onCompositionEnd"&&Hs&&(E=xv()):(gn=d,Th="value"in gn?gn.value:gn.textContent,Hs=!0)),k=Sl(c,N),0<k.length&&(N=new sp(N,e,null,r,d),h.push({event:N,listeners:k}),E?N.data=E:(E=Sv(r),E!==null&&(N.data=E)))),(E=o1?a1(e,r):l1(e,r))&&(c=Sl(c,"onBeforeInput"),0<c.length&&(d=new sp("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:c}),d.data=E))}Lv(h,t)})}function Ao(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Sl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Eo(e,r),i!=null&&n.unshift(Ao(e,i,s)),i=Eo(e,t),i!=null&&n.push(Ao(e,i,s))),e=e.return}return n}function Cs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gp(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=Eo(r,i),l!=null&&o.unshift(Ao(r,l,a))):s||(l=Eo(r,i),l!=null&&o.push(Ao(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var _1=/\r\n?/g,S1=/\u0000|\uFFFD/g;function vp(e){return(typeof e=="string"?e:""+e).replace(_1,` 38`).replace(S1,"")}function ja(e,t,r){if(t=vp(t),vp(e)!==t&&r)throw Error(A(425))}function kl(){}var ad=null,ld=null;function cd(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 ud=typeof setTimeout=="function"?setTimeout:void 0,k1=typeof clearTimeout=="function"?clearTimeout:void 0,yp=typeof Promise=="function"?Promise:void 0,E1=typeof queueMicrotask=="function"?queueMicrotask:typeof yp<"u"?function(e){return yp.resolve(null).then(e).catch(C1)}:ud;function C1(e){setTimeout(function(){throw e})}function uu(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),jo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);jo(t)}function _n(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 wp(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 Ri=Math.random().toString(36).slice(2),wr="__reactFiber$"+Ri,Oo="__reactProps$"+Ri,zr="__reactContainer$"+Ri,dd="__reactEvents$"+Ri,T1="__reactListeners$"+Ri,j1="__reactHandles$"+Ri;function Jn(e){var t=e[wr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[zr]||r[wr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=wp(e);e!==null;){if(r=e[wr])return r;e=wp(e)}return t}e=r,r=e.parentNode}return null}function ia(e){return e=e[wr]||e[zr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function ac(e){return e[Oo]||null}var hd=[],Ks=-1;function On(e){return{current:e}}function ge(e){0>Ks||(e.current=hd[Ks],hd[Ks]=null,Ks--)}function he(e,t){Ks++,hd[Ks]=e.current,e.current=t}var Nn={},Qe=On(Nn),ut=On(!1),as=Nn;function xi(e,t){var r=e.type.contextTypes;if(!r)return Nn;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 dt(e){return e=e.childContextTypes,e!=null}function El(){ge(ut),ge(Qe)}function xp(e,t,r){if(Qe.current!==Nn)throw Error(A(168));he(Qe,t),he(ut,r)}function $v(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(A(108,hb(e)||"Unknown",s));return be({},r,n)}function Cl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,as=Qe.current,he(Qe,e),he(ut,ut.current),!0}function bp(e,t,r){var n=e.stateNode;if(!n)throw Error(A(169));r?(e=$v(e,t,as),n.__reactInternalMemoizedMergedChildContext=e,ge(ut),ge(Qe),he(Qe,e)):ge(ut),he(ut,r)}var Dr=null,lc=!1,du=!1;function Mv(e){Dr===null?Dr=[e]:Dr.push(e)}function N1(e){lc=!0,Mv(e)}function In(){if(!du&&Dr!==null){du=!0;var e=0,t=ce;try{var r=Dr;for(ce=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Dr=null,lc=!1}catch(s){throw Dr!==null&&(Dr=Dr.slice(e+1)),cv(Sh,In),s}finally{ce=t,du=!1}}return null}var Gs=[],Js=0,Tl=null,jl=0,Pt=[],Rt=0,ls=null,Mr=1,Ur="";function Wn(e,t){Gs[Js++]=jl,Gs[Js++]=Tl,Tl=e,jl=t}function Uv(e,t,r){Pt[Rt++]=Mr,Pt[Rt++]=Ur,Pt[Rt++]=ls,ls=e;var n=Mr;e=Ur;var s=32-er(n)-1;n&=~(1<<s),r+=1;var i=32-er(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Mr=1<<32-er(t)+s|r<<s|n,Ur=i+e}else Mr=1<<i|r<<s|n,Ur=e}function Ah(e){e.return!==null&&(Wn(e,1),Uv(e,1,0))}function Oh(e){for(;e===Tl;)Tl=Gs[--Js],Gs[Js]=null,jl=Gs[--Js],Gs[Js]=null;for(;e===ls;)ls=Pt[--Rt],Pt[Rt]=null,Ur=Pt[--Rt],Pt[Rt]=null,Mr=Pt[--Rt],Pt[Rt]=null}var yt=null,vt=null,ve=!1,Zt=null;function Bv(e,t){var r=At(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 _p(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,yt=e,vt=_n(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yt=e,vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ls!==null?{id:Mr,overflow:Ur}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=At(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,yt=e,vt=null,!0):!1;default:return!1}}function fd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function pd(e){if(ve){var t=vt;if(t){var r=t;if(!_p(e,t)){if(fd(e))throw Error(A(418));t=_n(r.nextSibling);var n=yt;t&&_p(e,t)?Bv(n,r):(e.flags=e.flags&-4097|2,ve=!1,yt=e)}}else{if(fd(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,yt=e}}}function Sp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yt=e}function Na(e){if(e!==yt)return!1;if(!ve)return Sp(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cd(e.type,e.memoizedProps)),t&&(t=vt)){if(fd(e))throw Fv(),Error(A(418));for(;t;)Bv(e,t),t=_n(t.nextSibling)}if(Sp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){vt=_n(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}vt=null}}else vt=yt?_n(e.stateNode.nextSibling):null;return!0}function Fv(){for(var e=vt;e;)e=_n(e.nextSibling)}function bi(){vt=yt=null,ve=!1}function Ih(e){Zt===null?Zt=[e]:Zt.push(e)}var P1=Gr.ReactCurrentBatchConfig;function Yi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(A(309));var n=r.stateNode}if(!n)throw Error(A(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(A(284));if(!r._owner)throw Error(A(290,e))}return e}function Pa(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kp(e){var t=e._init;return t(e._payload)}function zv(e){function t(y,v){if(e){var w=y.deletions;w===null?(y.deletions=[v],y.flags|=16):w.push(v)}}function r(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function n(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function s(y,v){return y=Cn(y,v),y.index=0,y.sibling=null,y}function i(y,v,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<v?(y.flags|=2,v):w):(y.flags|=2,v)):(y.flags|=1048576,v)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,w,_){return v===null||v.tag!==6?(v=yu(w,y.mode,_),v.return=y,v):(v=s(v,w),v.return=y,v)}function l(y,v,w,_){var S=w.type;return S===zs?d(y,v,w.props.children,_,w.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===nn&&kp(S)===v.type)?(_=s(v,w.props),_.ref=Yi(y,v,w),_.return=y,_):(_=cl(w.type,w.key,w.props,null,y.mode,_),_.ref=Yi(y,v,w),_.return=y,_)}function c(y,v,w,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=wu(w,y.mode,_),v.return=y,v):(v=s(v,w.children||[]),v.return=y,v)}function d(y,v,w,_,S){return v===null||v.tag!==7?(v=os(w,y.mode,_,S),v.return=y,v):(v=s(v,w),v.return=y,v)}function h(y,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=yu(""+v,y.mode,w),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case wa:return w=cl(v.type,v.key,v.props,null,y.mode,w),w.ref=Yi(y,null,v),w.return=y,w;case Fs:return v=wu(v,y.mode,w),v.return=y,v;case nn:var _=v._init;return h(y,_(v._payload),w)}if(so(v)||qi(v))return v=os(v,y.mode,w,null),v.return=y,v;Pa(y,v)}return null}function p(y,v,w,_){var S=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(y,v,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case wa:return w.key===S?l(y,v,w,_):null;case Fs:return w.key===S?c(y,v,w,_):null;case nn:return S=w._init,p(y,v,S(w._payload),_)}if(so(w)||qi(w))return S!==null?null:d(y,v,w,_,null);Pa(y,w)}return null}function f(y,v,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(w)||null,a(v,y,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case wa:return y=y.get(_.key===null?w:_.key)||null,l(v,y,_,S);case Fs:return y=y.get(_.key===null?w:_.key)||null,c(v,y,_,S);case nn:var k=_._init;return f(y,v,w,k(_._payload),S)}if(so(_)||qi(_))return y=y.get(w)||null,d(v,y,_,S,null);Pa(v,_)}return null}function b(y,v,w,_){for(var S=null,k=null,E=v,N=v=0,R=null;E!==null&&N<w.length;N++){E.index>N?(R=E,E=null):R=E.sibling;var O=p(y,E,w[N],_);if(O===null){E===null&&(E=R);break}e&&E&&O.alternate===null&&t(y,E),v=i(O,v,N),k===null?S=O:k.sibling=O,k=O,E=R}if(N===w.length)return r(y,E),ve&&Wn(y,N),S;if(E===null){for(;N<w.length;N++)E=h(y,w[N],_),E!==null&&(v=i(E,v,N),k===null?S=E:k.sibling=E,k=E);return ve&&Wn(y,N),S}for(E=n(y,E);N<w.length;N++)R=f(E,y,N,w[N],_),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?N:R.key),v=i(R,v,N),k===null?S=R:k.sibling=R,k=R);return e&&E.forEach(function(B){return t(y,B)}),ve&&Wn(y,N),S}function m(y,v,w,_){var S=qi(w);if(typeof S!="function")throw Error(A(150));if(w=S.call(w),w==null)throw Error(A(151));for(var k=S=null,E=v,N=v=0,R=null,O=w.next();E!==null&&!O.done;N++,O=w.next()){E.index>N?(R=E,E=null):R=E.sibling;var B=p(y,E,O.value,_);if(B===null){E===null&&(E=R);break}e&&E&&B.alternate===null&&t(y,E),v=i(B,v,N),k===null?S=B:k.sibling=B,k=B,E=R}if(O.done)return r(y,E),ve&&Wn(y,N),S;if(E===null){for(;!O.done;N++,O=w.next())O=h(y,O.value,_),O!==null&&(v=i(O,v,N),k===null?S=O:k.sibling=O,k=O);return ve&&Wn(y,N),S}for(E=n(y,E);!O.done;N++,O=w.next())O=f(E,y,N,O.value,_),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?N:O.key),v=i(O,v,N),k===null?S=O:k.sibling=O,k=O);return e&&E.forEach(function(D){return t(y,D)}),ve&&Wn(y,N),S}function x(y,v,w,_){if(typeof w=="object"&&w!==null&&w.type===zs&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case wa:e:{for(var S=w.key,k=v;k!==null;){if(k.key===S){if(S=w.type,S===zs){if(k.tag===7){r(y,k.sibling),v=s(k,w.props.children),v.return=y,y=v;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===nn&&kp(S)===k.type){r(y,k.sibling),v=s(k,w.props),v.ref=Yi(y,k,w),v.return=y,y=v;break e}r(y,k);break}else t(y,k);k=k.sibling}w.type===zs?(v=os(w.props.children,y.mode,_,w.key),v.return=y,y=v):(_=cl(w.type,w.key,w.props,null,y.mode,_),_.ref=Yi(y,v,w),_.return=y,y=_)}return o(y);case Fs:e:{for(k=w.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){r(y,v.sibling),v=s(v,w.children||[]),v.return=y,y=v;break e}else{r(y,v);break}else t(y,v);v=v.sibling}v=wu(w,y.mode,_),v.return=y,y=v}return o(y);case nn:return k=w._init,x(y,v,k(w._payload),_)}if(so(w))return b(y,v,w,_);if(qi(w))return m(y,v,w,_);Pa(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(r(y,v.sibling),v=s(v,w),v.return=y,y=v):(r(y,v),v=yu(w,y.mode,_),v.return=y,y=v),o(y)):r(y,v)}return x}var _i=zv(!0),Hv=zv(!1),Nl=On(null),Pl=null,Qs=null,Lh=null;function Dh(){Lh=Qs=Pl=null}function $h(e){var t=Nl.current;ge(Nl),e._currentValue=t}function md(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 ii(e,t){Pl=e,Lh=Qs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ct=!0),e.firstContext=null)}function It(e){var t=e._currentValue;if(Lh!==e)if(e={context:e,memoizedValue:t,next:null},Qs===null){if(Pl===null)throw Error(A(308));Qs=e,Pl.dependencies={lanes:0,firstContext:e}}else Qs=Qs.next=e;return t}var Qn=null;function Mh(e){Qn===null?Qn=[e]:Qn.push(e)}function Wv(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Mh(t)):(r.next=s.next,s.next=r),t.interleaved=r,Hr(e,n)}function Hr(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 sn=!1;function Uh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vv(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 Br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Sn(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,Hr(e,r)}return s=n.interleaved,s===null?(t.next=t,Mh(n)):(t.next=s.next,s.next=t),n.interleaved=t,Hr(e,r)}function nl(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,kh(e,r)}}function Ep(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 Rl(e,t,r,n){var s=e.updateQueue;sn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,d=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,m=a;switch(p=t,f=r,m.tag){case 1:if(b=m.payload,typeof b=="function"){h=b.call(f,h,p);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=m.payload,p=typeof b=="function"?b.call(f,h,p):b,p==null)break e;h=be({},h,p);break e;case 2:sn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=f,l=h):d=d.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);us|=o,e.lanes=o,e.memoizedState=h}}function Cp(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(A(191,s));s.call(n)}}}var oa={},Sr=On(oa),Io=On(oa),Lo=On(oa);function Yn(e){if(e===oa)throw Error(A(174));return e}function Bh(e,t){switch(he(Lo,t),he(Io,e),he(Sr,oa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ju(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ju(t,e)}ge(Sr),he(Sr,t)}function Si(){ge(Sr),ge(Io),ge(Lo)}function qv(e){Yn(Lo.current);var t=Yn(Sr.current),r=Ju(t,e.type);t!==r&&(he(Io,e),he(Sr,r))}function Fh(e){Io.current===e&&(ge(Sr),ge(Io))}var we=On(0);function Al(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 hu=[];function zh(){for(var e=0;e<hu.length;e++)hu[e]._workInProgressVersionPrimary=null;hu.length=0}var sl=Gr.ReactCurrentDispatcher,fu=Gr.ReactCurrentBatchConfig,cs=0,xe=null,Ie=null,De=null,Ol=!1,mo=!1,Do=0,R1=0;function qe(){throw Error(A(321))}function Hh(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!rr(e[r],t[r]))return!1;return!0}function Wh(e,t,r,n,s,i){if(cs=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,sl.current=e===null||e.memoizedState===null?L1:D1,e=r(n,s),mo){i=0;do{if(mo=!1,Do=0,25<=i)throw Error(A(301));i+=1,De=Ie=null,t.updateQueue=null,sl.current=$1,e=r(n,s)}while(mo)}if(sl.current=Il,t=Ie!==null&&Ie.next!==null,cs=0,De=Ie=xe=null,Ol=!1,t)throw Error(A(300));return e}function Vh(){var e=Do!==0;return Do=0,e}function fr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?xe.memoizedState=De=e:De=De.next=e,De}function Lt(){if(Ie===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}
vendor: 4,029 bytes, line 38
38else e=Ie.next;var t=De===null?xe.memoizedState:De.next;if(t!==null)De=t,Ie=e;else{if(e===null)throw Error(A(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},De===null?xe.memoizedState=De=e:De=De.next=e}return De}function $o(e,t){return typeof t=="function"?t(e):t}function pu(e){var t=Lt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;var n=Ie,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,c=i;do{var d=c.lane;if((cs&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=h,o=n):l=l.next=h,xe.lanes|=d,us|=d}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,rr(n,t.memoizedState)||(ct=!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,xe.lanes|=i,us|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function mu(e){var t=Lt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);rr(i,t.memoizedState)||(ct=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Kv(){}function Gv(e,t){var r=xe,n=Lt(),s=t(),i=!rr(n.memoizedState,s);if(i&&(n.memoizedState=s,ct=!0),n=n.queue,qh(Yv.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||De!==null&&De.memoizedState.tag&1){if(r.flags|=2048,Mo(9,Qv.bind(null,r,n,s,t),void 0,null),$e===null)throw Error(A(349));cs&30||Jv(r,t,s)}return s}function Jv(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Qv(e,t,r,n){t.value=r,t.getSnapshot=n,Xv(t)&&Zv(e)}function Yv(e,t,r){return r(function(){Xv(t)&&Zv(e)})}function Xv(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rr(e,r)}catch{return!0}}function Zv(e){var t=Hr(e,1);t!==null&&tr(t,e,1,-1)}function Tp(e){var t=fr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=I1.bind(null,xe,e),[t.memoizedState,e]}function Mo(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.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 ey(){return Lt().memoizedState}function il(e,t,r,n){var s=fr();xe.flags|=e,s.memoizedState=Mo(1|t,r,void 0,n===void 0?null:n)}function cc(e,t,r,n){var s=Lt();n=n===void 0?null:n;var i=void 0;if(Ie!==null){var o=Ie.memoizedState;if(i=o.destroy,n!==null&&Hh(n,o.deps)){s.memoizedState=Mo(t,r,i,n);return}}xe.flags|=e,s.memoizedState=Mo(1|t,r,i,n)}function jp(e,t){return il(8390656,8,e,t)}function qh(e,t){return cc(2048,8,e,t)}function ty(e,t){return cc(4,2,e,t)}function ry(e,t){return cc(4,4,e,t)}function ny(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 sy(e,t,r){return r=r!=null?r.concat([e]):null,cc(4,4,ny.bind(null,t,e),r)}function Kh(){}function iy(e,t){var r=Lt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Hh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function oy(e,t){var r=Lt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Hh(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function ay(e,t,r){return cs&21?(rr(r,t)||(r=hv(),xe.lanes|=r,us|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,
vendor: 9,515 bytes, lines 38-40
38ct=!0),e.memoizedState=r)}function A1(e,t){var r=ce;ce=r!==0&&4>r?r:4,e(!0);var n=fu.transition;fu.transition={};try{e(!1),t()}finally{ce=r,fu.transition=n}}function ly(){return Lt().memoizedState}function O1(e,t,r){var n=En(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},cy(e))uy(t,r);else if(r=Wv(e,t,r,n),r!==null){var s=rt();tr(r,e,n,s),dy(r,t,n)}}function I1(e,t,r){var n=En(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(cy(e))uy(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,rr(a,o)){var l=t.interleaved;l===null?(s.next=s,Mh(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Wv(e,t,s,n),r!==null&&(s=rt(),tr(r,e,n,s),dy(r,t,n))}}function cy(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function uy(e,t){mo=Ol=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function dy(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,kh(e,r)}}var Il={readContext:It,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},L1={readContext:It,useCallback:function(e,t){return fr().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:jp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,il(4194308,4,ny.bind(null,t,e),r)},useLayoutEffect:function(e,t){return il(4194308,4,e,t)},useInsertionEffect:function(e,t){return il(4,2,e,t)},useMemo:function(e,t){var r=fr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=fr();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=O1.bind(null,xe,e),[n.memoizedState,e]},useRef:function(e){var t=fr();return e={current:e},t.memoizedState=e},useState:Tp,useDebugValue:Kh,useDeferredValue:function(e){return fr().memoizedState=e},useTransition:function(){var e=Tp(!1),t=e[0];return e=A1.bind(null,e[1]),fr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=xe,s=fr();if(ve){if(r===void 0)throw Error(A(407));r=r()}else{if(r=t(),$e===null)throw Error(A(349));cs&30||Jv(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,jp(Yv.bind(null,n,i,e),[e]),n.flags|=2048,Mo(9,Qv.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=fr(),t=$e.identifierPrefix;if(ve){var r=Ur,n=Mr;r=(n&~(1<<32-er(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Do++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=R1++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},D1={readContext:It,useCallback:iy,useContext:It,useEffect:qh,useImperativeHandle:sy,useInsertionEffect:ty,useLayoutEffect:ry,useMemo:oy,useReducer:pu,useRef:ey,useState:function(){return pu($o)},useDebugValue:Kh,useDeferredValue:function(e){var t=Lt();return ay(t,Ie.memoizedState,e)},useTransition:function(){var e=pu($o)[0],t=Lt().memoizedState;return[e,t]},useMutableSource:Kv,useSyncExternalStore:Gv,useId:ly,unstable_isNewReconciler:!1},$1={readContext:It,useCallback:iy,useContext:It,useEffect:qh,useImperativeHandle:sy,useInsertionEffect:ty,useLayoutEffect:ry,useMemo:oy,useReducer:mu,useRef:ey,useState:function(){return mu($o)},useDebugValue:Kh,useDeferredValue:function(e){var t=Lt();return Ie===null?t.memoizedState=e:ay(t,Ie.memoizedState,e)},useTransition:function(){var e=mu($o)[0],t=Lt().memoizedState;return[e,t]},useMutableSource:Kv,useSyncExternalStore:Gv,useId:ly,unstable_isNewReconciler:!1};function Kt(e,t){if(e&&e.defaultProps){t=be({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function gd(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:be({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var uc={isMounted:function(e){return(e=e._reactInternals)?ms(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=rt(),s=En(e),i=Br(n,s);i.payload=t,r!=null&&(i.callback=r),t=Sn(e,i,s),t!==null&&(tr(t,e,s,n),nl(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=rt(),s=En(e),i=Br(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Sn(e,i,s),t!==null&&(tr(t,e,s,n),nl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=rt(),n=En(e),s=Br(r,n);s.tag=2,t!=null&&(s.callback=t),t=Sn(e,s,n),t!==null&&(tr(t,e,n,r),nl(t,e,n))}};function Np(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?!Po(r,n)||!Po(s,i):!0}function hy(e,t,r){var n=!1,s=Nn,i=t.contextType;return typeof i=="object"&&i!==null?i=It(i):(s=dt(t)?as:Qe.current,n=t.contextTypes,i=(n=n!=null)?xi(e,s):Nn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Pp(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&&uc.enqueueReplaceState(t,t.state,null)}function vd(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Uh(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=It(i):(i=dt(t)?as:Qe.current,s.context=xi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(gd(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&&uc.enqueueReplaceState(s,s.state,null),Rl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ki(e,t){try{var r="",n=t;do r+=db(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 gu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function yd(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var M1=typeof WeakMap=="function"?WeakMap:Map;function fy(e,t,r){r=Br(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Dl||(Dl=!0,jd=n),yd(e,t)},r}function py(e,t,r){r=Br(-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(){yd(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){yd(e,t),typeof n!="function"&&(kn===null?kn=new Set([this]):kn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Rp(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new M1;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=X1.bind(null,e,t,r),t.then(e,e))}function Ap(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 Op(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=Br(-1,1),t.tag=2,Sn(r,t,1))),r.lanes|=1),e)}var U1=Gr.ReactCurrentOwner,ct=!1;function et(e,t,r,n){t.child=e===null?Hv(t,null,r,n):_i(t,e.child,r,n)}function Ip(e,t,r,n,s){r=r.render;var i=t.ref;return ii(t,s),n=Wh(e,t,r,n,i,s),r=Vh(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Wr(e,t,s)):(ve&&r&&Ah(t),t.flags|=1,et(e,t,n,s),t.child)}function Lp(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!tf(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,my(e,t,i,n,s)):(e=cl(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:Po,r(o,n)&&e.ref===t.ref)return Wr(e,t,s)}return t.flags|=1,e=Cn(i,n),e.ref=t.ref,e.return=t,t.child=e}function my(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Po(i,n)&&e.ref===t.ref)if(ct=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(ct=!0);else return t.lanes=e.lanes,Wr(e,t,s)}return wd(e,t,r,n,s)}function gy(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},he(Xs,pt),pt|=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,he(Xs,pt),pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,he(Xs,pt),pt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,he(Xs,pt),pt|=n;return et(e,t,s,r),t.child}function vy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function wd(e,t,r,n,s){var i=dt(r)?as:Qe.current;return i=xi(t,i),ii(t,s),r=Wh(e,t,r,n,i,s),n=Vh(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Wr(e,t,s)):(ve&&n&&Ah(t),t.flags|=1,et(e,t,r,s),t.child)}function Dp(e,t,r,n,s){if(dt(r)){var i=!0;Cl(t)}else i=!1;if(ii(t,s),t.stateNode===null)ol(e,t),hy(t,r,n),vd(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=It(c):(c=dt(r)?as:Qe.current,c=xi(t,c));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Pp(t,o,n,c),sn=!1;var p=t.memoizedState;o.state=p,Rl(t,n,o,s),l=t.memoizedState,a!==n||p!==l||ut.current||sn?(typeof d=="function"&&(gd(t,r,d,n),l=t.memoizedState),(a=sn||Np(t,r,a,n,p,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Vv(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Kt(t.type,a),o.props=c,h=t.pendingProps,p=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=It(l):(l=dt(r)?as:Qe.current,l=xi(t,l));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&Pp(t,o,n,l),sn=!1,p=t.memoizedState,o.state=p,Rl(t,n,o,s);var b=t.memoizedState;a!==h||p!==b||ut.current||sn?(typeof f=="function"&&(gd(t,r,f,n),b=t.memoizedState),(c=sn||Np(t,r,c,n,p,b,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,b,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,b,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=b),o.props=n,o.state=b,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return xd(e,t,r,n,i,s)}function xd(e,t,r,n,s,i){vy(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&bp(t,r,!1),Wr(e,t,i);n=t.stateNode,U1.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=_i(t,e.child,null,i),t.child=_i(t,null,a,i)):et(e,t,a,i),t.memoizedState=n.state,s&&bp(t,r,!0),t.child}function yy(e){var t=e.stateNode;t.pendingContext?xp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xp(e,t.context,!1),Bh(e,t.containerInfo)}function $p(e,t,r,n,s){return bi(),Ih(s),t.flags|=256,et(e,t,r,n),t.child}var bd={dehydrated:null,treeContext:null,retryLane:0};function _d(e){return{baseLanes:e,cachePool:null,transitions:null}}function wy(e,t,r){var n=t.pendingProps,s=we.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),he(we,s&1),e===null)return pd(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=fc(o,n,0,null),e=os(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=_d(r),t.memoizedState=bd,e):Gh(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return B1(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=Cn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Cn(a,i):(i=os(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?_d(r):{base
vendor: 7,641 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=bd,n}return i=e.child,e=i.sibling,n=Cn(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 Gh(e,t){return t=fc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ra(e,t,r,n){return n!==null&&Ih(n),_i(t,e.child,null,r),e=Gh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function B1(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=gu(Error(A(422))),Ra(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=fc({mode:"visible",children:n.children},s,0,null),i=os(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&_i(t,e.child,null,o),t.child.memoizedState=_d(o),t.memoizedState=bd,i);if(!(t.mode&1))return Ra(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(A(419)),n=gu(i,n,void 0),Ra(e,t,o,n)}if(a=(o&e.childLanes)!==0,ct||a){if(n=$e,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,Hr(e,s),tr(n,e,s,-1))}return ef(),n=gu(Error(A(421))),Ra(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Z1.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,vt=_n(s.nextSibling),yt=t,ve=!0,Zt=null,e!==null&&(Pt[Rt++]=Mr,Pt[Rt++]=Ur,Pt[Rt++]=ls,Mr=e.id,Ur=e.overflow,ls=t),t=Gh(t,n.children),t.flags|=4096,t)}function Mp(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),md(e.return,t,r)}function vu(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 xy(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(et(e,t,n.children,r),n=we.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&&Mp(e,r,t);else if(e.tag===19)Mp(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(he(we,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&&Al(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),vu(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&&Al(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}vu(t,!0,r,null,i);break;case"together":vu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ol(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),us|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,r=Cn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Cn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function F1(e,t,r){switch(t.tag){case 3:yy(t),bi();break;case 5:qv(t);break;case 1:dt(t.type)&&Cl(t);break;case 4:Bh(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;he(Nl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(he(we,we.current&1),t.flags|=128,null):r&t.child.childLanes?wy(e,t,r):(he(we,we.current&1),e=Wr(e,t,r),e!==null?e.sibling:null);he(we,we.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return xy(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),he(we,we.current),n)break;return null;case 22:case 23:return t.lanes=0,gy(e,t,r)}return Wr(e,t,r)}var by,Sd,_y,Sy;by=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(){};_y=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Yn(Sr.current);var i=null;switch(r){case"input":s=Vu(e,s),n=Vu(e,n),i=[];break;case"select":s=be({},s,{value:void 0}),n=be({},n,{value:void 0}),i=[];break;case"textarea":s=Gu(e,s),n=Gu(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=kl)}Qu(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(So.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(So.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Sy=function(e,t,r,n){r!==n&&(t.flags|=4)};function Xi(e,t){if(!ve)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 Ke(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 z1(e,t,r){var n=t.pendingProps;switch(Oh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return dt(t.type)&&El(),Ke(t),null;case 3:return n=t.stateNode,Si(),ge(ut),ge(Qe),zh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Na(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zt!==null&&(Rd(Zt),Zt=null))),Sd(e,t),Ke(t),null;case 5:Fh(t);var s=Yn(Lo.current);if(r=t.type,e!==null&&t.stateNode!=null)_y(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(A(166));return Ke(t),null}if(e=Yn(Sr.current),Na(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;
vendor: 33,202 bytes, line 40
40switch(n[wr]=t,n[Oo]=i,e=(t.mode&1)!==0,r){case"dialog":pe("cancel",n),pe("close",n);break;case"iframe":case"object":case"embed":pe("load",n);break;case"video":case"audio":for(s=0;s<oo.length;s++)pe(oo[s],n);break;case"source":pe("error",n);break;case"img":case"image":case"link":pe("error",n),pe("load",n);break;case"details":pe("toggle",n);break;case"input":Kf(n,i),pe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},pe("invalid",n);break;case"textarea":Jf(n,i),pe("invalid",n)}Qu(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&ja(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ja(n.textContent,a,e),s=["children",""+a]):So.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",n)}switch(r){case"input":xa(n),Gf(n,i,!0);break;case"textarea":xa(n),Qf(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=kl)}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=Yg(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[wr]=t,e[Oo]=n,by(e,t,!1,!1),t.stateNode=e;e:{switch(o=Yu(r,n),r){case"dialog":pe("cancel",e),pe("close",e),s=n;break;case"iframe":case"object":case"embed":pe("load",e),s=n;break;case"video":case"audio":for(s=0;s<oo.length;s++)pe(oo[s],e);s=n;break;case"source":pe("error",e),s=n;break;case"img":case"image":case"link":pe("error",e),pe("load",e),s=n;break;case"details":pe("toggle",e),s=n;break;case"input":Kf(e,n),s=Vu(e,n),pe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=be({},n,{value:void 0}),pe("invalid",e);break;case"textarea":Jf(e,n),s=Gu(e,n),pe("invalid",e);break;default:s=n}Qu(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ev(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Xg(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ko(e,l):typeof l=="number"&&ko(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(So.hasOwnProperty(i)?l!=null&&i==="onScroll"&&pe("scroll",e):l!=null&&yh(e,i,l,o))}switch(r){case"input":xa(e),Gf(e,n,!1);break;case"textarea":xa(e),Qf(e);break;case"option":n.value!=null&&e.setAttribute("value",""+jn(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?ti(e,!!n.multiple,i,!1):n.defaultValue!=null&&ti(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=kl)}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 Ke(t),null;case 6:if(e&&t.stateNode!=null)Sy(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(A(166));if(r=Yn(Lo.current),Yn(Sr.current),Na(t)){if(n=t.stateNode,r=t.memoizedProps,n[wr]=t,(i=n.nodeValue!==r)&&(e=yt,e!==null))switch(e.tag){case 3:ja(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ja(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[wr]=t,t.stateNode=n}return Ke(t),null;case 13:if(ge(we),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&vt!==null&&t.mode&1&&!(t.flags&128))Fv(),bi(),t.flags|=98560,i=!1;else if(i=Na(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(A(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(A(317));i[wr]=t}else bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),i=!1}else Zt!==null&&(Rd(Zt),Zt=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||we.current&1?Le===0&&(Le=3):ef())),t.updateQueue!==null&&(t.flags|=4),Ke(t),null);case 4:return Si(),Sd(e,t),e===null&&Ro(t.stateNode.containerInfo),Ke(t),null;case 10:return $h(t.type._context),Ke(t),null;case 17:return dt(t.type)&&El(),Ke(t),null;case 19:if(ge(we),i=t.memoizedState,i===null)return Ke(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Xi(i,!1);else{if(Le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Al(e),o!==null){for(t.flags|=128,Xi(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 he(we,we.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ne()>Ei&&(t.flags|=128,n=!0,Xi(i,!1),t.lanes=4194304)}else{if(!n)if(e=Al(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Xi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ve)return Ke(t),null}else 2*Ne()-i.renderingStartTime>Ei&&r!==1073741824&&(t.flags|=128,n=!0,Xi(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=Ne(),t.sibling=null,r=we.current,he(we,n?r&1|2:r&1),t):(Ke(t),null);case 22:case 23:return Zh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?pt&1073741824&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function H1(e,t){switch(Oh(t),t.tag){case 1:return dt(t.type)&&El(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),ge(ut),ge(Qe),zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fh(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Si(),null;case 10:return $h(t.type._context),null;case 22:case 23:return Zh(),null;case 24:return null;default:return null}}var Aa=!1,Je=!1,W1=typeof WeakSet=="function"?WeakSet:Set,M=null;function Ys(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Te(e,t,n)}else r.current=null}function kd(e,t,r){try{r()}catch(n){Te(e,t,n)}}var Up=!1;function V1(e,t){if(ad=bl,e=jv(),Rh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(a=o+s),h!==i||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===e)break t;if(p===r&&++c===s&&(a=o),p===i&&++d===n&&(l=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ld={focusedElem:e,selectionRange:r},bl=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var m=b.memoizedProps,x=b.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Kt(t.type,m),x);y.__reactInternalSnapshotBeforeUpdate=v}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(A(163))}}catch(_){Te(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return b=Up,Up=!1,b}function go(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&&kd(t,r,i)}s=s.next}while(s!==n)}}function dc(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 Ed(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 ky(e){var t=e.alternate;t!==null&&(e.alternate=null,ky(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wr],delete t[Oo],delete t[dd],delete t[T1],delete t[j1])),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 Ey(e){return e.tag===5||e.tag===3||e.tag===4}function Bp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ey(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 Cd(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=kl));else if(n!==4&&(e=e.child,e!==null))for(Cd(e,t,r),e=e.sibling;e!==null;)Cd(e,t,r),e=e.sibling}function Td(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(Td(e,t,r),e=e.sibling;e!==null;)Td(e,t,r),e=e.sibling}var Be=null,Xt=!1;function Xr(e,t,r){for(r=r.child;r!==null;)Cy(e,t,r),r=r.sibling}function Cy(e,t,r){if(_r&&typeof _r.onCommitFiberUnmount=="function")try{_r.onCommitFiberUnmount(nc,r)}catch{}switch(r.tag){case 5:Je||Ys(r,t);case 6:var n=Be,s=Xt;Be=null,Xr(e,t,r),Be=n,Xt=s,Be!==null&&(Xt?(e=Be,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Be.removeChild(r.stateNode));break;case 18:Be!==null&&(Xt?(e=Be,r=r.stateNode,e.nodeType===8?uu(e.parentNode,r):e.nodeType===1&&uu(e,r),jo(e)):uu(Be,r.stateNode));break;case 4:n=Be,s=Xt,Be=r.stateNode.containerInfo,Xt=!0,Xr(e,t,r),Be=n,Xt=s;break;case 0:case 11:case 14:case 15:if(!Je&&(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)&&kd(r,t,o),s=s.next}while(s!==n)}Xr(e,t,r);break;case 1:if(!Je&&(Ys(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Te(r,t,a)}Xr(e,t,r);break;case 21:Xr(e,t,r);break;case 22:r.mode&1?(Je=(n=Je)||r.memoizedState!==null,Xr(e,t,r),Je=n):Xr(e,t,r);break;default:Xr(e,t,r)}}function Fp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new W1),t.forEach(function(n){var s=e_.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Bt(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:Be=a.stateNode,Xt=!1;break e;case 3:Be=a.stateNode.containerInfo,Xt=!0;break e;case 4:Be=a.stateNode.containerInfo,Xt=!0;break e}a=a.return}if(Be===null)throw Error(A(160));Cy(i,o,s),Be=null,Xt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Te(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ty(t,e),t=t.sibling}function Ty(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),dr(e),n&4){try{go(3,e,e.return),dc(3,e)}catch(m){Te(e,e.return,m)}try{go(5,e,e.return)}catch(m){Te(e,e.return,m)}}break;case 1:Bt(t,e),dr(e),n&512&&r!==null&&Ys(r,r.return);break;case 5:if(Bt(t,e),dr(e),n&512&&r!==null&&Ys(r,r.return),e.flags&32){var s=e.stateNode;try{ko(s,"")}catch(m){Te(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&&Jg(s,i),Yu(a,o);var c=Yu(a,i);for(o=0;o<l.length;o+=2){var d=l[o],h=l[o+1];d==="style"?ev(s,h):d==="dangerouslySetInnerHTML"?Xg(s,h):d==="children"?ko(s,h):yh(s,d,h,c)}switch(a){case"input":qu(s,i);break;case"textarea":Qg(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ti(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?ti(s,!!i.multiple,i.defaultValue,!0):ti(s,!!i.multiple,i.multiple?[]:"",!1))}s[Oo]=i}catch(m){Te(e,e.return,m)}}break;case 6:if(Bt(t,e),dr(e),n&4){if(e.stateNode===null)throw Error(A(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){Te(e,e.return,m)}}break;case 3:if(Bt(t,e),dr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{jo(t.containerInfo)}catch(m){Te(e,e.return,m)}break;case 4:Bt(t,e),dr(e);break;case 13:Bt(t,e),dr(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Yh=Ne())),n&4&&Fp(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Je=(c=Je)||d,Bt(t,e),Je=c):Bt(t,e),dr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(M=e,d=e.child;d!==null;){for(h=M=d;M!==null;){switch(p=M,f=p.child,p.tag){case 0:case 11:case 14:case 15:go(4,p,p.return);break;case 1:Ys(p,p.return);var b=p.stateNode;if(typeof b.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(m){Te(n,r,m)}}break;case 5:Ys(p,p.return);break;case 22:if(p.memoizedState!==null){Hp(h);continue}}f!==null?(f.return=p,M=f):Hp(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Zg("display",o))}catch(m){Te(e,e.return,m)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(m){Te(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:Bt(t,e),dr(e),n&4&&Fp(e);break;case 21:break;default:Bt(t,e),dr(e)}}function dr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Ey(r)){var n=r;break e}r=r.return}throw Error(A(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ko(s,""),n.flags&=-33);var i=Bp(e);Td(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Bp(e);Cd(e,a,o);break;default:throw Error(A(161))}}catch(l){Te(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function q1(e,t,r){M=e,jy(e)}function jy(e,t,r){for(var n=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Aa;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Je;a=Aa;var c=Je;if(Aa=o,(Je=l)&&!c)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?Wp(s):l!==null?(l.return=o,M=l):Wp(s);for(;i!==null;)M=i,jy(i),i=i.sibling;M=s,Aa=a,Je=c}zp(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):zp(e)}}function zp(e){for(;M!==null;){var t=M;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Je||dc(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Je)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Kt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Cp(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}Cp(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&jo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}Je||t.flags&512&&Ed(t)}catch(p){Te(t,t.return,p)}}if(t===e){M=null;break}if(r=t.sibling,r!==null){r.return=t.return,M=r;break}M=t.return}}function Hp(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var r=t.sibling;if(r!==null){r.return=t.return,M=r;break}M=t.return}}function Wp(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{dc(4,t)}catch(l){Te(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Te(t,s,l)}}var i=t.return;try{Ed(t)}catch(l){Te(t,i,l)}break;case 5:var o=t.return;try{Ed(t)}catch(l){Te(t,o,l)}}}catch(l){Te(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var K1=Math.ceil,Ll=Gr.ReactCurrentDispatcher,Jh=Gr.ReactCurrentOwner,Ot=Gr.ReactCurrentBatchConfig,se=0,$e=null,Re=null,Fe=0,pt=0,Xs=On(0),Le=0,Uo=null,us=0,hc=0,Qh=0,vo=null,lt=null,Yh=0,Ei=1/0,Or=null,Dl=!1,jd=null,kn=null,Oa=!1,vn=null,$l=0,yo=0,Nd=null,al=-1,ll=0;function rt(){return se&6?Ne():al!==-1?al:al=Ne()}function En(e){return e.mode&1?se&2&&Fe!==0?Fe&-Fe:P1.transition!==null?(ll===0&&(ll=hv()),ll):(e=ce,e!==0||(e=window.event,e=e===void 0?16:wv(e.type)),e):1}function tr(e,t,r,n){if(50<yo)throw yo=0,Nd=null,Error(A(185));na(e,r,n),(!(se&2)||e!==$e)&&(e===$e&&(!(se&2)&&(hc|=r),Le===4&&an(e,Fe)),ht(e,n),r===1&&se===0&&!(t.mode&1)&&(Ei=Ne()+500,lc&&In()))}function ht(e,t){var r=e.callbackNode;Pb(e,t);var n=xl(e,e===$e?Fe: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?N1(Vp.bind(null,e)):Mv(Vp.bind(null,e)),E1(function(){!(se&6)&&In()}),r=null;else{switch(fv(n)){case 1:r=Sh;break;case 4:r=uv;break;case 16:r=wl;break;case 536870912:r=dv;break;default:r=wl}r=Dy(r,Ny.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Ny(e,t){if(al=-1,ll=0,se&6)throw Error(A(327));var r=e.callbackNode;if(oi()&&e.callbackNode!==r)return null;var n=xl(e,e===$e?Fe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Ml(e,n);else{t=n;var s=se;se|=2;var i=Ry();($e!==e||Fe!==t)&&(Or=null,Ei=Ne()+500,is(e,t));do try{Q1();break}catch(a){Py(e,a)}while(!0);Dh(),Ll.current=i,se=s,Re!==null?t=0:($e=null,Fe=0,t=Le)}if(t!==0){if(t===2&&(s=rd(e),s!==0&&(n=s,t=Pd(e,s))),t===1)throw r=Uo,is(e,0),an(e,n),ht(e,Ne()),r;if(t===6)an(e,n);else{if(s=e.current.alternate,!(n&30)&&!G1(s)&&(t=Ml(e,n),t===2&&(i=rd(e),i!==0&&(n=i,t=Pd(e,i))),t===1))throw r=Uo,is(e,0),an(e,n),ht(e,Ne()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(A(345));case 2:Vn(e,lt,Or);break;case 3:if(an(e,n),(n&130023424)===n&&(t=Yh+500-Ne(),10<t)){if(xl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){rt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ud(Vn.bind(null,e,lt,Or),t);break}Vn(e,lt,Or);break;case 4:if(an(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-er(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=Ne()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*K1(n/1960))-n,10<n){e.timeoutHandle=ud(Vn.bind(null,e,lt,Or),n);break}Vn(e,lt,Or);break;case 5:Vn(e,lt,Or);break;default:throw Error(A(329))}}}return ht(e,Ne()),e.callbackNode===r?Ny.bind(null,e):null}function Pd(e,t){var r=vo;return e.current.memoizedState.isDehydrated&&(is(e,t).flags|=256),e=Ml(e,t),e!==2&&(t=lt,lt=r,t!==null&&Rd(t)),e}function Rd(e){lt===null?lt=e:lt.push.apply(lt,e)}function G1(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(!rr(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 an(e,t){for(t&=~Qh,t&=~hc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-er(t),n=1<<r;e[r]=-1,t&=~n}}function Vp(e){if(se&6)throw Error(A(327));oi();var t=xl(e,0);if(!(t&1))return ht(e,Ne()),null;var r=Ml(e,t);if(e.tag!==0&&r===2){var n=rd(e);n!==0&&(t=n,r=Pd(e,n))}if(r===1)throw r=Uo,is(e,0),an(e,t),ht(e,Ne()),r;if(r===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vn(e,lt,Or),ht(e,Ne()),null}function Xh(e,t){var r=se;se|=1;try{return e(t)}finally{se=r,se===0&&(Ei=Ne()+500,lc&&In())}}function ds(e){vn!==null&&vn.tag===0&&!(se&6)&&oi();var t=se;se|=1;var r=Ot.transition,n=ce;try{if(Ot.transition=null,ce=1,e)return e()}finally{ce=n,Ot.transition=r,se=t,!(se&6)&&In()}}function Zh(){pt=Xs.current,ge(Xs)}function is(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,k1(r)),Re!==null)for(r=Re.return;r!==null;){var n=r;switch(Oh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&El();break;case 3:Si(),ge(ut),ge(Qe),zh();break;case 5:Fh(n);break;case 4:Si();break;case 13:ge(we);break;case 19:ge(we);break;case 10:$h(n.type._context);break;case 22:case 23:Zh()}r=r.return}if($e=e,Re=e=Cn(e.current,null),Fe=pt=t,Le=0,Uo=null,Qh=hc=us=0,lt=vo=null,Qn!==null){for(t=0;t<Qn.length;t++)if(r=Qn[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}Qn=null}return e}function Py(e,t){do{var r=Re;try{if(Dh(),sl.current=Il,Ol){for(var n=xe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ol=!1}if(cs=0,De=Ie=xe=null,mo=!1,Do=0,Jh.current=null,r===null||r.return===null){Le=1,Uo=t,Re=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Fe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=Ap(o);if(f!==null){f.flags&=-257,Op(f,o,a,i,t),f.mode&1&&Rp(i,c,t),t=f,l=c;var b=t.updateQueue;if(b===null){var m=new Set;m.add(l),t.updateQueue=m}else b.add(l);break e}else{if(!(t&1)){Rp(i,c,t),ef();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var x=Ap(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Op(x,o,a,i,t),Ih(ki(l,a));break e}}i=l=ki(l,a),Le!==4&&(Le=2),vo===null?vo=[i]:vo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=fy(i,l,t);Ep(i,y);break e;case 1:a=l;var v=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(kn===null||!kn.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=py(i,a,t);Ep(i,_);break e}}i=i.return}while(i!==null)}Oy(r)}catch(S){t=S,Re===r&&r!==null&&(Re=r=r.return);continue}break}while(!0)}function Ry(){var e=Ll.current;return Ll.current=Il,e===null?Il:e}function ef(){(Le===0||Le===3||Le===2)&&(Le=4),$e===null||!(us&268435455)&&!(hc&268435455)||an($e,Fe)}function Ml(e,t){var r=se;se|=2;var n=Ry();($e!==e||Fe!==t)&&(Or=null,is(e,t));do try{J1();break}catch(s){Py(e,s)}while(!0);if(Dh(),se=r,Ll.current=n,Re!==null)throw Error(A(261));return $e=null,Fe=0,Le}function J1(){for(;Re!==null;)Ay(Re)}function Q1(){for(;Re!==null&&!bb();)Ay(Re)}function Ay(e){var t=Ly(e.alternate,e,pt);e.memoizedProps=e.pendingProps,t===null?Oy(e):Re=t,Jh.current=null}function Oy(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=H1(r,t),r!==null){r.flags&=32767,Re=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Le=6,Re=null;return}}else if(r=z1(r,t,pt),r!==null){Re=r;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);Le===0&&(Le=5)}function Vn(e,t,r){var n=ce,s=Ot.transition;try{Ot.transition=null,ce=1,Y1(e,t,r,n)}finally{Ot.transition=s,ce=n}return null}function Y1(e,t,r,n){do oi();while(vn!==null);if(se&6)throw Error(A(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Rb(e,i),e===$e&&(Re=$e=null,Fe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Oa||(Oa=!0,Dy(wl,function(){return oi(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Ot.transition,Ot.transition=null;var o=ce;ce=1;var a=se;se|=4,Jh.current=null,V1(e,r),Ty(r,e),v1(ld),bl=!!ad,ld=ad=null,e.current=r,q1(r),_b(),se=a,ce=o,Ot.transition=i}else e.current=r;if(Oa&&(Oa=!1,vn=e,$l=s),i=e.pendingLanes,i===0&&(kn=null),Eb(r.stateNode),ht(e,Ne()),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(Dl)throw Dl=!1,e=jd,jd=null,e;return $l&1&&e.tag!==0&&oi(),i=e.pendingLanes,i&1?e===Nd?yo++:(yo=0,Nd=e):yo=0,In(),null}function oi(){if(vn!==null){var e=fv($l),t=Ot.transition,r=ce;try{if(Ot.transition=null,ce=16>e?16:e,vn===null)var n=!1;else{if(e=vn,vn=null,$l=0,se&6)throw Error(A(331));var s=se;for(se|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(M=c;M!==null;){var d=M;switch(d.tag){case 0:case 11:case 15:go(8,d,i)}var h=d.child;if(h!==null)h.return=d,M=h;else for(;M!==null;){d=M;var p=d.sibling,f=d.return;if(ky(d),d===c){M=null;break}if(p!==null){p.return=f,M=p;break}M=f}}}var b=i.alternate;if(b!==null){var m=b.child;if(m!==null){b.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:go(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,M=y;break e}M=i.return}}var v=e.current;for(M=v;M!==null;){o=M;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,M=w;else e:for(o=v;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:dc(9,a)}}catch(S){Te(a,a.return,S)}if(a===o){M=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,M=_;break e}M=a.return}}if(se=s,In(),_r&&typeof _r.onPostCommitFiberRoot=="function")try{_r.onPostCommitFiberRoot(nc,e)}catch{}n=!0}return n}finally{ce=r,Ot.transition=t}}return!1}function qp(e,t,r){t=ki(r,t),t=fy(e,t,1),e=Sn(e,t,1),t=rt(),e!==null&&(na(e,1,t),ht(e,t))}function Te(e,t,r){if(e.tag===3)qp(e,e,r);else for(;t!==null;){if(t.tag===3){qp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(kn===null||!kn.has(n))){e=ki(r,e),e=py(t,e,1),t=Sn(t,e,1),e=rt(),t!==null&&(na(t,1,e),ht(t,e));break}}t=t.return}}function X1(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&r,$e===e&&(Fe&r)===r&&(Le===4||Le===3&&(Fe&130023424)===Fe&&500>Ne()-Yh?is(e,0):Qh|=r),ht(e,t)}function Iy(e,t){t===0&&(e.mode&1?(t=Sa,Sa<<=1,!(Sa&130023424)&&(Sa=4194304)):t=1);var r=rt();e=Hr(e,t),e!==null&&(na(e,t,r),ht(e,r))}function Z1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Iy(e,r)}function e_(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(A(314))}n!==null&&n.delete(t),Iy(e,r)}var Ly;Ly=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)ct=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ct=!1,F1(e,t,r);ct=!!(e.flags&131072)}else ct=!1,ve&&t.flags&1048576&&Uv(t,jl,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ol(e,t),e=t.pendingProps;var s=xi(t,Qe.current);ii(t,r),s=Wh(null,t,n,e,s,r);var i=Vh();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,dt(n)?(i=!0,Cl(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Uh(t),s.updater=uc,t.stateNode=s,s._reactInternals=t,vd(t,n,e,r),t=xd(null,t,n,!0,i,r)):(t.tag=0,ve&&i&&Ah(t),et(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ol(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=r_(n),e=Kt(n,e),s){case 0:t=wd(null,t,n,e,r);break e;case 1:t=Dp(null,t,n,e,r);break e;case 11:t=Ip(null,t,n,e,r);break e;case 14:t=Lp(null,t,n,Kt(n.type,e),r);break e}throw Error(A(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),wd(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),Dp(e,t,n,s,r);case 3:e:{if(yy(t),e===null)throw Error(A(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Vv(e,t),Rl(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=ki(Error(A(423)),t),t=$p(e,t,n,r,s);break e}else if(n!==s){s=ki(Error(A(424)),t),t=$p(e,t,n,r,s);break e}else for(vt=_n(t.stateNode.containerInfo.firstChild),yt=t,ve=!0,Zt=null,r=Hv(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(bi(),n===s){t=Wr(e,t,r);break e}et(e,t,n,r)}t=t.child}return t;case 5:return qv(t),e===null&&pd(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,cd(n,s)?o=null:i!==null&&cd(n,i)&&(t.flags|=32),vy(e,t),et(e,t,o,r),t.child;case 6:return e===null&&pd(t),null;case 13:return wy(e,t,r);case 4:return Bh(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_i(t,null,n,r):et(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),Ip(e,t,n,s,r);case 7:return et(e,t,t.pendingProps,r),t.child;case 8:return et(e,t,t.pendingProps.children,r),t.child;case 12:return et(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,he(Nl,n._currentValue),n._currentValue=o,i!==null)if(rr(i.value,o)){if(i.children===s.children&&!ut.current){t=Wr(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=Br(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),md(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(A(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),md(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}et(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ii(t,r),s=It(s),n=n(s),t.flags|=1,et(e,t,n,r),t.child;case 14:return n=t.type,s=Kt(n,t.pendingProps),s=Kt(n.type,s),Lp(e,t,n,s,r);case 15:return my(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),ol(e,t),t.tag=1,dt(n)?(e=!0,Cl(t)):e=!1,ii(t,r),hy(t,n,s),vd(t,n,s,r),xd(null,t,n,!0,e,r);case 19:return xy(e,t,r);case 22:return gy(e,t,r)}throw Error(A(156,t.tag))};function Dy(e,t){return cv(e,t)}function t_(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 At(e,t,r,n){return new t_(e,t,r,n)}function tf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function r_(e){if(typeof e=="function")return tf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===bh)return 14}return 2}function Cn(e,t){var r=e.alternate;return r===null?(r=At(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 cl(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")tf(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case zs:return os(r.children,s,i,t);case wh:o=8,s|=8;break;case Fu:return e=At(12,r,t,s|2),e.elementType=Fu,e.lanes=i,e;case zu:return e=At(13,r,t,s),e.elementType=zu,e.lanes=i,e;case Hu:return e=At(19,r,t,s),e.elementType=Hu,e.lanes=i,e;case qg:return fc(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wg:o=10;break e;case Vg:o=9;break e;case xh:o=11;break e;case bh:o=14;break e;case nn:o=16,n=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=At(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function os(e,t,r,n){return e=At(7,e,n,t),e.lanes=r,e}function fc(e,t,r,n){return e=At(22,e,n,t),e.elementType=qg,e.lanes=r,e.stateNode={isHidden:!1},e}function yu(e,t,r){return e=At(6,e,null,t),e.lanes=r,e}function wu(e,t,r){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function n_(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=Zc(0),this.expirationTimes=Zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function rf(e,t,r,n,s,i,o,a,l){return e=new n_(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=At(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uh(i),e}function s_(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fs,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function $y(e){if(!e)return Nn;e=e._reactInternals;e:{if(ms(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var r=e.type;if(dt(r))return $v(e,r,t)}return t}function My(e,t,r,n,s,i,o,a,l){return e=rf(r,n,!0,e,s,i,o,a,l),e.context=$y(null),r=e.current,n=rt(),s=En(r),i=Br(n,s),i.callback=t??null,Sn(r,i,s),e.current.lanes=s,na(e,s,n),ht(e,n),e}function pc(e,t,r,n){var s=t.current,i=rt(),o=En(s);return r=$y(r),t.context===null?t.context=r:t.pendingContext=r,t=Br(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Sn(s,t,o),e!==null&&(tr(e,s,o,i),nl(e,s,o)),o}function Ul(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 Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function nf(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function i_(){return null}var Uy=typeof reportError=="function"?reportError:function(e){console.error(e)};function sf(e){this._internalRoot=e}mc.prototype.render=sf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));pc(e,t,null,null)};mc.prototype.unmount=sf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ds(function(){pc(null,e,null,null)}),t[zr]=null}};function mc(e){this._internalRoot=e}mc.prototype.unstable_scheduleHydration=function(e){if(e){var t=gv();e={blockedOn:null,target:e,priority:t};for(var r=0;r<on.length&&t!==0&&t<on[r].priority;r++);on.splice(r,0,e),r===0&&yv(e)}};function of(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gp(){}function o_(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=Ul(o);i.call(c)}}var o=My(t,n,e,0,null,!1,!1,"",Gp);return e._reactRootContainer=o,e[zr]=o.current,Ro(e.nodeType===8?e.parentNode:e),ds(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=Ul(l);a.call(c)}}var l=rf(e,0,!1,null,null,!1,!1,"",Gp);return e._reactRootContainer=l,e[zr]=l.current,Ro(e.nodeType===8?e.parentNode:e),ds(function(){pc(t,l,r,n)}),l}function vc(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=Ul(o);a.call(l)}}pc(t,o,e,s)}else o=o_(r,t,e,s,n);return Ul(o)}pv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=io(t.pendingLanes);r!==0&&(kh(t,r|1),ht(t,Ne()),!(se&6)&&(Ei=Ne()+500,In()))}break;case 13:ds(function(){var n=Hr(e,1);if(n!==null){var s=rt();tr(n,e,1,s)}}),nf(e,1)}};Eh=function(e){if(e.tag===13){var t=Hr(e,134217728);if(t!==null){var r=rt();tr(t,e,134217728,r)}nf(e,134217728)}};mv=function(e){if(e.tag===13){var t=En(e),r=Hr(e,t);if(r!==null){var n=rt();tr(r,e,t,n)}nf(e,t)}};gv=function(){return ce};vv=function(e,t){var r=ce;try{return ce=e,t()}finally{ce=r}};Zu=function(e,t,r){switch(t){case"input":if(qu(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=ac(n);if(!s)throw Error(A(90));Gg(n),qu(n,s)}}}break;case"textarea":Qg(e,r);break;case"select":t=r.value,t!=null&&ti(e,!!r.multiple,t,!1)}};nv=Xh;sv=ds;var a_={usingClientEntryPoint:!1,Events:[ia,qs,ac,tv,rv,Xh]},Zi={findFiberByHostInstance:Jn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},l_={bundleType:Zi.bundleType,version:Zi.version,rendererPackageName:Zi.rendererPackageName,rendererConfig:Zi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=av(e),e===null?null:e.stateNode},findFiberByHostInstance:Zi.findFiberByHostInstance||i_,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 Ia=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ia.isDisabled&&Ia.supportsFiber)try{nc=Ia.inject(l_),_r=Ia}catch{}}bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=a_;bt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!of(t))throw Error(A(200));return s_(e,t,null,r)};bt.createRoot=function(e,t){if(!of(e))throw Error(A(299));var r=!1,n="",s=Uy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=rf(e,1,!1,null,null,r,!1,n,s),e[zr]=t.current,Ro(e.nodeType===8?e.parentNode:e),new sf(t)};bt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=av(t),e=e===null?null:e.stateNode,e};bt.flushSync=function(e){return ds(e)};bt.hydrate=function(e,t,r){if(!gc(t))throw Error(A(200));return vc(null,e,t,!0,r)};bt.hydrateRoot=function(e,t,r){if(!of(e))throw Error(A(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Uy;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=My(t,null,e,1,r??null,s,!1,i,o),e[zr]=t.current,Ro(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 mc(t)};bt.render=function(e,t,r){if(!gc(t))throw Error(A(200));return vc(null,e,t,!1,r)};bt.unmountComponentAtNode=function(e){if(!gc(e))throw Error(A(40));return e._reactRootContainer?(ds(function(){vc(null,null,e,!1,function(){e._reactRootContainer=null,e[zr]=null})}),!0):!1};bt.unstable_batchedUpdates=Xh;bt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!gc(r))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return vc(e,t,r,!1,n)};bt.version="18.3.1-next-f1338f8080-20240426";function By(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(By)}catch(e){console.error(e)}}By(),Bg.exports=bt;var aa=Bg.exports;const Fy=jg(aa);var zy,Jp=aa;zy=Jp.createRoot,Jp.hydrateRoot;var yc=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(){}},wc=typeof window>"u"||"Deno"in globalThis;function Gt(){}function c_(e,t){return typeof e=="function"?e(t):e}function u_(e){return typeof e=="number"&&e>=0&&e!==1/0}function d_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ad(e,t){return typeof e=="function"?e(t):e}function h_(e,t){return typeof e=="function"?e(t):e}function Qp(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==af(o,t.options))return!1}else if(!Fo(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 Yp(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Bo(t.options.mutationKey)!==Bo(i))return!1}else if(!Fo(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function af(e,t){return((t==null?void 0:t.queryKeyHashFn)||Bo)(e)}function Bo(e){return JSON.stringify(e,(t,r)=>Od(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Fo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Fo(e[r],t[r])):!1}function Hy(e,t){if(e===t)return e;const r=Xp(e)&&Xp(t);if(r||Od(e)&&Od(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let d=0;d<o;d++){const h=r?d:i[d];
vendor: 6,616 bytes, line 40
40(!r&&l.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,c++):(a[h]=Hy(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function Xp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Od(e){if(!Zp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Zp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zp(e){return Object.prototype.toString.call(e)==="[object Object]"}function f_(e){return new Promise(t=>{setTimeout(t,e)})}function p_(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Hy(e,t):t}function m_(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function g_(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var lf=Symbol();function Wy(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===lf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Zn,dn,di,xg,v_=(xg=class extends yc{constructor(){super();ie(this,Zn);ie(this,dn);ie(this,di);Y(this,di,t=>{if(!wc&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){j(this,dn)||this.setEventListener(j(this,di))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,dn))==null||t.call(this),Y(this,dn,void 0))}setEventListener(t){var r;Y(this,di,t),(r=j(this,dn))==null||r.call(this),Y(this,dn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){j(this,Zn)!==t&&(Y(this,Zn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof j(this,Zn)=="boolean"?j(this,Zn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zn=new WeakMap,dn=new WeakMap,di=new WeakMap,xg),Vy=new v_,hi,hn,fi,bg,y_=(bg=class extends yc{constructor(){super();ie(this,hi,!0);ie(this,hn);ie(this,fi);Y(this,fi,t=>{if(!wc&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){j(this,hn)||this.setEventListener(j(this,fi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,hn))==null||t.call(this),Y(this,hn,void 0))}setEventListener(t){var r;Y(this,fi,t),(r=j(this,hn))==null||r.call(this),Y(this,hn,t(this.setOnline.bind(this)))}setOnline(t){j(this,hi)!==t&&(Y(this,hi,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return j(this,hi)}},hi=new WeakMap,hn=new WeakMap,fi=new WeakMap,bg),Bl=new y_;function w_(){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 x_(e){return Math.min(1e3*2**e,3e4)}function qy(e){return(e??"online")==="online"?Bl.isOnline():!0}var Ky=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xu(e){return e instanceof Ky}function Gy(e){let t=!1,r=0,n=!1,s;const i=w_(),o=m=>{var x;n||(p(new Ky(m)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Vy.isFocused()&&(e.networkMode==="always"||Bl.isOnline())&&e.canRun(),d=()=>qy(e.networkMode)&&e.canRun(),h=m=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,m),s==null||s(),i.resolve(m))},p=m=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var x;s=y=>{(n||c())&&m(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var m;s=void 0,n||(m=e.onContinue)==null||m.call(e)}),b=()=>{if(n)return;let m;const x=r===0?e.initialPromise:void 0;try{m=x??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(h).catch(y=>{var k;if(n)return;const v=e.retry??(wc?0:3),w=e.retryDelay??x_,_=typeof w=="function"?w(r,y):w,S=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,y);if(t||!S){p(y);return}r++,(k=e.onFail)==null||k.call(e,r,y),f_(_).then(()=>c()?void 0:f()).then(()=>{t?p(y):b()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?b():f().then(b),i)}}var b_=e=>setTimeout(e,0);function __(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=b_;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 tt=__(),es,_g,Jy=(_g=class{constructor(){ie(this,es)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u_(this.gcTime)&&Y(this,es,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wc?1/0:5*60*1e3))}clearGcTimeout(){j(this,es)&&(clearTimeout(j(this,es)),Y(this,es,void 0))}},es=new WeakMap,_g),pi,ts,Nt,rs,Ge,ea,ns,Qt,Ar,Sg,S_=(Sg=class extends Jy{constructor(t){super();ie(this,Qt);ie(this,pi);ie(this,ts);ie(this,Nt);ie(this,rs);ie(this,Ge);ie(this,ea);ie(this,ns);Y(this,ns,!1),Y(this,ea,t.defaultOptions),this.setOptions(t.options),this.observers=[],Y(this,rs,t.client),Y(this,Nt,j(this,rs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Y(this,pi,E_(this.options)),this.state=t.state??j(this,pi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,Ge))==null?void 0:t.promise}setOptions(t){this.options={...j(this,ea),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Nt).remove(this)}setData(t,r){const n=p_(this.state.data,t,this.options);return Ve(this,Qt,Ar).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ve(this,Qt,Ar).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=j(this,Ge))==null?void 0:n.promise;return(s=j(this,Ge))==null||s.cancel(t),r?r.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,pi))}isActive(){return this.observers.some(t=>h_(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===lf||this.state.dataUpdateCount+this.state.errorUpdate
40Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ad(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!d_(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=j(this,Ge))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=j(this,Ge))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,Nt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(j(this,Ge)&&(j(this,ns)?j(this,Ge).cancel({revert:!0}):j(this,Ge).cancelRetry()),this.scheduleGc()),j(this,Nt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ve(this,Qt,Ar).call(this,{type:"invalidate"})}fetch(t,r){var c,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(j(this,Ge))return j(this,Ge).continueRetry(),j(this,Ge).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Y(this,ns,!0),n.signal)})},i=()=>{const p=Wy(this.options,r),b=(()=>{const m={client:j(this,rs),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return Y(this,ns,!1),this.options.persister?this.options.persister(p,b,this):p(b)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:j(this,rs),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),Y(this,ts,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Ve(this,Qt,Ar).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,b,m,x;xu(p)&&p.silent||Ve(this,Qt,Ar).call(this,{type:"error",error:p}),xu(p)||((b=(f=j(this,Nt).config).onError)==null||b.call(f,p,this),(x=(m=j(this,Nt).config).onSettled)==null||x.call(m,this.state.data,p,this)),this.scheduleGc()};return Y(this,Ge,Gy({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,b,m,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(y){l(y);return}(b=(f=j(this,Nt).config).onSuccess)==null||b.call(f,p,this),(x=(m=j(this,Nt).config).onSettled)==null||x.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{Ve(this,Qt,Ar).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Ve(this,Qt,Ar).call(this,{type:"pause"})},onContinue:()=>{Ve(this,Qt,Ar).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,Ge).start()}},pi=new WeakMap,ts=new WeakMap,Nt=new WeakMap,rs=new WeakMap,Ge=new WeakMap,ea=new WeakMap,ns=new WeakMap,Qt=new WeakSet,Ar=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,...k_(n.data,this.options),fetchMeta:t.meta??null};case"success":return Y(this,ts,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return xu(s)&&s.revert&&j(this,ts)?{...j(this,ts),fetchStatus:"idle"}
vendor: 4,844 bytes, line 40
40:{...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),tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),j(this,Nt).notify({query:this,type:"updated",action:t})})},Sg);function k_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function E_(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 mr,kg,C_=(kg=class extends yc{constructor(t={}){super();ie(this,mr);this.config=t,Y(this,mr,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??af(s,r);let o=this.get(i);return o||(o=new S_({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){j(this,mr).has(t.queryHash)||(j(this,mr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=j(this,mr).get(t.queryHash);r&&(t.destroy(),r===t&&j(this,mr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,mr).get(t)}getAll(){return[...j(this,mr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Qp(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Qp(t,n)):r}notify(t){tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mr=new WeakMap,kg),gr,Ze,ss,vr,tn,Eg,T_=(Eg=class extends Jy{constructor(t){super();ie(this,vr);ie(this,gr);ie(this,Ze);ie(this,ss);this.mutationId=t.mutationId,Y(this,Ze,t.mutationCache),Y(this,gr,[]),this.state=t.state||j_(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,gr).includes(t)||(j(this,gr).push(t),this.clearGcTimeout(),j(this,Ze).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Y(this,gr,j(this,gr).filter(r=>r!==t)),this.scheduleGc(),j(this,Ze).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,gr).length||(this.state.status==="pending"?this.scheduleGc():j(this,Ze).remove(this))}continue(){var t;return((t=j(this,ss))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,d,h,p,f,b,m,x,y,v,w,_,S,k,E,N;const r=()=>{Ve(this,vr,tn).call(this,{type:"continue"})};Y(this,ss,Gy({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,O)=>{Ve(this,vr,tn).call(this,{type:"failed",failureCount:R,error:O})},onPause:()=>{Ve(this,vr,tn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Ze).canRun(this)}));const n=this.state.status==="pending",s=!j(this,ss).canStart();try{if(n)r();else{Ve(this,vr,tn).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=j(this,Ze).config).onMutate)==null?void 0:o.call(i,t,this));const O=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));O!==this.state.context&&Ve(this,vr,tn).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const R=await j(this,ss).start();return await((d=(c=j(this,Ze).config).onSuccess)==null?void 0:d.call(c,R,t,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,R,t,this.state.context)),await((b=(f=j(this,Ze).config).onSettled)==null?void 0:b.call(f,R,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,R,null,t,this.state.context)),Ve(this,vr,tn).call(this,{type:"success",data:R}),R}catch(R){try{throw await((v=(y=j(this,Ze).config).onError)==null?void 0:v.call(y,R,t,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,R,t,this.state.context)),await((k=(S=j(this,Ze).config).onSettled)==null?void 0:k.call(S,void 0,R,this.state.variables,this.state.context,this)),await((N=(E=this.options).onSettled)==null?void 0:N.call(E,void 0,R,t,this.state.context)),R}finally{Ve(this,vr,tn).call(this,{type:"error",error:R})}}finally{j(this,Ze).runNext(this)}}}
40,gr=new WeakMap,Ze=new WeakMap,ss=new WeakMap,vr=new WeakSet,tn=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),tt.batch(()=>{j(this,gr).forEach(n=>{n.onMutationUpdate(t)}),j(this,Ze).notify({mutation:this,type:"updated",action:t})})},Eg);function j_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $r,Yt,ta,Cg,N_=(Cg=class extends yc{constructor(t={}){super();ie(this,$r);ie(this,Yt);ie(this,ta);this.config=t,Y(this,$r,new Set),Y(this,Yt,new Map),Y(this,ta,0)}build(t,r,n){const s=new T_({mutationCache:this,mutationId:++va(this,ta)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){j(this,$r).add(t);const r=La(t);if(typeof r=="string"){const n=j(this,Yt).get(r);n?n.push(t):j(this,Yt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,$r).delete(t)){const r=La(t);if(typeof r=="string"){const n=j(this,Yt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&j(this,Yt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=La(t);if(typeof r=="string"){const n=j(this,Yt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=La(t);if(typeof r=="string"){const s=(n=j(this,Yt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){tt.batch(()=>{j(this,$r).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,$r).clear(),j(this,Yt).clear()})}getAll(){return Array.from(j(this,$r))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Yp(r,n))}findAll(t={}){return this.getAll().filter(r=>Yp(t,r))}notify(t){tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,428 bytes, line 40
40r.state.isPaused);return tt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Gt))))}},$r=new WeakMap,Yt=new WeakMap,ta=new WeakMap,Cg);function La(e){var t;return(t=e.options.scope)==null?void 0:t.id}function em(e){return{onFetch:(t,r)=>{var d,h,p,f,b;const n=t.options,s=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=Wy(t.options,t.fetchOptions),v=async(w,_,S)=>{if(m)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return x(B),B})(),N=await y(E),{maxPages:R}=t.options,O=S?g_:m_;return{pages:O(w.pages,N,R),pageParams:O(w.pageParams,_,R)}};if(s&&i.length){const w=s==="backward",_=w?P_:tm,S={pages:i,pageParams:o},k=_(n,S);a=await v(S,k,w)}else{const w=e??i.length;do{const _=l===0?o[0]??n.initialPageParam:tm(n,a);if(l>0&&_==null)break;a=await v(a,_),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var m,x;return(x=(m=t.options).persister)==null?void 0:x.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function tm(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 P_(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 ke,fn,pn,mi,gi,mn,vi,yi,Tg,R_=(Tg=class{constructor(e={}){ie(this,ke);ie(this,fn);ie(this,pn);ie(this,mi);ie(this,gi);ie(this,mn);ie(this,vi);ie(this,yi);Y(this,ke,e.queryCache||new C_),Y(this,fn,e.mutationCache||new N_),Y(this,pn,e.defaultOptions||{}),Y(this,mi,new Map),Y(this,gi,new Map),Y(this,mn,0)}mount(){va(this,mn)._++,j(this,mn)===1&&(Y(this,vi,Vy.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,ke).onFocus())})),Y(this,yi,Bl.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,ke).onOnline())})))}unmount(){var e,t;va(this,mn)._--,j(this,mn)===0&&((e=j(this,vi))==null||e.call(this),Y(this,vi,void 0),(t=j(this,yi))==null||t.call(this),Y(this,yi,void 0))}isFetching(e){return j(this,ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,fn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=j(this,ke).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=j(this,ke).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ad(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return j(this,ke).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=j(this,ke).get(n.queryHash),i=s==null?void 0:s.state.data,o=c_(t,i);if(o!==void 0)return j(this,ke).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return tt.batch(()=>j(this,ke).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=j(this,ke).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=j(this,ke);tt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=j(this,ke);return tt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=tt.batch(()=>j(this,ke).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Gt).catch(Gt)}invalidateQueries(e,t={}){return tt.batch(()=>(j(this,ke).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=tt.batch(()=>j(this,ke).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Gt)),s.state.fetchStatus==="paused"?Promise.resolve():i}
40));return Promise.all(n).then(Gt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=j(this,ke).build(this,t);return r.isStaleByTime(Ad(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gt).catch(Gt)}fetchInfiniteQuery(e){return e.behavior=em(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gt).catch(Gt)}ensureInfiniteQueryData(e){return e.behavior=em(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Bl.isOnline()?j(this,fn).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,ke)}getMutationCache(){return j(this,fn)}getDefaultOptions(){return j(this,pn)}setDefaultOptions(e){Y(this,pn,e)}setQueryDefaults(e,t){j(this,mi).set(Bo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,mi).values()],r={};return t.forEach(n=>{Fo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){j(this,gi).set(Bo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,gi).values()],r={};return t.forEach(n=>{Fo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,pn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=af(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===lf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,pn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,ke).clear(),j(this,fn).clear()}},ke=new WeakMap,fn=new WeakMap,pn=new WeakMap,mi=new WeakMap,gi=new WeakMap,mn=new WeakMap,vi=new WeakMap,yi=new WeakMap,Tg),A_=g.createContext(void 0),O_=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(A_.Provider,{value:e,children:t}));/** 41 * @remix-run/router v1.23.0 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */function zo(){return zo=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},zo.apply(this,arguments)}var yn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(yn||(yn={}));const rm="popstate";function I_(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return Id("",{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:Fl(s)}return D_(t,r,null,e)}function Ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Qy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function L_(){return Math.random().toString(36).substr(2,8)}function nm(e,t){return{usr:e.state,key:e.key,idx:t}}function Id(e,t,r,n){return r===void 0&&(r=null),zo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ai(t):t,{state:r,key:t&&t.key||n||L_()})}function Fl(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 Ai(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 D_(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=yn.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(zo({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=yn.Pop;let x=d(),y=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:y})}function p(x,y){a=yn.Push;let v=Id(m.location,x,y);c=d()+1;let w=nm(v,c),_=m.createHref(v);try{o.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:m.location,delta:1})}function f(x,y){a=yn.Replace;
vendor: 3,153 bytes, line 49
49let v=Id(m.location,x,y);c=d();let w=nm(v,c),_=m.createHref(v);o.replaceState(w,"",_),i&&l&&l({action:a,location:m.location,delta:0})}function b(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof x=="string"?x:Fl(x);return v=v.replace(/ $/,"%20"),Ae(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(rm,h),l=x,()=>{s.removeEventListener(rm,h),l=null}},createHref(x){return t(s,x)},createURL:b,encodeLocation(x){let y=b(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:f,go(x){return o.go(x)}};return m}var sm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sm||(sm={}));function $_(e,t,r){return r===void 0&&(r="/"),M_(e,t,r,!1)}function M_(e,t,r,n){let s=typeof t=="string"?Ai(t):t,i=cf(s.pathname||"/",r);if(i==null)return null;let o=Yy(e);U_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Q_(i);a=G_(o[l],c,n)}return a}function Yy(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("/")&&(Ae(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Tn([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(Ae(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Yy(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:q_(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Xy(i.path))s(i,o,l)}),t}function Xy(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=Xy(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 U_(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:K_(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const B_=/^:[\w-]+$/,F_=3,z_=2,H_=1,W_=10,V_=-2,im=e=>e==="*";function q_(e,t){let r=e.split("/"),n=r.length;return r.some(im)&&(n+=V_),t&&(n+=z_),r.filter(s=>!im(s)).reduce((s,i)=>s+(B_.test(i)?F_:i===""?H_:W_),n)}function K_(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 G_(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=om({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!h&&c&&r&&!n[n.length-1].route.index&&(h=om({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,263 bytes, lines 49-58
49Object.assign(s,h.params),o.push({params:s,pathname:Tn([i,h.pathname]),pathnameBase:eS(Tn([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=Tn([i,h.pathnameBase]))}return o}function om(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=J_(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let m=a[h]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const b=a[h];return f&&!b?c[p]=void 0:c[p]=(b||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function J_(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Qy(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 Q_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qy(!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 cf(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 Y_(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Ai(e):e;return{pathname:r?r.startsWith("/")?r:X_(r,t):t,search:tS(n),hash:rS(s)}}function X_(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 bu(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 Z_(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Zy(e,t){let r=Z_(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function e0(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ai(e):(s=zo({},e),Ae(!s.pathname||!s.pathname.includes("?"),bu("?","pathname","search",s)),Ae(!s.pathname||!s.pathname.includes("#"),bu("#","pathname","hash",s)),Ae(!s.search||!s.search.includes("#"),bu("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=Y_(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Tn=e=>e.join("/").replace(/\/\/+/g,"/"),eS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function nS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const t0=["post","put","patch","delete"];new Set(t0);const sS=["get",...t0];new Set(sS);/** 50 * React Router v6.30.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function Ho(){return Ho=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},Ho.apply(this,arguments)}const uf=g.createContext(null),iS=g.createContext(null),gs=g.createContext(null),xc=g.createContext(null),Ln=g.createContext({outlet:null,matches:[],isDataRoute:!1}),r0=g.createContext(null);function oS(e,t){let{relative:r}=t===void 0?{}:t;la()||Ae(!1);let{basename:n,navigator:s}=g.useContext(gs),{hash:i,pathname:o,search:a}=s0(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Tn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function la(){return g.useContext(xc)!=null}function Oi(){return la()||Ae(!1),g.useContext(xc).location}function n0(e){g.useContext(gs).static||g.useLayoutEffect(e)}function bc(){let{isDataRoute:e}=g.useContext(Ln);return e?xS():aS()}function aS(){la()||Ae(!1);let e=g.useContext(uf),{basename:t,future:r,navigator:n}=g.useContext(gs),{matches:s}=g.useContext(Ln),{pathname:i}=Oi(),o=JSON.stringify(Zy(s,r.v7_relativeSplatPath)),a=g.useRef(!1);return n0(()=>{a.current=!0}),g.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let h=e0(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Tn([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,o,i,e])}function lS(){let{matches:e}=g.useContext(Ln),t=e[e.length-1];return t?t.params:{}}function s0(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=g.useContext(gs),{matches:s}=g.useContext(Ln),{pathname:i}=Oi(),o=JSON.stringify(Zy(s,n.v7_relativeSplatPath));return g.useMemo(()=>e0(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function cS(e,t){return uS(e,t)}function uS(e,t,r,n){la()||Ae(!1);let{navigator:s}=g.useContext(gs),{matches:i}=g.useContext(Ln),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Oi(),d;if(t){var h;let x=typeof t=="string"?Ai(t):t;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||Ae(!1),d=x}else d=c;let p=d.pathname||"/",f=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=$_(e,{pathname:f}),m=mS(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Tn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Tn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return t&&m?g.createElement(xc.Provider,{value:{location:Ho({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:yn.Pop}},m):m}function dS(){let e=wS(),t=nS(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 g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:s},r):null,null)}const hS=g.createElement(dS,null);class fS extends g.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?g.createElement(Ln.Provider,{value:this.props.routeContext},g.createElement(r0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pS(e){let{routeContext:t,match:r,children:n}=e,s=g.useContext(uf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(Ln.Provider,{value:t},n)}function mS(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||Ae(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:p,errors:f}=r,b=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||b){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,h,p)=>{let f,b=!1,m=null,x=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||hS,l&&(c<0&&p===0?(b=!0,x=null):c===p&&(b=!0,x=h.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,p+1)),v=()=>{let w;return f?w=m:b?w=x:h.route.Component?w=g.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,g.createElement(pS,{match:h,routeC
58ontext:{outlet:d,matches:y,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?g.createElement(fS,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var i0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(i0||{}),zl=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}(zl||{});function gS(e){let t=g.useContext(uf);return t||Ae(!1),t}function vS(e){let t=g.useContext(iS);return t||Ae(!1),t}function yS(e){let t=g.useContext(Ln);return t||Ae(!1),t}function o0(e){let t=yS(),r=t.matches[t.matches.length-1];return r.route.id||Ae(!1),r.route.id}function wS(){var e;let t=g.useContext(r0),r=vS(zl.UseRouteError),n=o0(zl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function xS(){let{router:e}=gS(i0.UseNavigateStable),t=o0(zl.UseNavigateStable),r=g.useRef(!1);return n0(()=>{r.current=!0}),g.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ho({fromRouteId:t},i)))},[e,t])}function bS(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ds(e){Ae(!1)}function _S(e){let{basename:t="/",children:r=null,location:n,navigationType:s=yn.Pop,navigator:i,static:o=!1,future:a}=e;la()&&Ae(!1);let l=t.replace(/^\/*/,"/"),c=g.useMemo(()=>({basename:l,navigator:i,static:o,future:Ho({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Ai(n));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:b="default"}=n,m=g.useMemo(()=>{let x=cf(d,l);return x==null?null:{location:{pathname:x,search:h,hash:p,state:f,key:b},navigationType:s}},[l,d,h,p,f,b,s]);return m==null?null:g.createElement(gs.Provider,{value:c},g.createElement(xc.Provider,{children:r,value:m}))}function SS(e){let{children:t,location:r}=e;return cS(Ld(t),r)}new Promise(()=>{});function Ld(e,t){t===void 0&&(t=[]);let r=[];return g.Children.forEach(e,(n,s)=>{if(!g.isValidElement(n))return;let i=[...t,s];if(n.type===g.Fragment){r.push.apply(r,Ld(n.props.children,i));return}n.type!==Ds&&Ae(!1),!n.props.index||!n.props.children||Ae(!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=Ld(n.props.children,i)),r.push(o)}),r}/** 59 * React Router DOM v6.30.1 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */function Dd(){return Dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dd.apply(this,arguments)}function kS(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function ES(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function CS(e,t){return e.button===0&&(!t||t==="_self")&&!ES(e)}function $d(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function TS(e,t){let r=$d(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const jS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],NS="6";try{window.__reactRouterVersion=NS}catch{}const PS="startTransition",am=mh[PS];function RS(e){let{basename:t,children:r,future:n,window:s}=e,i=g.useRef();i.current==null&&(i.current=I_({window:s,v5Compat:!0}));let o=i.current,[a,l]=g.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},d=g.useCallback(h=>{c&&am?am(()=>l(h)):l(h)},[l,c]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.useEffect(()=>bS(n),[n]),g.createElement(_S,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const AS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kn=g.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:h}=t,p=kS(t,jS),{basename:f}=g.useContext(gs),b,m=!1;if(typeof c=="string"&&OS.test(c)&&(b=c,AS))try{let w=new URL(window.location.href),_=c.startsWith("//")?new URL(w.protocol+c):new URL(c),S=cf(_.pathname,f);
vendor: 1,068 bytes, line 67
67_.origin===w.origin&&S!=null?c=S+_.search+_.hash:m=!0}catch{}let x=oS(c,{relative:s}),y=IS(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:h});function v(w){n&&n(w),w.defaultPrevented||y(w)}return g.createElement("a",Dd({},p,{href:b||x,onClick:m||i?n:v,ref:r,target:l}))});var lm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lm||(lm={}));var cm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(cm||(cm={}));function IS(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=bc(),c=Oi(),d=s0(e,{relative:o});return g.useCallback(h=>{if(CS(h,r)){h.preventDefault();let p=n!==void 0?n:Fl(c)===Fl(d);l(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,d,n,s,r,e,i,o,a])}function LS(e){let t=g.useRef($d(e)),r=g.useRef(!1),n=Oi(),s=g.useMemo(()=>
67TS(n.search,r.current?null:t.current),[n.search]),i=bc(),o=g.useCallback((a,l)=>{const c=$d(typeof a=="function"?a(s):a);r.current=!0,i("?"+c,l)},[i,s]);return[s,o]}var um=["light","dark"],DS="(prefers-color-scheme: dark)",$S=g.createContext(void 0),MS={setTheme:e=>{},themes:[]},US=()=>{var e;return(e=g.useContext($S))!=null?e:MS};g.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?um.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(b,m=!1,x=!0)=>{let y=o?o[b]:b,v=m?b+"|| ''":`'${y}'`,w="";return s&&x&&!m&&um.includes(b)&&(w+=`d.style.colorScheme = '${b}';`),r==="class"?m||y?w+=`c.add(${v})`:w+="null":y&&(w+=`d[s](n,${v})`),w},f=e?`!function(){${d}${p(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${DS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return g.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var BS=e=>{switch(e){case"success":return HS;case"info":return VS;case"warning":return WS;case"error":return qS;default:return null}},FS=Array(12).fill(0),zS=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},FS.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),HS=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),WS=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.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"})),VS=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),qS=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),KS=I.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"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),GS=()=>
67{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Md=1,JS=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{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:Md++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
67this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(YS(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:d})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Md++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},at=new JS,QS=(e,t)=>{let r=(t==null?void 0:t.id)||Md++;return at.addToast({title:e,...t,id:r}),r},YS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XS=QS,ZS=()=>at.toasts,ek=()=>at.getActiveToasts(),dm=Object.assign(XS,{success:at.success,info:at.info,warning:at.warning,error:at.error,custom:at.custom,message:at.message,promise:at.promise,dismiss:at.dismiss,loading:at.loading},{getHistory:ZS,getToasts:ek});function tk(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))}tk(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 68`);function Da(e){return e.label!==void 0}var rk=3,nk="32px",sk="16px",hm=4e3,ik=356,ok=14,ak=20,lk=200;function Ft(...e){return e.filter(Boolean).join(" ")}function ck(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var uk=e=>{var t,r,n,s,i,o,a,l,c,d,h;let{invert:p,toast:f,unstyled:b,interacting:m,setHeights:x,visibleToasts:y,heights:v,index:w,toasts:_,expanded:S,removeToast:k,defaultRichColors:E,closeButton:N,style:R,cancelButtonStyle:O,actionButtonStyle:B,className:D="",descriptionClassName:W="",duration:L,position:q,gap:V,loadingIcon:K,expandByDefault:T,classNames:P,icons:$,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:F}=e,[X,ee]=I.useState(null),[ye,Oe]=I.useState(null),[ne,or]=I.useState(!1),[St,ar]=I.useState(!1),[kt,jr]=I.useState(!1),[Et,Dn]=I.useState(!1),[$n,Mn]=I.useState(!1),[vs,Nr]=I.useState(0),[Dt,ys]=I.useState(0),lr=I.useRef(f.duration||L||hm),ws=I.useRef(null),Ct=I.useRef(null),Bi=w===0,xs=w+1<=y,We=f.type,$t=f.dismissible!==!1,Fi=f.className||"",bs=f.descriptionClassName||"",Qr=I.useMemo(()=>v.findIndex(G=>G.toastId===f.id)||0,[v,f.id]),_s=I.useMemo(()=>{var G;return(G=f.closeButton)!=null?G:N},[f.closeButton,N]),Ss=I.useMemo(()=>f.duration||L||hm,[f.duration,L]),Yr=I.useRef(0),cr=I.useRef(0),Un=I.useRef(0),ur=I.useRef(null),[ks,Bn]=q.split("-"),Es=I.useMemo(()=>v.reduce((G,oe,ue)=>ue>=Qr?G:G+oe.height,0),[v,Qr]),zi=GS(),Hi=f.invert||p,Fn=We==="loading";cr.current=I.useMemo(()=>Qr*V+Es,[Qr,Es]),I.useEffect(()=>{lr.current=Ss},[Ss]),I.useEffect(()=>{or(!0)},[]),I.useEffect(()=>{let G=Ct.current;if(G){let oe=G.getBoundingClientRect().height;return ys(oe),x(ue=>[{toastId:f.id,height:oe,position:f.position},...ue]),()=>x(ue=>ue.filter(Ye=>Ye.toastId!==f.id))}},[x,f.id]),I.useLayoutEffect(()=>{if(!ne)return;let G=Ct.current,oe=G.style.height;G.style.height="auto";let ue=G.getBoundingClientRect().height;G.style.height=oe,ys(ue),x(Ye=>Ye.find(Xe=>Xe.toastId===f.id)?Ye.map(Xe=>
68Xe.toastId===f.id?{...Xe,height:ue}:Xe):[{toastId:f.id,height:ue,position:f.position},...Ye])},[ne,f.title,f.description,x,f.id]);let Tt=I.useCallback(()=>{ar(!0),Nr(cr.current),x(G=>G.filter(oe=>oe.toastId!==f.id)),setTimeout(()=>{k(f)},lk)},[f,k,x,cr]);I.useEffect(()=>{if(f.promise&&We==="loading"||f.duration===1/0||f.type==="loading")return;let G;return S||m||F&&zi?(()=>{if(Un.current<Yr.current){let oe=new Date().getTime()-Yr.current;lr.current=lr.current-oe}Un.current=new Date().getTime()})():lr.current!==1/0&&(Yr.current=new Date().getTime(),G=setTimeout(()=>{var oe;(oe=f.onAutoClose)==null||oe.call(f,f),Tt()},lr.current)),()=>clearTimeout(G)},[S,m,f,We,F,zi,Tt]),I.useEffect(()=>{f.delete&&Tt()},[Tt,f.delete]);function ha(){var G,oe,ue;return $!=null&&$.loading?I.createElement("div",{className:Ft(P==null?void 0:P.loader,(G=f==null?void 0:f.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":We==="loading"},$.loading):K?I.createElement("div",{className:Ft(P==null?void 0:P.loader,(oe=f==null?void 0:f.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":We==="loading"},K):I.createElement(zS,{className:Ft(P==null?void 0:P.loader,(ue=f==null?void 0:f.classNames)==null?void 0:ue.loader),visible:We==="loading"})}return I.createElement("li",{tabIndex:0,ref:Ct,className:Ft(D,Fi,P==null?void 0:P.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[We],(r=f==null?void 0:f.classNames)==null?void 0:r[We]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:E,"data-styled":!(f.jsx||f.unstyled||b),"data-mounted":ne,"data-promise":!!f.promise,"data-swiped":$n,"data-removed":St,"data-visible":xs,"data-y-position":ks,"data-x-position":Bn,"data-index":w,"data-front":Bi,"data-swiping":kt,"data-dismissible":$t,"data-type":We,"data-invert":Hi,"data-swipe-out":Et,"data-swipe-direction":ye,"data-expanded":!!(S||T&&ne),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${St?vs:cr.current}px`,"--initial-height":T?"auto":`${Dt}px`,...R,...f.style},onDragEnd:()=>{jr(!1),ee(null),ur.current=null},onPointerDown:G=>{Fn||!$t||(ws.current=new Date,Nr(cr.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(jr(!0),ur.current={x:G.clientX,y:G.clientY}))},onPointerUp:()=>{var G,oe,ue,Ye;if(Et||!$t)return;ur.current=null;let Xe=Number(((G=Ct.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mt=Number(((oe=Ct.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ut=new Date().getTime()-((ue=ws.current)==null?void 0:ue.getTime()),it=X==="x"?Xe:Mt,jt=Math.abs(it)/Ut;if(Math.abs(it)>=ak||jt>.11){Nr(cr.current),(Ye=f.onDismiss)==null||Ye.call(f,f),Oe(X==="x"?Xe>0?"right":"left":Mt>0?"down":"up"),Tt(),Dn(!0),Mn(!1);return}jr(!1),ee(null)},onPointerMove:G=>{var oe,ue,Ye,Xe;if(!ur.current||!$t||((oe=window.getSelection())==null?void 0:oe.toString().length)>0)return;let Mt=G.clientY-ur.current.y,Ut=G.clientX-ur.current.x,it=(ue=e.swipeDirections)!=null?ue:ck(q);!X&&(Math.abs(Ut)>1||Math.abs(Mt)>1)&&ee(Math.abs(Ut)>Math.abs(Mt)?"x":"y");let jt={x:0,y:0};X==="y"?(it.includes("top")||it.includes("bottom"))&&(it.includes("top")&&Mt<0||it.includes("bottom")&&Mt>0)&&(jt.y=Mt):X==="x"&&(it.includes("left")||it.includes("right"))&&(it.includes("left")&&Ut<0||it.includes("right")&&Ut>0)&&(jt.x=Ut),(Math.abs(jt.x)>0||Math.abs(jt.y)>0)&&Mn(!0),(Ye=Ct.current)==null||Ye.style.setProperty("--swipe-amount-x",`${jt.x}px`),(Xe=Ct.current)==null||Xe.style.setProperty("--swipe-amount-y",`${jt.y}px`)}},_s&&!f.jsx?I.createElement("button",{"aria-label":J,"data-disabled":Fn,"data-close-button":!0,onClick:Fn||!$t?()=>{}:()=>{var G;Tt(),(G=f.onDismiss)==null||G.call(f,f)},className:Ft(P==null?void 0:P.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:KS):null,f.jsx||g.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:I.createElement(I.Fragment,null,We||f.icon||f.promise?I.createElement("div",{"data-icon":"",className:Ft(P==null?void 0:P.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ha():null,f.type!=="loading"?f.icon||($==null?void 0:$[We])||BS(We):null):null,I.createElement("div",{"data-content":"",className:Ft(P==null?void 0:P.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Ft(P==null?void 0:P.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?I.createElement("div",{"data-description":"",className:Ft(W,bs,P==null?void 0:P.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),g.isValidElement(f.cancel)?f.cancel:f.cancel&&Da(f.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||O,onClick:G=>{var oe,ue;Da(f.cancel)&&$t&&((ue=(oe=f.cancel).onClick)==null||ue.call(oe,G),Tt())},className:Ft(P==null?void 0:P.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,g.isValidElement(f.action)?f.action:f.action&&Da(f.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||B,onClick:G=>{var oe,ue;Da(f.action)&&((ue=(oe=f.action).onClick)==null||ue.call(oe,G),!G.defaultPrevented&&Tt())},className:Ft(P==null?void 0:P.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function fm(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function dk(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?sk:nk;function l(c){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=a:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var hk=g.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:h,duration:p,style:f,visibleToasts:b=rk,toastOptions:m,dir:x=fm(),gap:y=ok,loadingIcon:v,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[k,E]=I.useState([]),N=I.useMemo(()=>Array.from(new Set([n].concat(k.filter(F=>F.position).map(F=>
68F.position)))),[k,n]),[R,O]=I.useState([]),[B,D]=I.useState(!1),[W,L]=I.useState(!1),[q,V]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=I.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=I.useRef(null),$=I.useRef(!1),J=I.useCallback(F=>{E(X=>{var ee;return(ee=X.find(ye=>ye.id===F.id))!=null&&ee.delete||at.dismiss(F.id),X.filter(({id:ye})=>ye!==F.id)})},[]);return I.useEffect(()=>at.subscribe(F=>{if(F.dismiss){E(X=>X.map(ee=>ee.id===F.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{Fy.flushSync(()=>{E(X=>{let ee=X.findIndex(ye=>ye.id===F.id);return ee!==-1?[...X.slice(0,ee),{...X[ee],...F},...X.slice(ee+1)]:[F,...X]})})})}),[]),I.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:X})=>{V(X?"dark":"light")})}catch{F.addListener(({matches:ee})=>{try{V(ee?"dark":"light")}catch(ye){console.error(ye)}})}},[d]),I.useEffect(()=>{k.length<=1&&D(!1)},[k]),I.useEffect(()=>{let F=X=>{var ee,ye;s.every(Oe=>X[Oe]||X.code===Oe)&&(D(!0),(ee=K.current)==null||ee.focus()),X.code==="Escape"&&(document.activeElement===K.current||(ye=K.current)!=null&&ye.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),I.useEffect(()=>{if(K.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,$.current=!1)}},[K.current]),I.createElement("section",{ref:t,"aria-label":`${_} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((F,X)=>{var ee;let[ye,Oe]=F.split("-");return k.length?I.createElement("ol",{key:F,dir:x==="auto"?fm():x,tabIndex:-1,ref:K,className:a,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":ye,"data-lifted":B&&k.length>1&&!i,"data-x-position":Oe,style:{"--front-toast-height":`${((ee=R[0])==null?void 0:ee.height)||0}px`,"--width":`${ik}px`,"--gap":`${y}px`,...f,...dk(l,c)},onBlur:ne=>{$.current&&!ne.currentTarget.contains(ne.relatedTarget)&&($.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||$.current||($.current=!0,P.current=ne.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{W||D(!1)},onDragEnd:()=>D(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},k.filter(ne=>!ne.position&&X===0||ne.position===F).map((ne,or)=>{var St,ar;return I.createElement(uk,{key:ne.id,icons:w,index:or,toast:ne,defaultRichColors:h,duration:(St=m==null?void 0:m.duration)!=null?St:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:b,closeButton:(ar=m==null?void 0:m.closeButton)!=null?ar:o,interacting:W,position:F,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:J,toasts:k.filter(kt=>kt.position==ne.position),heights:R.filter(kt=>kt.position==ne.position),setHeights:O,expandByDefault:i,gap:y,loadingIcon:v,expanded:B,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const fk=({...e})=>{const{theme:t="system"}=US();return u.jsx(hk,{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})},pk=1,mk=1e6;let _u=0;function gk(){return _u=(_u+1)%Number.MAX_SAFE_INTEGER,_u.toString()}const Su=new Map,pm=e=>{if(Su.has(e))return;const t=setTimeout(()=>{Su.delete(e),wo({type:"REMOVE_TOAST",toastId:e})},mk);Su.set(e,t)},vk=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,pk)};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;
68return r?pm(r):e.toasts.forEach(n=>{pm(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ul=[];let dl={toasts:[]};function wo(e){dl=vk(dl,e),ul.forEach(t=>{t(dl)})}function yk({...e}){const t=gk(),r=s=>wo({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>wo({type:"DISMISS_TOAST",toastId:t});return wo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function _c(){const[e,t]=g.useState(dl);return g.useEffect(()=>(ul.push(t),()=>{const r=ul.indexOf(t);r>-1&&ul.splice(r,1)}),[e]),{...e,toast:yk,dismiss:r=>wo({type:"DISMISS_TOAST",toastId:r})}}function me(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 mm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function a0(...e){return t=>{let r=!1;const n=e.map(s=>{const i=mm(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():mm(e[s],null)}}}}function He(...e){return g.useCallback(a0(...e),e)}function wk(e,t){const r=g.createContext(t),n=i=>{const{children:o,...a}=i,l=g.useMemo(()=>a,Object.values(a));return u.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function s(i){const o=g.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 Ii(e,t=[]){let r=[];function n(i,o){const a=g.createContext(o),l=r.length;r=[...r,o];const c=h=>{var y;const{scope:p,children:f,...b}=h,m=((y=p==null?void 0:p[e])==null?void 0:y[l])||a,x=g.useMemo(()=>b,Object.values(b));return u.jsx(m.Provider,{value:x,children:f})};c.displayName=i+"Provider";function d(h,p){var m;const f=((m=p==null?void 0:p[e])==null?void 0:m[l])||a,b=g.useContext(f);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[c,d]}const s=()=>{const i=r.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,xk(s,...t)]}function xk(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const h=l(i)[`__scope${c}`];return{...a,...h}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Wo(e){const t=_k(e),r=g.forwardRef((n,s)=>{const{children:i,...o}=n,a=g.Children.toArray(i),l=a.find(kk);if(l){const c=l.props.children,d=a.map(h=>h===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:h);return u.jsx(t,{...o,ref:s,children:g.isValidElement(c)?g.cloneElement(c,void 0,d):null})}return u.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var bk=Wo("Slot");function _k(e){const t=g.forwardRef((r,n)=>{const{children:s,...i}=r;if(g.isValidElement(s)){const o=Ck(s),a=Ek(i,s.props);return s.type!==g.Fragment&&(a.ref=n?a0(n,o):o),g.cloneElement(s,a)}return g.Children.count(s)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l0=Symbol("radix.slottable");function Sk(e){const t=({children:r})=>u.jsx(u.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=l0,t}function kk(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===l0}function Ek(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function Ck(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 Tk(e){const t=e+"CollectionProvider",[r,n]=Ii(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:x,children:y}=m,v=I.useRef(null),w=I.useRef(new Map).current;return u.jsx(s,{scope:x,itemMap:w,collectionRef:v,children:y})};o.displayName=t;const a=e+"CollectionSlot",l=Wo(a),c=I.forwardRef((m,x)=>{const{scope:y,children:v}=m,w=i(a,y),_=He(x,w.collectionRef);return u.jsx(l,{ref:_,children:v})});c.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=Wo(d),f=I.forwardRef((m,x)=>{const{scope:y,children:v,...w}=m,_=I.useRef(null),S=He(x,_),k=i(d,y);return I.useEffect(()=>(k.itemMap.set(_,{ref:_,...w}),()=>
vendor: 9,168 bytes, line 68
68void k.itemMap.delete(_))),u.jsx(p,{[h]:"",ref:S,children:v})});f.displayName=d;function b(m){const x=i(e+"CollectionConsumer",m);return I.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},b,n]}var jk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=jk.reduce((e,t)=>{const r=Wo(`Primitive.${t}`),n=g.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function c0(e,t){e&&aa.flushSync(()=>e.dispatchEvent(t))}function Er(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Nk(e,t=globalThis==null?void 0:globalThis.document){const r=Er(e);g.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 Pk="DismissableLayer",Ud="dismissableLayer.update",Rk="dismissableLayer.pointerDownOutside",Ak="dismissableLayer.focusOutside",gm,u0=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sc=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=g.useContext(u0),[d,h]=g.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=g.useState({}),b=He(t,E=>h(E)),m=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),v=d?m.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=v>=y,S=Ik(E=>{const N=E.target,R=[...c.branches].some(O=>O.contains(N));!_||R||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},p),k=Lk(E=>{const N=E.target;[...c.branches].some(O=>O.contains(N))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},p);return Nk(E=>{v===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),g.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(gm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),vm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=gm)}},[d,p,r,c]),g.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),vm())},[d,c]),g.useEffect(()=>{const E=()=>f({});return document.addEventListener(Ud,E),()=>document.removeEventListener(Ud,E)},[]),u.jsx(Se.div,{...l,ref:b,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,k.onFocusCapture),onBlurCapture:me(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,S.onPointerDownCapture)})});Sc.displayName=Pk;var Ok="DismissableLayerBranch",d0=g.forwardRef((e,t)=>{const r=g.useContext(u0),n=g.useRef(null),s=He(t,n);return g.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),u.jsx(Se.div,{...e,ref:s})});d0.displayName=Ok;function Ik(e,t=globalThis==null?void 0:globalThis.document){const r=Er(e),n=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){h0(Rk,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Lk(e,t=globalThis==null?void 0:globalThis.document){const r=Er(e),n=g.useRef(!1);return g.useEffect(()=>{const s=i=>{i.target&&!n.current&&h0(Ak,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 vm(){const e=new CustomEvent(Ud);document.dispatchEvent(e)}function h0(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?c0(s,i):s.dispatchEvent(i)}var Dk=Sc,$k=d0,Vr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Mk="Portal",df=g.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=g.useState(!1);Vr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Fy.createPortal(u.jsx(Se.div,{...n,ref:t}),o):null});df.displayName=Mk;function Uk(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var Li=e=>{const{present:t,children:r}=e,n=Bk(t),s=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),i=He(n.ref,Fk(s));return typeof r=="function"||n.isPresent?g.cloneElement(s,{ref:i}):null};Li.displayName="Presence";function Bk(e){const[t,r]=g.useState(),n=g.useRef(null),s=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[a,l]=Uk(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=$a(n.current);i.current=a==="mounted"?c:"none"},[a]),Vr(()=>{const c=n.current,d=s.current;if(d!==e){const p=i.current,f=$a(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Vr(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=f=>{const m=$a(n.current).includes(f.animationName);if(f.target===t&&m&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=f=>{f.target===t&&(i.current=$a(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function $a(e){return(e==null?void 0:e.animationName)||"none"}function Fk(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zk=mh[" useInsertionEffect ".trim().toString()]||Vr;function hf({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=Hk({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const d=g.useRef(e!==void 0);g.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=g.useCallback(d=>{var h;if(a){const p=Wk(d)?d(e):d;p!==e&&((h=o.current)==null||h.call(o,p))}else i(d)},[a,e,i,o]);return[l,c]}function Hk({defaultProp:e,onChange:t}){const[r,n]=g.useState(e),s=g.useRef(r),i=g.useRef(t);return zk(()=>{i.current=t},[t]),g.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function Wk(e){return typeof e=="function"}var Vk=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qk="VisuallyHidden",kc=g.forwardRef((e,t)=>u.jsx(Se.span,{...e,ref:t,style:{...Vk,...e.style}}));kc.displayName=qk;var Kk=kc,ff="ToastProvider",[pf,Gk,Jk]=Tk("Toast"),[f0,O2]=Ii("Toast",[Jk]),[Qk,Ec]=f0(ff),p0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=g.useState(null),[c,d]=g.useState(0),h=g.useRef(!1),p=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${ff}\`. Expected non-empty \`string\`.`),u.jsx(pf.Provider,{scope:t,children:u.jsx(Qk,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>d(f=>f+1),[]),onToastRemove:g.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};p0.displayName=ff;var m0="ToastViewport",Yk=["F8"],Bd="toast.viewportPause",Fd="toast.viewportResume",g0=g.forwardRef((e,t)=>
68{const{__scopeToast:r,hotkey:n=Yk,label:s="Notifications ({hotkey})",...i}=e,o=Ec(m0,r),a=Gk(r),l=g.useRef(null),c=g.useRef(null),d=g.useRef(null),h=g.useRef(null),p=He(t,h,o.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=o.toastCount>0;g.useEffect(()=>{const x=y=>{var w;n.length!==0&&n.every(_=>y[_]||y.code===_)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),g.useEffect(()=>{const x=l.current,y=h.current;if(b&&x&&y){const v=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Bd);y.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(Fd);y.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&w()},S=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",v),x.addEventListener("focusout",_),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,o.isClosePausedRef]);const m=g.useCallback(({tabbingDirection:x})=>{const v=a().map(w=>{const _=w.ref.current,S=[_,...uE(_)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const x=h.current;if(x){const y=v=>{var S,k,E;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const N=document.activeElement,R=v.shiftKey;if(v.target===x&&R){(S=c.current)==null||S.focus();return}const D=m({tabbingDirection:R?"backwards":"forwards"}),W=D.findIndex(L=>L===N);ku(D.slice(W+1))?v.preventDefault():R?(k=c.current)==null||k.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,m]),u.jsxs($k,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&u.jsx(zd,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});ku(x)}}),u.jsx(pf.Slot,{scope:r,children:u.jsx(Se.ol,{tabIndex:-1,...i,ref:p})}),b&&u.jsx(zd,{ref:d,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});ku(x)}})]})});g0.displayName=m0;var v0="ToastFocusProxy",zd=g.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Ec(v0,r);return u.jsx(kc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});zd.displayName=v0;var ca="Toast",Xk="toast.swipeStart",Zk="toast.swipeMove",eE="toast.swipeCancel",tE="toast.swipeEnd",y0=g.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=hf({prop:n,defaultProp:s??!0,onChange:i,caller:ca});return u.jsx(Li,{present:r||a,children:u.jsx(sE,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Er(e.onPause),onResume:Er(e.onResume),onSwipeStart:me(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(e.onSwipeMove,c=>{const{x:d,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:me(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(e.onSwipeEnd,c=>{const{x:d,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});y0.displayName=ca;var[rE,nE]=f0(ca,{onClose(){}}),sE=g.forwardRef((e,t)=>
68{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...b}=e,m=Ec(ca,r),[x,y]=g.useState(null),v=He(t,L=>y(L)),w=g.useRef(null),_=g.useRef(null),S=s||m.duration,k=g.useRef(0),E=g.useRef(S),N=g.useRef(0),{onToastAdd:R,onToastRemove:O}=m,B=Er(()=>{var q;(x==null?void 0:x.contains(document.activeElement))&&((q=m.viewport)==null||q.focus()),o()}),D=g.useCallback(L=>{!L||L===1/0||(window.clearTimeout(N.current),k.current=new Date().getTime(),N.current=window.setTimeout(B,L))},[B]);g.useEffect(()=>{const L=m.viewport;if(L){const q=()=>{D(E.current),c==null||c()},V=()=>{const K=new Date().getTime()-k.current;E.current=E.current-K,window.clearTimeout(N.current),l==null||l()};return L.addEventListener(Bd,V),L.addEventListener(Fd,q),()=>{L.removeEventListener(Bd,V),L.removeEventListener(Fd,q)}}},[m.viewport,S,l,c,D]),g.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(S)},[i,S,m.isClosePausedRef,D]),g.useEffect(()=>(R(),()=>O()),[R,O]);const W=g.useMemo(()=>x?E0(x):null,[x]);return m.viewport?u.jsxs(u.Fragment,{children:[W&&u.jsx(iE,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),u.jsx(rE,{scope:r,onClose:B,children:aa.createPortal(u.jsx(pf.ItemSlot,{scope:r,children:u.jsx(Dk,{asChild:!0,onEscapeKeyDown:me(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||B(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(Se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...b,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:me(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:me(e.onPointerDown,L=>{L.button===0&&(w.current={x:L.clientX,y:L.clientY})}),onPointerMove:me(e.onPointerMove,L=>{if(!w.current)return;const q=L.clientX-w.current.x,V=L.clientY-w.current.y,K=!!_.current,T=["left","right"].includes(m.swipeDirection),P=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=T?P(0,q):0,J=T?0:P(0,V),F=L.pointerType==="touch"?10:2,X={x:$,y:J},ee={originalEvent:L,delta:X};K?(_.current=X,Ma(Zk,h,ee,{discrete:!1})):ym(X,m.swipeDirection,F)?(_.current=X,Ma(Xk,d,ee,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(q)>F||Math.abs(V)>F)&&(w.current=null)}),onPointerUp:me(e.onPointerUp,L=>{const q=_.current,V=L.target;if(V.hasPointerCapture(L.pointerId)&&V.releasePointerCapture(L.pointerId),_.current=null,w.current=null,q){const K=L.currentTarget,T={originalEvent:L,delta:q};ym(q,m.swipeDirection,m.swipeThreshold)?Ma(tE,f,T,{discrete:!0}):Ma(eE,p,T,{discrete:!0}),K.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),iE=e=>{const{__scopeToast:t,children:r,...n}=e,s=Ec(ca,t),[i,o]=g.useState(!1),[a,l]=g.useState(!1);return lE(()=>o(!0)),g.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(df,{asChild:!0,children:u.jsx(kc,{...n,children:i&&u.jsxs(u.Fragment,{children:[s.label," ",r]})})})},oE="ToastTitle",w0=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(Se.div,{...n,ref:t})});w0.displayName=oE;var aE="ToastDescription",x0=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(Se.div,{...n,ref:t})});x0.displayName=aE;var b0="ToastAction",_0=g.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(k0,{altText:r,asChild:!0,children:u.jsx(mf,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${b0}\`. Expected non-empty \`string\`.`),null)});_0.displayName=b0;var S0="ToastClose",mf=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=nE(S0,r);return u.jsx(k0,{asChild:!0,children:u.jsx(Se.button,{type:"button",...n,ref:t,onClick:me(e.onClick,s.onClose)})})});mf.displayName=S0;var k0=g.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return u.jsx(Se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function E0(e){const t=[];
vendor: 5,690 bytes, lines 68-117
68return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),cE(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(...E0(n))}}),t}function Ma(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?c0(s,i):s.dispatchEvent(i)}var ym=(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 lE(e=()=>{}){const t=Er(e);Vr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function cE(e){return e.nodeType===e.ELEMENT_NODE}function uE(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 ku(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var dE=p0,C0=g0,T0=y0,j0=w0,N0=x0,P0=_0,R0=mf;function A0(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=A0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function O0(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=A0(e))&&(n&&(n+=" "),n+=t);return n}const wm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xm=O0,gf=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xm(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const d=r==null?void 0:r[c],h=i==null?void 0:i[c];if(d===null)return null;const p=wm(d)||wm(h);return s[c][p]}),a=r&&Object.entries(r).reduce((c,d)=>{let[h,p]=d;return p===void 0||(c[h]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(b=>{let[m,x]=b;return Array.isArray(x)?x.includes({...i,...a}[m]):{...i,...a}[m]===x})?[...c,h,p]:c},[]);return xm(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 69 * @license lucide-react v0.462.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const hE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I0=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 74 * @license lucide-react v0.462.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */var fE={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"};/** 79 * @license lucide-react v0.462.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const pE=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>g.createElement("svg",{ref:l,...fE,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:I0("lucide",s),...a},[...o.map(([c,d])=>g.createElement(c,d)),...Array.isArray(i)?i:[i]]));/** 84 * @license lucide-react v0.462.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const le=(e,t)=>{const r=g.forwardRef(({className:n,...s},i)=>g.createElement(pE,{ref:i,iconNode:t,className:I0(`lucide-${hE(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 89 * @license lucide-react v0.462.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const Hd=le("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 94 * @license lucide-react v0.462.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const bm=le("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 99 * @license lucide-react v0.462.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const mE=le("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 104 * @license lucide-react v0.462.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const gE=le("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"}]]);/** 109 * @license lucide-react v0.462.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const L0=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 114 * @license lucide-react v0.462.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree.
118 */const vE=le("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 119 * @license lucide-react v0.462.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const Hl=le("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"}]]);/** 124 * @license lucide-react v0.462.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const Ci=le("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 129 * @license lucide-react v0.462.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const Wd=le("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 134 * @license lucide-react v0.462.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const yE=le("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 139 * @license lucide-react v0.462.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const wE=le("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 144 * @license lucide-react v0.462.0 - ISC 145 * 146 * This source code is licensed under the ISC license. 147 * See the LICENSE file in the root directory of this source tree. 148 */const Vd=le("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 149 * @license lucide-react v0.462.0 - ISC 150 * 151 * This source code is licensed under the ISC license. 152 * See the LICENSE file in the root directory of this source tree. 153 */const vf=le("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 154 * @license lucide-react v0.462.0 - ISC 155 * 156 * This source code is licensed under the ISC license. 157 * See the LICENSE file in the root directory of this source tree. 158 */const D0=le("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 159 * @license lucide-react v0.462.0 - ISC 160 * 161 * This source code is licensed under the ISC license. 162 * See the LICENSE file in the root directory of this source tree. 163 */const _m=le("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/** 164 * @license lucide-react v0.462.0 - ISC 165 * 166 * This source code is licensed under the ISC license. 167 * See the LICENSE file in the root directory of this source tree. 168 */const yf=le("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 169 * @license lucide-react v0.462.0 - ISC 170 * 171 * This source code is licensed under the ISC license. 172 * See the LICENSE file in the root directory of this source tree. 173 */const Zs=le("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 174 * @license lucide-react v0.462.0 - ISC 175 * 176 * This source code is licensed under the ISC license. 177 * See the LICENSE file in the root directory of this source tree. 178 */const Sm=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 179 * @license lucide-react v0.462.0 - ISC 180 * 181 * This source code is licensed under the ISC license. 182 * See the LICENSE file in the root directory of this source tree. 183 */const xE=le("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** 184 * @license lucide-react v0.462.0 - ISC 185 * 186 * This source code is licensed under the ISC license. 187 * See the LICENSE file in the root directory of this source tree. 188 */const bE=le("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 189 * @license lucide-react v0.462.0 - ISC 190 * 191 * This source code is licensed under the ISC license. 192 * See the LICENSE file in the root directory of this source tree. 193 */const _E=le("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 194 * @license lucide-react v0.462.0 - ISC 195 * 196 * This source code is licensed under the ISC license. 197 * See the LICENSE file in the root directory of this source tree. 198 */const SE=le("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 199 * @license lucide-react v0.462.0 - ISC 200 * 201 * This source code is licensed under the ISC license. 202 * See the LICENSE file in the root directory of this source tree. 203 */const kE=le("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
vendor: 8,719 bytes, lines 203-243
203],["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"}]]);/** 204 * @license lucide-react v0.462.0 - ISC 205 * 206 * This source code is licensed under the ISC license. 207 * See the LICENSE file in the root directory of this source tree. 208 */const EE=le("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 209 * @license lucide-react v0.462.0 - ISC 210 * 211 * This source code is licensed under the ISC license. 212 * See the LICENSE file in the root directory of this source tree. 213 */const $0=le("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 214 * @license lucide-react v0.462.0 - ISC 215 * 216 * This source code is licensed under the ISC license. 217 * See the LICENSE file in the root directory of this source tree. 218 */const CE=le("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"}]]);/** 219 * @license lucide-react v0.462.0 - ISC 220 * 221 * This source code is licensed under the ISC license. 222 * See the LICENSE file in the root directory of this source tree. 223 */const TE=le("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 224 * @license lucide-react v0.462.0 - ISC 225 * 226 * This source code is licensed under the ISC license. 227 * See the LICENSE file in the root directory of this source tree. 228 */const jE=le("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 229 * @license lucide-react v0.462.0 - ISC 230 * 231 * This source code is licensed under the ISC license. 232 * See the LICENSE file in the root directory of this source tree. 233 */const NE=le("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** 234 * @license lucide-react v0.462.0 - ISC 235 * 236 * This source code is licensed under the ISC license. 237 * See the LICENSE file in the root directory of this source tree. 238 */const M0=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 239 * @license lucide-react v0.462.0 - ISC 240 * 241 * This source code is licensed under the ISC license. 242 * See the LICENSE file in the root directory of this source tree. 243 */const PE=le("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),wf="-",RE=e=>{const t=OE(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(wf);return a[0]===""&&a.length!==1&&a.shift(),U0(a,t)||AE(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},U0=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?U0(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(wf);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},km=/^\[(.+)\]$/,AE=e=>{if(km.test(e)){const t=km.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},OE=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return LE(Object.entries(e.classGroups),r).forEach(([i,o])=>{qd(o,n,i,t)}),n},qd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Em(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(IE(s)){qd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{qd(o,Em(t,i),r,n)})})},Em=(e,t)=>{let r=e;return t.split(wf).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},IE=e=>e.isThemeGetter,LE=(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,DE=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)}}},B0="!",$E=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,d=0,h;for(let x=0;x<a.length;x++){let y=a[x];if(c===0){if(y===s&&(n||a.slice(x,x+i)===t)){l.push(a.slice(d,x)),d=x+i;continue}if(y==="/"){h=x;continue}}y==="["?c++:y==="]"&&c--}const p=l.length===0?a:a.substring(d),f=p.startsWith(B0),b=f?p.substring(1):p,m=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},ME=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},UE=e=>({cache:DE(e.cacheSize),parseClassName:$E(e),...RE(e)}),BE=/\s+/,FE=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(BE);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(c);let b=!!f,m=n(b?p.substring(0,f):p);if(!m){if(!b){a=c+(a.length>0?" "+a:a);continue}if(m=n(p),!m){a=c+(a.length>0?" "+a:a);continue}b=!1}const x=ME(d).join(":"),y=h?x+B0:x,v=y+m;if(i.includes(v))continue;i.push(v);const w=s(m,b);for(let _=0;_<w.length;++_){const S=w[_];i.push(y+S)}a=c+(a.length>0?" "+a:a)}return a};function zE(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=F0(t))&&(n&&(n+=" "),n+=r);return n}const F0=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=F0(e[n]))&&(r&&(r+=" "),r+=t);return r};function HE(e,...t){let r,n,s,i=o;function o(l){const c=t.reduce((d,h)=>h(d),e());return r=UE(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=FE(l,r);return s(l,d),d}return function(){return i(zE.apply(null,arguments))}}const fe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},z0=/^\[(?:([a-z-]+):)?(.+)\]$/i,WE=/^\d+\/\d+$/,VE=new Set(["px","full","screen"]),qE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KE=/\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$/,GE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rr=e=>ai(e)||VE.has(e)||WE.test(e),Zr=e=>Di(e,"length",sC),ai=e=>!!e&&!Number.isNaN(Number(e)),Eu=e=>Di(e,"number",ai),eo=e=>!!e&&Number.isInteger(Number(e)),YE=e=>e.endsWith("%")&&ai(e.slice(0,-1)),Z=e=>z0.test(e),en=e=>qE.test(e),XE=new Set(["length","size","percentage"]),ZE=e=>Di(e,XE,H0),eC=e=>Di(e,"position",H0),tC=new Set(["image","url"]),rC=e=>Di(e,tC,oC),nC=e=>Di(e,"",iC),to=()=>!0,Di=(e,t,r)=>{const n=z0.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},sC=e=>KE.test(e)&&!GE.test(e),H0=()=>!1,iC=e=>JE.test(e),oC=e=>QE.test(e),aC=()=>{const e=fe("colors"),t=fe("spacing"),r=fe("blur"),n=fe("brightness"),s=fe("borderColor"),i=fe("borderRadius"),o=fe("borderSpacing"),a=fe("borderWidth"),l=fe("contrast"),c=fe("grayscale"),d=fe("hueRotate"),h=fe("invert"),p=fe("gap"),f=fe("gradientColorStops"),b=fe("gradientColorStopPositions"),m=fe("inset"),x=fe("margin"),y=fe("opacity"),v=fe("padding"),w=fe("saturate"),_=fe("scale"),S=fe("sepia"),k=fe("skew"),E=fe("space"),N=fe("translate"),R=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",Z,t],D=()=>[Z,t],W=()=>["",Rr,Zr],L=()=>["auto",ai,Z],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],
vendor: 6,862 bytes, line 243
243V=()=>["solid","dashed","dotted","double","none"],K=()=>["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",Z],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[ai,Z];return{cacheSize:500,separator:":",theme:{colors:[to],spacing:[Rr,Zr],blur:["none","",en,Z],brightness:J(),borderColor:[e],borderRadius:["none","","full",en,Z],borderSpacing:D(),borderWidth:W(),contrast:J(),grayscale:P(),hueRotate:J(),invert:P(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[YE,Zr],inset:B(),margin:B(),opacity:J(),padding:D(),saturate:J(),scale:J(),sepia:P(),skew:J(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[en]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),Z]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],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",eo,Z]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",eo,Z]}],"grid-cols":[{"grid-cols":[to]}],"col-start-end":[{col:["auto",{span:["full",eo,Z]},Z]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[to]}],"row-start-end":[{row:["auto",{span:[eo,Z]},Z]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[en]},en]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",en,Zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Eu]}],"font-family":[{font:[to]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",ai,Eu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rr,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rr,Zr]}],"underline-offset":[{"underline-offset":["auto",Rr,Z]}],"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",Z]}],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",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),eC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ZE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}
243],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...V(),"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":[y]}
vendor: 4,458 bytes, line 243
243],"divide-style":[{divide:V()}],"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:["",...V()]}],"outline-offset":[{"outline-offset":[Rr,Z]}],"outline-w":[{outline:[Rr,Zr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Rr,Zr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",en,nC]}],"shadow-color":[{shadow:[to]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",en,Z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[eo,Z]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"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",Z]}],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",Z]}],"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"]}],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",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Rr,Zr,Eu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
243none"]}]},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"]}}},lC=HE(aC);function _e(...e){return lC(O0(e))}const cC=dE,W0=g.forwardRef(({className:e,...t},r)=>u.jsx(C0,{ref:r,className:_e("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}));W0.displayName=C0.displayName;const uC=gf("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"}}),V0=g.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(T0,{ref:n,className:_e(uC({variant:t}),e),...r}));V0.displayName=T0.displayName;const dC=g.forwardRef(({className:e,...t},r)=>u.jsx(P0,{ref:r,className:_e("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));dC.displayName=P0.displayName;const q0=g.forwardRef(({className:e,...t},r)=>u.jsx(R0,{ref:r,className:_e("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 13,157 bytes, line 243
243/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(M0,{className:"h-4 w-4"})}));q0.displayName=R0.displayName;const K0=g.forwardRef(({className:e,...t},r)=>u.jsx(j0,{ref:r,className:_e("text-sm font-semibold",e),...t}));K0.displayName=j0.displayName;const G0=g.forwardRef(({className:e,...t},r)=>u.jsx(N0,{ref:r,className:_e("text-sm opacity-90",e),...t}));G0.displayName=N0.displayName;function hC(){const{toasts:e}=_c();return u.jsxs(cC,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return u.jsxs(V0,{...i,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(K0,{children:r}),n&&u.jsx(G0,{children:n})]}),s,u.jsx(q0,{})]},t)}),u.jsx(W0,{})]})}var fC=mh[" useId ".trim().toString()]||(()=>{}),pC=0;function Cu(e){const[t,r]=g.useState(fC());return Vr(()=>{e||r(n=>n??String(pC++))},[e]),e||(t?`radix-${t}`:"")}const mC=["top","right","bottom","left"],Pn=Math.min,mt=Math.max,Wl=Math.round,Ua=Math.floor,kr=e=>({x:e,y:e}),gC={left:"right",right:"left",bottom:"top",top:"bottom"},vC={start:"end",end:"start"};function Kd(e,t,r){return mt(e,Pn(t,r))}function qr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function $i(e){return e.split("-")[1]}function xf(e){return e==="x"?"y":"x"}function bf(e){return e==="y"?"height":"width"}const yC=new Set(["top","bottom"]);function br(e){return yC.has(Kr(e))?"y":"x"}function _f(e){return xf(br(e))}function wC(e,t,r){r===void 0&&(r=!1);const n=$i(e),s=_f(e),i=bf(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Vl(o)),[o,Vl(o)]}function xC(e){const t=Vl(e);return[Gd(e),t,Gd(t)]}function Gd(e){return e.replace(/start|end/g,t=>vC[t])}const Cm=["left","right"],Tm=["right","left"],bC=["top","bottom"],_C=["bottom","top"];function SC(e,t,r){switch(e){case"top":case"bottom":return r?t?Tm:Cm:t?Cm:Tm;case"left":case"right":return t?bC:_C;default:return[]}}function kC(e,t,r,n){const s=$i(e);let i=SC(Kr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Gd)))),i}function Vl(e){return e.replace(/left|right|bottom|top/g,t=>gC[t])}function EC(e){return{top:0,right:0,bottom:0,left:0,...e}}function J0(e){return typeof e!="number"?EC(e):{top:e,right:e,bottom:e,left:e}}function ql(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 jm(e,t,r){let{reference:n,floating:s}=e;const i=br(t),o=_f(t),a=bf(o),l=Kr(t),c=i==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-s.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch($i(t)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}const CC=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 c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=jm(c,n,l),p=n,f={},b=0;for(let m=0;m<a.length;m++){const{name:x,fn:y}=a[m],{x:v,y:w,data:_,reset:S}=await y({x:d,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});d=v??d,h=w??h,f={...f,[x]:{...f[x],..._}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:h}=jm(c,p,l)),m=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:f}};async function Vo(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=qr(t,e),b=J0(f),x=a[p?h==="floating"?"reference":"floating":h],y=ql(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=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)),_=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},S=ql(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(y.top-S.top+b.top)/_.y,bottom:(S.bottom-y.bottom+b.bottom)/_.y,left:(y.left-S.left+b.left)/_.x,right:(S.right-y.right+b.right)/_.x}}const TC=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=qr(e,t)||{};if(c==null)return{};const h=J0(d),p={x:r,y:n},f=_f(s),b=bf(f),m=await o.getDimensions(c),x=f==="y",y=x?"top":"left",v=x?"bottom":"right",w=x?"clientHeight":"clientWidth",_=i.reference[b]+i.reference[f]-p[f]-i.floating[b],S=p[f]-i.reference[f],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=k?k[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[w]||i.floating[b]);const N=_/2-S/2,R=E/2-m[b]/2-1,O=Pn(h[y],R),B=Pn(h[v],R),D=O,W=E-m[b]-B,L=E/2-m[b]/2+N,q=Kd(D,L,W),V=!l.arrow&&$i(s)!=null&&L!==q&&i.reference[b]/2-(L<D?O:B)-m[b]/2<0,K=V?L<D?L-D:L-W:0;return{[f]:p[f]+K,data:{[f]:q,centerOffset:L-q-K,...V&&{alignmentOffset:K}},reset:V}}}),jC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...x}=qr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=Kr(s),v=br(a),w=Kr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(w||!m?[Vl(a)]:xC(a)),k=b!=="none";!p&&k&&S.push(...kC(a,m,b,_));const E=[a,...S],N=await Vo(t,x),R=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&R.push(N[y]),h){const L=wC(s,o,_);R.push(N[L[0]],N[L[1]])}if(O=[...O,{placement:s,overflows:R}],!R.every(L=>L<=0)){var B,D;const L=(((B=i.flip)==null?void 0:B.index)||0)+1,q=E[L];if(q&&(!(h==="alignment"?v!==br(q):!1)||O.every(T=>T.overflows[0]>0&&br(T.placement)===v)))return{data:{index:L,overflows:O},reset:{placement:q}};let V=(D=O.filter(K=>K.overflows[0]<=0).sort((K,T)=>K.overflows[1]-T.overflows[1])[0])==null?void 0:D.placement;if(!V)switch(f){case"bestFit":{var W;const K=(W=O.filter(T=>{if(k){const P=br(T.placement);return P===v||P==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(P=>P>0).reduce((P,$)=>P+$,0)]).sort((T,P)=>T[1]-P[1])[0])==null?void 0:W[0];K&&(V=K);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function Nm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pm(e){return mC.some(t=>e[t]>=0)}const NC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=qr(e,t);switch(n){case"referenceHidden":{const i=await Vo(t,{...s,elementContext:"reference"}),o=Nm(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Pm(o)}}}case"escaped":{const i=await Vo(t,{...s,altBoundary:!0}),o=Nm(i,r.floating);return{data:{escapedOffsets:o,escaped:Pm(o)}}}default:return{}}}}},Q0=new Set(["left","top"]);async function PC(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Kr(r),a=$i(r),l=br(r)==="y",c=Q0.has(o)?-1:1,d=i&&l?-1:1,h=qr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(f=a==="end"?b*-1:b),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}const RC=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 PC(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}}}}},AC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:y,y:v}=x;return{x:y,y:v}}},...l}=qr(e,t),c={x:r,y:n},d=await Vo(t,l),h=br(Kr(s)),p=xf(h);let f=c[p],b=c[h];if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+d[x],w=f-d[y];f=Kd(v,f,w)}if(o){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=b+d[x],w=b-d[y];b=Kd(v,b,w)}const m=a.fn({...t,[p]:f,[h]:b});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:i,[h]:o}}}}}},OC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=qr(e,t),d={x:r,y:n},h=br(s),p=xf(h);let f=d[p],b=d[h];const m=qr(a,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=p==="y"?"height":"width",_=i.reference[p]-i.floating[w]+x.mainAxis,S=i.reference[p]+i.reference[w]-x.mainAxis;f<_?f=_:f>S&&(f=S)}if(c){var y,v;const w=p==="y"?"width":"height",_=Q0.has(Kr(s)),S=i.reference[h]-i.floating[w]+(_&&((y=o.offset)==null?void 0:y[h])||0)+(_?0:x.crossAxis),k=i.reference[h]+i.reference[w]+(_?0:((v=o.offset)==null?void 0:v[h])||0)-(_?x.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[p]:f,[h]:b}}}},IC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=qr(e,t),d=await Vo(t,c),h=Kr(s),p=$i(s),f=br(s)==="y",{width:b,height:m}=i.floating;let x,y;h==="top"||h==="bottom"?(x=h,y=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,x=p==="end"?"top":"bottom");const v=m-d.top-d.bottom,w=b-d.left-d.right,_=Pn(m-d[x],v),S=Pn(b-d[y],w),k=!t.middlewareData.shift;let E=_,N=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=v),k&&!p){const O=mt(d.left,0),B=mt(d.right,0),D=mt(d.top,0),W=mt(d.bottom,0);f?N=b-2*(O!==0||B!==0?O+B:mt(d.left,d.right)):E=m-2*(D!==0||W!==0?D+W:mt(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:E});const R=await o.getDimensions(a.floating);return b!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}};function Cc(){return typeof window<"u"}function Mi(e){return Y0(e)?(e.nodeName||"").toLowerCase():"#document"}function wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tr(e){var t;return(t=(Y0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Y0(e){return Cc()?e instanceof Node||e instanceof wt(e).Node:!1}function nr(e){return Cc()?e instanceof Element||e instanceof wt(e).Element:!1}function Cr(e){return Cc()?e instanceof HTMLElement||e instanceof wt(e).HTMLElement:!1}function Rm(e){return!Cc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wt(e).ShadowRoot}const LC=new Set(["inline","contents"]);function ua(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!LC.has(s)}const DC=new Set(["table","td","th"]);function $C(e){return DC.has(Mi(e))}const MC=[":popover-open",":modal"];function Tc(e){return MC.some(t=>{try{return e.matches(t)}catch{return!1}})}const UC=["transform","translate","scale","rotate","perspective"],BC=["transform","translate","scale","rotate","perspective","filter"],FC=["paint","layout","strict","content"];function Sf(e){const t=kf(),r=nr(e)?sr(e):e;return UC.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||BC.some(n=>(r.willChange||"").includes(n))||FC.some(n=>(r.contain||"").includes(n))}function zC(e){let t=Rn(e);for(;Cr(t)&&!Ti(t);){if(Sf(t))return t;if(Tc(t))return null;t=Rn(t)}return null}function kf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const HC=new Set(["html","body","#document"]);function Ti(e){return HC.has(Mi(e))}function sr(e){return wt(e).getComputedStyle(e)}function jc(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rn(e){if(Mi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rm(e)&&e.host||Tr(e);return Rm(t)?t.host:t}function X0(e){const t=Rn(e);return Ti(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cr(t)&&ua(t)?t:X0(t)}function qo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=X0(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=wt(s);if(i){const a=Jd(o);
vendor: 4,593 bytes, line 243
243return t.concat(o,o.visualViewport||[],ua(s)?s:[],a&&r?qo(a):[])}return t.concat(s,qo(s,[],r))}function Jd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Z0(e){const t=sr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Cr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Wl(r)!==i||Wl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Ef(e){return nr(e)?e:e.contextElement}function li(e){const t=Ef(e);if(!Cr(t))return kr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Z0(t);let o=(i?Wl(r.width):r.width)/n,a=(i?Wl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const WC=kr(0);function ew(e){const t=wt(e);return!kf()||!t.visualViewport?WC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VC(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==wt(e)?!1:t}function hs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Ef(e);let o=kr(1);t&&(n?nr(n)&&(o=li(n)):o=li(e));const a=VC(i,r,n)?ew(i):kr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const p=wt(i),f=n&&nr(n)?wt(n):n;let b=p,m=Jd(b);for(;m&&n&&f!==b;){const x=li(m),y=m.getBoundingClientRect(),v=sr(m),w=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,_=y.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,h*=x.y,l+=w,c+=_,b=wt(m),m=Jd(b)}}return ql({width:d,height:h,x:l,y:c})}function Cf(e,t){const r=jc(e).scrollLeft;return t?t.left+r:hs(Tr(e)).left+r}function tw(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Cf(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function qC(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Tr(n),a=t?Tc(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=kr(1);const d=kr(0),h=Cr(n);if((h||!h&&!i)&&((Mi(n)!=="body"||ua(o))&&(l=jc(n)),Cr(n))){const f=hs(n);c=li(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=o&&!h&&!i?tw(o,l,!0):kr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function KC(e){return Array.from(e.getClientRects())}function GC(e){const t=Tr(e),r=jc(e),n=e.ownerDocument.body,s=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Cf(e);const a=-r.scrollTop;return sr(n).direction==="rtl"&&(o+=mt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function JC(e,t){const r=wt(e),n=Tr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=kf();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const QC=new Set(["absolute","fixed"]);function YC(e,t){const r=hs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Cr(e)?li(e):kr(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function Am(e,t,r){let n;if(t==="viewport")n=JC(e,r);else if(t==="document")n=GC(Tr(e));else if(nr(t))n=YC(t,r);else{const s=ew(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ql(n)}function rw(e,t){const r=Rn(e);return r===t||!nr(r)||Ti(r)?!1:sr(r).position==="fixed"||rw(r,t)}function XC(e,t){const r=t.get(e);if(r)return r;let n=qo(e,[],!1).filter(a=>nr(a)&&Mi(a)!=="body"),s=null;const i=sr(e).position==="fixed";let o=i?Rn(e):e;for(;nr(o)&&!Ti(o);){const a=sr(o),l=Sf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&QC.has(s.position)||ua(o)&&!l&&rw(e,o))?n=n.filter(d=>d!==o):s=a,o=Rn(o)}return t.set(e,n),n}function ZC(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Tc(t)?[]:XC(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,d)=>{const h=Am(t,d,s);return c.top=mt(h.top,c.top),c.right=Pn(h.right,c.right),c.bottom=Pn(h.bottom,c.bottom),c.left=mt(h.left,c.left),c},Am(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eT(e){const{width:t,height:r}=Z0(e);return{width:t,height:r}}function tT(e,t,r){const n=Cr(t),s=Tr(t),i=r==="fixed",o=hs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kr(0);function c(){l.x=Cf(s)}if(n||!n&&!i)if((Mi(t)!=="body"||ua(s))&&(a=jc(t)),n){const f=hs(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&c();i&&!n&&s&&c();const d=s&&!n&&!i?tw(s,a):kr(0),h=o.left+a.scrollLeft-l.x-d.x,p=o.top+a.scrollTop-l.y-d.y;return{x:h,y:p,width:o.width,height:o.height}}function Tu(e){return sr(e).position==="static"}
vendor: 9,169 bytes, line 243
243function Om(e,t){if(!Cr(e)||sr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Tr(e)===r&&(r=r.ownerDocument.body),r}function nw(e,t){const r=wt(e);if(Tc(e))return r;if(!Cr(e)){let s=Rn(e);for(;s&&!Ti(s);){if(nr(s)&&!Tu(s))return s;s=Rn(s)}return r}let n=Om(e,t);for(;n&&$C(n)&&Tu(n);)n=Om(n,t);return n&&Ti(n)&&Tu(n)&&!Sf(n)?r:n||zC(e)||r}const rT=async function(e){const t=this.getOffsetParent||nw,r=this.getDimensions,n=await r(e.floating);return{reference:tT(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nT(e){return sr(e).direction==="rtl"}const sT={convertOffsetParentRelativeRectToViewportRelativeRect:qC,getDocumentElement:Tr,getClippingRect:ZC,getOffsetParent:nw,getElementRects:rT,getClientRects:KC,getDimensions:eT,getScale:li,isElement:nr,isRTL:nT};function sw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iT(e,t){let r=null,n;const s=Tr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=c;if(a||t(),!p||!f)return;const b=Ua(h),m=Ua(s.clientWidth-(d+p)),x=Ua(s.clientHeight-(h+f)),y=Ua(d),w={rootMargin:-b+"px "+-m+"px "+-x+"px "+-y+"px",threshold:mt(0,Pn(1,l))||1};let _=!0;function S(k){const E=k[0].intersectionRatio;if(E!==l){if(!_)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!sw(c,e.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,w)}r.observe(e)}return o(!0),i}function oT(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ef(e),d=s||i?[...c?qo(c):[],...qo(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const h=c&&a?iT(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),r()}),c&&!l&&f.observe(c),f.observe(t));let b,m=l?hs(e):null;l&&x();function x(){const y=hs(e);m&&!sw(m,y)&&r(),m=y,b=requestAnimationFrame(x)}return r(),()=>{var y;d.forEach(v=>{s&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),h==null||h(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const aT=RC,lT=AC,cT=jC,uT=IC,dT=NC,Im=TC,hT=OC,fT=(e,t,r)=>{const n=new Map,s={platform:sT,...r},i={...s.platform,_c:n};return CC(e,t,{...s,platform:i})};var pT=typeof document<"u",mT=function(){},hl=pT?g.useLayoutEffect:mT;function Kl(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(!Kl(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)&&!Kl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lm(e,t){const r=iw(e);return Math.round(t*r)/r}function ju(e){const t=g.useRef(e);return hl(()=>{t.current=e}),t}function gT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,h]=g.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=g.useState(n);Kl(p,n)||f(n);const[b,m]=g.useState(null),[x,y]=g.useState(null),v=g.useCallback(T=>{T!==k.current&&(k.current=T,m(T))},[]),w=g.useCallback(T=>{T!==E.current&&(E.current=T,y(T))},[]),_=i||b,S=o||x,k=g.useRef(null),E=g.useRef(null),N=g.useRef(d),R=l!=null,O=ju(l),B=ju(s),D=ju(c),W=g.useCallback(()=>{if(!k.current||!E.current)return;const T={placement:t,strategy:r,middleware:p};B.current&&(T.platform=B.current),fT(k.current,E.current,T).then(P=>{const $={...P,isPositioned:D.current!==!1};L.current&&!Kl(N.current,$)&&(N.current=$,aa.flushSync(()=>{h($)}))})},[p,t,r,B,D]);hl(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(T=>({...T,isPositioned:!1})))},[c]);const L=g.useRef(!1);hl(()=>(L.current=!0,()=>{L.current=!1}),[]),hl(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(O.current)return O.current(_,S,W);W()}},[_,S,W,O,R]);const q=g.useMemo(()=>({reference:k,floating:E,setReference:v,setFloating:w}),[v,w]),V=g.useMemo(()=>({reference:_,floating:S}),[_,S]),K=g.useMemo(()=>{const T={position:r,left:0,top:0};if(!V.floating)return T;const P=Lm(V.floating,d.x),$=Lm(V.floating,d.y);return a?{...T,transform:"translate("+P+"px, "+$+"px)",...iw(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:$}},[r,a,V.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:W,refs:q,elements:V,floatingStyles:K}),[d,W,q,V,K])}const vT=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Im({element:n.current,padding:s}).fn(r):{}:n?Im({element:n,padding:s}).fn(r):{}}}},yT=(e,t)=>({...aT(e),options:[e,t]}),wT=(e,t)=>({...lT(e),options:[e,t]}),xT=(e,t)=>({...hT(e),options:[e,t]}),bT=(e,t)=>({...cT(e),options:[e,t]}),_T=(e,t)=>({...uT(e),options:[e,t]}),ST=(e,t)=>({...dT(e),options:[e,t]}),kT=(e,t)=>({...vT(e),options:[e,t]});var ET="Arrow",ow=g.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return u.jsx(Se.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});ow.displayName=ET;var CT=ow;function aw(e){const[t,r]=g.useState(void 0);return Vr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var lw="Popper",[cw,uw]=Ii(lw),[I2,dw]=cw(lw),hw="PopperAnchor",fw=g.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=dw(hw,r),o=g.useRef(null),a=He(t,o);return g.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:u.jsx(Se.div,{...s,ref:a})});fw.displayName=hw;var Tf="PopperContent",[TT,jT]=cw(Tf),pw=g.forwardRef((e,t)=>{var ne,or,St,ar,kt,jr;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:b,...m}=e,x=dw(Tf,r),[y,v]=g.useState(null),w=He(t,Et=>v(Et)),[_,S]=g.useState(null),k=aw(_),E=(k==null?void 0:k.width)??0,N=(k==null?void 0:k.height)??0,R=n+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(c)?c:[c],D=B.length>0,W={padding:O,boundary:B.filter(PT),altBoundary:D},{refs:L,floatingStyles:q,placement:V,isPositioned:K,middlewareData:T}=gT({strategy:"fixed",placement:R,whileElementsMounted:(...Et)=>oT(...Et,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[yT({mainAxis:s+N,alignmentAxis:o}),l&&wT({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?xT():void 0,...W}),l&&bT({...W}),_T({...W,apply:({elements:Et,rects:Dn,availableWidth:$n,availableHeight:Mn})=>{const{width:vs,height:Nr}=Dn.reference,Dt=Et.floating.style;Dt.setProperty("--radix-popper-available-width",`${$n}px`),Dt.setProperty("--radix-popper-available-height",`${Mn}px`),Dt.setProperty("--radix-popper-anchor-width",`${vs}px`),Dt.setProperty("--radix-popper-anchor-height",`${Nr}px`)}}),_&&kT({element:_,padding:a}),RT({arrowWidth:E,arrowHeight:N}),p&&ST({strategy:"referenceHidden",...W})]}),[P,$]=vw(V),J=Er(b);Vr(()=>{K&&(J==null||J())},[K,J]);const F=(ne=T.arrow)==null?void 0:ne.x,X=(or=T.arrow)==null?void 0:or.y,ee=((St=T.arrow)==null?void 0:St.centerOffset)!==0,[ye,Oe]=g.useState();return Vr(()=>{y&&Oe(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:K?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(ar=T.transformOrigin)==null?void 0:ar.x,(kt=T.transformOrigin)==null?void 0:kt.y].join(" "),...((jr=T.hide)==null?void 0:jr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(TT,{scope:r,placedSide:P,onArrowChange:S,arrowX:F,arrowY:X,shouldHideArrow:ee,children:u.jsx(Se.div,{"data-side":P,"data-align":$,...m,ref:w,style:{...m.style,animation:K?void 0:"none"}})})})});pw.displayName=Tf;var mw="PopperArrow",NT={top:"bottom",right:"left",bottom:"top",left:"r
243ight"},gw=g.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=jT(mw,n),o=NT[i.placedSide];return u.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:u.jsx(CT,{...s,ref:r,style:{...s.style,display:"block"}})})});gw.displayName=mw;function PT(e){return e!==null}var RT=e=>({name:"transformOrigin",options:e,fn(t){var x,y,v;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,d]=vw(r),h={start:"0%",center:"50%",end:"100%"}[d],p=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,f=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let b="",m="";return c==="bottom"?(b=o?h:`${p}px`,m=`${-l}px`):c==="top"?(b=o?h:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(b=`${-l}px`,m=o?h:`${f}px`):c==="left"&&(b=`${n.floating.width+l}px`,m=o?h:`${f}px`),{data:{x:b,y:m}}}});function vw(e){const[t,r="center"]=e.split("-");return[t,r]}var AT=fw,OT=pw,IT=gw,[Nc,L2]=Ii("Tooltip",[uw]),jf=uw(),yw="TooltipProvider",LT=700,Dm="tooltip.open",[DT,ww]=Nc(yw),xw=e=>{const{__scopeTooltip:t,delayDuration:r=LT,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(DT,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};xw.displayName=yw;var bw="Tooltip",[D2,Pc]=Nc(bw),Qd="TooltipTrigger",$T=g.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Pc(Qd,r),i=ww(Qd,r),o=jf(r),a=g.useRef(null),l=He(t,a,s.onTriggerChange),c=g.useRef(!1),d=g.useRef(!1),h=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),u.jsx(AT,{asChild:!0,...o,children:u.jsx(Se.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:me(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:me(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:me(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:me(e.onBlur,s.onClose),onClick:me(e.onClick,s.onClose)})})});$T.displayName=Qd;var MT="TooltipPortal",[$2,UT]=Nc(MT,{forceMount:void 0}),ji="TooltipContent",_w=g.forwardRef((e,t)=>{const r=UT(ji,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Pc(ji,e.__scopeTooltip);return u.jsx(Li,{present:n||o.open,children:o.disableHoverableContent?u.jsx(Sw,{side:s,...i,ref:t}):u.jsx(BT,{side:s,...i,ref:t})})}),BT=g.forwardRef((e,t)=>{const r=Pc(ji,e.__scopeTooltip),n=ww(ji,e.__scopeTooltip),s=g.useRef(null),i=He(t,s),[o,a]=g.useState(null),{trigger:l,onClose:c}=r,d=s.current,{onPointerInTransitChange:h}=n,p=g.useCallback(()=>{a(null),h(!1)},[h]),f=g.useCallback((b,m)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},v=VT(y,x.getBoundingClientRect()),w=qT(y,v),_=KT(m.getBoundingClientRect()),S=JT([...w,..._]);a(S),h(!0)},[h]);return g.useEffect(()=>()=>p(),[p]),g.useEffect(()=>{if(l&&d){const b=x=>f(x,d),m=x=>f(x,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",m)}}},[l,d,f,p]),g.useEffect(()=>{if(o){const b=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),w=!GT(y,o);v?p():w&&(p(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,o,c,p]),u.jsx(Sw,{...e,ref:i})}),[FT,zT]=Nc(bw,{isInside:!1}),HT=Sk("TooltipContent"),Sw=g.forwardRef((e,t)=>
vendor: 4,736 bytes, line 243
243{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Pc(ji,r),c=jf(r),{onClose:d}=l;return g.useEffect(()=>(document.addEventListener(Dm,d),()=>document.removeEventListener(Dm,d)),[d]),g.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),u.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:u.jsxs(OT,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(HT,{children:n}),u.jsx(FT,{scope:r,isInside:!0,children:u.jsx(Kk,{id:l.contentId,role:"tooltip",children:s||n})})]})})});_w.displayName=ji;var kw="TooltipArrow",WT=g.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=jf(r);return zT(kw,r).isInside?null:u.jsx(IT,{...s,...n,ref:t})});WT.displayName=kw;function VT(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 qT(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 KT(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 GT(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,d=a.y,h=l.x,p=l.y;d>n!=p>n&&r<(h-c)*(n-d)/(p-d)+c&&(s=!s)}return s}function JT(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),QT(t)}function QT(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 YT=xw,Ew=_w;const XT=YT,ZT=g.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(Ew,{ref:n,sideOffset:t,className:_e("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));ZT.displayName=Ew.displayName;const ej=gf("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",hero:"bg-gradient-primary text-primary-foreground font-semibold shadow-glow hover:opacity-90 transition-opacity",accent:"bg-gradient-accent text-accent-foreground font-semibold hover:opacity-90 transition-opacity"},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"}}),je=g.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?bk:"button";return u.jsx(o,{className:_e(ej({variant:t,size:r,className:e})),ref:i,...s})});
243je.displayName="Button";const tj="/assets/hero-bg-OIPqo04_.jpg",rj=[{icon:Zs,title:"Video-Loop Shows",description:"Lade dein Produktvideo hoch â es läuft automatisch in Endlosschleife für deine Kunden."},{icon:vf,title:"KI-gesteuerter Chat",description:"Ein intelligenter Chat beantwortet Kundenfragen in Echtzeit â rund um die Uhr."},{icon:Ci,title:"Live-Zuschauerzähler",description:"Zeige deinen Besuchern, wie viele Personen gerade zuschauen â Social Proof pur."},{icon:PE,title:"Smarte CTAs",description:"Call-to-Action Buttons zeitverzögert oder dauerhaft einblenden â du entscheidest."},{icon:D0,title:"Embeddable Widget",description:"Ein Banner für deine Shop-Seite, das Besucher direkt zur Show führt."},{icon:$0,title:"Video-Overlays",description:"Blende Links, Websites und Telefonnummern über dein Video ein â an/aus schaltbar."}],nj=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx("nav",{className:"fixed top-0 w-full z-50 border-b border-border/50 bg-background/80 backdrop-blur-xl",children:u.jsxs("div",{className:"container flex items-center justify-between h-16",children:[u.jsx("span",{className:"font-display text-xl font-bold text-gradient-primary",children:"ShopCast"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Kn,{to:"/auth",children:u.jsx(je,{variant:"ghost",size:"sm",children:"Anmelden"})}),u.jsx(Kn,{to:"/auth?mode=signup",children:u.jsx(je,{variant:"hero",size:"sm",children:"Kostenlos starten"})})]})]})}),u.jsxs("section",{className:"relative pt-32 pb-20 overflow-hidden",children:[u.jsx("img",{src:tj,alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-30",width:1920,height:1080}),u.jsx("div",{className:"absolute inset-0 bg-glow opacity-30"}),u.jsxs("div",{className:"container relative z-10 text-center max-w-4xl",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full border border-primary/30 bg-primary/5 text-primary text-sm font-medium mb-8",children:[u.jsx($0,{className:"w-4 h-4"}),"Die Zukunft des Live Shoppings"]}),u.jsxs("h1",{className:"font-display text-5xl md:text-7xl font-bold tracking-tight mb-6",children:["Dein Shop wird zur"," ",u.jsx("span",{className:"text-gradient-primary",children:"Live-Show"})]}),u.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto mb-10",children:"Erstelle interaktive Shopping-Shows mit Video, KI-Chat und smarten CTAs. Steigere Engagement und Conversions â ohne eine Zeile Code."}),u.jsxs("div",{className:"flex items-center justify-center gap-4",children:[u.jsx(Kn,{to:"/auth?mode=signup",children:u.jsxs(je,{variant:"hero",size:"lg",className:"text-base px-8",children:["Jetzt starten ",u.jsx(bm,{className:"w-4 h-4 ml-1"})]})}),u.jsx(Kn,{to:"/show/demo",children:u.jsxs(je,{variant:"outline",size:"lg",className:"text-base",children:[u.jsx(Zs,{className:"w-4 h-4 mr-1"})," Demo ansehen"]})})]})]})]}),u.jsx("section",{className:"py-24 border-t border-border/50",children:u.jsxs("div",{className:"container",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Alles was du brauchst"}),u.jsx("p",{className:"text-muted-foreground text-lg max-w-xl mx-auto",children:"Eine Plattform für interaktive Shopping-Erlebnisse."})]}),u.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:rj.map(e=>u.jsxs("div",{className:"group p-6 rounded-xl bg-card border border-border/50 shadow-card hover:border-primary/30 transition-colors",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center mb-4 group-hover:shadow-glow transition-shadow",children:u.jsx(e.icon,{className:"w-5 h-5 text-primary"})}),u.jsx("h3",{className:"font-display text-lg font-semibold mb-2",children:e.title}),u.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:e.description})]},e.title))})]})}),u.jsx("section",{className:"py-24 border-t border-border/50",children:u.jsxs("div",{className:"container text-center max-w-2xl",children:[u.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:["Bereit für mehr ",u.jsx("span",{className:"text-gradient-primary",children:"Conversions"}),"?"]}),u.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Starte jetzt kostenlos und verwandle deinen Shop in ein Live-Shopping-Erlebnis."}),u.jsx(Kn,{to:"/auth?mode=signup",children:u.jsxs(je,{variant:"hero",size:"lg",className:"text-base px-10",children:["Kostenlos registrieren ",u.jsx(bm,{className:"w-4 h-4 ml-1"})]})})]})}),u.jsx("footer",{className:"border-t border-border/50 py-8",children:u.jsxs("div",{className:"container flex items-center justify-between text-sm text-muted-foreground",children:[u.jsx("span",{className:"font-display font-semibold text-foreground",children:"ShopCast"}),u.jsxs("span",{children:["© ",new Date().getFullYear()," ShopCast. Alle Rechte vorbehalten."]})]})})]});function sj(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(d){try{c(n.next(d))}catch(h){o(h)}}function l(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?i(d.value):s(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}const ij=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
243class Nf 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 oj extends Nf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class $m extends Nf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Mm extends Nf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Yd;(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"})(Yd||(Yd={}));class aj{constructor(t,{headers:r={},customFetch:n,region:s=Yd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=ij(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return sj(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:d,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const b=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,b.searchParams.set("forceFunctionRegion",f));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(p["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(p["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let x=d;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),d?(x=o.signal,d.addEventListener("abort",()=>o.abort())):x=o.signal);const y=yield this.fetch(b.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:m,signal:x}).catch(S=>{throw new oj(S)}),v=y.headers.get("x-relay-error");if(v&&v==="true")throw new $m(y);if(!y.ok)throw new Mm(y);let w=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return w==="application/json"?_=yield y.json():w==="application/octet-stream"||w==="application/pdf"?_=yield y.blob():w==="text/event-stream"?_=y:w==="multipart/form-data"?_=yield y.formData():_=yield y.text(),{data:_,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof Mm||a instanceof $m?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Cw=3,Um=e=>Math.min(1e3*2**e,3e4),lj=[520,503],Tw=["GET","HEAD","OPTIONS"];var cj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
243de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Bm(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 uj(e,t,r,n){return!(!n||r>=Cw||!Tw.includes(e)||!lj.includes(t))}var dj=class{constructor(e){var t,r,n,s;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.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,this.retryEnabled=(s=e.retry)!==null&&s!==void 0?s:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let d;try{d=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!Tw.includes(r.method))throw h;if(r.retryEnabled&&o<Cw){const p=Um(o);o++,await Bm(p,r.signal);continue}throw h}if(uj(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,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:Um(o);await d.text(),o++,await Bm(p,r.signal);continue}return await r.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",d="";const h=o==null?void 0:o.cause;if(h){var p,f,b,m;const v=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",w=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(b=o==null?void 0:o.name)!==null&&b!==void 0?b:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 244 245Caused by: ${(m=h==null?void 0:h.name)!==null&&m!==void 0?m:"Error"}: ${v}`,w&&(l+=` (${w})`),h!=null&&h.stack&&(l+=` 246${h.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const y=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",c="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${y} 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="",c="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(c+=`. Your request URL is ${y} 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:c,code:d},data:null,count:null,status:0,statusText:""}})),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 c;const p=await e.text();p===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?n=p:n=JSON.parse(p))}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 cj(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},hj=class extends dj{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}
246explain({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 Fm=new RegExp("[,()]");var $s=class extends hj{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"&&Fm.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"&&Fm.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])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},fj=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(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new $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,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2460){const l=[...new Set(a)].map(c=>`"${c}"`);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 c=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(c.length>0){const d=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new $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 Ko(e){"@babel/helpers - typeof";return Ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ko(e)}function pj(e,t){if(Ko(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ko(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mj(e){var t=pj(e,"string");return Ko(t)=="symbol"?t:t+""}function gj(e,t,r){return(t=mj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zm(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 Ba(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zm(Object(r),!0).forEach(function(n){gj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vj=class jw{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=(c,d)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),i),f=d==null?void 0:d.signal;if(f){if(f.aborted)return clearTimeout(p),l(c,d);const b=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",b,{once:!0}),l(c,Ba(Ba({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",b)})}return l(c,Ba(Ba({},d),{},{signal:h.signal})).finally(()=>clearTimeout(p))}: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 fj(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 jw(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 c;const d=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(d)),h=n&&Object.values(r).some(d);h?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,b])=>b!==void 0).map(([f,b])=>[f,Array.isArray(b)?`{${b.join(",")}}`:`${b}
246`]).forEach(([f,b])=>{l.searchParams.append(f,b)})):(a="POST",c=r);const p=new Headers(this.headers);return h?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new $s({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class yj{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: 247import ws from "ws" 248new 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+=` 249 250Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const wj="2.102.1",xj=`realtime-js/${wj}`,bj="1.0.0",Nw="2.0.0",_j=Nw,Sj=1e4,kj=100,ln={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Pw={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Xd={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class Ej{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let b=new DataView(f),m=0;b.setUint8(m++,this.KINDS.userBroadcastPush),b.setUint8(m++,l.length),b.setUint8(m++,a.length),b.setUint8(m++,o.length),b.setUint8(m++,c.length),b.setUint8(m++,h.length),b.setUint8(m++,r),Array.from(l,y=>
250b.setUint8(m++,y.charCodeAt(0))),Array.from(a,y=>b.setUint8(m++,y.charCodeAt(0))),Array.from(o,y=>b.setUint8(m++,y.charCodeAt(0))),Array.from(c,y=>b.setUint8(m++,y.charCodeAt(0))),Array.from(h,y=>b.setUint8(m++,y.charCodeAt(0)));var x=new Uint8Array(f.byteLength+n.byteLength);return x.set(new Uint8Array(f),0),x.set(new Uint8Array(n),f.byteLength),x.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+i));l=l+i;const h=n.decode(t.slice(l,l+o));l=l+o;const p=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,b={type:this.BROADCAST_EVENT,event:d,payload:f};return o>0&&(b.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:b}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var de;(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"})(de||(de={}));const Hm=(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]=Cj(o,e,t,s),i),{}):{}},Cj=(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)?Rw(i,o):Zd(o)},Rw=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Pj(t,r)}switch(e){case de.bool:return Tj(t);case de.float4:case de.float8:case de.int2:case de.int4:case de.int8:case de.numeric:case de.oid:return jj(t);case de.json:case de.jsonb:return Nj(t);case de.timestamp:return Rj(t);case de.abstime:case de.date:case de.daterange:case de.int4range:case de.int8range:case de.money:case de.reltime:case de.text:case de.time:case de.timestamptz:case de.timetz:case de.tsrange:case de.tstzrange:return Zd(t);default:return Zd(t)}},Zd=e=>e,Tj=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},jj=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Nj=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Pj=(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=>Rw(t,a))}return e},Rj=e=>typeof e=="string"?e.replace(" ","T"):e,Aw=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 xo=e=>typeof e=="function"?e:function(){return e},Aj=typeof self<"u"?self:null,Ms=typeof window<"u"?window:null,pr=Aj||Ms||globalThis,Oj="2.0.0",Ij=1e4,Lj=1e3,yr={connecting:0,open:1,closing:2,closed:3},ot={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Ir={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},eh={longpoll:"longpoll",websocket:"websocket"},Dj={complete:4},th="base64url.bearer.phx.",Fa=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 250
250oks=[],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})}},Ow=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))}},$j=class{constructor(e,t,r){this.state=ot.closed,this.topic=e,this.params=xo(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Fa(this,Ir.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Ow(()=>{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=ot.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=ot.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=ot.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=ot.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 Fa(this,Ir.leave,xo({}),this.timeout).send(),this.state=ot.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Ir.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=ot.closed,this.bindings=[]}onClose(e){this.on(Ir.close,e)}onError(e){return this.on(Ir.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 Fa(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=ot.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Ir.close,"leave")},r=new Fa(this,Ir.leave,xo({}),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=ot.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===ot.closed}isErrored(){return this.state===ot.errored}isJoined(){return this.state===ot.joined}isJoining(){return this.state===ot.joining}isLeaving(){return this.state===ot.leaving}},Gl=class{static request(e,t,r,n,s,i,o){if(pr.XDomainRequest){let a=new pr.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(pr.XMLHttpRequest){let a=new pr.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(pr.fetch&&pr.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),pr.fetch(t,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.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,c]of Object.entries(n))e.setRequestHeader(l,c);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===Dj.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)}`}},Mj=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)},Ts=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(th)&&(this.authToken=atob(t[1].slice(th.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=yr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+eh.websocket),"$1/"+eh.longpoll)}endpointURL(){return Gl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=yr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===yr.open||this.readyState===yr.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=yr.open,this.onopen({}),this.poll();break;
250case 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=Mj(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(` 251`),()=>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=yr.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=Gl.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},Uj=class ao{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=ao.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=ao.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=ao.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 ao.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,c)=>{r[l]||(a[l]=c)}),this.map(r,(l,c)=>{let d=i[l];if(d){let h=c.metas.map(m=>m.phx_ref),p=d.metas.map(m=>m.phx_ref),f=c.metas.filter(m=>p.indexOf(m.phx_ref)<0),b=d.metas.filter(m=>h.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),b.length>0&&(a[l]=this.clone(d),a[l].metas=b)}else o[l]=c}),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 c=t[a];if(t[a]=this.clone(l),c){let d=t[a].metas.map(p=>p.phx_ref),h=c.metas.filter(p=>d.indexOf(p.phx_ref)<0);t[a].metas.unshift(...h)}n(a,c,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;let d=l.metas.map(h=>h.phx_ref);c.metas=c.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(a,c,l),c.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))}},za={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),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,s.length),l.setUint8(c++,n.length),Array.from(t,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(s,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(c++,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 251
251switch(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 c=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:c,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 c=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 p=e.slice(a,e.byteLength),f={status:h,response:p};return{join_ref:l,ref:c,topic:d,event:Ir.reply,payload:f}},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}}},Bj=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Ij,this.transport=t.transport||pr.WebSocket||Ts,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||pr&&pr.sessionStorage,this.establishedConnections=0,this.defaultEncoder=za.encode.bind(za),this.defaultDecoder=za.decode.bind(za),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!==Ts?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Ms&&Ms.addEventListener&&(Ms.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Ms.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),Ms.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=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=xo(t.params||{}),this.endPoint=`${e}/${eh.websocket}`,this.vsn=t.vsn||Oj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Ow(()=>{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 Ts}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=Gl.appendParams(Gl.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=xo(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ts?this.connectWithFallback(Ts,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 Ts:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${th}${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(),Lj,"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===yr.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()}
251triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Ir.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case yr.connecting:return"connecting";case yr.open:return"open";case yr.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 $j(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 bo{constructor(t,r){const n=zj(r);this.presence=new Uj(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=bo.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=bo.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return bo.transformState(this.presence.state)}static transformState(t){return t=Fj(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=fl(s),r},{})}static onJoinPayload(t,r,n){const s=Wm(r),i=fl(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Wm(r),i=fl(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function fl(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function Fj(e){return JSON.parse(JSON.stringify(e))}function zj(e){return(e==null?void 0:e.events)&&{events:e.events}}function Wm(e){return e!=null&&e.metas?fl(e):[]}var Vm;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Vm||(Vm={}));class Hj{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new bo(this.channel.channelAdapter,r)}}class Wj{constructor(t,r,n){const s=Vj(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>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===ln.joined}isJoined(){return this.state===ln.joined}isJoining(){return this.state===ln.joining}isClosed(){return this.state===ln.closed}isLeaving(){return this.state===ln.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function Vj(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var qm;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qm||(qm={}));var ei;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ei||(ei={}));var Lr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Lr||(Lr={}));class _o{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 Wj(this.socket.socketAdapter,t,this.params),this.presence=new Hj(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Aw(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`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,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ei.PRESENCE]&&this.bindings[ei.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(Lr.CHANNEL_ERROR,f)}),this._onClose(()=>t==null?void 0:t(Lr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(Lr.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=ln.errored,t==null||t(Lr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Lr.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:c,schema:d,table:h,filter:p}}=l,f=t&&t[a];if(f&&f.event===c&&_o.isFilterValueEqual(f.schema,d)&&_o.isFilterValueEqual(f.table,h)&&_o.isFilterValueEqual(f.filter,p))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=ln.errored,r==null||r(Lr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=ln.errored&&r&&r(Lr.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===ei.PRESENCE||t===ei.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("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;
251try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this.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 c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.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"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.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,c,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const p=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in p){const f=p.id,b=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((o=r.ids)===null||o===void 0?void 0:o.includes(f))&&(b==="*"||(b==null?void 0:b.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=Pw;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:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),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=Hm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Hm(t.columns,t.old_record)),r}}class qj{constructor(t,r){this.socket=new Bj(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()==Xd.connecting}isDisconnecting(){return this.socket.connectionState()==Xd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Kj={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Gj=[1e3,2e3,5e3,1e4],Jj=1e4,Qj=` 252 addEventListener("message", (e) => { 253 if (e.data.event === "start") { 254 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 255 } 256 });`;class Yj{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={}
256,this.ref=0,this.serializer=new Ej,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 qj(t,s),this.httpEndpoint=Aw(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} 257 258To use Realtime in Node.js, you need to provide a WebSocket implementation: 259 260Option 1: Use Node.js 22+ which has native WebSocket support 261Option 2: Install and provide the "ws" package: 262 263 npm install ws 264 265 import ws from "ws" 266 const client = new RealtimeClient(url, { 267 ...options, 268 transport: ws 269 })`):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()||Xd.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 _o(`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:xj};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(Pw.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([Qj],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,c,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={};
269h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:Sj,h.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Kj.HEARTBEAT_INTERVAL,h.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:yj.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=>Gj[m-1]||Jj;let p,f;const b=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:_j;switch(b){case bj:p=(m,x)=>x(JSON.stringify(m)),f=(m,x)=>x(JSON.parse(m));break;case Nw:p=this.serializer.encode.bind(this.serializer),f=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=b,h.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:p,h.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:f,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 Go=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 Xj(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 Zj(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 eN(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=Xj(e.baseUrl,n,s),l=await Zj(e.auth),c=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),p=h&&d?JSON.parse(d):d;if(!c.ok){const f=h?p:void 0,b=f==null?void 0:f.error;throw new Go((b==null?void 0:b.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function Ha(e){return e.join("�")}var tN=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Ha(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/${Ha(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ha(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ha(e.namespace)}`}),!0}catch(t){if(t instanceof Go&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Go&&r.status===409)return;throw r}}};function js(e){return e.join("�")}var rN=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/${js(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/${js(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/${js(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/${js(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/${js(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/${js(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Go&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Go&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},nN=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=eN({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new tN(this.client,t),this.tableOps=new rN(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)}
269async 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)}},Rc=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function Ac(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var rh=class extends Rc{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Iw=class extends Rc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const sN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),iN=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)},nh=e=>{if(Array.isArray(e))return e.map(r=>nh(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]=nh(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);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 aN(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 lN(e){var t=aN(e,"string");return Jo(t)=="symbol"?t:t+""}function cN(e,t,r){return(t=lN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Km(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Km(Object(r),!0).forEach(function(n){cN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Km(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Gm=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)},uN=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 rh(Gm(o),i,a,n))}).catch(()=>{const o=i+"";t(new rh(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new Iw(Gm(e),e,n))},dN=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return H(H({},s),r);if(iN(n)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=hN(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),H(H({},s),r)};function hN(e,t,r){const n=H({},e);for(const s of Object.keys(n))s.toLowerCase()===t.toLowerCase()&&delete n[s];return n[t]=r,n}async function ro(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,dN(t,n,s,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(o==="vectors"){const d=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!d||!d.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>
269uN(c,l,n,o))})}function Lw(e="storage"){return{get:async(t,r,n,s)=>ro(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>ro(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>ro(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>ro(t,"HEAD",r,H(H({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>ro(t,"DELETE",r,s,i,n,e)}}const fN=Lw("storage"),{get:Qo,post:Jt,put:sh,head:pN,remove:Pf}=fN,gt=Lw("vectors");var Ui=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([s,i])=>[s.toLowerCase(),i])),this.fetch=sN(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=H(H({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ac(r))return{data:null,error:r};throw r}}},mN=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(Ac(t))return{data:null,error:t};throw t}}};let Dw;Dw=Symbol.toStringTag;var gN=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Dw]="BlobDownloadBuilder",this.promise=null}asStream(){return new mN(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(Ac(t))return{data:null,error:t};throw t}}};const vN={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Jm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var yN=class extends Ui{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=H(H({},Jm),n);let a=H(H({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(a=H(H({},a),n.headers));const c=s._removeEmptyFolders(t),d=s._getFinalPath(c),h=await(e=="PUT"?sh:Jt)(s.fetch,`${s.url}/object/${d}`,i,H({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,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 c=H(H({},Jm),n),d=H(H({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType),{path:i,fullPath:(await sh(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=H({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Jt(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 Rc("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 Jt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
269stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Jt(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 Jt(n.fetch,`${n.url}/object/sign/${s}`,H({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"",l=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${n.url}${l}${a}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Jt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(o=>H(H({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${i}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>Qo(this.fetch,`${this.url}/${n}/${o}${i}`,{headers:this.headers,noResolveJson:!0},r);return new gN(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>nh(await Qo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await pN(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Ac(s)){var n;const i=s instanceof rh?s.status:s instanceof Iw?(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=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Pf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=H(H(H({},vN),t),{},{prefix:e||""});return await Jt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=H({},e);return await Jt(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,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const wN="2.102.1",da={"X-Client-Info":`storage-js/${wN}`};var xN=class extends Ui{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=H(H({},da),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Qo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Qo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Jt(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 sh(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 Jt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Pf(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():""}},bN=class extends Ui{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},da),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Jt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
269{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 Qo(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Pf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!oN(e))throw new Rc("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 nN({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}}}}})}},_N=class extends Ui{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},da),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await gt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await gt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await gt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await gt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},SN=class extends Ui{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},da),{},{"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 gt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await gt.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 gt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await gt.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 gt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},kN=class extends Ui{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},da),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await gt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await gt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await gt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await gt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},EN=class extends kN{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new CN(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)}},CN=class extends _N{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName}))}
269async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new TN(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},TN=class extends SN{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},jN=class extends xN{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new yN(this.url,this.headers,e,this.fetch)}get vectors(){return new EN(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new bN(this.url+"/iceberg",this.headers,this.fetch)}};function Oc(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 $w="2.102.1",Us=30*1e3,ih=3,Nu=ih*Us,NN="http://localhost:9999",PN="supabase.auth.token",RN={"X-Client-Info":`gotrue-js/${$w}`},oh="X-Supabase-Api-Version",Mw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},AN=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ON=10*60*1e3;class Yo extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function U(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class IN extends Yo{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function LN(e){return U(e)&&e.name==="AuthApiError"}class Gn extends Yo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Jr extends Yo{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class ft extends Jr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Wa(e){return U(e)&&e.name==="AuthSessionMissingError"}class Ns extends Jr{constructor(){super("Auth session or user missing","AuthInvalidToken
269ResponseError",500,void 0)}}class Va extends Jr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class qa extends Jr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function DN(e){return U(e)&&e.name==="AuthImplicitGrantRedirectError"}class Qm extends Jr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class $N extends Jr{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 ah extends Jr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Pu(e){return U(e)&&e.name==="AuthRetryableFetchError"}class Ym extends Jr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class lh extends Jr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Jl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Xm=` 270\r=`.split(""),MN=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Xm.length;t+=1)e[Xm[t].charCodeAt(0)]=-2;for(let t=0;t<Jl.length;t+=1)e[Jl[t].charCodeAt(0)]=t;return e})();function Zm(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(Jl[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(Jl[n]),t.queuedBits-=6}}function Uw(e,t,r){const n=MN[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 eg(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{FN(o,n,r)};for(let o=0;o<e.length;o+=1)Uw(e.charCodeAt(o),s,i);return t.join("")}function UN(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 BN(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}UN(n,t)}}function FN(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 ci(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Uw(e.charCodeAt(s),r,n);return new Uint8Array(t)}function zN(e){const t=[];return BN(e,r=>t.push(r)),new Uint8Array(t)}function Xn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Zm(s,r,n)),Zm(null,r,n),t.join("")}function HN(e){return Math.round(Date.now()/1e3)+e}function WN(){return Symbol("auth-callback")}const Ue=()=>typeof window<"u"&&typeof document<"u",zn={tested:!1,writable:!1},Bw=()=>{if(!Ue())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(zn.tested)return zn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),zn.tested=!0,zn.writable=!0}catch{zn.tested=!0,zn.writable=!1}return zn.writable};function VN(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
270h((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),qN=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Bs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Hn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Me=async(e,t)=>{await e.removeItem(t)};class Ic{constructor(){this.promise=new Ic.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Ic.promiseConstructor=Promise;function Ka(e){const t=e.split(".");if(t.length!==3)throw new lh("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!AN.test(t[n]))throw new lh("JWT not in base64url format");return{header:JSON.parse(eg(t[0])),payload:JSON.parse(eg(t[1])),signature:ci(t[2]),raw:{header:t[0],payload:t[1]}}}async function KN(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function GN(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 JN(e){return("0"+e.toString(16)).substr(-2)}function QN(){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,JN).join("")}async function YN(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 XN(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 YN(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ps(e,t,r=!1){const n=QN();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Bs(e,`${t}-code-verifier`,s);const i=await XN(n);return[i,n===i?"plain":"s256"]}const ZN=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function eP(e){const t=e.headers.get(oh);if(!t||!t.match(ZN))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function tP(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 rP(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 nP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Rs(e){if(!nP.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Ru(){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 sP(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 tg(e){return JSON.parse(JSON.stringify(e))}const qn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),iP=[502,503,504];async function rg(e){var t;if(!qN(e))throw new ah(qn(e),0);if(iP.includes(e.status))throw new ah(qn(e),e.status);let r;try{r=await e.json()}catch(i){throw new Gn(qn(i),i)}let n;const s=eP(e);if(s&&s.getTime()>=Mw["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 Ym(qn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new ft}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)=>
270i&&typeof o=="string",!0))throw new Ym(qn(r),e.status,r.weak_password.reasons);throw new IN(qn(r),e.status||500,n)}const oP=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function z(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[oh]||(i[oh]=Mw["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 aP(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 aP(e,t,r,n,s,i){const o=oP(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new ah(qn(l),0)}if(a.ok||await rg(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await rg(l)}}function zt(e){var t;let r=null;uP(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=HN(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function ng(e){const t=zt(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 cn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function lP(e){return{data:e,error:null}}function cP(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=Oc(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 sg(e){return e}function uP(e){return e.access_token&&e.refresh_token&&e.expires_in}const Au=["global","local","others"];class dP{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=Au[0]){if(Au.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Au.join(", ")}`);try{return await z(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await z(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:cn})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Oc(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:cP,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(U(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await z(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:cn})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:sg});if(d.error)throw d.error;const h=await d.json(),p=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);c[`${x}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(U(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){Rs(t);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:cn})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Rs(t);try{return await z(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:cn})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Rs(t);
270try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:cn})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Rs(t.userId);try{const{data:r,error:n}=await z(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Rs(t.userId),Rs(t.id);try{return{data:await z(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await z(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:sg});if(d.error)throw d.error;const h=await d.json(),p=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);c[`${x}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(U(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await z(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await z(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await z(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(U(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await z(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await z(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await z(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}}function ig(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const hr={debug:!!(globalThis&&Bw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
270class zw extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class og extends zw{}async function hP(e,t,r){hr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),hr.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),hr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{hr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw hr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new og(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(hr.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 hr.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){hr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{hr.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 hr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new og(`Lock "${e}" was released because another request stole it`)}throw i}}function fP(){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 Hw(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function pP(e){return parseInt(e,16)}function mP(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function gP(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:d,uri:h,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 271`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=Hw(e.address),b=d?`${d}://${n}`:n,m=e.statement?`${e.statement} 272`:"",x=`${b} wants you to sign in with your Ethereum account: 273${f} 274 275${m}`;let y=`URI: ${h} 276Version: ${p} 277Chain ID: ${r}${o?` 278Nonce: ${o}`:""} 279Issued At: ${i.toISOString()}`;if(s&&(y+=` 280Expiration Time: ${s.toISOString()}`),a&&(y+=` 281Not Before: ${a.toISOString()}`),l&&(y+=` 282Request ID: ${l}`),c){let v=` 283Resources:`;
283for(const w of c){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}`);v+=` 284- ${w}`}y+=v}return`${x} 285${y}`}class Pe 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 Ql extends Pe{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function vP({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 Pe({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 Pe({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 Pe({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 Pe({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 Pe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Pe({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 Pe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Pe({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(Ww(o)){if(i.rp.id!==o)return new Pe({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Pe({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 Pe({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 Pe({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 Pe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function yP({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 Pe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Pe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Ww(n)){if(r.rpId!==n)return new Pe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Pe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Pe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
285ROR",cause:e})}return new Pe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class wP{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 xP=new wP;function bP(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=Oc(e,["challenge","user","excludeCredentials"]),i=ci(t).buffer,o=Object.assign(Object.assign({},r),{id:ci(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:ci(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function _P(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=Oc(e,["challenge","allowCredentials"]),s=ci(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:ci(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function SP(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Xn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Xn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function 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:Xn(new Uint8Array(s.authenticatorData)),clientDataJSON:Xn(new Uint8Array(s.clientDataJSON)),signature:Xn(new Uint8Array(s.signature)),userHandle:s.userHandle?Xn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Ww(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ag(){var e,t;return!!(Ue()&&"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 EP(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ql("Browser returned unexpected credential type",t)}:{data:null,error:new Ql("Empty credential response",t)}}catch(t){return{data:null,error:vP({error:t,options:e})}}}async function CP(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ql("Browser returned unexpected credential type",t)}:{data:null,error:new Ql("Empty credential response",t)}}catch(t){return{data:null,error:yP({error:t,options:e})}}}const TP={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},jP={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Yl(...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]=Yl(a,o):n[i]=Yl(o)}else n[i]=o}return n}function NP(e,t){return Yl(TP,e,t||{})}function PP(e,t){return Yl(jP,e,t||{})}class RP{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 c=s??xP.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 f=(await this.client.getUser()).data.user,b=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";d.name=`${d.id}:${b}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=NP(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:p}=await EP({publicKey:d,signal:c});return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const d=PP(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:p}=await CP(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:c}));return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(a){return U(a)?{data:null,error:a}:{data:null,error:new Gn("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 Yo("rpId is required for WebAuthn authentication")};try{if(!ag())return{data:null,error:new Gn("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 U(o)?{data:null,error:o}:{data:null,error:new Gn("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 Yo("rpId is required for WebAuthn registration")};try{if(!ag())return{data:null,error:new Gn("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;
285return(h=d.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new Gn("Unexpected error in register",o)}}}}fP();const AP={url:NN,storageKey:PN,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:RN,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function lg(e,t,r){return await r()}const As={};class Xo{get jwks(){var t,r;return(r=(t=As[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){As[this.storageKey]=Object.assign(Object.assign({},As[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=As[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){As[this.storageKey]=Object.assign(Object.assign({},As[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({},AP),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Xo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Xo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Ue()){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 dP({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||lg,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&&Ue()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=hP:this.lock=lg,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 RP(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:Bw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ig(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=ig(this.memoryStorage)),Ue()&&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} (${$w}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Ue()&&(r=VN(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ue()&&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),DN(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 U(r)?this._returnResult({error:r}):this._returnResult({error:new Gn("Unexpected error during initialization",r)}
285)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:zt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:d,password:h,options:p}=t;let f=null,b=null;this.flowType==="pkce"&&([f,b]=await Ps(this.storage,this.storageKey)),i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:b},xform:zt})}else if("phone"in t){const{phone:d,password:h,options:p}=t;i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:zt})}else throw new Va("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Me(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(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 z(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:ng})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await z(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:ng})}else throw new Va("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 Ns;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(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,c,d,h,p;let f,b;if("message"in t)f=t.message,b=t.signature;else{const{chain:m,wallet:x,statement:y,options:v}=t;let w;if(Ue())if(typeof x=="object")w=x;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")w=R.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const _=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=Hw(S[0]);let E=(n=v==null?void 0:v.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const R=await w.request({method:"eth_chainId"});E=pP(R)}const N={domain:_.host,address:k,statement:y,uri:_.href,version:"1",chainId:E,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=gP(N),b=await w.request({method:"personal_sign",params:[mP(f),k]})}try{const{data:m,error:x}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:b}
285,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:zt});if(x)throw x;if(!m||!m.session||!m.user){const y=new Ns;return this._returnResult({data:{user:null,session:null},error:y})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:x})}catch(m){if(U(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,s,i,o,a,l,c,d,h,p,f;let b,m;if("message"in t)b=t.message,m=t.signature;else{const{chain:x,wallet:y,statement:v,options:w}=t;let _;if(Ue())if(typeof y=="object")_=y;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=y}const S=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),v?{statement:v}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)b=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${S.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}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.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(E=>`- ${E}`)]:[]].join(` 286`);const k=await _.signMessage(new TextEncoder().encode(b),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:x,error:y}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:Xn(m)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:zt});if(y)throw y;if(!x||!x.session||!x.user){const v=new Ns;return this._returnResult({data:{user:null,session:null},error:v})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}
286catch(x){if(U(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await Hn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new $N;const{data:i,error:o}=await z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:zt});if(await Me(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Ns;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 Me(this.storage,`${this.storageKey}-code-verifier`),U(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 z(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:zt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new Ns;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await Ps(this.storage,this.storageKey));const{error:h}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:d}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new Va("You must provide either an email or phone number.")}catch(a){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(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 z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:zt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(U(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 Ps(this.storage,this.storageKey));const c=await z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:lP});return!((i=c.data)===null||i===void 0)&&i.url&&Ue()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(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 ft;const{error:s}=await z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(U(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 z(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 z(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 Va("You must provide either an email or phone number and a type")}catch(r){if(U(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 Hn(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
286id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Nu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Hn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Ru()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=sP(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 z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:cn}):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 ft}:await z(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:cn})})}catch(r){if(U(r))return Wa(r)&&(await this._removeSession(),await Me(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 ft;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Ps(this.storage,this.storageKey));const{data:c,error:d}=await z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:cn});if(d)throw d;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(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 ft;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Ka(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(U(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 ft;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(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Ue())throw new qa("No browser detected.");
286if(t.error||t.error_description||t.error_code)throw new qa(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 Qm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new qa("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 Qm("No code detected.");const{data:v,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new qa("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let p=d+h;l&&(p=parseInt(l));const f=p-d;f*1e3<=Us&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const b=p-h;d-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,p,d):d-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,p,d);const{data:m,error:x}=await this._getUser(i);if(x)throw x;const y={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:p,refresh_token:o,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(n){if(U(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 Hn(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&&!Wa(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(LN(a)&&(a.status===404||a.status===401||a.status===403)||Wa(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Me(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=WN(),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),Wa(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Ps(this.storage,this.storageKey,!0));try{return await z(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(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(U(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,d;const{data:h,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await z(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Ue()&&!(!((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(U(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:d}=t,h=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:zt}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Ns}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(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;
286return await z(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(U(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 GN(async s=>(s>0&&await KN(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:zt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Pu(i)&&Date.now()+o-n<Us})}catch(n){if(this._debug(r,"error",n),U(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),Ue()&&!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 Hn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Hn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Bs(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Ru()}else if(s&&!s.user&&!s.user){const o=await Hn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Me(this.storage,this.storageKey+"-user"),await Bs(this.storage,this.storageKey,s)):s.user=Ru()}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()<Nu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Nu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Pu(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 ft;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Ic;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new ft;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),U(i)){const o={data:null,error:i};return Pu(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 Me(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 Bs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=tg(s);await Bs(this.storage,this.storageKey,i)}else{const s=tg(r);await Bs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Me(this.storage,this.storageKey),await Me(this.storage,this.storageKey+"-code-verifier"),await Me(this.storage,this.storageKey+"-user"),this.userStorage&&await Me(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ue()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
286catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Us);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)/Us);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Us}ms, refresh threshold is ${ih} ticks`),s<=ih&&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 zw)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ue()||!(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 Ps(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 z(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await z(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(U(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"?SP(t.webauthn.credential_response):kP(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await z(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(U(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 z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(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:bP(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:_P(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(U(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:f}=Ka(t);let b=null;f.aal&&(b=f.aal);let m=b;const{data:{user:x},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const w=f.amr||[];return{data:{currentLevel:b,nextLevel:m,currentAuthenticationMethods:w},error:null}}catch(f){if(U(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
286=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}=Ka(o.access_token);let c=null;l.aal&&(c=l.aal);let d=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:d,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await z(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ft})})}catch(r){if(U(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 ft});const o=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(U(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 ft});const o=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await z(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ft})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await z(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ft})})}catch(r){if(U(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+ON>s)return n;const{data:i,error:o}=await z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:b}
286=await this.getSession();if(b||!f.session)return this._returnResult({data:null,error:b});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Ka(n);r!=null&&r.allowExpired||tP(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const d=rP(s.alg),h=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,zN(`${a}.${l}`)))throw new lh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}}Xo.nextInstanceID={};const OP=Xo,IP="2.102.1";let lo="";typeof Deno<"u"?lo="deno":typeof document<"u"?lo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?lo="react-native":lo="node";const LP={"X-Client-Info":`supabase-js-${lo}/${IP}`},DP={headers:LP},$P={schema:"public"},MP={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},UP={};function Zo(e){"@babel/helpers - typeof";return Zo=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},Zo(e)}function BP(e,t){if(Zo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FP(e){var t=BP(e,"string");return Zo(t)=="symbol"?t:t+""}function zP(e,t,r){return(t=FP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cg(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 Ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cg(Object(r),!0).forEach(function(n){zP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const HP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),WP=()=>Headers,VP=(e,t,r)=>{const n=HP(r),s=WP();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(i,Ee(Ee({},o),{},{headers:c}))}};function qP(e){return e.endsWith("/")?e:e+"/"}function KP(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:d,global:h}=t,p={db:Ee(Ee({},l),s),auth:Ee(Ee({},c),i),realtime:Ee(Ee({},d),o),storage:{},global:Ee(Ee(Ee({},h),a),{},{headers:Ee(Ee({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function GP(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(qP(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var JP=class extends OP{constructor(e){super(e)}},QP=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=GP(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:$P,realtime:UP,auth:Ee(Ee({},MP),{},{storageKey:o}),global:DP},l=KP(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=VP(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ee({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 vj(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 jN(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new aj(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)}
286channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},d,h){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new JP({url:this.authUrl.href,headers:Ee(Ee({},p),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new Yj(this.realtimeUrl.href,Ee(Ee({},e),{},{params:Ee(Ee({},{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 YP=(e,t,r)=>new QP(e,t,r);function XP(){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}XP()&&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 ZP="https://plpcvbazszthlrjmhwob.supabase.co",eR="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBscGN2YmF6c3p0aGxyam1od29iIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ4ODA0MzQsImV4cCI6MjA5MDQ1NjQzNH0.txxN-gMocmiWWIjsABNK2m77WCsIBbuyz6yVO_IcrYE",Ce=YP(ZP,eR,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),te=g.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:_e("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}));te.displayName="Input";var tR="Label",Vw=g.forwardRef((e,t)=>u.jsx(Se.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())}}));Vw.displayName=tR;var qw=Vw;const rR=gf("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Q=g.forwardRef(({className:e,...t},r)=>u.jsx(qw,{ref:r,className:_e(rR(),e),...t}));Q.displayName=qw.displayName;const nR=()=>{const[e]=LS(),[t,r]=g.useState(e.get("mode")==="signup"),[n,s]=g.useState(""),[i,o]=g.useState(""),[a,l]=g.useState(!1),c=bc(),{toast:d}=_c();g.useEffect(()=>{const{data:{subscription:p}}=Ce.auth.onAuthStateChange((f,b)=>{b&&c("/dashboard")});return Ce.auth.getSession().then(({data:{session:f}})=>{f&&c("/dashboard")}),()=>p.unsubscribe()},[c]);const h=async p=>{p.preventDefault(),l(!0);try{if(t){const{error:f}=await Ce.auth.signUp({email:n,password:i,options:{emailRedirectTo:window.location.origin}});if(f)throw f;d({title:"Account erstellt!",description:"Bitte bestätige deine E-Mail-Adresse."})}else{const{error:f}=await Ce.auth.signInWithPassword({email:n,password:i});if(f)throw f}}catch(f){d({title:"Fehler",description:f.message,variant:"destructive"})}finally{l(!1)}};return u.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[u.jsx("div",{className:"absolute inset-0 bg-glow opacity-20"}),u.jsxs("div",{className:"relative w-full max-w-md",children:[u.jsxs(Kn,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground text-sm mb-8 transition-colors",children:[u.jsx(Hd,{className:"w-4 h-4"})," Zurück"]}),u.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border/50 shadow-card",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsx("span",{className:"font-display text-2xl font-bold text-gradient-primary",children:"ShopCast"}),u.jsx("h1",{className:"font-display text-xl font-semibold mt-4",children:t?"Account erstellen":"Willkommen zurück"}),u.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:t?"Starte deine erste Shopping-Show":"Melde dich an, um fortzufahren"})]}),u.jsxs("form",{onSubmit:h,className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{htmlFor:"email",children:"E-Mail"}),u.jsx(te,{id:"email",type:"email",value:n,onChange:p=>s(p.target.value),placeholder:"[email protected]",required:!0})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{htmlFor:"password",children:"Passwort"}),u.jsx(te,{id:"password",type:"password",value:i,onChange:p=>o(p.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6})]}),u.jsxs(je,{type:"submit",variant:"hero",className:"w-full",disabled:a,children:[a&&u.jsx(yE,{className:"w-4 h-4 animate-spin mr-2"}),t?"Registrieren":"Anmelden"]})]}),u.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-6",children:[t?"Bereits registriert?":"Noch kein Account?"," ",u.jsx("button",{onClick:()=>r(!t),className:"text-primary hover:underline",children:t?"Anmelden":"Registrieren"})]})]})]})]})};function sR(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Lc="Switch",[iR,M2]=Ii(Lc),[oR,aR]=iR(Lc),Kw=g.forwardRef((e,t)=>
vendor: 5,993 bytes, line 286
286{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,form:d,...h}=e,[p,f]=g.useState(null),b=He(t,w=>f(w)),m=g.useRef(!1),x=p?d||!!p.closest("form"):!0,[y,v]=hf({prop:s,defaultProp:i??!1,onChange:c,caller:Lc});return u.jsxs(oR,{scope:r,checked:y,disabled:a,children:[u.jsx(Se.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":Yw(y),"data-disabled":a?"":void 0,disabled:a,value:l,...h,ref:b,onClick:me(e.onClick,w=>{v(_=>!_),x&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),x&&u.jsx(Qw,{control:p,bubbles:!m.current,name:n,value:l,checked:y,required:o,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Kw.displayName=Lc;var Gw="SwitchThumb",Jw=g.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=aR(Gw,r);return u.jsx(Se.span,{"data-state":Yw(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Jw.displayName=Gw;var lR="SwitchBubbleInput",Qw=g.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},i)=>{const o=g.useRef(null),a=He(o,i),l=sR(r),c=aw(t);return g.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(l!==r&&f){const b=new Event("click",{bubbles:n});f.call(d,r),d.dispatchEvent(b)}},[l,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qw.displayName=lR;function Yw(e){return e?"checked":"unchecked"}var Xw=Kw,cR=Jw;const un=g.forwardRef(({className:e,...t},r)=>u.jsx(Xw,{className:_e("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:u.jsx(cR,{className:_e("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")})}));un.displayName=Xw.displayName;var Ou="focusScope.autoFocusOnMount",Iu="focusScope.autoFocusOnUnmount",ug={bubbles:!1,cancelable:!0},uR="FocusScope",Zw=g.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=g.useState(null),c=Er(s),d=Er(i),h=g.useRef(null),p=He(t,m=>l(m)),f=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(n){let m=function(w){if(f.paused||!a)return;const _=w.target;a.contains(_)?h.current=_:rn(h.current,{select:!0})},x=function(w){if(f.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||rn(h.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&rn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),v.disconnect()}}},[n,a,f.paused]),g.useEffect(()=>{if(a){hg.add(f);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Ou,ug);a.addEventListener(Ou,c),a.dispatchEvent(y),y.defaultPrevented||(dR(gR(ex(a)),{select:!0}),document.activeElement===m&&rn(a))}return()=>{a.removeEventListener(Ou,c),setTimeout(()=>{const y=new CustomEvent(Iu,ug);a.addEventListener(Iu,d),a.dispatchEvent(y),y.defaultPrevented||rn(m??document.body,{select:!0}),a.removeEventListener(Iu,d),hg.remove(f)},0)}}},[a,c,d,f]);const b=g.useCallback(m=>{if(!r&&!n||f.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const v=m.currentTarget,[w,_]=hR(v);w&&_?!m.shiftKey&&y===_?(m.preventDefault(),r&&rn(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),r&&rn(_,{select:!0})):y===v&&m.preventDefault()}},[r,n,f.paused]);return u.jsx(Se.div,{tabIndex:-1,...o,ref:p,onKeyDown:b})});Zw.displayName=uR;function dR(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(rn(n,{select:t}),document.activeElement!==r)return}function hR(e){const t=ex(e),r=dg(t,e),n=dg(t.reverse(),e);return[r,n]}function ex(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 dg(e,t){for(const r of e)if(!fR(r,{upTo:t}))return r}function fR(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 pR(e){return e instanceof HTMLInputElement&&"select"in e}function rn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&pR(e)&&t&&e.select()}}var hg=mR();function mR(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=fg(e,t),e.unshift(t)},remove(t){var r;e=fg(e,t),(r=e[0])==null||r.resume()}}}function fg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gR(e){return e.filter(t=>t.tagName!=="A")}var Lu=0;function vR(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pg()),document.body.insertAdjacentElement("beforeend",e[1]??pg()),Lu++,()=>{Lu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lu--}},[])}function pg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 286-301
286style.position="fixed",e.style.pointerEvents="none",e}var xr=function(){return xr=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},xr.apply(this,arguments)};function tx(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 yR(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 pl="right-scroll-bar-position",ml="width-before-scroll-bar",wR="with-scroll-bars-hidden",xR="--removed-body-scroll-bar-size";function Du(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function bR(e,t){var r=g.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"?g.useLayoutEffect:g.useEffect,mg=new WeakMap;function SR(e,t){var r=bR(null,function(n){return e.forEach(function(s){return Du(s,n)})});return _R(function(){var n=mg.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;s.forEach(function(a){i.has(a)||Du(a,null)}),i.forEach(function(a){s.has(a)||Du(a,o)})}mg.set(r,e)},[e]),r}function kR(e){return e}function ER(e,t){t===void 0&&(t=kR);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)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){o.push(d),c()},filter:function(d){return o=o.filter(d),r}}}};return s}function CR(e){e===void 0&&(e={});var t=ER(null);return t.options=xr({async:!0,ssr:!1},e),t}var rx=function(e){var t=e.sideCar,r=tx(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 g.createElement(n,xr({},r))};rx.isSideCarExport=!0;function TR(e,t){return e.useMedium(t),rx}var nx=CR(),$u=function(){},Dc=g.forwardRef(function(e,t){var r=g.useRef(null),n=g.useState({onScrollCapture:$u,onWheelCapture:$u,onTouchMoveCapture:$u}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,h=e.shards,p=e.sideCar,f=e.noRelative,b=e.noIsolation,m=e.inert,x=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,w=e.gapMode,_=tx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,k=SR([r,t]),E=xr(xr({},_),s);return g.createElement(g.Fragment,null,d&&g.createElement(S,{sideCar:nx,removeScrollBar:c,shards:h,noRelative:f,noIsolation:b,inert:m,setCallbacks:i,allowPinchZoom:!!x,lockRef:r,gapMode:w}),o?g.cloneElement(g.Children.only(a),xr(xr({},E),{ref:k})):g.createElement(v,xr({},E,{className:l,ref:k}),a))});Dc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Dc.classNames={fullWidth:ml,zeroRight:pl};var jR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jR();return t&&e.setAttribute("nonce",t),e}function PR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var AR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=NR())&&(PR(t,r),RR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},OR=function(){var e=AR();return function(t,r){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},sx=function(){var e=OR(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},IR={left:0,top:0,right:0,gap:0},Mu=function(e){return parseInt(e||"",10)||0},LR=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[Mu(r),Mu(n),Mu(s)]},DR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return IR;var t=LR(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])}},$R=sx(),ui="data-scroll-locked",MR=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),` 287 .`.concat(wR,` { 288 overflow: hidden `).concat(n,`; 289 padding-right: `).concat(a,"px ").concat(n,`; 290 } 291 body[`).concat(ui,`] { 292 overflow: hidden `).concat(n,`; 293 overscroll-behavior: contain; 294 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 295 padding-left: `.concat(s,`px; 296 padding-top: `).concat(i,`px; 297 padding-right: `).concat(o,`px; 298 margin-left:0; 299 margin-top:0; 300 margin-right: `).concat(a,"px ").concat(n,`; 301 `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
301")].filter(Boolean).join(""),` 302 } 303 304 .`).concat(pl,` { 305 right: `).concat(a,"px ").concat(n,`; 306 } 307 308 .`).concat(ml,` { 309 margin-right: `).concat(a,"px ").concat(n,`; 310 } 311 312 .`).concat(pl," .").concat(pl,` { 313 right: 0 `).concat(n,`; 314 } 315 316 .`).concat(ml," .").concat(ml,` { 317 margin-right: 0 `).concat(n,`; 318 } 319 320 body[`).concat(ui,`] { 321 `).concat(xR,": ").concat(a,`px; 322 } 323`)},gg=function(){var e=parseInt(document.body.getAttribute(ui)||"0",10);return isFinite(e)?e:0},UR=function(){g.useEffect(function(){return document.body.setAttribute(ui,(gg()+1).toString()),function(){var e=gg()-1;e<=0?document.body.removeAttribute(ui):document.body.setAttribute(ui,e.toString())}},[])},BR=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;UR();var i=g.useMemo(function(){return DR(s)},[s]);return g.createElement($R,{styles:MR(i,!t,s,r?"":"!important")})},ch=!1;if(typeof window<"u")try{var Ga=Object.defineProperty({},"passive",{get:function(){return ch=!0,!0}});window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{ch=!1}var Os=ch?{passive:!1}:!1,FR=function(e){return e.tagName==="TEXTAREA"},ix=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!FR(e)&&r[t]==="visible")},zR=function(e){return ix(e,"overflowY")},HR=function(e){return ix(e,"overflowX")},vg=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=ox(e,n);if(s){var i=ax(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},WR=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},VR=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},ox=function(e,t){return e==="v"?zR(t):HR(t)},ax=function(e,t){return e==="v"?WR(t):VR(t)},qR=function(e,t){return e==="h"&&t==="rtl"?-1:1},KR=function(e,t,r,n,s){var i=qR(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),c=!1,d=o>0,h=0,p=0;do{if(!a)break;var f=ax(e,a),b=f[0],m=f[1],x=f[2],y=m-x-i*b;(b||y)&&ox(e,a)&&(h+=y,p+=b);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(c=!0),c},Ja=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yg=function(e){return[e.deltaX,e.deltaY]},wg=function(e){return e&&"current"in e?e.current:e},GR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JR=function(e){return` 324 .block-interactivity-`.concat(e,` {pointer-events: none;} 325 .allow-interactivity-`).concat(e,` {pointer-events: all;} 326`)},QR=0,Is=[];function YR(e){var t=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),s=g.useState(QR++)[0],i=g.useState(sx)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=yR([e.lockRef.current],(e.shards||[]).map(wg),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Ja(m),v=r.current,w="deltaX"in m?m.deltaX:v[0]-y[0],_="deltaY"in m?m.deltaY:v[1]-y[1],S,k=m.target,E=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in m&&E==="h"&&k.type==="range")return!1;var N=vg(E,k);if(!N)return!0;if(N?S=E:(S=E==="v"?"h":"v",N=vg(E,k)),!N)return!1;if(!n.current&&"changedTouches"in m&&(w||_)&&(n.current=S),!S)return!0;var R=n.current||S;return KR(R,x,m,R==="h"?w:_,!0)},[]),l=g.useCallback(function(m){var x=m;if(!(!Is.length||Is[Is.length-1]!==i)){var y="deltaY"in x?yg(x):Ja(x),v=t.current.filter(function(S){return S.name===x.type&&(S.target===x.target||x.target===S.shadowParent)&&GR(S.delta,y)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}
vendor: 4,333 bytes, line 326
326if(!v){var w=(o.current.shards||[]).map(wg).filter(Boolean).filter(function(S){return S.contains(x.target)}),_=w.length>0?a(x,w[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),c=g.useCallback(function(m,x,y,v){var w={name:m,delta:x,target:y,should:v,shadowParent:XR(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),d=g.useCallback(function(m){r.current=Ja(m),n.current=void 0},[]),h=g.useCallback(function(m){c(m.type,yg(m),m.target,a(m,e.lockRef.current))},[]),p=g.useCallback(function(m){c(m.type,Ja(m),m.target,a(m,e.lockRef.current))},[]);g.useEffect(function(){return Is.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Os),document.addEventListener("touchmove",l,Os),document.addEventListener("touchstart",d,Os),function(){Is=Is.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Os),document.removeEventListener("touchmove",l,Os),document.removeEventListener("touchstart",d,Os)}},[]);var f=e.removeScrollBar,b=e.inert;return g.createElement(g.Fragment,null,b?g.createElement(i,{styles:JR(s)}):null,f?g.createElement(BR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function XR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZR=TR(nx,YR);var lx=g.forwardRef(function(e,t){return g.createElement(Dc,xr({},e,{ref:t,sideCar:ZR}))});lx.classNames=Dc.classNames;var e2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ls=new WeakMap,Qa=new WeakMap,Ya={},Uu=0,cx=function(e){return e&&(e.host||cx(e.parentNode))},t2=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=cx(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})},r2=function(e,t,r,n){var s=t2(t,Array.isArray(e)?e:[e]);Ya[r]||(Ya[r]=new WeakMap);var i=Ya[r],o=[],a=new Set,l=new Set(s),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};s.forEach(c);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))d(p);else try{var f=p.getAttribute(n),b=f!==null&&f!=="false",m=(Ls.get(p)||0)+1,x=(i.get(p)||0)+1;Ls.set(p,m),i.set(p,x),o.push(p),m===1&&b&&Qa.set(p,!0),x===1&&p.setAttribute(r,"true"),b||p.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return d(t),a.clear(),Uu++,function(){o.forEach(function(h){var p=Ls.get(h)-1,f=i.get(h)-1;Ls.set(h,p),i.set(h,f),p||(Qa.has(h)||h.removeAttribute(n),Qa.delete(h)),f||h.removeAttribute(r)}),Uu--,Uu||(Ls=new WeakMap,Ls=new WeakMap,Qa=new WeakMap,Ya={})}},n2=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=e2(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),r2(n,s,r,"aria-hidden")):function(){return null}},$c="Dialog",[ux,U2]=Ii($c),[s2,ir]=ux($c),dx=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=g.useRef(null),l=g.useRef(null),[c,d]=hf({prop:n,defaultProp:s??!1,onChange:i,caller:$c});return u.jsx(s2,{scope:t,triggerRef:a,contentRef:l,contentId:Cu(),titleId:Cu(),descriptionId:Cu(),open:c,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(h=>!h),[d]),modal:o,children:r})};dx.displayName=$c;var hx="DialogTrigger",fx=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=ir(hx,r),i=He(t,s.triggerRef);return u.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Of(s.open),...n,ref:i,onClick:me(e.onClick,s.onOpenToggle)})});fx.displayName=hx;var Rf="DialogPortal",[i2,px]=ux(Rf,{forceMount:void 0}),mx=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=ir(Rf,t);return u.jsx(i2,{scope:t,forceMount:r,children:g.Children.map(n,o=>u.jsx(Li,{present:r||i.open,children:u.jsx(df,{asChild:!0,container:s,children:o})}))})};mx.displayName=Rf;var Xl="DialogOverlay",gx=g.forwardRef((e,t)=>{const r=px(Xl,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=ir(Xl,e.__scopeDialog);return i.modal?u.jsx(Li,{present:n||i.open,children:u.jsx(a2,{...s,ref:t})}):null});gx.displayName=Xl;var o2=Wo("DialogOverlay.RemoveScroll"),a2=g.forwardRef((e,t)=>
vendor: 4,640 bytes, lines 326-330
326{const{__scopeDialog:r,...n}=e,s=ir(Xl,r);return u.jsx(lx,{as:o2,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(Se.div,{"data-state":Of(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),fs="DialogContent",vx=g.forwardRef((e,t)=>{const r=px(fs,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=ir(fs,e.__scopeDialog);return u.jsx(Li,{present:n||i.open,children:i.modal?u.jsx(l2,{...s,ref:t}):u.jsx(c2,{...s,ref:t})})});vx.displayName=fs;var l2=g.forwardRef((e,t)=>{const r=ir(fs,e.__scopeDialog),n=g.useRef(null),s=He(t,r.contentRef,n);return g.useEffect(()=>{const i=n.current;if(i)return n2(i)},[]),u.jsx(yx,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:me(e.onFocusOutside,i=>i.preventDefault())})}),c2=g.forwardRef((e,t)=>{const r=ir(fs,e.__scopeDialog),n=g.useRef(!1),s=g.useRef(!1);return u.jsx(yx,{...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,c;(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;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),yx=g.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=ir(fs,r),l=g.useRef(null),c=He(t,l);return vR(),u.jsxs(u.Fragment,{children:[u.jsx(Zw,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:u.jsx(Sc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Of(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(u2,{titleId:a.titleId}),u.jsx(h2,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Af="DialogTitle",wx=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=ir(Af,r);return u.jsx(Se.h2,{id:s.titleId,...n,ref:t})});wx.displayName=Af;var xx="DialogDescription",bx=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=ir(xx,r);return u.jsx(Se.p,{id:s.descriptionId,...n,ref:t})});bx.displayName=xx;var _x="DialogClose",Sx=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=ir(_x,r);return u.jsx(Se.button,{type:"button",...n,ref:t,onClick:me(e.onClick,()=>s.onOpenChange(!1))})});Sx.displayName=_x;function Of(e){return e?"open":"closed"}var kx="DialogTitleWarning",[B2,Ex]=wk(kx,{contentName:fs,titleName:Af,docsSlug:"dialog"}),u2=({titleId:e})=>{const t=Ex(kx),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 327 328If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 329 330For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},d2="DialogDescriptionWarning",h2=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ex(d2).contentName}}.`;return g.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},f2=dx,p2=fx,m2=mx,Cx=gx,Tx=vx,jx=wx,Nx=bx,g2=Sx;const uh=f2,Px=p2,v2=m2,Rx=g.forwardRef(({className:e,...t},r)=>u.jsx(Cx,{ref:r,className:_e("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}));Rx.displayName=Cx.displayName;const Zl=g.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(v2,{children:[u.jsx(Rx,{}),u.jsxs(Tx,{ref:n,className:_e("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
330nded-lg",e),...r,children:[t,u.jsxs(g2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[u.jsx(M0,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zl.displayName=Tx.displayName;const ec=({className:e,...t})=>u.jsx("div",{className:_e("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ec.displayName="DialogHeader";const tc=g.forwardRef(({className:e,...t},r)=>u.jsx(jx,{ref:r,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t}));tc.displayName=jx.displayName;const y2=g.forwardRef(({className:e,...t},r)=>u.jsx(Nx,{ref:r,className:_e("text-sm text-muted-foreground",e),...t}));y2.displayName=Nx.displayName;const w2=({showId:e,bannerText:t,embedBubbleColor:r="#0ED3CF",embedBannerColor:n="#0ED3CF",embedBubbleTextColor:s="#0a0a0a",embedBannerTextColor:i="#0a0a0a",scheduleEnabled:o=!1,scheduleStartHour:a=7,scheduleEndHour:l=22,savedBubbleLabel:c,savedBannerLabel:d,children:h})=>{const[p,f]=g.useState(!0),[b,m]=g.useState(!0),[x,y]=g.useState(c||"Präsentation jetzt anschauen"),[v,w]=g.useState(d||t||"Live Show läuft gerade"),{toast:_}=_c();g.useEffect(()=>{const T=setTimeout(()=>{Ce.from("shows").update({embed_bubble_label:x,embed_banner_label:v}).eq("id",e).then()},500);return()=>clearTimeout(T)},[x,v,e]);const k=`${window.location.origin}/show/${e}`,E="https://plpcvbazszthlrjmhwob.supabase.co",N="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBscGN2YmF6c3p0aGxyam1od29iIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ4ODA0MzQsImV4cCI6MjA5MDQ1NjQzNH0.txxN-gMocmiWWIjsABNK2m77WCsIBbuyz6yVO_IcrYE",R=T=>`navigator.sendBeacon('${E}/rest/v1/show_analytics?apikey=${N}',new Blob([JSON.stringify({show_id:'${e}',event_type:'${T}',device_type:/Mobi|Android|iPhone|iPad/.test(navigator.userAgent)?'mobile':'desktop'})],{type:'application/json'}));`,O=`ð´ ${v} `,B=`<!-- ShopCast Live Bubble --> 331<div id="shopcast-bubble" style="position:fixed;bottom:16px;right:16px;z-index:9999;max-width:calc(100vw - 32px);"> 332 <a href="${k}" target="_self" onclick="${R("bubble_click")}" style="display:inline-flex;align-items:center;gap:8px;background:${r};color:${s};padding:12px 18px;border-radius:50px;text-decoration:none;font-family:sans-serif;font-weight:700;font-size:clamp(12px,3.5vw,15px);box-shadow:0 4px 24px ${r}66;animation:shopcast-pulse 2s ease-in-out infinite;"> 333 <span style="width:8px;height:8px;min-width:8px;background:#ef4444;border-radius:50%;display:inline-block;animation:shopcast-dot 1.5s infinite;"></span> 334 ${x} 335 </a> 336</div>`,D=`<!-- ShopCast Live Banner --> 337<div id="shopcast-banner" style="position:fixed;top:0;left:0;right:0;z-index:9999;background:${n};overflow:hidden;height:clamp(40px,8vw,48px);"> 338 <div style="display:flex;align-items:center;height:100%;animation:shopcast-scroll 40s linear infinite;white-space:nowrap;"> 339 <span style="display:inline-flex;align-items:center;gap:8px;color:${i};font-family:sans-serif;font-weight:700;font-size:clamp(11px,3vw,14px);"> 340 ${O.repeat(20)} 341 </span> 342 </div> 343 <a href="${k}" target="_self" onclick="${R("banner_click")}" style="position:absolute;inset:0;"></a> 344</div>`,W=new Set;p&&(W.add("shopcast-pulse"),W.add("shopcast-dot")),b&&W.add("shopcast-scroll");const L=`<style> 345${W.has("shopcast-pulse")?"@keyframes shopcast-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}":""} 346${W.has("shopcast-dot")?"@keyframes shopcast-dot{0%,100%{opacity:1}50%{opacity:0.3}}":""} 347${W.has("shopcast-scroll")?"@keyframes shopcast-scroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}":""} 348</style>`.replace(/\n{2,}/g,` 349`),q=[];if(b&&q.push(D),p&&q.push(B),q.length>0&&q.push(L),o&&q.length>0){const T=`<script> 350(function(){ 351 function shopcastCheck(){ 352 var d=new Date(); 353 var berlin=new Date(d.toLocaleString('en-US',{timeZone:'Europe/Berlin'})); 354 var h=berlin.getHours(); 355 var show=${a<=l?`h>=${a}
355&&h<${l}`:`h>=${a}||h<${l}`}; 356 var els=document.querySelectorAll('#shopcast-bubble,#shopcast-banner'); 357 for(var i=0;i<els.length;i++){els[i].style.display=show?'':'none';} 358 } 359 shopcastCheck(); 360 setInterval(shopcastCheck,60000); 361})(); 362<\/script>`;q.push(T)}const V=q.join(` 363 364`),K=()=>{navigator.clipboard.writeText(V),_({title:"Embed-Code kopiert!",description:"Füge den Code in den <head> oder vor </body> deiner Seite ein."})};return u.jsxs(uh,{children:[u.jsx(Px,{asChild:!0,children:h}),u.jsxs(Zl,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[u.jsxs(ec,{children:[u.jsx(tc,{className:"font-display",children:"Embed-Code generieren"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Ein Code-Snippet â einfach in den Header deiner Seite einfügen."})]}),u.jsxs("div",{className:"space-y-4 mt-2",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl border border-border",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Vd,{className:"w-5 h-5 text-primary"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-display font-semibold text-sm",children:"Live-Bubble"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Pulsierende Bubble unten rechts"})]})]}),u.jsx(un,{checked:p,onCheckedChange:f})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl border border-border",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(mE,{className:"w-5 h-5 text-primary"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-display font-semibold text-sm",children:"Top-Banner"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Lauftext oben auf der Seite"})]})]}),u.jsx(un,{checked:b,onCheckedChange:m})]})]}),p&&u.jsxs("div",{children:[u.jsx(Q,{className:"mb-2 block",children:"Bubble-Beschriftung"}),u.jsx(te,{value:x,onChange:T=>y(T.target.value),placeholder:"z.B. Präsentation jetzt anschauen"})]}),b&&u.jsxs("div",{children:[u.jsx(Q,{className:"mb-2 block",children:"Banner-Beschriftung"}),u.jsx(te,{value:v,onChange:T=>w(T.target.value),placeholder:"z.B. Live Show läuft gerade"})]}),(p||b)&&u.jsxs("div",{children:[u.jsx(Q,{className:"mb-2 block",children:"Vorschau"}),u.jsxs("div",{className:"relative h-36 bg-muted/50 rounded-lg border border-border overflow-hidden",children:[b&&u.jsx("div",{className:"absolute top-0 left-0 right-0 h-[40px] flex items-center overflow-hidden",style:{background:n},children:u.jsxs("span",{className:"text-[10px] font-bold whitespace-nowrap animate-marquee-slow",style:{color:i},children:["ð´ "+(v||"Live Show läuft gerade")+" · ".repeat(1),"ð´ "+(v||"Live Show läuft gerade")+" · ".repeat(1),"ð´ "+(v||"Live Show läuft gerade")+" · ".repeat(1),"ð´ "+(v||"Live Show läuft gerade")+" · ".repeat(1)]})}),p&&u.jsx("div",{className:"absolute bottom-3 right-3",children:u.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 rounded-full text-[10px] font-bold animate-pulse",style:{background:r,color:s,boxShadow:`0 0 16px ${r}66`},children:[u.jsx("span",{className:"w-2 h-2 bg-destructive rounded-full animate-ping"}),x||"LIVE"]})})]})]}),p||b?u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx(Q,{className:"mb-2 block",children:"HTML-Code"}),u.jsx("pre",{className:"bg-muted/50 border border-border rounded-lg p-3 text-xs overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap break-all font-mono text-muted-foreground",children:V})]}),u.jsxs(je,{variant:"hero",className:"w-full",onClick:K,children:[u.jsx(vE,{className:"w-4 h-4 mr-2"})," Code kopieren"]})]}):u.jsx("p",{className:"text-center text-sm text-muted-foreground py-4",children:"Aktiviere mindestens eine Option, um den Code zu generieren."})]})]})]})},Ht=g.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:_e("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ht.displayName="Card";const Wt=g.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:_e("flex flex-col space-y-1.5 p-6",e),...t}));
364Wt.displayName="CardHeader";const Vt=g.forwardRef(({className:e,...t},r)=>u.jsx("h3",{ref:r,className:_e("text-2xl font-semibold leading-none tracking-tight",e),...t}));Vt.displayName="CardTitle";const x2=g.forwardRef(({className:e,...t},r)=>u.jsx("p",{ref:r,className:_e("text-sm text-muted-foreground",e),...t}));x2.displayName="CardDescription";const qt=g.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:_e("p-6 pt-0",e),...t}));qt.displayName="CardContent";const b2=g.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:_e("flex items-center p-6 pt-0",e),...t}));b2.displayName="CardFooter";const _2=({showId:e,showName:t})=>{const[r,n]=g.useState({totalViews:0,avgDuration:0,mobileCount:0,desktopCount:0,bannerClicks:0,bubbleClicks:0,phoneClicks:0,chatLinkClicks:0,chatMessages:0,ctaClicks:0}),[s,i]=g.useState(!0),[o,a]=g.useState(!1),l=async()=>{i(!0);const{data:h,error:p}=await Ce.from("show_analytics").select("*").eq("show_id",e);if(p||!h){i(!1);return}const f=h.filter(x=>x.event_type==="page_view"),b=f.map(x=>x.duration_seconds||0).filter(x=>x>0),m=b.length>0?Math.round(b.reduce((x,y)=>x+y,0)/b.length):0;n({totalViews:f.length,avgDuration:m,mobileCount:f.filter(x=>x.device_type==="mobile").length,desktopCount:f.filter(x=>x.device_type==="desktop").length,bannerClicks:h.filter(x=>x.event_type==="banner_click").length,bubbleClicks:h.filter(x=>x.event_type==="bubble_click").length,phoneClicks:h.filter(x=>x.event_type==="phone_click").length,chatLinkClicks:h.filter(x=>x.event_type==="chat_link_click").length,chatMessages:h.filter(x=>x.event_type==="chat_message").length,ctaClicks:h.filter(x=>x.event_type==="cta_click").length}),i(!1)},c=async()=>{if(!confirm("Alle Statistiken für diese Show wirklich zurücksetzen?"))return;a(!0);const{error:h}=await Ce.from("show_analytics").delete().eq("show_id",e);h?dm.error("Fehler beim Zurücksetzen der Statistiken"):(dm.success("Statistiken zurückgesetzt"),n({totalViews:0,avgDuration:0,mobileCount:0,desktopCount:0,bannerClicks:0,bubbleClicks:0,phoneClicks:0,chatLinkClicks:0,chatMessages:0,ctaClicks:0})),a(!1)};g.useEffect(()=>{l()},[e]);const d=h=>{const p=Math.floor(h/3600),f=Math.floor(h%3600/60),b=h%60;return p>0?`${p}h ${f}m ${b}s`:f>0?`${f}m ${b}s`:`${b}s`};return s?u.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"Statistiken laden..."}):u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("h3",{className:"font-display font-semibold text-lg",children:[t," â Statistiken"]}),u.jsxs(je,{variant:"outline",size:"sm",onClick:c,disabled:o,className:"gap-1.5",children:[u.jsx(bE,{className:"w-3.5 h-3.5"}),o?"Wird zurückgesetzt...":"Zurücksetzen"]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(Ci,{className:"w-3.5 h-3.5 text-primary"})," Seitenaufrufe"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.totalViews})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(L0,{className:"w-3.5 h-3.5 text-primary"})," à Verweildauer"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:d(r.avgDuration)})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(D0,{className:"w-3.5 h-3.5 text-primary"})," Desktop"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.desktopCount})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(EE,{className:"w-3.5 h-3.5 text-primary"})," Mobil"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.mobileCount})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(_m,{className:"w-3.5 h-3.5 text-primary"}
364)," Banner-Klicks"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.bannerClicks})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(_m,{className:"w-3.5 h-3.5 text-primary"})," Bubble-Klicks"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.bubbleClicks})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(yf,{className:"w-3.5 h-3.5 text-primary"})," Telefon-Klicks"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.phoneClicks})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(Vd,{className:"w-3.5 h-3.5 text-primary"})," Chat-Link-Klicks"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.chatLinkClicks})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(Vd,{className:"w-3.5 h-3.5 text-primary"})," Chat-Nachrichten"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.chatMessages})})]}),u.jsxs(Ht,{className:"bg-card/80",children:[u.jsx(Wt,{className:"pb-2 pt-4 px-4",children:u.jsxs(Vt,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[u.jsx(kE,{className:"w-3.5 h-3.5 text-primary"})," CTA-Klicks"]})}),u.jsx(qt,{className:"px-4 pb-4",children:u.jsx("p",{className:"text-2xl font-display font-bold",children:r.ctaClicks})})]})]})]})},S2=e=>({id:e.id,name:e.name,videoUrl:e.video_url,videoLoop:e.video_loop,ctaText:e.cta_text,ctaUrl:e.cta_url,ctaDelay:e.cta_delay,ctaPermanent:e.cta_permanent,overlayLink:e.overlay_link,overlayWebsite:e.overlay_website,overlayPhone:e.overlay_phone,overlayEnabled:e.overlay_enabled,overlayCountry:e.overlay_country,bannerText:e.banner_text,viewCount:e.view_count,chatImageUrl:e.chat_image_url,chatHeaderText:e.chat_header_text,chatResponseText:e.chat_response_text,chatResponseUrl:e.chat_response_url,colorBackground:e.color_background||"#0a0a0a",colorPrimary:e.color_primary||"#0ED3CF",colorText:e.color_text||"#ffffff",colorBanner:e.color_banner||"#0ED3CF",colorEmbedBubble:e.color_embed_bubble||"#0ED3CF",colorEmbedBanner:e.color_embed_banner||"#0ED3CF",colorEmbedBubbleText:e.color_embed_bubble_text||"#0a0a0a",colorEmbedBannerText:e.color_embed_banner_text||"#0a0a0a",colorOverlay:e.color_overlay||"#0ED3CF",colorOverlayText:e.color_overlay_text||"#0a0a0a",overlayIcon:e.overlay_icon||"phone",backUrl:e.back_url||"",scheduleEnabled:e.schedule_enabled??!1,scheduleStartHour:e.schedule_start_hour??7,scheduleEndHour:e.schedule_end_hour??22,embedBubbleLabel:e.embed_bubble_label||"Präsentation jetzt anschauen",embedBannerLabel:e.embed_banner_label||"Live Show läuft gerade",offerEnabled:e.offer_enabled??!1,offerTitle:e.offer_title||"",offerPrice:e.offer_price||"",offerPriceSubtitle:e.offer_price_subtitle||"",offerBadge:e.offer_badge||"",offerFeatures:e.offer_features||"",offerButtonText:e.offer_button_text||"",offerButtonUrl:e.offer_button_url||"",offerColorBg:e.offer_color_bg||"#1e293b",offerColorAccent:e.offer_color_accent||"#0ED3CF"}),k2=()=>{const[e,t]=g.useState(null),[r,n]=g.useState([]),[s,i]=g.useState(!1),[o,a]=g.useState(null),[l,c]=g.useState(null),[d,h]=g.useState(!0),p=bc(),{toast:f}=_c(),[b,m]=g.useState(""),[x,y]=g.useState("Jetzt kaufen"),[v,w]=g.useState(""),[_,S]=g.useState(0),[k,E]=g.useState(!0),[N,R]=g.useState(""),[O,B]=g.useState(""),[D,W]=g.useState(""),[L,q]=g.useState(!0),[V,K]=g.useState("DE"),[T,P]=g.useState("Produktpräsentation läuft gerade"),[$,J]=g.useState(!0),[F,X]=g.useState(0),[ee,ye]=g.useState(!1),[Oe,ne]=g.useState(""),[or,St]=g.useState(""),[ar,kt]=g.useState("Du hast noch Fragen zum Produkt? Stelle hier deine Fragen."),[jr,Et]=g.useState("Schreibe uns auf WhatsApp"),[Dn,$n]=g.useState(""),[Mn,vs]=g.useState(!1),[Nr,Dt]=g.useState("#0a0a0a"),[ys,lr]=g.useState("#0ED3CF"),[ws,Ct]=g.useState("#ffffff"),[Bi,xs]=g.useState("#0ED3CF"),[We,$t]=g.useState("#0ED3CF"),[Fi,bs]=g.useState("#0ED3CF"),[Qr,_s]=g.useState("#0a0a0a"),[Ss,Yr]=g.useState("#0a0a0a"),[cr,Un]=g.useState("#0ED3CF"),[ur,ks]=g.useState("#0a0a0a"),[Bn,Es]=g.useState("phone"),[zi,Hi]=g.useState(""),[Fn,Tt]=g.useState(!1),[ha,G]=g.useState(7),[oe,ue]=g.useState(22),[Ye,Xe]=g.useState(!1),[Mt,Ut]=g.useState(""),[it,jt]=g.useState(""),[If,Mc]=g.useState(""),[Lf,Uc]=g.useState(""),[Df,Bc]=g.useState(""),[$f,Fc]=g.useState(""),[Mf,zc]=g.useState(""),[Hc,fa]=g.useState("#1e293b"),[Wc,pa]=g.useState("#0ED3CF"),Vc=async C=>{const{data:ae,error:Pr}=await Ce.from("shows").select("*").eq("user_id",C).order("created_at",{ascending:!1});!Pr&&ae&&n(ae.map(S2)),h(!1)};g.useEffect(()=>{const{data:{subscription:C}
364}=Ce.auth.onAuthStateChange((ae,Pr)=>{Pr?(t(Pr.user),Vc(Pr.user.id)):p("/auth")});return Ce.auth.getSession().then(({data:{session:ae}})=>{ae?(t(ae.user),Vc(ae.user.id)):p("/auth")}),()=>C.unsubscribe()},[p]);const Uf=()=>{m(""),y("Jetzt kaufen"),w(""),S(0),E(!0),R(""),B(""),W(""),q(!0),K("DE"),P("Produktpräsentation läuft gerade"),J(!0),X(0),a(null),ne(""),St(""),kt("Du hast noch Fragen zum Produkt? Stelle hier deine Fragen."),Et("Schreibe uns auf WhatsApp"),$n(""),Dt("#0a0a0a"),lr("#0ED3CF"),Ct("#ffffff"),xs("#0ED3CF"),$t("#0ED3CF"),bs("#0ED3CF"),_s("#0a0a0a"),Yr("#0a0a0a"),Un("#0ED3CF"),ks("#0a0a0a"),Es("phone"),Hi(""),Tt(!1),G(7),ue(22),Xe(!1),Ut(""),jt(""),Mc(""),Uc(""),Bc(""),Fc(""),zc(""),fa("#1e293b"),pa("#0ED3CF")},Ax=async()=>{if(!b.trim()){f({title:"Fehler",description:"Bitte gib einen Namen ein.",variant:"destructive"});return}const C={user_id:e.id,name:b,video_url:Oe||(o==null?void 0:o.videoUrl)||"",video_loop:$,cta_text:x,cta_url:v,cta_delay:_,cta_permanent:k,overlay_link:N,overlay_website:O,overlay_phone:D,overlay_enabled:L,overlay_country:V,banner_text:T,view_count:F,chat_image_url:or||(o==null?void 0:o.chatImageUrl)||"",chat_header_text:ar,chat_response_text:jr,chat_response_url:Dn,color_background:Nr,color_primary:ys,color_text:ws,color_banner:Bi,color_embed_bubble:We,color_embed_banner:Fi,color_embed_bubble_text:Qr,color_embed_banner_text:Ss,color_overlay:cr,color_overlay_text:ur,overlay_icon:Bn,back_url:zi,schedule_enabled:Fn,schedule_start_hour:ha,schedule_end_hour:oe,offer_enabled:Ye,offer_title:Mt,offer_price:it,offer_price_subtitle:If,offer_badge:Lf,offer_features:Df,offer_button_text:$f,offer_button_url:Mf,offer_color_bg:Hc,offer_color_accent:Wc};if(o){const{error:ae}=await Ce.from("shows").update(C).eq("id",o.id);if(ae){f({title:"Fehler",description:ae.message,variant:"destructive"});return}}else{const{error:ae}=await Ce.from("shows").insert(C);if(ae){f({title:"Fehler",description:ae.message,variant:"destructive"});return}}await Vc(e.id),i(!1),Uf(),f({title:o?"Show aktualisiert":"Show erstellt!"})},Ox=C=>{a(C),m(C.name),y(C.ctaText),w(C.ctaUrl),S(C.ctaDelay),E(C.ctaPermanent),R(C.overlayLink),B(C.overlayWebsite),W(C.overlayPhone),q(C.overlayEnabled),K(C.overlayCountry||"DE"),P(C.bannerText),J(C.videoLoop??!0),X(C.viewCount??0),ne(C.videoUrl),St(C.chatImageUrl),kt(C.chatHeaderText),Et(C.chatResponseText),$n(C.chatResponseUrl),Dt(C.colorBackground),lr(C.colorPrimary),Ct(C.colorText),xs(C.colorBanner),$t(C.colorEmbedBubble),bs(C.colorEmbedBanner),_s(C.colorEmbedBubbleText),Yr(C.colorEmbedBannerText),Un(C.colorOverlay),ks(C.colorOverlayText),Es(C.overlayIcon),Hi(C.backUrl),Tt(C.scheduleEnabled),G(C.scheduleStartHour),ue(C.scheduleEndHour),Xe(C.offerEnabled),Ut(C.offerTitle),jt(C.offerPrice),Mc(C.offerPriceSubtitle),Uc(C.offerBadge),Bc(C.offerFeatures),Fc(C.offerButtonText),zc(C.offerButtonUrl),fa(C.offerColorBg),pa(C.offerColorAccent),i(!0)},Ix=async C=>{await Ce.from("shows").delete().eq("id",C),n(r.filter(ae=>ae.id!==C)),f({title:"Show gelöscht"})},Lx=async()=>{await Ce.auth.signOut(),p("/")};return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx("header",{className:"border-b border-border/50 bg-card/50 backdrop-blur-xl sticky top-0 z-50",children:u.jsxs("div",{className:"container flex items-center justify-between h-16",children:[u.jsx("span",{className:"font-display text-xl font-bold text-gradient-primary",children:"ShopCast"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-sm text-muted-foreground hidden sm:block",children:e==null?void 0:e.email}),u.jsxs(je,{variant:"ghost",size:"sm",onClick:Lx,children:[u.jsx(wE,{className:"w-4 h-4 mr-1"})," Abmelden"]})]})]})}),u.jsxs("main",{className:"container px-4 sm:px-6 py-6 sm:py-10",children:[u.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6 sm:mb-8",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"font-display text-2xl sm:text-3xl font-bold",children:"Deine Shows"}),u.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"Erstelle und verwalte deine Shopping-Shows."})]}),u.jsxs(uh,{open:s,onOpenChange:C=>{i(C),C||Uf()},children:[u.jsx(Px,{asChild:!0,children:u.jsxs(je,{variant:"hero",children:[u.jsx(Sm,{className:"w-4 h-4 mr-1"})," Neue Show"]})}),u.jsxs(Zl,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[u.jsx(ec,{children:u.jsx(tc,{
364className:"font-display",children:o?"Show bearbeiten":"Neue Show erstellen"})}),u.jsxs("div",{className:"space-y-5 mt-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Show-Name *"}),u.jsx(te,{value:b,onChange:C=>m(C.target.value),placeholder:"z.B. Frühlingskollektion 2025"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Banner-Text"}),u.jsx(te,{value:T,onChange:C=>P(C.target.value),placeholder:"Produktpräsentation läuft gerade"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Zurück-URL (optional)"}),u.jsx(te,{value:zi,onChange:C=>Hi(C.target.value),placeholder:"https://dein-shop.de â leer = Herkunftsseite"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Wenn leer, wird der Nutzer zur vorherigen Seite zurückgeleitet."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Q,{className:"flex items-center gap-1",children:[u.jsx(Ci,{className:"w-3 h-3"})," Zuschauer-Anzahl"]}),u.jsx(te,{type:"number",value:F,onChange:C=>X(Number(C.target.value)),min:0,placeholder:"z.B. 85"})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsxs("h3",{className:"font-display font-semibold text-sm mb-3 flex items-center gap-2",children:[u.jsx(TE,{className:"w-4 h-4 text-primary"})," Video"]}),u.jsxs("div",{className:"space-y-3",children:[(Oe||(o==null?void 0:o.videoUrl))&&u.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-sm text-muted-foreground flex items-center gap-2",children:[u.jsx(Zs,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"truncate flex-1",children:"Video hochgeladen"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Video hochladen (MP4)"}),u.jsx(te,{type:"file",accept:"video/mp4,video/webm,video/quicktime",disabled:ee,onChange:async C=>{var ga;const ae=(ga=C.target.files)==null?void 0:ga[0];if(!ae)return;ye(!0);const Pr=(o==null?void 0:o.id)||crypto.randomUUID(),qc=ae.name.split(".").pop(),ma=Date.now(),Wi=`${e.id}/${Pr}_${ma}.${qc}`,{error:Vi}=await Ce.storage.from("videos").upload(Wi,ae,{upsert:!0});if(Vi)f({title:"Upload fehlgeschlagen",description:Vi.message,variant:"destructive"});else{const{data:Dx}=Ce.storage.from("videos").getPublicUrl(Wi);ne(Dx.publicUrl),f({title:"â Video erfolgreich hochgeladen!",description:"Dein Video wurde gespeichert und ist bereit."})}ye(!1)}}),ee&&u.jsx("p",{className:"text-xs text-muted-foreground animate-pulse",children:"Wird hochgeladen..."})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Q,{className:"flex items-center gap-1",children:[u.jsx(xE,{className:"w-3 h-3"})," Dauerschleife"]}),u.jsx(un,{checked:$,onCheckedChange:J})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsxs("h3",{className:"font-display font-semibold text-sm mb-3 flex items-center gap-2",children:[u.jsx(Zs,{className:"w-4 h-4 text-primary"})," Call-to-Action"]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Button-Text"}),u.jsx(te,{value:x,onChange:C=>y(C.target.value),placeholder:"Jetzt kaufen"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Button-Link"}),u.jsx(te,{value:v,onChange:C=>w(C.target.value),placeholder:"https://dein-shop.de/produkt"})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Q,{children:"Dauerhaft anzeigen"}),u.jsx(un,{checked:k,onCheckedChange:E})]}),!k&&u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Verzögerung (Sekunden)"}),u.jsx(te,{type:"number",value:_,onChange:C=>S(Number(C.target.value)),min:0})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsxs("h3",{className:"font-display font-semibold text-sm flex items-center gap-2",children:[u.jsx(Wd,{className:"w-4 h-4 text-primary"})," Video-Overlay"]}),u.jsx(un,{checked:L,onCheckedChange:q})]}),L&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Land / Flagge"}),u.jsxs("select",{value:V,onChange:C=>K(C.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[u.jsx("option",{value:"DE",children:"ð©ðª Deutschland"}),u.jsx("option",{value:"AT",children:"ð¦ð¹ Ãsterreich"}),u.jsx("option",{value:"CH",children:"ð¨ð Schweiz"}),u.jsx("option",{value:"US",children:"ðºð¸ USA"}),u.jsx("option",{value:"GB",children:"ð¬ð§ UK"}),u.jsx("option",{value:"FR",children:"ð«ð· Frankreich"}),u.jsx("option",{value:"IT",children:"ð®ð¹ Italien"}),u.jsx("option",{value:"ES",children:"ðªð¸ Spanien"}),u.jsx("option",{value:"NL",children:"ð³ð± Niederlande"}),u.jsx("option",{value:"PL",children:"ðµð± Polen"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Q,{className:"flex items-center gap-1",children:[u.jsx(Wd,{className:"w-3 h-3"})," Website"]}),u.jsx(te,{value:O,onChange:C=>B(C.target.value),placeholder:"www.dein-shop.de"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Symbol"}),u.jsxs("select",{value:Bn,onChange:C=>Es(C.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[u.jsx("option",{value:"phone",children:"ð Telefon"}),u.jsx("option",{value:"whatsapp",children:"ð¬ WhatsApp"}),u.jsx("option",{value:"globe",children:"ð Website"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Q,{className:"flex items-center gap-1",children:[Bn==="whatsapp"?"ð¬":u.jsx(yf,{className:"w-3 h-3"})," ",Bn==="whatsapp"?"WhatsApp-Nummer":"Telefon"]}),u.jsx(te,{value:D,onChange:C=>W(C.target.value),placeholder:"+49 123 456789"})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsxs("h3",{className:"font-display font-semibold text-sm mb-3 flex items-center gap-2",children:[u.jsx(vf,{className:"w-4 h-4 text-primary"})," Chat-Widget"]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Bild (Person / Produkt)"}),or&&u.jsx("div",{className:"w-16 h-16 rounded-full overflow-hidden bg-muted mb-2",children:u.jsx("img",{src:or,alt:"Chat-Bild",className:"w-full h-full object-cover"})}),u.jsx(te,{type:"file",accept:"image/*",disabled:Mn,onChange:async C=>{var Vi;const ae=(Vi=C.target.files)==null?void 0:Vi[0];if(!ae)return;vs(!0);const Pr=(o==null?void 0:o.id)||crypto.randomUUID(),qc=ae.name.split(".").pop(),ma=`${e.id}/chat-${Pr}.${qc}`,{error:Wi}=await Ce.storage.from("videos").upload(ma,ae,{upsert:!0});if(Wi)f({title:"Upload fehlgeschlagen",description:Wi.message,variant:"destructive"});else{const{data:ga}=Ce.storage.from("videos").getPublicUrl(ma);St(ga.publicUrl),f({title:"Bild hochgeladen â"})}vs(!1)}}),Mn&&u.jsx("p",{className:"text-xs text-muted-foreground animate-pulse",children:"Wird hochgeladen..."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Ãberschrift"}),u.jsx(te,{value:ar,onChange:C=>kt(C.target.value),placeholder:"Du hast noch Fragen zum Produkt?"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Antwort-Text"}),u.jsx(te,{value:jr,onChange:C=>Et(C.target.value),placeholder:"Schreibe uns auf WhatsApp"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Antwort-Link (z.B. WhatsApp-Link)"}),u.jsx(te,{value:Dn,onChange:C=>$n(C.target.value),placeholder:"https://wa.me/491234567890"})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("h3",{className:"font-display font-semibold text-sm flex items-center gap-2",children:"ð·ï¸ Angebots-Karte (Chat)"}),u.jsx(un,{checked:Ye,onCheckedChange:Xe})]}),Ye&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Titel"}),u.jsx(te,{value:Mt,onChange:C=>Ut(C.target.value),placeholder:"z.B. Premium Plan"})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Preis"}),u.jsx(te,{value:it,onChange:C=>jt(C.target.value),placeholder:"z.B. 99 â¬"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Preis-Zusatz"}),u.jsx(te,{value:If,onChange:C=>Mc(C.target.value),placeholder:"z.B. netto / Monat"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Badge-Text (optional)"}),u.jsx(te,{value:Lf,onChange:C=>Uc(C.target.value),placeholder:"z.B. ð 7 Tage kostenlos testen"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Features (eine pro Zeile)"}),u.jsx("textarea",{value:Df,onChange:C=>Bc(C.target.value),placeholder:`Unbegrenzte Nutzung 365Premium Support 366Alle Features inklusive`,rows:4,className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Button-Text"}),u.jsx(te,{value:$f,onChange:C=>Fc(C.target.value),placeholder:"Jetzt starten"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Q,{children:"Button-Link"}),u.jsx(te,{value:Mf,onChange:C=>zc(C.target.value),placeholder:"https://..."})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Karten-Hintergrund"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Hc,onChange:C=>fa(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Hc,onChange:C=>fa(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Akzentfarbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Wc,onChange:C=>pa(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Wc,onChange:C=>pa(C.target.value),className:"text-xs h-8"})]})]})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsx("h3",{className:"font-display font-semibold text-sm mb-3 flex items-center gap-2",children:"ð¨ Farben â Show-Seite"}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Hintergrund"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Nr,onChange:C=>Dt(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Nr,onChange:C=>Dt(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Primärfarbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:ys,onChange:C=>lr(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:ys,onChange:C=>lr(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Textfarbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:ws,onChange:C=>Ct(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:ws,onChange:C=>Ct(C.target.value),className:"text-xs h-8"})]})]})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Banner-Farbe (unter Video)"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Bi,onChange:C=>xs(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Bi,onChange:C=>xs(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Overlay-F
366arbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:cr,onChange:C=>Un(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:cr,onChange:C=>Un(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Overlay-Text"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:ur,onChange:C=>ks(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:ur,onChange:C=>ks(C.target.value),className:"text-xs h-8"})]})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsx("h3",{className:"font-display font-semibold text-sm mb-3 flex items-center gap-2",children:"ð¨ Farben â Einbettungen"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Bubble-Farbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:We,onChange:C=>$t(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:We,onChange:C=>$t(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Bubble-Textfarbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Qr,onChange:C=>_s(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Qr,onChange:C=>_s(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Banner-Farbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Fi,onChange:C=>bs(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Fi,onChange:C=>bs(C.target.value),className:"text-xs h-8"})]})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(Q,{className:"text-xs",children:"Banner-Textfarbe"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"color",value:Ss,onChange:C=>Yr(C.target.value),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),u.jsx(te,{value:Ss,onChange:C=>Yr(C.target.value),className:"text-xs h-8"})]})]})]})]}),u.jsxs("div",{className:"border-t border-border pt-4",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsxs("h3",{className:"font-display font-semibold text-sm flex items-center gap-2",children:[u.jsx(L0,{className:"w-4 h-4 text-primary"})," Zeitplan (Embed)"]}),u.jsx(un,{checked:Fn,onCheckedChange:Tt})]}),u.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Zeigt Bubble & Banner nur zu bestimmten Uhrzeiten an (Berlin-Zeit). Ein laufendes Video wird nicht unterbrochen."}),Fn&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("div",{className:"space-y-1 flex-1",children:[u.jsx(Q,{className:"text-xs",children:"Von"}),u.jsx("select",{value:ha,onChange:C=>G(Number(C.target.value)),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:Array.from({length:24},(C,ae)=>u.jsxs("option",{value:ae,children:[String(ae).padStart(2,"0"),":00"]},ae))})]}),u.jsxs("div",{className:"space-y-1 flex-1",children:[u.jsx(Q,{className:"text-xs",children:"Bis"}),u.jsx("select",{value:oe,onChange:C=>ue(Number(C.target.value)),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:Array.from({length:24},(C,ae)=>u.jsxs("option",{value:ae,children:[String(ae).padStart(2,"0"),":00"]},ae))})]})]})]}),u.jsx(je,{variant:"hero",className:"w-full",onClick:Ax,children:o?"Speichern":"Show erstellen"})]})]})]})]}),d?u.jsx("div",{className:"text-center py-20 text-muted-foreground",children:"Laden..."}):r.length===0?u.jsxs("div",{className:"text-center py-20 bg-card rounded-2xl border border-border/50",children:[u.jsx(Zs,{className:"w-12 h-12 text-muted-foreground mx-auto mb-4"}),u.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Keine Shows vorhanden"}),u.jsx("p",{className:"text-muted-foreground mb-6",children:"Erstelle deine erste Shopping-Show, um loszulegen."}),u.jsxs(je,{variant:"hero",onClick:()=>i(!0),children:[u.jsx(Sm,{className:"w-4 h-4 mr-1"})," Erste Show erstellen"]})]}):u.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:r.map(C=>u.jsxs("div",{className:"bg-card rounded-xl border border-border/50 shadow-card overflow-hidden group",children:[u.jsxs("div",{className:"aspect-video bg-muted flex items-center justify-center relative",children:[u.jsx(Zs,{className:"w-10 h-10 text-muted-foreground"}),u.jsxs("div",{className:"absolute top-3 right-3 flex items-center gap-1.5 bg-background/80 backdrop-blur px-2 py-1 rounded-full text-xs",children:[u.jsx(Ci,{className:"w-3 h-3 text-primary"}),u.jsx("span",{children:C.viewCount})]})]}),u.jsxs("div",{className:"p-4 sm:p-5",children:[u.jsx("h3",{className:"font-display font-semibold text-base sm:text-lg mb-1",children:C.name}),u.jsx("p",{className:"text-muted-foreground text-xs sm:text-sm mb-3 sm:mb-4 truncate",children:C.bannerText}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsxs(je,{variant:"outline",size:"sm",className:"flex-1 min-w-[100px] text-xs sm:text-sm",onClick:()=>p(`/show/${C.id}`),children:[u.jsx(Hl,{className:"w-3 h-3 mr-1"})," Ansehen"]}),u.jsx(je,{variant:"outline",size:"sm",onClick:()=>Ox(C),children:u.jsx(SE,{className:"w-3 h-3"})}),u.jsx(w2,{showId:C.id,bannerText:C.bannerText,embedBubbleColor:C.colorEmbedBubble,embedBannerColor:C.colorEmbedBanner,embedBubbleTextColor:C.colorEmbedBubbleText,embedBannerTextColor:C.colorEmbedBannerText,scheduleEnabled:C.scheduleEnabled,scheduleStartHour:C.scheduleStartHour,scheduleEndHour:C.scheduleEndHour,savedBubbleLabel:C.embedBubbleLabel,savedBannerLabel:C.embedBannerLabel,children:u.jsx(je,{variant:"outline",size:"sm",children:u.jsx(Hl,{className:"w-3 h-3"})})}),u.jsx(je,{variant:"outline",size:"sm",onClick:()=>Ix(C.id),children:u.jsx(CE,{className:"w-3 h-3"})}),u.jsx(je,{variant:"outline",size:"sm",onClick:()=>c(C),children:u.jsx(gE,{className:"w-3 h-3"})})]})]})]},C.id))}),u.jsx(uh,{open:!!l,onOpenChange:C=>{C||c(null)},children:u.jsxs(Zl,{className:"max-w-lg",children:[u.jsx(ec,{children:u.jsx(tc,{
366className:"font-display",children:"Statistiken"})}),l&&u.jsx(_2,{showId:l.id,showName:l.name})]})})]})]})},E2={DE:"ð©ðª",AT:"ð¦ð¹",CH:"ð¨ð",US:"ðºð¸",GB:"ð¬ð§",FR:"ð«ð·",IT:"ð®ð¹",ES:"ðªð¸",NL:"ð³ð±",PL:"ðµð±"},C2=({className:e,style:t})=>u.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:e,style:t,children:u.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),T2=({website:e,phone:t,country:r,icon:n="phone",bgColor:s,textColor:i,onPhoneClick:o})=>{if(!e&&!t)return null;const a=E2[r]||"ð©ðª",l=s||void 0,c=i||void 0,d=n==="whatsapp"?`https://wa.me/${t.replace(/[^0-9+]/g,"").replace("+","")}`:`tel:${t}`;return u.jsx("div",{className:"shrink-0 z-10",children:u.jsx("div",{className:"backdrop-blur-md border-t-2 px-3 sm:px-6 py-2.5 sm:py-4",style:{background:l?`${l}e6`:"rgba(0,0,0,0.9)",borderColor:l||void 0},children:u.jsxs("div",{className:"flex items-center justify-center gap-4 sm:gap-8 flex-wrap",children:[t&&u.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",onClick:o,className:"flex items-center gap-2 sm:gap-3 hover:opacity-80 transition-opacity",children:[u.jsx("span",{className:"text-xl sm:text-3xl",children:a}),n==="whatsapp"?u.jsx(C2,{className:"w-4 h-4 sm:w-6 sm:h-6",style:{color:c}}):u.jsx(yf,{className:"w-4 h-4 sm:w-6 sm:h-6",style:{color:c}}),u.jsx("span",{className:"font-display text-sm sm:text-xl md:text-2xl font-bold tracking-wide",style:{color:c},children:t})]}),e&&t&&u.jsx("div",{className:"w-px h-6 sm:h-8 hidden sm:block",style:{background:c?`${c}4d`:"rgba(255,255,255,0.3)"}}),e&&u.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[u.jsx(Wd,{className:"w-4 h-4 sm:w-6 sm:h-6",style:{color:c}}),u.jsx("span",{className:"font-display text-sm sm:text-xl md:text-2xl font-bold tracking-wide",style:{color:c},children:e})]})]})})})},j2=()=>{const{id:e}=lS(),[t,r]=g.useState(null),[n,s]=g.useState(!1),[i,o]=g.useState(!0),[a,l]=g.useState([]),[c,d]=g.useState(""),[h,p]=g.useState(0);g.useEffect(()=>{if(!t)return;const S=t.viewCount||12;p(S);const k=setInterval(()=>{p(E=>{const N=Math.random();return N<.6?E+Math.ceil(Math.random()*3):N<.85?Math.max(S,E-Math.ceil(Math.random()*2)):E})},8e3+Math.random()*7e3);return()=>clearInterval(k)},[t]);const f=g.useRef(null),b=g.useRef(null);g.useEffect(()=>{e&&Ce.from("shows").select("*").eq("id",e).single().then(({data:S,error:k})=>{!k&&S&&r({id:S.id,name:S.name,videoUrl:S.video_url,videoLoop:S.video_loop,ctaText:S.cta_text,ctaUrl:S.cta_url,ctaDelay:S.cta_delay,ctaPermanent:S.cta_permanent,overlayLink:S.overlay_link,overlayWebsite:S.overlay_website,overlayPhone:S.overlay_phone,overlayEnabled:S.overlay_enabled,overlayCountry:S.overlay_country,bannerText:S.banner_text,viewCount:S.view_count,chatImageUrl:S.chat_image_url,chatHeaderText:S.chat_header_text,chatResponseText:S.chat_response_text,chatResponseUrl:S.chat_response_url,colorBackground:S.color_background||"#0a0a0a",colorPrimary:S.color_primary||"#0ED3CF",colorText:S.color_text||"#ffffff",colorBanner:S.color_banner||"#0ED3CF",colorOverlay:S.
366color_overlay||"#0ED3CF",colorOverlayText:S.color_overlay_text||"#0a0a0a",overlayIcon:S.overlay_icon||"phone",backUrl:S.back_url||"",offerEnabled:S.offer_enabled??!1,offerTitle:S.offer_title||"",offerPrice:S.offer_price||"",offerPriceSubtitle:S.offer_price_subtitle||"",offerBadge:S.offer_badge||"",offerFeatures:S.offer_features||"",offerButtonText:S.offer_button_text||"",offerButtonUrl:S.offer_button_url||"",offerColorBg:S.offer_color_bg||"#1e293b",offerColorAccent:S.offer_color_accent||"#0ED3CF"})})},[e]);const m=g.useRef(null),x=g.useRef(Date.now()),y=g.useCallback(()=>/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)?"mobile":"desktop",[]),v=g.useCallback(S=>{t&&Ce.from("show_analytics").insert({show_id:t.id,event_type:S,device_type:y()}).then(()=>{})},[t,y]);g.useEffect(()=>{if(!t)return;x.current=Date.now(),Ce.from("show_analytics").insert({show_id:t.id,event_type:"page_view",device_type:y(),duration_seconds:0}).select("id").single().then(({data:B})=>{B&&(m.current=B.id)});const S="https://plpcvbazszthlrjmhwob.supabase.co",k="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBscGN2YmF6c3p0aGxyam1od29iIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ4ODA0MzQsImV4cCI6MjA5MDQ1NjQzNH0.txxN-gMocmiWWIjsABNK2m77WCsIBbuyz6yVO_IcrYE",E=(B=!1)=>{if(!m.current)return;const D=Math.round((Date.now()-x.current)/1e3);if(!(D<=0))if(B&&navigator.sendBeacon){const W=`${S}/rest/v1/show_analytics?id=eq.${m.current}`;new Blob([JSON.stringify({duration_seconds:D})],{type:"application/json"});const L=new Headers({apikey:k,Authorization:`Bearer ${k}`,"Content-Type":"application/json",Prefer:"return=minimal"});fetch(W,{method:"PATCH",headers:L,body:JSON.stringify({duration_seconds:D}),keepalive:!0}).catch(()=>{})}else Ce.from("show_analytics").update({duration_seconds:D}).eq("id",m.current).then(()=>{})},N=setInterval(()=>E(!1),15e3),R=()=>E(!0),O=()=>{document.visibilityState==="hidden"&&E(!0)};return window.addEventListener("beforeunload",R),document.addEventListener("visibilitychange",O),()=>{clearInterval(N),window.removeEventListener("beforeunload",R),document.removeEventListener("visibilitychange",O),E(!0)}},[t,y]),g.useEffect(()=>{if(t){if(t.ctaPermanent)s(!0);else if(t.ctaDelay>0){const S=setTimeout(()=>s(!0),t.ctaDelay*1e3);return()=>clearTimeout(S)}}},[t]),g.useEffect(()=>{var S;(S=f.current)==null||S.scrollIntoView({behavior:"smooth"})},[a]);const w=()=>{if(!c.trim()||!t)return;const S=new Date().toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"}),k={id:crypto.randomUUID(),sender:"user",text:c,time:S};l(E=>[...E,k]),d(""),v("chat_message"),setTimeout(()=>{var R;let E=((R=t.chatResponseUrl)==null?void 0:R.trim())||void 0;E&&!/^https?:\/\//i.test(E)&&(E="https://"+E);const N={id:crypto.randomUUID(),sender:"system",text:t.chatResponseText||"Vielen Dank für deine Nachricht!",time:new Date().toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"}),url:E};l(O=>[...O,N])},800)};if(!t)return u.jsxs("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center gap-4 px-4",children:[u.jsx("h1",{className:"font-display text-xl sm:text-2xl font-bold text-center",children:"Show nicht gefunden"}),u.jsx("p",{className:"text-muted-foreground text-center text-sm sm:text-base",children:"Diese Show existiert nicht oder wurde gelöscht."}),u.jsx(Kn,{to:"/",children:u.jsxs(je,{variant:"outline",children:[u.jsx(Hd,{className:"w-4 h-4 mr-1"})," Zur Startseite"]})})]});const _={bg:t.colorBackground,primary:t.colorPrimary,text:t.colorText,banner:t.colorBanner};return u.jsxs("div",{className:"h-[100dvh] flex flex-col overflow-hidden",style:{background:_.bg,color:_.text},children:[u.jsx("header",{className:"border-b border-white/10 shrink-0",style:{background:_.bg},children:u.jsxs("div",{className:"px-3 sm:px-6 flex items-center justify-between h-12 sm:h-14",children:[u.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0",children:[u.jsx("a",{href:t.backUrl||document.referrer||"/",onClick:S=>{!t.backUrl&&document.referrer&&(S.preventDefault(),window.history.back())},className:"opacity-60 hover:opacity-100 transition-opacity shrink-0",style:{color:_.text},children:u.jsx(Hd,{className:"w-5 h-5"})}),u.jsx("span",{className:"font-display font-semibold text-sm sm:text-base truncate",children:t.name})]}),u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 px-2 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs sm:text-sm font-medium shrink-0",style:{background:_.primary+"1a",color:_.primary},children:[u.jsx(Ci,{className:"w-3 h-3 sm:w-4 sm:h-4"}),u.jsxs("span",{className:"hidden sm:inline",children:[h," Zuschauer heute"]}),u.jsx("span",{className:"sm:hidden",children:h})]})]})}),u.jsxs("div",{className:"flex-1 flex flex-col lg:flex-row min-h-0",children:[u.jsxs("div",{className:"relative bg-black lg:flex-1 shrink-0 flex flex-col",children:[u.jsxs("div",{className:"flex-1 flex items-center justify-center relative overflow-hidden",children:[t.videoUrl?u.jsxs(u.Fragment,{children:[u.jsx("video",{ref:b,src:t.videoUrl,loop:t.videoLoop??!0,playsInl
366ine:!0,preload:"auto",className:"w-full h-full object-contain bg-black",onLoadedMetadata:()=>{const S=b.current;if(!S||!t)return;const k=`shopcast_first_visit_${t.id}`,E=localStorage.getItem(k);if(!E)localStorage.setItem(k,String(Date.now())),S.currentTime=0;else{const N=parseInt(E,10),R=(Date.now()-N)/1e3,O=S.duration;O>0&&(S.currentTime=R%O)}},onError:()=>{const S=b.current;S&&!i&&setTimeout(()=>{S.load(),S.play().catch(()=>{})},1e3)}},t.videoUrl),i&&u.jsx("button",{onClick:async()=>{const S=b.current;if(S){S.muted=!1,S.volume=1;try{await S.play()}catch{S.load(),S.muted=!1,S.volume=1,S.addEventListener("canplay",()=>{S.muted=!1,S.volume=1,S.play().catch(()=>{})},{once:!0})}setTimeout(()=>{S.muted&&(S.muted=!1,S.volume=1)},100),o(!1)}},className:"absolute inset-0 flex items-center justify-center z-10 bg-black/40 backdrop-blur-[2px] transition-opacity hover:bg-black/30 cursor-pointer",children:u.jsxs("div",{className:"flex flex-col items-center gap-2 animate-pulse",children:[u.jsx("div",{className:"w-16 h-16 sm:w-20 sm:h-20 rounded-full flex items-center justify-center shadow-lg",style:{background:_.primary,color:_.bg},children:u.jsx(NE,{className:"w-7 h-7 sm:w-9 sm:h-9"})}),u.jsx("span",{className:"text-white font-display font-bold text-sm sm:text-base drop-shadow-lg",children:"Ton anschalten"})]})})]}):u.jsxs("div",{className:"text-center bg-gradient-surface w-full h-full flex flex-col items-center justify-center",children:[u.jsx("div",{className:"w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-3 sm:mb-4 animate-pulse-glow",children:u.jsx(vf,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"})}),u.jsx("p",{className:"text-muted-foreground font-medium text-sm sm:text-base",children:"Demo-Modus"}),u.jsx("p",{className:"text-muted-foreground/60 text-xs sm:text-sm mt-1",children:"Video wird hier abgespielt"})]}),u.jsxs("div",{className:"absolute top-2 left-2 sm:top-4 sm:left-4 flex items-center gap-1 sm:gap-1.5 bg-background/80 backdrop-blur px-2 sm:px-3 py-1 sm:py-1.5 rounded-full text-[10px] sm:text-xs font-medium",children:[u.jsx(Ci,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 text-primary"}),h," Zuschauer"]})]}),t.overlayEnabled&&u.jsx(T2,{website:t.overlayWebsite,phone:t.overlayPhone,country:t.overlayCountry||"DE",icon:t.overlayIcon,bgColor:t.colorOverlay,textColor:t.colorOverlayText,onPhoneClick:()=>v("phone_click")})]}),u.jsxs("div",{className:"w-full lg:w-96 border-t lg:border-t-0 lg:border-l border-white/10 flex flex-col flex-1 lg:flex-none min-h-0",style:{background:_.bg},children:[u.jsxs("div",{className:"p-3 sm:p-5 border-b border-white/10 text-center shrink-0",children:[t.chatImageUrl?u.jsx("img",{src:t.chatImageUrl,alt:"Berater",className:"hidden sm:block w-20 h-20 rounded-full object-cover mx-auto mb-3 border-2",style:{borderColor:_.primary+"4d"}}):u.jsx("div",{className:"hidden sm:flex w-20 h-20 rounded-full items-center justify-center mx-auto mb-3",style:{background:_.primary+"1a"},children:u.jsx(jE,{className:"w-8 h-8",style:{color:_.primary}})}),u.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground leading-relaxed",children:t.chatHeaderText||"Du hast noch Fragen? Stelle hier deine Fragen."})]}),t.offerEnabled&&t.offerTitle&&u.jsxs("div",{className:"mx-3 sm:mx-4 mt-3 sm:mt-4 rounded-xl p-4 sm:p-5 shrink-0 border border-white/10",style:{background:t.offerColorBg},children:[u.jsx("h3",{className:"font-display font-bold text-base sm:text-lg mb-1",style:{color:_.text},children:t.offerTitle}),u.jsxs("div",{className:"flex items-baseline gap-2 mb-1",children:[u.jsx("span",{className:"font-display font-bold text-2xl sm:text-3xl",style:{color:_.text},children:t.offerPrice}),t.offerPriceSubtitle&&u.jsx("span",{className:"text-xs sm:text-sm opacity-60",style:{color:_.text},children:t.offerPriceSubtitle})]}),t.offerBadge&&u.jsx("p",{className:"text-xs sm:text-sm font-semibold mb-3",style:{color:t.offerColorAccent},children:t.offerBadge}),t.offerFeatures&&u.jsx("ul",{className:"space-y-1.5 sm:space-y-2 mb-4",children:t.offerFeatures.split(` 367`).filter(Boolean).map((S,k)=>u.jsxs("li",{className:"flex items-center gap-2 text-xs sm:text-sm",style:{color:_.text},children:[u.jsx("span",{className:"shrink-0",style:{color:t.offerColorAccent},children:"â"}),S.trim()]},k))}),t.offerButtonText&&t.offerButtonUrl&&u.jsxs("a",{href:t.offerButtonUrl.startsWith("http")?t.offerButtonUrl:"https://"+t.offerButtonUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>v("offer_click"),className:"block w-full text-center font-bold text-sm sm:text-base py-2.5 sm:py-3 rounded-lg transition-opacity hover:opacity-90",style:{background:t.offerColorAccent,color:t.offerColorBg},children:[t.offerButtonText," â"]})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto p-3 sm:p-4 space-y-2 sm:space-y-3 min-h-0",children:[a.map(S=>u.jsx("div",{className:`flex ${S.sender==="user"?"justify-end":"justify-start"}`,children:u.jsxs("div",{className:`max-w-[85%] sm:max-w-[80%] px-3 sm:px-4 py-2 sm:py-2.5 rounded-2xl text-xs sm:text-sm ${S.sender==="user"?"rounded-br-md":"rounded-bl-md"}`,style:S.sender==="user"?{background:_.primary,color:_.bg}:{background:_.text+"14",color:_.text},children:[u.jsx("p",{children:S.text}),S.url&&u.jsxs("a",{href:S.url,target:"_blank",rel:"noopener noreferrer",onClick:()=>v("chat_link_click"),className:"inline-flex items-center gap-1 mt-1.5 sm:mt-2 text-[10px] sm:text-xs font-medium underline underline-offset-2 opacity-80 hover:opacity-100",children:[u.jsx(Hl,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3"})," Hier klicken"]}),u.jsx("span",{className:`text-[9px] sm:text-[10px] mt-1 block ${S.sender==="user"?"text-primary-foreground
367/60":"text-muted-foreground"}`,children:S.time})]})},S.id)),u.jsx("div",{ref:f})]}),n&&t.ctaUrl&&u.jsx("div",{className:"px-3 sm:px-4 py-2 sm:py-3 border-t border-white/10 shrink-0",children:u.jsx("a",{href:t.ctaUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>v("cta_click"),children:u.jsxs(je,{className:"w-full text-xs sm:text-sm font-bold",size:"default",style:{background:_.primary,color:_.bg},children:[u.jsx(Hl,{className:"w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2"})," ",t.ctaText]})})}),u.jsx("div",{className:"p-3 sm:p-4 border-t border-white/10 shrink-0",children:u.jsxs("form",{onSubmit:S=>{S.preventDefault(),w()},className:"flex gap-2",children:[u.jsx(te,{value:c,onChange:S=>d(S.target.value),placeholder:"Nachricht schreiben...",className:"flex-1 text-sm",style:{background:_.text+"0a",borderColor:_.text+"1a",color:_.text}}),u.jsx(je,{type:"submit",size:"icon",className:"shrink-0",style:{background:_.primary,color:_.bg},children:u.jsx(_E,{className:"w-4 h-4"})})]})})]})]})]})},N2=()=>{const e=Oi();return g.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),u.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),u.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},P2=new R_,R2=()=>u.jsx(O_,{client:P2,children:u.jsxs(XT,{children:[u.jsx(hC,{}),u.jsx(fk,{}),u.jsx(RS,{children:u.jsxs(SS,{children:[u.jsx(Ds,{path:"/",element:u.jsx(nj,{})}),u.jsx(Ds,{path:"/auth",element:u.jsx(nR,{})}),u.jsx(Ds,{path:"/dashboard",element:u.jsx(k2,{})}),u.jsx(Ds,{path:"/show/:id",element:u.jsx(j2,{})}),u.jsx(Ds,{path:"*",element:u.jsx(N2,{})})]})})]})});zy(document.getElementById("root")).render(u.jsx(R2,{}));
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.