vendor: 7,773 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Auth-DNhnVwIT.js","assets/card-BuXUi2qO.js","assets/tabs-DHiaIUJC.js","assets/index-3n2vhJSo.js","assets/Inbox-BRkXvZau.js","assets/EmailCard-BmzxHtQ6.js","assets/textarea-8E-iyF7K.js","assets/Layout-DJM8Nhr5.js","assets/en-US-DNUEYIb-.js","assets/save-DzECIos-.js","assets/trash-2-DdrI1I0J.js","assets/info-CJcsv1Md.js","assets/Top5RankingBoard-DoTMgCmm.js","assets/InboxList-CiNn1M--.js","assets/checkbox-DKWDhTaI.js","assets/trending-up-CFum-BMU.js","assets/EmptyState-CsbWFNEA.js","assets/formatDistanceToNow-DIxqAR2j.js","assets/Dashboard-CTrsmhyQ.js","assets/Sent-DgVSDM2s.js","assets/Drafts-B0ct0AMQ.js","assets/ErrorAlert-DT1JNSTA.js","assets/alert-dialog-B6beMukR.js","assets/Contacts-CNcHVpAC.js","assets/Analytics-ByMDaMKZ.js","assets/plus-DrbiADgI.js","assets/Admin-rrKGxjqy.js","assets/switch-CHgUBdXF.js","assets/Settings-C_kVT3uf.js"])))=>i.map(i=>d[i]); 2var B0=Object.defineProperty;var Lf=t=>{throw TypeError(t)};var W0=(t,e,n)=>e in t?B0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ii=(t,e,n)=>W0(t,typeof e!="symbol"?e+"":e,n),Il=(t,e,n)=>e.has(t)||Lf("Cannot "+n);var S=(t,e,n)=>(Il(t,e,"read from private field"),n?n.call(t):e.get(t)),W=(t,e,n)=>e.has(t)?Lf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),M=(t,e,n,r)=>(Il(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Z=(t,e,n)=>(Il(t,e,"access private method"),n);var Oo=(t,e,n,r)=>({set _(s){M(t,e,s,n)},get _(){return S(t,e,r)}});function H0(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(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"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(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 r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var St=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function im(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function V0(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var om={exports:{}},Ja={},am={exports:{}},J={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var po=Symbol.for("react.element"),q0=Symbol.for("react.portal"),K0=Symbol.for("react.fragment"),Q0=Symbol.for("react.strict_mode"),G0=Symbol.for("react.profiler"),Y0=Symbol.for("react.provider"),J0=Symbol.for("react.context"),X0=Symbol.for("react.forward_ref"),Z0=Symbol.for("react.suspense"),ew=Symbol.for("react.memo"),tw=Symbol.for("react.lazy"),$f=Symbol.iterator;function nw(t){return t===null||typeof t!="object"?null:(t=$f&&t[$f]||t["@@iterator"],typeof t=="function"?t:null)}var lm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},um=Object.assign,cm={};function Ks(t,e,n){this.props=t,this.context=e,this.refs=cm,this.updater=n||lm}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Ks.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function dm(){}dm.prototype=Ks.prototype;function rd(t,e,n){this.props=t,this.context=e,this.refs=cm,this.updater=n||lm}var sd=rd.prototype=new dm;sd.constructor=rd;um(sd,Ks.prototype);sd.isPureReactComponent=!0;var Df=Array.isArray,fm=Object.prototype.hasOwnProperty,id={current:null},hm={key:!0,ref:!0,__self:!0,__source:!0};function pm(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)fm.call(e,r)&&!hm.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:po,type:t,key:i,ref:o,props:s,_owner:id.current}}function rw(t,e){return{$$typeof:po,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function od(t){return typeof t=="object"&&t!==null&&t.$$typeof===po}function sw(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Mf=/\/+/g;function Nl(t,e){return typeof t=="object"&&t!==null&&t.key!=null?sw(""+t.key):e.toString(36)}function ra(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case po:case q0:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+Nl(o,0):r,Df(s)?(n="",t!=null&&(n=t.replace(Mf,"$&/")+"/"),ra(s,e,n,"",function(u){return u})):s!=null&&(od(s)&&(s=rw(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Mf,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",Df(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+Nl(i,a);o+=ra(i,e,n,l,s)}else if(l=nw(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+Nl(i,a++),o+=ra(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Ao(t,e,n){if(t==null)return t;var r=[],s=0;return ra(t,r,"","",function(i){return e.call(n,i,s++)}),r}function iw(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ke={current:null},sa={transition:null},ow={ReactCurrentDispatcher:Ke,ReactCurrentBatchConfig:sa,ReactCurrentOwner:id};function mm(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:Ao,forEach:function(t,e,n){Ao(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Ao(t,function(){e++}),e},toArray:function(t){return Ao(t,function(e){return e})||[]},only:function(t){if(!od(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};J.Component=Ks;J.Fragment=K0;J.Profiler=G0;J.PureComponent=rd;J.StrictMode=Q0;J.Suspense=Z0;
vendor: 5,032 bytes, lines 10-26
10J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ow;J.act=mm;J.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=um({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=id.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)fm.call(e,l)&&!hm.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:po,type:t.type,key:s,ref:i,props:r,_owner:o}};J.createContext=function(t){return t={$$typeof:J0,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Y0,_context:t},t.Consumer=t};J.createElement=pm;J.createFactory=function(t){var e=pm.bind(null,t);return e.type=t,e};J.createRef=function(){return{current:null}};J.forwardRef=function(t){return{$$typeof:X0,render:t}};J.isValidElement=od;J.lazy=function(t){return{$$typeof:tw,_payload:{_status:-1,_result:t},_init:iw}};J.memo=function(t,e){return{$$typeof:ew,type:t,compare:e===void 0?null:e}};J.startTransition=function(t){var e=sa.transition;sa.transition={};try{t()}finally{sa.transition=e}};J.unstable_act=mm;J.useCallback=function(t,e){return Ke.current.useCallback(t,e)};J.useContext=function(t){return Ke.current.useContext(t)};J.useDebugValue=function(){};J.useDeferredValue=function(t){return Ke.current.useDeferredValue(t)};J.useEffect=function(t,e){return Ke.current.useEffect(t,e)};J.useId=function(){return Ke.current.useId()};J.useImperativeHandle=function(t,e,n){return Ke.current.useImperativeHandle(t,e,n)};J.useInsertionEffect=function(t,e){return Ke.current.useInsertionEffect(t,e)};J.useLayoutEffect=function(t,e){return Ke.current.useLayoutEffect(t,e)};J.useMemo=function(t,e){return Ke.current.useMemo(t,e)};J.useReducer=function(t,e,n){return Ke.current.useReducer(t,e,n)};J.useRef=function(t){return Ke.current.useRef(t)};J.useState=function(t){return Ke.current.useState(t)};J.useSyncExternalStore=function(t,e,n){return Ke.current.useSyncExternalStore(t,e,n)};J.useTransition=function(){return Ke.current.useTransition()};J.version="18.3.1";am.exports=J;var _=am.exports;const j=im(_),gm=H0({__proto__:null,default:j},[_]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var aw=_,lw=Symbol.for("react.element"),uw=Symbol.for("react.fragment"),cw=Object.prototype.hasOwnProperty,dw=aw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fw={key:!0,ref:!0,__self:!0,__source:!0};function vm(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)cw.call(e,r)&&!fw.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:lw,type:t,key:i,ref:o,props:s,_owner:dw.current}}Ja.Fragment=uw;Ja.jsx=vm;Ja.jsxs=vm;om.exports=Ja;var k=om.exports,ym={exports:{}},pt={},wm={exports:{}},_m={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(t){function e(P,I){var U=P.length;P.push(I);e:for(;0<U;){var $=U-1>>>1,z=P[$];if(0<s(z,I))P[$]=I,P[U]=z,U=$;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var I=P[0],U=P.pop();if(U!==I){P[0]=U;e:for(var $=0,z=P.length,X=z>>>1;$<X;){var pe=2*($+1)-1,st=P[pe],se=pe+1,Ct=P[se];if(0>s(st,U))se<z&&0>s(Ct,st)?(P[$]=Ct,P[se]=U,$=se):(P[$]=st,P[pe]=U,$=pe);else if(se<z&&0>s(Ct,U))P[$]=Ct,P[se]=U,$=se;else break e}}return I}function s(P,I){var U=P.sortIndex-I.sortIndex;return U!==0?U:P.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,p=!1,y=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(P){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=P)r(u),I.sortIndex=I.expirationTime,e(l,I);else break;I=n(u)}}function x(P){if(m=!1,g(P),!y)if(n(l)!==null)y=!0,B(b);else{var I=n(u);I!==null&&Y(x,I.startTime-P)}}function b(P,I){y=!1,m&&(m=!1,v(T),T=-1),p=!0;var U=f;try{for(g(I),d=n(l);d!==null&&(!(d.expirationTime>I)||P&&!F());){var $=d.callback;
vendor: 9,155 bytes, lines 26-35
26if(typeof $=="function"){d.callback=null,f=d.priorityLevel;var z=$(d.expirationTime<=I);I=t.unstable_now(),typeof z=="function"?d.callback=z:d===n(l)&&r(l),g(I)}else r(l);d=n(l)}if(d!==null)var X=!0;else{var pe=n(u);pe!==null&&Y(x,pe.startTime-I),X=!1}return X}finally{d=null,f=U,p=!1}}var C=!1,E=null,T=-1,R=5,A=-1;function F(){return!(t.unstable_now()-A<R)}function D(){if(E!==null){var P=t.unstable_now();A=P;var I=!0;try{I=E(!0,P)}finally{I?K():(C=!1,E=null)}}else C=!1}var K;if(typeof h=="function")K=function(){h(D)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,G=N.port2;N.port1.onmessage=D,K=function(){G.postMessage(null)}}else K=function(){w(D,0)};function B(P){E=P,C||(C=!0,K())}function Y(P,I){T=w(function(){P(t.unstable_now())},I)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_continueExecution=function(){y||p||(y=!0,B(b))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(P){switch(f){case 1:case 2:case 3:var I=3;break;default:I=f}var U=f;f=I;try{return P()}finally{f=U}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,I){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var U=f;f=P;try{return I()}finally{f=U}},t.unstable_scheduleCallback=function(P,I,U){var $=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?$+U:$):U=$,P){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=U+z,P={id:c++,callback:I,priorityLevel:P,startTime:U,expirationTime:z,sortIndex:-1},U>$?(P.sortIndex=U,e(u,P),n(l)===null&&P===n(u)&&(m?(v(T),T=-1):m=!0,Y(x,U-$))):(P.sortIndex=z,e(l,P),y||p||(y=!0,B(b))),P},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(P){var I=f;return function(){var U=f;f=I;try{return P.apply(this,arguments)}finally{f=U}}}})(_m);wm.exports=_m;var hw=wm.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var pw=_,ht=hw;function O(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xm=new Set,Mi={};function zr(t,e){Ds(t,e),Ds(t+"Capture",e)}function Ds(t,e){for(Mi[t]=e,t=0;t<e.length;t++)xm.add(e[t])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eu=Object.prototype.hasOwnProperty,mw=/^[: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]*$/,Ff={},Uf={};function gw(t){return Eu.call(Uf,t)?!0:Eu.call(Ff,t)?!1:mw.test(t)?Uf[t]=!0:(Ff[t]=!0,!1)}function vw(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function yw(t,e,n,r){if(e===null||typeof e>"u"||vw(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Qe(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Le[t]=new Qe(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Le[e]=new Qe(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Le[t]=new Qe(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Le[t]=new Qe(t,2,!1,t,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(t){Le[t]=new Qe(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Le[t]=new Qe(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Le[t]=new Qe(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Le[t]=new Qe(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Le[t]=new Qe(t,5,!1,t.toLowerCase(),null,!1,!1)});var ad=/[\-:]([a-z])/g;function ld(t){return t[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(t){var e=t.replace(ad,ld);Le[e]=new Qe(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(ad,ld);Le[e]=new Qe(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(ad,ld);Le[e]=new Qe(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Le[t]=new Qe(t,1,!1,t.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Le[t]=new Qe(t,1,!1,t.toLowerCase(),null,!0,!0)});function ud(t,e,n,r){var s=Le.hasOwnProperty(e)?Le[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(yw(e,n,s,r)&&(n=null),r||s===null?gw(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var wn=pw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,jo=Symbol.for("react.element"),rs=Symbol.for("react.portal"),ss=Symbol.for("react.fragment"),cd=Symbol.for("react.strict_mode"),ku=Symbol.for("react.profiler"),bm=Symbol.for("react.provider"),Sm=Symbol.for("react.context"),dd=Symbol.for("react.forward_ref"),Cu=Symbol.for("react.suspense"),Tu=Symbol.for("react.suspense_list"),fd=Symbol.for("react.memo"),An=Symbol.for("react.lazy"),Em=Symbol.for("react.offscreen"),zf=Symbol.iterator;function oi(t){return t===null||typeof t!="object"?null:(t=zf&&t[zf]||t["@@iterator"],typeof t=="function"?t:null)}var ve=Object.assign,Ll;function wi(t){if(Ll===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Ll=e&&e[1]||""}return` 35`+Ll+t}var $l=!1;function Dl(t,e){if(!t||$l)return"";$l=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}
vendor: 17,106 bytes, lines 35-38
35catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),i=r.stack.split(` 37`),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=` 38`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{$l=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?wi(t):""}function ww(t){switch(t.tag){case 5:return wi(t.type);case 16:return wi("Lazy");case 13:return wi("Suspense");case 19:return wi("SuspenseList");case 0:case 2:case 15:return t=Dl(t.type,!1),t;case 11:return t=Dl(t.type.render,!1),t;case 1:return t=Dl(t.type,!0),t;default:return""}}function Pu(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ss:return"Fragment";case rs:return"Portal";case ku:return"Profiler";case cd:return"StrictMode";case Cu:return"Suspense";case Tu:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Sm:return(t.displayName||"Context")+".Consumer";case bm:return(t._context.displayName||"Context")+".Provider";case dd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case fd:return e=t.displayName||null,e!==null?e:Pu(t.type)||"Memo";case An:e=t._payload,t=t._init;try{return Pu(t(e))}catch{}}return null}function _w(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pu(e);case 8:return e===cd?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function tr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function km(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function xw(t){var e=km(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Io(t){t._valueTracker||(t._valueTracker=xw(t))}function Cm(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=km(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ya(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Ru(t,e){var n=e.checked;return ve({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Bf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=tr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Tm(t,e){e=e.checked,e!=null&&ud(t,"checked",e,!1)}function Ou(t,e){Tm(t,e);var n=tr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Au(t,e.type,n):e.hasOwnProperty("defaultValue")&&Au(t,e.type,tr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Wf(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Au(t,e,n){(e!=="number"||ya(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var _i=Array.isArray;function ms(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+tr(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function ju(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(O(91));return ve({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Hf(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(O(92));if(_i(n)){if(1<n.length)throw Error(O(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:tr(n)}}function Pm(t,e){var n=tr(e.value),r=tr(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Vf(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Rm(t){switch(t){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 Iu(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Rm(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var No,Om=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(No=No||document.createElement("div"),No.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=No.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Fi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ki={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},bw=["Webkit","ms","Moz","O"];Object.keys(ki).forEach(function(t){bw.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ki[e]=ki[t]})});function Am(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ki.hasOwnProperty(t)&&ki[t]?(""+e).trim():e+"px"}function jm(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Am(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var Sw=ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Nu(t,e){if(e){if(Sw[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(O(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(O(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(O(61))}if(e.style!=null&&typeof e.style!="object")throw Error(O(62))}}function Lu(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 $u=null;function hd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Du=null,gs=null,vs=null;function qf(t){if(t=vo(t)){if(typeof Du!="function")throw Error(O(280));var e=t.stateNode;e&&(e=nl(e),Du(t.stateNode,t.type,e))}}function Im(t){gs?vs?vs.push(t):vs=[t]:gs=t}function Nm(){if(gs){var t=gs,e=vs;if(vs=gs=null,qf(t),e)for(t=0;t<e.length;t++)qf(e[t])}}function Lm(t,e){return t(e)}function $m(){}var Ml=!1;function Dm(t,e,n){if(Ml)return t(e,n);Ml=!0;try{return Lm(t,e,n)}finally{Ml=!1,(gs!==null||vs!==null)&&($m(),Nm())}}function Ui(t,e){var n=t.stateNode;if(n===null)return null;var r=nl(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(O(231,e,typeof n));return n}var Mu=!1;if(hn)try{var ai={};Object.defineProperty(ai,"passive",{get:function(){Mu=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{Mu=!1}function Ew(t,e,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var Ci=!1,wa=null,_a=!1,Fu=null,kw={onError:function(t){Ci=!0,wa=t}};function Cw(t,e,n,r,s,i,o,a,l){Ci=!1,wa=null,Ew.apply(kw,arguments)}function Tw(t,e,n,r,s,i,o,a,l){if(Cw.apply(this,arguments),Ci){if(Ci){var u=wa;Ci=!1,wa=null}else throw Error(O(198));_a||(_a=!0,Fu=u)}}function Br(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Mm(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Kf(t){if(Br(t)!==t)throw Error(O(188))}function Pw(t){var e=t.alternate;if(!e){if(e=Br(t),e===null)throw Error(O(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Kf(s),t;if(i===r)return Kf(s),e;i=i.sibling}throw Error(O(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?t:e}function Fm(t){return t=Pw(t),t!==null?Um(t):null}function Um(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Um(t);if(e!==null)return e;t=t.sibling}return null}var zm=ht.unstable_scheduleCallback,Qf=ht.unstable_cancelCallback,Rw=ht.unstable_shouldYield,Ow=ht.unstable_requestPaint,_e=ht.unstable_now,Aw=ht.unstable_getCurrentPriorityLevel,pd=ht.unstable_ImmediatePriority,Bm=ht.unstable_UserBlockingPriority,xa=ht.unstable_NormalPriority,jw=ht.unstable_LowPriority,Wm=ht.unstable_IdlePriority,Xa=null,Xt=null;function Iw(t){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(Xa,t,void 0,(t.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:$w,Nw=Math.log,Lw=Math.LN2;function $w(t){return t>>>=0,t===0?32:31-(Nw(t)/Lw|0)|0}var Lo=64,$o=4194304;function xi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ba(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=xi(a):(i&=o,i!==0&&(r=xi(i)))}else o=n&~s,o!==0?r=xi(o):i!==0&&(r=xi(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Nt(e),s=1<<n,r|=t[n],e&=~s;return r}function Dw(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 Mw(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Nt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=Dw(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Uu(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Hm(){var t=Lo;return Lo<<=1,!(Lo&4194240)&&(Lo=64),t}function Fl(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function mo(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Nt(e),t[e]=n}function Fw(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Nt(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function md(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Nt(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var ie=0;function Vm(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var qm,gd,Km,Qm,Gm,zu=!1,Do=[],qn=null,Kn=null,Qn=null,zi=new Map,Bi=new Map,In=[],Uw="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 Gf(t,e){switch(t){case"focusin":case"focusout":qn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":zi.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(e.pointerId)}}function li(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=vo(e),e!==null&&gd(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function zw(t,e,n,r,s){switch(e){case"focusin":return qn=li(qn,t,e,n,r,s),!0;case"dragenter":return Kn=li(Kn,t,e,n,r,s),!0;case"mouseover":return Qn=li(Qn,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return zi.set(i,li(zi.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Bi.set(i,li(Bi.get(i)||null,t,e,n,r,s)),!0}return!1}function Ym(t){var e=br(t.target);if(e!==null){var n=Br(e);if(n!==null){if(e=n.tag,e===13){if(e=Mm(n),e!==null){t.blockedOn=e,Gm(t.priority,function(){Km(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ia(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Bu(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);$u=r,n.target.dispatchEvent(r),$u=null}else return e=vo(n),e!==null&&gd(e),t.blockedOn=n,!1;e.shift()}return!0}function Yf(t,e,n){ia(t)&&n.delete(e)}function Bw(){zu=!1,qn!==null&&ia(qn)&&(qn=null),Kn!==null&&ia(Kn)&&(Kn=null),Qn!==null&&ia(Qn)&&(Qn=null),zi.forEach(Yf),Bi.forEach(Yf)}function ui(t,e){t.blockedOn===e&&(t.blockedOn=null,zu||(zu=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,Bw)))}function Wi(t){function e(s){return ui(s,t)}if(0<Do.length){ui(Do[0],t);for(var n=1;n<Do.length;n++){var r=Do[n];r.blockedOn===t&&(r.blockedOn=null)}}for(qn!==null&&ui(qn,t),Kn!==null&&ui(Kn,t),Qn!==null&&ui(Qn,t),zi.forEac
vendor: 8,922 bytes, line 38
38h(e),Bi.forEach(e),n=0;n<In.length;n++)r=In[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<In.length&&(n=In[0],n.blockedOn===null);)Ym(n),n.blockedOn===null&&In.shift()}var ys=wn.ReactCurrentBatchConfig,Sa=!0;function Ww(t,e,n,r){var s=ie,i=ys.transition;ys.transition=null;try{ie=1,vd(t,e,n,r)}finally{ie=s,ys.transition=i}}function Hw(t,e,n,r){var s=ie,i=ys.transition;ys.transition=null;try{ie=4,vd(t,e,n,r)}finally{ie=s,ys.transition=i}}function vd(t,e,n,r){if(Sa){var s=Bu(t,e,n,r);if(s===null)Gl(t,e,r,Ea,n),Gf(t,r);else if(zw(s,t,e,n,r))r.stopPropagation();else if(Gf(t,r),e&4&&-1<Uw.indexOf(t)){for(;s!==null;){var i=vo(s);if(i!==null&&qm(i),i=Bu(t,e,n,r),i===null&&Gl(t,e,r,Ea,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Gl(t,e,r,null,n)}}var Ea=null;function Bu(t,e,n,r){if(Ea=null,t=hd(r),t=br(t),t!==null)if(e=Br(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Mm(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ea=t,null}function Jm(t){switch(t){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(Aw()){case pd:return 1;case Bm:return 4;case xa:case jw:return 16;case Wm:return 536870912;default:return 16}default:return 16}}var Wn=null,yd=null,oa=null;function Xm(){if(oa)return oa;var t,e=yd,n=e.length,r,s="value"in Wn?Wn.value:Wn.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return oa=s.slice(t,1<r?1-r:void 0)}function aa(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Mo(){return!0}function Jf(){return!1}function mt(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Mo:Jf,this.isPropagationStopped=Jf,this}return ve(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Mo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Mo)},persist:function(){},isPersistent:Mo}),e}var Qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wd=mt(Qs),go=ve({},Qs,{view:0,detail:0}),Vw=mt(go),Ul,zl,ci,Za=ve({},go,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_d,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ci&&(ci&&t.type==="mousemove"?(Ul=t.screenX-ci.screenX,zl=t.screenY-ci.screenY):zl=Ul=0,ci=t),Ul)},movementY:function(t){return"movementY"in t?t.movementY:zl}}),Xf=mt(Za),qw=ve({},Za,{dataTransfer:0}),Kw=mt(qw),Qw=ve({},go,{relatedTarget:0}),Bl=mt(Qw),Gw=ve({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),Yw=mt(Gw),Jw=ve({},Qs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Xw=mt(Jw),Zw=ve({},Qs,{data:0}),Zf=mt(Zw),e_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t_={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"},n_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r_(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=n_[t])?!!e[t]:!1}function _d(){return r_}var s_=ve({},go,{key:function(t){if(t.key){var e=e_[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=aa(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?t_[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_d,charCode:function(t){return t.type==="keypress"?aa(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?aa(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),i_=mt(s_),o_=ve({},Za,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=mt(o_),a_=ve({},go,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_d}),l_=mt(a_),u_=ve({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),c_=mt(u_),d_=ve({},Za,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),f_=mt(d_),h_=[9,13,27,32],xd=hn&&"CompositionEvent"in window,Ti=null;hn&&"documentMode"in document&&(Ti=document.documentMode);var p_=hn&&"TextEvent"in window&&!Ti,Zm=hn&&(!xd||Ti&&8<Ti&&11>=Ti),th=" ",nh=!1;function eg(t,e){switch(t){case"keyup":return h_.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var is=!1;function m_(t,e){switch(t){case"compositionend":return tg(e);case"keypress":return e.which!==32?null:(nh=!0,th);case"textInput":return t=e.data,t===th&&nh?null:t;default:return null}}function g_(t,e){if(is)return t==="compositionend"||!xd&&eg(t,e)?(t=Xm(),oa=yd=Wn=null,is=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Zm&&e.locale!=="ko"?null:e.data;default:return null}}var v_={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 rh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!v_[t.type]:e==="textarea"}function ng(t,e,n,r){Im(r),e=ka(e,"onChange"),0<e.length&&(n=new wd("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Pi=null,Hi=null;function y_(t){hg(t,0)}function el(t){var e=ls(t);if(Cm(e))return t}function w_(t,e){if(t==="change")return e}var rg=!1;if(hn){var Wl;if(hn){var Hl="oninput"in document;if(!Hl){var sh=document.createElement("div");sh.setAttribute("oninput","return;"),Hl=typeof sh.oninput=="function"}Wl=Hl}else Wl=!1;rg=Wl&&(!document.documentMode||9<document.documentMode)}function ih(){Pi&&(Pi.detachEvent("onpropertychange",sg),Hi=Pi=null)}function sg(t){if(t.propertyName==="value"&&el(Hi)){var e=[];ng(e,Hi,t,hd(t)),Dm(y_,e)}}function __(t,e,n){t==="focusin"?(ih(),Pi=e,Hi=n,Pi.attachEvent("onpropertychange",sg)):t==="focusout"&&ih()}function x_(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return el(Hi)}function b_(t,e){if(t==="click")return el(e)}function S_(t,e){if(t==="input"||t==="change")return el(e)}function E_(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var $t=typeof Object.is=="function"?Object.is:E_;function Vi(t,e){if($t(t,e))return!0;
vendor: 4,808 bytes, line 38
38if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Eu.call(e,s)||!$t(t[s],e[s]))return!1}return!0}function oh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ah(t,e){var n=oh(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=oh(n)}}function ig(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ig(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function og(){for(var t=window,e=ya();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ya(t.document)}return e}function bd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function k_(t){var e=og(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&ig(n.ownerDocument.documentElement,n)){if(r!==null&&bd(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=ah(n,i);var o=ah(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var C_=hn&&"documentMode"in document&&11>=document.documentMode,os=null,Wu=null,Ri=null,Hu=!1;function lh(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hu||os==null||os!==ya(r)||(r=os,"selectionStart"in r&&bd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ri&&Vi(Ri,r)||(Ri=r,r=ka(Wu,"onSelect"),0<r.length&&(e=new wd("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=os)))}function Fo(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var as={animationend:Fo("Animation","AnimationEnd"),animationiteration:Fo("Animation","AnimationIteration"),animationstart:Fo("Animation","AnimationStart"),transitionend:Fo("Transition","TransitionEnd")},Vl={},ag={};hn&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete as.animationend.animation,delete as.animationiteration.animation,delete as.animationstart.animation),"TransitionEvent"in window||delete as.transitionend.transition);function tl(t){if(Vl[t])return Vl[t];if(!as[t])return t;var e=as[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in ag)return Vl[t]=e[n];return t}var lg=tl("animationend"),ug=tl("animationiteration"),cg=tl("animationstart"),dg=tl("transitionend"),fg=new Map,uh="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 lr(t,e){fg.set(t,e),zr(e,[t])}for(var ql=0;ql<uh.length;ql++){var Kl=uh[ql],T_=Kl.toLowerCase(),P_=Kl[0].toUpperCase()+Kl.slice(1);lr(T_,"on"+P_)}lr(lg,"onAnimationEnd");lr(ug,"onAnimationIteration");lr(cg,"onAnimationStart");lr("dblclick","onDoubleClick");lr("focusin","onFocus");lr("focusout","onBlur");lr(dg,"onTransitionEnd");Ds("onMouseEnter",["mouseout","mouseover"]);Ds("onMouseLeave",["mouseout","mouseover"]);Ds("onPointerEnter",["pointerout","pointerover"]);Ds("onPointerLeave",["pointerout","pointerover"]);zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,388 bytes, line 38
38zr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zr("onBeforeInput",["compositionend","keypress","textInput","paste"]);zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bi="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(" "),R_=new Set("cancel close invalid load scroll toggle".split(" ").concat(bi));function ch(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Tw(r,e,void 0,t),t.currentTarget=null}function hg(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;ch(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;ch(s,a,u),i=l}}}if(_a)throw t=Fu,_a=!1,Fu=null,t}function de(t,e){var n=e[Gu];n===void 0&&(n=e[Gu]=new Set);var r=t+"__bubble";n.has(r)||(pg(e,t,2,!1),n.add(r))}function Ql(t,e,n){var r=0;e&&(r|=4),pg(n,t,r,e)}var Uo="_reactListening"+Math.random().toString(36).slice(2);function qi(t){if(!t[Uo]){t[Uo]=!0,xm.forEach(function(n){n!=="selectionchange"&&(R_.has(n)||Ql(n,!1,t),Ql(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Uo]||(e[Uo]=!0,Ql("selectionchange",!1,e))}}function pg(t,e,n,r){switch(Jm(e)){case 1:var s=Ww;break;case 4:s=Hw;break;default:s=vd}n=s.bind(null,e,n,t),s=void 0,!Mu||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function Gl(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.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=br(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Dm(function(){var u=i,c=hd(n),d=[];e:{var f=fg.get(t);if(f!==void 0){var p=wd,y=t;switch(t){case"keypress":if(aa(n)===0)break e;case"keydown":case"keyup":p=i_;break;case"focusin":y="focus",p=Bl;break;case"focusout":y="blur",p=Bl;break;case"beforeblur":case"afterblur":p=Bl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Xf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Kw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=l_;break;case lg:case ug:case cg:p=Yw;break;case dg:p=c_;break;case"scroll":p=Vw;break;case"wheel":p=f_;break;case"copy":case"cut":case"paste":p=Xw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=eh}var m=(e&4)!==0,w=!m&&t==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var h=u,g;h!==null;){g=h;var x=g.stateNode;if(g.tag===5&&x!==null&&(g=x,v!==null&&(x=Ui(h,v),x!=null&&m.push(Ki(h,x,g)))),w)break;h=h.return}0<m.length&&(f=new p(f,y,null,n,c),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",f&&n!==$u&&(y=n.relatedTarget||n.fromElement)&&(br(y)||y[pn]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?br(y):null,y!==null&&(w=Br(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(m=Xf,x="onMouseLeave",v="onMouseEnter",h="mouse",(t==="pointerout"||t==="pointerover")&&(m=eh,x="onPointerLeave",v="onPointerEnter",h="pointer"),w=p==null?f:ls(p),g=y==null?f:ls(y),f=new m(x,h+"leave",p,n,c
vendor: 6,988 bytes, lines 38-39
38),f.target=w,f.relatedTarget=g,x=null,br(c)===u&&(m=new m(v,h+"enter",y,n,c),m.target=g,m.relatedTarget=w,x=m),w=x,p&&y)t:{for(m=p,v=y,h=0,g=m;g;g=Qr(g))h++;for(g=0,x=v;x;x=Qr(x))g++;for(;0<h-g;)m=Qr(m),h--;for(;0<g-h;)v=Qr(v),g--;for(;h--;){if(m===v||v!==null&&m===v.alternate)break t;m=Qr(m),v=Qr(v)}m=null}else m=null;p!==null&&dh(d,f,p,m,!1),y!==null&&w!==null&&dh(d,w,y,m,!0)}}e:{if(f=u?ls(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var b=w_;else if(rh(f))if(rg)b=S_;else{b=x_;var C=__}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(b=b_);if(b&&(b=b(t,u))){ng(d,b,n,c);break e}C&&C(t,f,u),t==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&Au(f,"number",f.value)}switch(C=u?ls(u):window,t){case"focusin":(rh(C)||C.contentEditable==="true")&&(os=C,Wu=u,Ri=null);break;case"focusout":Ri=Wu=os=null;break;case"mousedown":Hu=!0;break;case"contextmenu":case"mouseup":case"dragend":Hu=!1,lh(d,n,c);break;case"selectionchange":if(C_)break;case"keydown":case"keyup":lh(d,n,c)}var E;if(xd)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else is?eg(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Zm&&n.locale!=="ko"&&(is||T!=="onCompositionStart"?T==="onCompositionEnd"&&is&&(E=Xm()):(Wn=c,yd="value"in Wn?Wn.value:Wn.textContent,is=!0)),C=ka(u,T),0<C.length&&(T=new Zf(T,t,null,n,c),d.push({event:T,listeners:C}),E?T.data=E:(E=tg(n),E!==null&&(T.data=E)))),(E=p_?m_(t,n):g_(t,n))&&(u=ka(u,"onBeforeInput"),0<u.length&&(c=new Zf("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=E))}hg(d,e)})}function Ki(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ka(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ui(t,n),i!=null&&r.unshift(Ki(t,i,s)),i=Ui(t,e),i!=null&&r.push(Ki(t,i,s))),t=t.return}return r}function Qr(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function dh(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Ui(n,i),l!=null&&o.unshift(Ki(n,l,a))):s||(l=Ui(n,i),l!=null&&o.push(Ki(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var O_=/\r\n?/g,A_=/\u0000|\uFFFD/g;function fh(t){return(typeof t=="string"?t:""+t).replace(O_,` 39`).replace(A_,"")}function zo(t,e,n){if(e=fh(e),fh(t)!==e&&n)throw Error(O(425))}function Ca(){}var Vu=null,qu=null;function Ku(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Qu=typeof setTimeout=="function"?setTimeout:void 0,j_=typeof clearTimeout=="function"?clearTimeout:void 0,hh=typeof Promise=="function"?Promise:void 0,I_=typeof queueMicrotask=="function"?queueMicrotask:typeof hh<"u"?function(t){return hh.resolve(null).then(t).catch(N_)}:Qu;function N_(t){setTimeout(function(){throw t})}function Yl(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),Wi(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Wi(e)}function Gn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function ph(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Gs=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Gs,Qi="__reactProps$"+Gs,pn="__reactContainer$"+Gs,Gu="__reactEvents$"+Gs,L_="__reactListeners$"+Gs,$_="__reactHandles$"+Gs;function br(t){var e=t[Jt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[pn]||n[Jt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=ph(t);t!==null;){if(n=t[Jt])return n;t=ph(t)}return e}t=n,n=t.parentNode}return null}function vo(t){return t=t[Jt]||t[pn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ls(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(O(33))}function nl(t){return t[Qi]||null}var Yu=[],us=-1;function ur(t){return{current:t}}function fe(t){0>us||(t.current=Yu[us],Yu[us]=null,us--)}function le(t,e){us++,Yu[us]=t.current,t.current=e}var nr={},Be=ur(nr),et=ur(!1),Nr=nr;function Ms(t,e){var n=t.type.contextTypes;if(!n)return nr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function tt(t){return t=t.childContextTypes,t!=null}function Ta(){fe(et),fe(Be)}function mh(t,e,n){if(Be.current!==nr)throw Error(O(168));le(Be,e),le(et,n)}function mg(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(O(108,_w(t)||"Unknown",s));return ve({},n,r)}function Pa(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||nr,Nr=Be.current,le(Be,t),le(et,et.current),!0}function gh(t,e,n){var r=t.stateNode;if(!r)throw Error(O(169));n?(t=mg(t,e,Nr),r.__reactInternalMemoizedMergedChildContext=t,fe(et),fe(Be),le(Be,t)):fe(et),le(et,n)}var un=null,rl=!1,Jl=!1;function gg(t){un===null?un=[t]:un.push(t)}function D_(t){rl=!0,gg(t)}function cr(){if(!Jl&&un!==null){Jl=!0;var t=0,e=ie;try{var n=un;for(ie=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}un=null,rl=!1}catch(s){throw un!==null&&(un=un.slice(t+1)),zm(pd,cr),s}finally{ie=e,Jl=!1}}return null}var cs=[],ds=0,Ra=null,Oa=0,wt=[],_t=0,Lr=null,cn=1,dn="";function yr(t,e){cs[ds++]=Oa,cs[ds++]=Ra,Ra=t,Oa=e}function vg(t,e,n){wt[_t++]=cn,wt[_t++]=dn,wt[_t++]=Lr,Lr=t;var r=cn;t=dn;var s=32-Nt(r)-1;r&=~(1<<s),n+=1;var i=32-Nt(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,cn=1<<32-Nt(e)+s|n<<s|r,dn=i+t}else cn=1<<i|n<<s|r,dn=t}function Sd(t){t.return!==null&&(yr(t,1),vg(t,1,0))}function Ed(t){for(;t===Ra;)Ra=cs[--ds],cs[ds]=null,Oa=cs[--ds],cs[ds]=null;for(;t===Lr;)Lr=wt[--_t],wt[_t]=null,dn=wt[--_t],wt[_t]=null,cn=wt[--_t],wt[_t]=null}var dt=null,ct=null,he=!1,jt=null;function yg(t,e){var n=xt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function vh(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,dt=t,ct=Gn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,dt=t,ct=null,!0):!1;
vendor: 13,688 bytes, line 39
39case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Lr!==null?{id:cn,overflow:dn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,dt=t,ct=null,!0):!1;default:return!1}}function Ju(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Xu(t){if(he){var e=ct;if(e){var n=e;if(!vh(t,e)){if(Ju(t))throw Error(O(418));e=Gn(n.nextSibling);var r=dt;e&&vh(t,e)?yg(r,n):(t.flags=t.flags&-4097|2,he=!1,dt=t)}}else{if(Ju(t))throw Error(O(418));t.flags=t.flags&-4097|2,he=!1,dt=t}}}function yh(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;dt=t}function Bo(t){if(t!==dt)return!1;if(!he)return yh(t),he=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Ku(t.type,t.memoizedProps)),e&&(e=ct)){if(Ju(t))throw wg(),Error(O(418));for(;e;)yg(t,e),e=Gn(e.nextSibling)}if(yh(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(O(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){ct=Gn(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}ct=null}}else ct=dt?Gn(t.stateNode.nextSibling):null;return!0}function wg(){for(var t=ct;t;)t=Gn(t.nextSibling)}function Fs(){ct=dt=null,he=!1}function kd(t){jt===null?jt=[t]:jt.push(t)}var M_=wn.ReactCurrentBatchConfig;function di(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,t))}return t}function Wo(t,e){throw t=Object.prototype.toString.call(e),Error(O(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function wh(t){var e=t._init;return e(t._payload)}function _g(t){function e(v,h){if(t){var g=v.deletions;g===null?(v.deletions=[h],v.flags|=16):g.push(h)}}function n(v,h){if(!t)return null;for(;h!==null;)e(v,h),h=h.sibling;return null}function r(v,h){for(v=new Map;h!==null;)h.key!==null?v.set(h.key,h):v.set(h.index,h),h=h.sibling;return v}function s(v,h){return v=Zn(v,h),v.index=0,v.sibling=null,v}function i(v,h,g){return v.index=g,t?(g=v.alternate,g!==null?(g=g.index,g<h?(v.flags|=2,h):g):(v.flags|=2,h)):(v.flags|=1048576,h)}function o(v){return t&&v.alternate===null&&(v.flags|=2),v}function a(v,h,g,x){return h===null||h.tag!==6?(h=su(g,v.mode,x),h.return=v,h):(h=s(h,g),h.return=v,h)}function l(v,h,g,x){var b=g.type;return b===ss?c(v,h,g.props.children,x,g.key):h!==null&&(h.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===An&&wh(b)===h.type)?(x=s(h,g.props),x.ref=di(v,h,g),x.return=v,x):(x=pa(g.type,g.key,g.props,null,v.mode,x),x.ref=di(v,h,g),x.return=v,x)}function u(v,h,g,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=iu(g,v.mode,x),h.return=v,h):(h=s(h,g.children||[]),h.return=v,h)}function c(v,h,g,x,b){return h===null||h.tag!==7?(h=Ir(g,v.mode,x,b),h.return=v,h):(h=s(h,g),h.return=v,h)}function d(v,h,g){if(typeof h=="string"&&h!==""||typeof h=="number")return h=su(""+h,v.mode,g),h.return=v,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case jo:return g=pa(h.type,h.key,h.props,null,v.mode,g),g.ref=di(v,null,h),g.return=v,g;case rs:return h=iu(h,v.mode,g),h.return=v,h;case An:var x=h._init;return d(v,x(h._payload),g)}if(_i(h)||oi(h))return h=Ir(h,v.mode,g,null),h.return=v,h;Wo(v,h)}return null}function f(v,h,g,x){var b=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return b!==null?null:a(v,h,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case jo:return g.key===b?l(v,h,g,x):null;case rs:return g.key===b?u(v,h,g,x):null;case An:return b=g._init,f(v,h,b(g._payload),x)}if(_i(g)||oi(g))return b!==null?null:c(v,h,g,x,null);Wo(v,g)}return null}function p(v,h,g,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return v=v.get(g)||null,a(h,v,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case jo:return v=v.get(x.key===null?g:x.key)||null,l(h,v,x,b);case rs:return v=v.get(x.key===null?g:x.key)||null,u(h,v,x,b);case An:var C=x._init;return p(v,h,g,C(x._payload),b)}if(_i(x)||oi(x))return v=v.get(g)||null,c(h,v,x,b,null);Wo(h,x)}return null}function y(v,h,g,x){for(var b=null,C=null,E=h,T=h=0,R=null;E!==null&&T<g.length;T++){E.index>T?(R=E,E=null):R=E.sibling;var A=f(v,E,g[T],x);if(A===null){E===null&&(E=R);break}t&&E&&A.alternate===null&&e(v,E),h=i(A,h,T),C===null?b=A:C.sibling=A,C=A,E=R}if(T===g.length)return n(v,E),he&&yr(v,T),b;if(E===null){for(;T<g.length;T++)E=d(v,g[T],x),E!==null&&(h=i(E,h,T),C===null?b=E:C.sibling=E,C=E);return he&&yr(v,T),b}for(E=r(v,E);T<g.length;T++)R=p(E,v,T,g[T],x),R!==null&&(t&&R.alternate!==null&&E.delete(R.key===null?T:R.key),h=i(R,h,T),C===null?b=R:C.sibling=R,C=R);return t&&E.forEach(function(F){return e(v,F)}),he&&yr(v,T),b}function m(v,h,g,x){var b=oi(g);if(typeof b!="function")throw Error(O(150));if(g=b.call(g),g==null)throw Error(O(151));for(var C=b=null,E=h,T=h=0,R=null,A=g.next();E!==null&&!A.done;T++,A=g.next()){E.index>T?(R=E,E=null):R=E.sibling;var F=f(v,E,A.value,x);if(F===null){E===null&&(E=R);break}t&&E&&F.alternate===null&&e(v,E),h=i(F,h,T),C===null?b=F:C.sibling=F,C=F,E=R}if(A.done)return n(v,E),he&&yr(v,T),b;if(E===null){for(;!A.done;T++,A=g.next())A=d(v,A.value,x),A!==null&&(h=i(A,h,T),C===null?b=A:C.sibling=A,C=A);return he&&yr(v,T),b}for(E=r(v,E);!A.done;T++,A=g.next())A=p(E,v,T,A.value,x),A!==null&&(t&&A.alternate!==null&&E.delete(A.key===null?T:A.key),h=i(A,h,T),C===null?b=A:C.sibling=A,C=A);return t&&E.forEach(function(D){return e(v,D)}),he&&yr(v,T),b}function w(v,h,g,x){if(typeof g=="object"&&g!==null&&g.type===ss&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case jo:e:{for(var b=g.key,C=h;C!==null;){if(C.key===b){if(b=g.type,b===ss){if(C.tag===7){n(v,C.sibling),h=s(C,g.props.children),h.return=v,v=h;break e}}else if(C.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===An&&wh(b)===C.type){n(v,C.sibling),h=s(C,g.props),h.ref=di(v,C,g),h.return=v,v=h;break e}n(v,C);break}else e(v,C);C=C.sibling}g.type===ss?(h=Ir(g.props.children,v.mode,x,g.key),h.return=v,v=h):(x=pa(g.type,g.key,g.props,null,v.mode,x),x.ref=di(v,h,g),x.return=v,v=x)}return o(v);case rs:e:{for(C=g.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(v,h.sibling),h=s(h,g.children||[]),h.return=v,v=h;break e}else{n(v,h);break}else e(v,h);h=h.sibling}h=iu(g,v.mode,x),h.return=v,v=h}return o(v);case An:return C=g._init,w(v,h,C(g._payload),x)}if(_i(g))return y(v,h,g,x);if(oi(g))return m(v,h,g,x);Wo(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(v,h.sibling),h=s(h,g),h.return=v,v=h):(n(v,h),h=su(g,v.mode,x),h.return=v,v=h),o(v)):n(v,h)}return w}var Us=_g(!0),xg=_g(!1),Aa=ur(null),ja=null,fs=null,Cd=null;function Td(){Cd=fs=ja=null}function Pd(t){var e=Aa.current;fe(Aa),t._currentValue=e}function Zu(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ws(t,e){ja=t,Cd=fs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Ze=!0),t.firstContext=null)}function Et(t){var e=t._currentValue;if(Cd!==t)if(t={context:t,memoizedValue:e,next:null},fs===null){if(ja===null)throw Error(O(308));fs=t,ja.dependencies={lanes:0,firstContext:t}}else fs=fs.next=t;return e}var Sr=null;function Rd(t){Sr===null?Sr=[t]:Sr.push(t)}function bg(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Rd(e)):(n.next=s.next,s.next=n),e.interleaved=n,mn(t,r)}function mn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var jn=!1;function Od(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sg(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function fn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Yn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,mn(t,n)}return s=r.interleaved,s===null?(e.next=e,Rd(r)):(e.next=s.next,s.next=e),r.interleaved=e,mn(t,n)}function la(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,md(t,n)}}function _h(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ia(t,e,n,r){var s=t.updateQueue;jn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,m=a;switch(f=e,p=n,m.tag){case 1:if(y=m.payload,typeof y=="function"){d=y.call(p,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,f=typeof y=="function"?y.call(p,d,f):y,f==null)break e;d=ve({},d,f);break e;case 2:jn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Dr|=o,t.lanes=o,t.memoizedState=d}}function xh(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(O(191,s));s.call(r)}}}var yo={},Zt=ur(yo),Gi=ur(yo),Yi=ur(yo);function Er(t){if(t===yo)throw Error(O(174));return t}function Ad(t,e){switch(le(Yi,e),le(Gi,t),le(Zt,yo),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Iu(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Iu(e,t)}fe(Zt),le(Zt,e)}function zs(){fe(Zt),fe(Gi),fe(Yi)}function Eg(t){Er(Yi.current);var e=Er(Zt.current),n=Iu(e,t.type);e!==n&&(le(Gi,t),le(Zt,n))}function jd(t){Gi.current===t&&(fe(Zt),fe(Gi))}var me=ur(0);function Na(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Xl=[];function Id(){for(var t=0;t<Xl.length;t++)Xl[t]._workInProgressVersionPrimary=null;Xl.length=0}var ua=wn.ReactCurrentDispatcher,Zl=wn.ReactCurrentBatchConfig,$r=0,ge=null,ke=null,Pe=null,La=!1,Oi=!1,Ji=0,F_=0;function De(){throw Error(O(321))}function Nd(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!$t(t[n],e[n]))return!1;return!0}function Ld(t,e,n,r,s,i){if($r=i,ge=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ua.current=t===null||t.memoizedState===null?W_:H_,t=n(r,s),Oi){i=0;do{if(Oi=!1,Ji=0,25<=i)throw Error(O(301));i+=1,Pe=ke=null,e.updateQueue=null,ua.current=V_,t=n(r,s)}while(Oi)}if(ua.current=$a,e=ke!==null&&ke.next!==null,$r=0,Pe=ke=ge=null,La=!1,e)throw Error(O(300));return t}function $d(){var t=Ji!==0;return Ji=0,t}function Vt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?ge.memoizedState=Pe=t:Pe=Pe.next=t,Pe}function kt(){if(ke===null){var t=ge.alternate;t=t!==null?t.memoizedState:null}else t=ke.next;var e=Pe===null?ge.memoizedState:Pe.next;if(e!==null)Pe=e,ke=t;else{if(t===null)throw Error(O(310));ke=t,t={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Pe===null?ge.memoizedState=Pe=t:Pe=Pe.next=t}return Pe}function Xi(t,e){return typeof e=="function"?e(t):e}function eu(t){var e=kt(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=ke,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;
vendor: 5,484 bytes, line 39
39if(($r&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ge.lanes|=c,Dr|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,$t(r,e.memoizedState)||(Ze=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,ge.lanes|=i,Dr|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function tu(t){var e=kt(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);$t(i,e.memoizedState)||(Ze=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function kg(){}function Cg(t,e){var n=ge,r=kt(),s=e(),i=!$t(r.memoizedState,s);if(i&&(r.memoizedState=s,Ze=!0),r=r.queue,Dd(Rg.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Pe!==null&&Pe.memoizedState.tag&1){if(n.flags|=2048,Zi(9,Pg.bind(null,n,r,s,e),void 0,null),Re===null)throw Error(O(349));$r&30||Tg(n,e,s)}return s}function Tg(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ge.updateQueue,e===null?(e={lastEffect:null,stores:null},ge.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Pg(t,e,n,r){e.value=n,e.getSnapshot=r,Og(e)&&Ag(t)}function Rg(t,e,n){return n(function(){Og(e)&&Ag(t)})}function Og(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!$t(t,n)}catch{return!0}}function Ag(t){var e=mn(t,1);e!==null&&Lt(e,t,1,-1)}function bh(t){var e=Vt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:t},e.queue=t,t=t.dispatch=B_.bind(null,ge,t),[e.memoizedState,t]}function Zi(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ge.updateQueue,e===null?(e={lastEffect:null,stores:null},ge.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function jg(){return kt().memoizedState}function ca(t,e,n,r){var s=Vt();ge.flags|=t,s.memoizedState=Zi(1|e,n,void 0,r===void 0?null:r)}function sl(t,e,n,r){var s=kt();r=r===void 0?null:r;var i=void 0;if(ke!==null){var o=ke.memoizedState;if(i=o.destroy,r!==null&&Nd(r,o.deps)){s.memoizedState=Zi(e,n,i,r);return}}ge.flags|=t,s.memoizedState=Zi(1|e,n,i,r)}function Sh(t,e){return ca(8390656,8,t,e)}function Dd(t,e){return sl(2048,8,t,e)}function Ig(t,e){return sl(4,2,t,e)}function Ng(t,e){return sl(4,4,t,e)}function Lg(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function $g(t,e,n){return n=n!=null?n.concat([t]):null,sl(4,4,Lg.bind(null,e,t),n)}function Md(){}function Dg(t,e){var n=kt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Nd(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Mg(t,e){var n=kt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Nd(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Fg(t,e,n){return $r&21?($t(n,e)||(n=Hm(),ge.lanes|=n,Dr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Ze=!0),t.memoizedState=n)}function U_(t,e){var n=ie;ie=n!==0&&4>n?n:4,t(!0);var r=Zl.transition;Zl.transition={};try{t(!1),e()}finally{ie=n,Zl.transition=r}}function Ug(){return kt().memoizedState}function z_(t,e,n){var r=Xn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zg(t))Bg(e,n);else if(n=bg(t,e,n,r),n!==null){var s=qe();Lt(n,t,r,s),Wg(n,e,r)}}function B_(t,e,n){var r=Xn(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zg(t))Bg(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,$t(a,o)){var l=e.interleaved;l===null?(s.next=s,Rd(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=bg(t,e,s,r),n!==null&&(s=qe(),Lt(n,t,r,s),Wg(n,e,r))}}function zg(t){var e=t.alternate;return t===ge||e!==null&&e===ge}function Bg(t,e){Oi=La=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Wg(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,md(t,n)}}var $a={readContext:Et,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},W_={readContext:Et,useCallback:function(t,e){return Vt().memoizedState=[t,e===void 0?null:e],t},useContext:Et,useEffect:Sh,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,ca(4194308,4,Lg.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ca(4194308,4,t,e)},useInsertionEffect:function(t,e){return ca(4,2,t,e)},useMemo:function(t,e){var n=Vt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Vt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=z_.bind(null,ge,t),[r.memoizedState,t]}
vendor: 7,431 bytes, lines 39-41
39,useRef:function(t){var e=Vt();return t={current:t},e.memoizedState=t},useState:bh,useDebugValue:Md,useDeferredValue:function(t){return Vt().memoizedState=t},useTransition:function(){var t=bh(!1),e=t[0];return t=U_.bind(null,t[1]),Vt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ge,s=Vt();if(he){if(n===void 0)throw Error(O(407));n=n()}else{if(n=e(),Re===null)throw Error(O(349));$r&30||Tg(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,Sh(Rg.bind(null,r,i,t),[t]),r.flags|=2048,Zi(9,Pg.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Vt(),e=Re.identifierPrefix;if(he){var n=dn,r=cn;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Ji++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=F_++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},H_={readContext:Et,useCallback:Dg,useContext:Et,useEffect:Dd,useImperativeHandle:$g,useInsertionEffect:Ig,useLayoutEffect:Ng,useMemo:Mg,useReducer:eu,useRef:jg,useState:function(){return eu(Xi)},useDebugValue:Md,useDeferredValue:function(t){var e=kt();return Fg(e,ke.memoizedState,t)},useTransition:function(){var t=eu(Xi)[0],e=kt().memoizedState;return[t,e]},useMutableSource:kg,useSyncExternalStore:Cg,useId:Ug,unstable_isNewReconciler:!1},V_={readContext:Et,useCallback:Dg,useContext:Et,useEffect:Dd,useImperativeHandle:$g,useInsertionEffect:Ig,useLayoutEffect:Ng,useMemo:Mg,useReducer:tu,useRef:jg,useState:function(){return tu(Xi)},useDebugValue:Md,useDeferredValue:function(t){var e=kt();return ke===null?e.memoizedState=t:Fg(e,ke.memoizedState,t)},useTransition:function(){var t=tu(Xi)[0],e=kt().memoizedState;return[t,e]},useMutableSource:kg,useSyncExternalStore:Cg,useId:Ug,unstable_isNewReconciler:!1};function Pt(t,e){if(t&&t.defaultProps){e=ve({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function ec(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ve({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var il={isMounted:function(t){return(t=t._reactInternals)?Br(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=qe(),s=Xn(t),i=fn(r,s);i.payload=e,n!=null&&(i.callback=n),e=Yn(t,i,s),e!==null&&(Lt(e,t,s,r),la(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=qe(),s=Xn(t),i=fn(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Yn(t,i,s),e!==null&&(Lt(e,t,s,r),la(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=qe(),r=Xn(t),s=fn(n,r);s.tag=2,e!=null&&(s.callback=e),e=Yn(t,s,r),e!==null&&(Lt(e,t,r,n),la(e,t,r))}};function Eh(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!Vi(n,r)||!Vi(s,i):!0}function Hg(t,e,n){var r=!1,s=nr,i=e.contextType;return typeof i=="object"&&i!==null?i=Et(i):(s=tt(e)?Nr:Be.current,r=e.contextTypes,i=(r=r!=null)?Ms(t,s):nr),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=il,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function kh(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&il.enqueueReplaceState(e,e.state,null)}function tc(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},Od(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Et(i):(i=tt(e)?Nr:Be.current,s.context=Ms(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(ec(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&il.enqueueReplaceState(s,s.state,null),Ia(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Bs(t,e){try{var n="",r=e;do n+=ww(r),r=r.return;while(r);var s=n}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:t,source:e,stack:s,digest:null}}function nu(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function nc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var q_=typeof WeakMap=="function"?WeakMap:Map;function Vg(t,e,n){n=fn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ma||(Ma=!0,fc=r),nc(t,e)},n}function qg(t,e,n){n=fn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){nc(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){nc(t,e),typeof r!="function"&&(Jn===null?Jn=new Set([this]):Jn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Ch(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new q_;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=ox.bind(null,t,e,n),e.then(t,t))}function Th(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Ph(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=fn(-1,1),e.tag=2,Yn(n,e,1))),n.lanes|=1),t)}var K_=wn.ReactCurrentOwner,Ze=!1;function Ve(t,e,n,r){e.child=t===null?xg(e,null,n,r):Us(e,t.child,n,r)}function Rh(t,e,n,r,s){n=n.render;var i=e.ref;return ws(e,s),r=Ld(t,e,n,r,i,s),n=$d(),t!==null&&!Ze?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,gn(t,e,s)):(he&&n&&Sd(e),e.flags|=1,Ve(t,e,r,s),e.child)}function Oh(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!qd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,Kg(t,e,i,r,s)):(t=pa(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Vi,n(o,r)&&t.ref===e.ref)return gn(t,e,s)}return e.flags|=1,t=Zn(i,r),t.ref=e.ref,t.return=e,e.child=t}function Kg(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(Vi(i,r)&&t.ref===e.ref)if(Ze=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(Ze=!0);else return e.lanes=t.lanes,gn(t,e,s)}return rc(t,e,n,r,s)}function Qg(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(ps,lt),lt|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,le(ps,lt),lt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,le(ps,lt),lt|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,le(ps,lt),lt|=r;return Ve(t,e,s,n),e.child}function Gg(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 7,194 bytes, line 41
41function rc(t,e,n,r,s){var i=tt(n)?Nr:Be.current;return i=Ms(e,i),ws(e,s),n=Ld(t,e,n,r,i,s),r=$d(),t!==null&&!Ze?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,gn(t,e,s)):(he&&r&&Sd(e),e.flags|=1,Ve(t,e,n,s),e.child)}function Ah(t,e,n,r,s){if(tt(n)){var i=!0;Pa(e)}else i=!1;if(ws(e,s),e.stateNode===null)da(t,e),Hg(e,n,r),tc(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Et(u):(u=tt(n)?Nr:Be.current,u=Ms(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&kh(e,o,r,u),jn=!1;var f=e.memoizedState;o.state=f,Ia(e,r,o,s),l=e.memoizedState,a!==r||f!==l||et.current||jn?(typeof c=="function"&&(ec(e,n,c,r),l=e.memoizedState),(a=jn||Eh(e,n,a,r,f,l,u))?(d||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"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,Sg(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Pt(e.type,a),o.props=u,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Et(l):(l=tt(n)?Nr:Be.current,l=Ms(e,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&kh(e,o,r,l),jn=!1,f=e.memoizedState,o.state=f,Ia(e,r,o,s);var y=e.memoizedState;a!==d||f!==y||et.current||jn?(typeof p=="function"&&(ec(e,n,p,r),y=e.memoizedState),(u=jn||Eh(e,n,u,r,f,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),o.props=r,o.state=y,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return sc(t,e,n,r,i,s)}function sc(t,e,n,r,s,i){Gg(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&gh(e,n,!1),gn(t,e,i);r=e.stateNode,K_.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Us(e,t.child,null,i),e.child=Us(e,null,a,i)):Ve(t,e,a,i),e.memoizedState=r.state,s&&gh(e,n,!0),e.child}function Yg(t){var e=t.stateNode;e.pendingContext?mh(t,e.pendingContext,e.pendingContext!==e.context):e.context&&mh(t,e.context,!1),Ad(t,e.containerInfo)}function jh(t,e,n,r,s){return Fs(),kd(s),e.flags|=256,Ve(t,e,n,r),e.child}var ic={dehydrated:null,treeContext:null,retryLane:0};function oc(t){return{baseLanes:t,cachePool:null,transitions:null}}function Jg(t,e,n){var r=e.pendingProps,s=me.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),le(me,s&1),t===null)return Xu(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ll(o,r,0,null),t=Ir(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=oc(n),e.memoizedState=ic,t):Fd(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Q_(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Zn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Zn(a,i):(i=Ir(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?oc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=ic,r}return i=t.child,t=i.sibling,r=Zn(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Fd(t,e){return e=ll({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ho(t,e,n,r){return r!==null&&kd(r),Us(e,t.child,null,n),t=Fd(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Q_(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=nu(Error(O(422))),Ho(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=ll({mode:"visible",children:r.children},s,0,null),i=Ir(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&Us(e,t.child,null,o),e.child.memoizedState=oc(o),e.memoizedState=ic,i);if(!(e.mode&1))return Ho(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(O(419)),r=nu(i,r,void 0),Ho(t,e,o,r)}if(a=(o&t.childLanes)!==0,Ze||a){if(r=Re,r!==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&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mn(t,s),Lt(r,t,s,-1))}return Vd(),r=nu(Error(O(421))),Ho(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=ax.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,ct=Gn(s.nextSibling),dt=e,he=!0,jt=null,t!==null&&(wt[_t++]=cn,wt[_t++]=dn,wt[_t++]=Lr,cn=t.id,dn=t.overflow,Lr=e),e=Fd(e,r.children),e.flags|=4096,e)}function Ih(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Zu(t.return,e,n)}function ru(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Xg(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Ve(t,e,r.children,n),r=me.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ih(t,n,e);
vendor: 4,892 bytes, line 41
41else if(t.tag===19)Ih(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(le(me,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Na(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),ru(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Na(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}ru(e,!0,n,null,i);break;case"together":ru(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function da(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function gn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Dr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(O(153));if(e.child!==null){for(t=e.child,n=Zn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Zn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function G_(t,e,n){switch(e.tag){case 3:Yg(e),Fs();break;case 5:Eg(e);break;case 1:tt(e.type)&&Pa(e);break;case 4:Ad(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;le(Aa,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(le(me,me.current&1),e.flags|=128,null):n&e.child.childLanes?Jg(t,e,n):(le(me,me.current&1),t=gn(t,e,n),t!==null?t.sibling:null);le(me,me.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return Xg(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),le(me,me.current),r)break;return null;case 22:case 23:return e.lanes=0,Qg(t,e,n)}return gn(t,e,n)}var Zg,ac,ev,tv;Zg=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ac=function(){};ev=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Er(Zt.current);var i=null;switch(n){case"input":s=Ru(t,s),r=Ru(t,r),i=[];break;case"select":s=ve({},s,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":s=ju(t,s),r=ju(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Ca)}Nu(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Mi.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Mi.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&de("scroll",t),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};tv=function(t,e,n,r){n!==r&&(e.flags|=4)};function fi(t,e){if(!he)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Me(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Y_(t,e,n){var r=e.pendingProps;switch(Ed(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(e),null;case 1:return tt(e.type)&&Ta(),Me(e),null;case 3:return r=e.stateNode,zs(),fe(et),fe(Be),Id(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Bo(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,jt!==null&&(mc(jt),jt=null))),ac(t,e),Me(e),null;case 5:jd(e);
vendor: 30,959 bytes, line 41
41var s=Er(Yi.current);if(n=e.type,t!==null&&e.stateNode!=null)ev(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(O(166));return Me(e),null}if(t=Er(Zt.current),Bo(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[Jt]=e,r[Qi]=i,t=(e.mode&1)!==0,n){case"dialog":de("cancel",r),de("close",r);break;case"iframe":case"object":case"embed":de("load",r);break;case"video":case"audio":for(s=0;s<bi.length;s++)de(bi[s],r);break;case"source":de("error",r);break;case"img":case"image":case"link":de("error",r),de("load",r);break;case"details":de("toggle",r);break;case"input":Bf(r,i),de("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},de("invalid",r);break;case"textarea":Hf(r,i),de("invalid",r)}Nu(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&zo(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&zo(r.textContent,a,t),s=["children",""+a]):Mi.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&de("scroll",r)}switch(n){case"input":Io(r),Wf(r,i,!0);break;case"textarea":Io(r),Vf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ca)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Rm(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Jt]=e,t[Qi]=r,Zg(t,e,!1,!1),e.stateNode=t;e:{switch(o=Lu(n,r),n){case"dialog":de("cancel",t),de("close",t),s=r;break;case"iframe":case"object":case"embed":de("load",t),s=r;break;case"video":case"audio":for(s=0;s<bi.length;s++)de(bi[s],t);s=r;break;case"source":de("error",t),s=r;break;case"img":case"image":case"link":de("error",t),de("load",t),s=r;break;case"details":de("toggle",t),s=r;break;case"input":Bf(t,r),s=Ru(t,r),de("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=ve({},r,{value:void 0}),de("invalid",t);break;case"textarea":Hf(t,r),s=ju(t,r),de("invalid",t);break;default:s=r}Nu(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?jm(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Om(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Fi(t,l):typeof l=="number"&&Fi(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Mi.hasOwnProperty(i)?l!=null&&i==="onScroll"&&de("scroll",t):l!=null&&ud(t,i,l,o))}switch(n){case"input":Io(t),Wf(t,r,!1);break;case"textarea":Io(t),Vf(t);break;case"option":r.value!=null&&t.setAttribute("value",""+tr(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?ms(t,!!r.multiple,i,!1):r.defaultValue!=null&&ms(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Ca)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Me(e),null;case 6:if(t&&e.stateNode!=null)tv(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(O(166));if(n=Er(Yi.current),Er(Zt.current),Bo(e)){if(r=e.stateNode,n=e.memoizedProps,r[Jt]=e,(i=r.nodeValue!==n)&&(t=dt,t!==null))switch(t.tag){case 3:zo(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&zo(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Jt]=e,e.stateNode=r}return Me(e),null;case 13:if(fe(me),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(he&&ct!==null&&e.mode&1&&!(e.flags&128))wg(),Fs(),e.flags|=98560,i=!1;else if(i=Bo(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(O(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[Jt]=e}else Fs(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Me(e),i=!1}else jt!==null&&(mc(jt),jt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||me.current&1?Te===0&&(Te=3):Vd())),e.updateQueue!==null&&(e.flags|=4),Me(e),null);case 4:return zs(),ac(t,e),t===null&&qi(e.stateNode.containerInfo),Me(e),null;case 10:return Pd(e.type._context),Me(e),null;case 17:return tt(e.type)&&Ta(),Me(e),null;case 19:if(fe(me),i=e.memoizedState,i===null)return Me(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)fi(i,!1);else{if(Te!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Na(t),o!==null){for(e.flags|=128,fi(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,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,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return le(me,me.current&1|2),e.child}t=t.sibling}i.tail!==null&&_e()>Ws&&(e.flags|=128,r=!0,fi(i,!1),e.lanes=4194304)}else{if(!r)if(t=Na(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),fi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!he)return Me(e),null}else 2*_e()-i.renderingStartTime>Ws&&n!==1073741824&&(e.flags|=128,r=!0,fi(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=_e(),e.sibling=null,n=me.current,le(me,r?n&1|2:n&1),e):(Me(e),null);case 22:case 23:return Hd(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?lt&1073741824&&(Me(e),e.subtreeFlags&6&&(e.flags|=8192)):Me(e),null;case 24:return null;case 25:return null}throw Error(O(156,e.tag))}function J_(t,e){switch(Ed(e),e.tag){case 1:return tt(e.type)&&Ta(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return zs(),fe(et),fe(Be),Id(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return jd(e),null;case 13:if(fe(me),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(O(340));Fs()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return fe(me),null;case 4:return zs(),null;case 10:return Pd(e.type._context),null;case 22:case 23:return Hd(),null;case 24:return null;default:return null}}var Vo=!1,ze=!1,X_=typeof WeakSet=="function"?WeakSet:Set,L=null;function hs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(t,e,r)}else n.current=null}function lc(t,e,n){try{n()}catch(r){we(t,e,r)}}var Nh=!1;function Z_(t,e){if(Vu=Sa,t=og(),bd(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===t)break t;if(f===n&&++u===s&&(a=o),f===i&&++c===r&&(l=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(qu={focusedElem:t,selectionRange:n},Sa=!1,L=e;L!==null;)if(e=L,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,L=t;else for(;L!==null;){e=L;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,w=y.memoizedState,v=e.stateNode,h=v.getSnapshotBeforeUpdate(e.elementType===e.type?m:Pt(e.type,m),w);v.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=e.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(x){we(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,L=t;break}L=e.return}return y=Nh,Nh=!1,y}function Ai(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&lc(e,n,i)}s=s.next}while(s!==r)}}function ol(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function uc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function nv(t){var e=t.alternate;e!==null&&(t.alternate=null,nv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Jt],delete e[Qi],delete e[Gu],delete e[L_],delete e[$_])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function rv(t){return t.tag===5||t.tag===3||t.tag===4}function Lh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||rv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function cc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ca));else if(r!==4&&(t=t.child,t!==null))for(cc(t,e,n),t=t.sibling;t!==null;)cc(t,e,n),t=t.sibling}function dc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(dc(t,e,n),t=t.sibling;t!==null;)dc(t,e,n),t=t.sibling}var je=null,Ot=!1;function kn(t,e,n){for(n=n.child;n!==null;)sv(t,e,n),n=n.sibling}function sv(t,e,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(Xa,n)}catch{}switch(n.tag){case 5:ze||hs(n,e);case 6:var r=je,s=Ot;je=null,kn(t,e,n),je=r,Ot=s,je!==null&&(Ot?(t=je,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(Ot?(t=je,n=n.stateNode,t.nodeType===8?Yl(t.parentNode,n):t.nodeType===1&&Yl(t,n),Wi(t)):Yl(je,n.stateNode));break;case 4:r=je,s=Ot,je=n.stateNode.containerInfo,Ot=!0,kn(t,e,n),je=r,Ot=s;break;case 0:case 11:case 14:case 15:if(!ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&lc(n,e,o),s=s.next}while(s!==r)}kn(t,e,n);break;case 1:if(!ze&&(hs(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){we(n,e,a)}kn(t,e,n);break;case 21:kn(t,e,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,kn(t,e,n),ze=r):kn(t,e,n);break;default:kn(t,e,n)}}function $h(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new X_),e.forEach(function(r){var s=lx.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Tt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:je=a.stateNode,Ot=!1;break e;case 3:je=a.stateNode.containerInfo,Ot=!0;break e;case 4:je=a.stateNode.containerInfo,Ot=!0;break e}a=a.return}if(je===null)throw Error(O(160));sv(i,o,s),je=null,Ot=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){we(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)iv(e,t),e=e.sibling}function iv(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Tt(e,t),Wt(t),r&4){try{Ai(3,t,t.return),ol(3,t)}catch(m){we(t,t.return,m)}try{Ai(5,t,t.return)}catch(m){we(t,t.return,m)}}break;case 1:Tt(e,t),Wt(t),r&512&&n!==null&&hs(n,n.return);break;case 5:if(Tt(e,t),Wt(t),r&512&&n!==null&&hs(n,n.return),t.flags&32){var s=t.stateNode;try{Fi(s,"")}catch(m){we(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Tm(s,i),Lu(a,o);var u=Lu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?jm(s,d):c==="dangerouslySetInnerHTML"?Om(s,d):c==="children"?Fi(s,d):ud(s,c,d,u)}switch(a){case"input":Ou(s,i);break;case"textarea":Pm(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ms(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?ms(s,!!i.multiple,i.defaultValue,!0):ms(s,!!i.multiple,i.multiple?[]:"",!1))}s[Qi]=i}catch(m){we(t,t.return,m)}}break;case 6:if(Tt(e,t),Wt(t),r&4){if(t.stateNode===null)throw Error(O(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){we(t,t.return,m)}}break;case 3:if(Tt(e,t),Wt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wi(e.containerInfo)}catch(m){we(t,t.return,m)}break;case 4:Tt(e,t),Wt(t);break;case 13:Tt(e,t),Wt(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Bd=_e())),r&4&&$h(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(ze=(u=ze)||c,Tt(e,t),ze=u):Tt(e,t),Wt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(L=t,c=t.child;c!==null;){for(d=L=c;L!==null;){switch(f=L,p=f.child,f.tag){case 0:case 11:case 14:case 15:Ai(4,f,f.return);break;case 1:hs(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(m){we(r,n,m)}}break;case 5:hs(f,f.return);break;case 22:if(f.memoizedState!==null){Mh(d);continue}}p!==null?(p.return=f,L=p):Mh(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Am("display",o))}catch(m){we(t,t.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){we(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Tt(e,t),Wt(t),r&4&&$h(t);break;case 21:break;default:Tt(e,t),Wt(t)}}function Wt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(rv(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Fi(s,""),r.flags&=-33);var i=Lh(t);dc(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Lh(t);cc(t,a,o);break;default:throw Error(O(161))}}catch(l){we(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function ex(t,e,n){L=t,ov(t)}function ov(t,e,n){for(var r=(t.mode&1)!==0;L!==null;){var s=L,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Vo;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ze;a=Vo;var u=ze;if(Vo=o,(ze=l)&&!u)for(L=s;L!==null;)o=L,l=o.child,o.tag===22&&o.memoizedState!==null?Fh(s):l!==null?(l.return=o,L=l):Fh(s);for(;i!==null;)L=i,ov(i),i=i.sibling;L=s,Vo=a,ze=u}Dh(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,L=i):Dh(t)}}function Dh(t){for(;L!==null;){var e=L;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ze||ol(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!ze)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Pt(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&xh(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}xh(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Wi(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}ze||e.flags&512&&uc(e)}catch(f){we(e,e.return,f)}}if(e===t){L=null;break}if(n=e.sibling,n!==null){n.return=e.return,L=n;break}L=e.return}}function Mh(t){for(;L!==null;){var e=L;if(e===t){L=null;break}var n=e.sibling;if(n!==null){n.return=e.return,L=n;break}L=e.return}}function Fh(t){for(;L!==null;){var e=L;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{ol(4,e)}catch(l){we(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){we(e,s,l)}}var i=e.return;try{uc(e)}catch(l){we(e,i,l)}break;case 5:var o=e.return;try{uc(e)}catch(l){we(e,o,l)}}}catch(l){we(e,e.return,l)}if(e===t){L=null;break}var a=e.sibling;if(a!==null){a.return=e.return,L=a;break}L=e.return}}var tx=Math.ceil,Da=wn.ReactCurrentDispatcher,Ud=wn.ReactCurrentOwner,bt=wn.ReactCurrentBatchConfig,ne=0,Re=null,Se=null,Ne=0,lt=0,ps=ur(0),Te=0,eo=null,Dr=0,al=0,zd=0,ji=null,Je=null,Bd=0,Ws=1/0,an=null,Ma=!1,fc=null,Jn=null,qo=!1,Hn=null,Fa=0,Ii=0,hc=null,fa=-1,ha=0;function qe(){return ne&6?_e():fa!==-1?fa:fa=_e()}function Xn(t){return t.mode&1?ne&2&&Ne!==0?Ne&-Ne:M_.transition!==null?(ha===0&&(ha=Hm()),ha):(t=ie,t!==0||(t=window.event,t=t===void 0?16:Jm(t.type)),t):1}function Lt(t,e,n,r){if(50<Ii)throw Ii=0,hc=null,Error(O(185));mo(t,n,r),(!(ne&2)||t!==Re)&&(t===Re&&(!(ne&2)&&(al|=n),Te===4&&Nn(t,Ne)),nt(t,r),n===1&&ne===0&&!(e.mode&1)&&(Ws=_e()+500,rl&&cr()))}function nt(t,e){var n=t.callbackNode;Mw(t,e);var r=ba(t,t===Re?Ne:0);if(r===0)n!==null&&Qf(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Qf(n),e===1)t.tag===0?D_(Uh.bind(null,t)):gg(Uh.bind(null,t)),I_(function(){!(ne&6)&&cr()}),n=null;else{switch(Vm(r)){case 1:n=pd;break;case 4:n=Bm;break;case 16:n=xa;break;case 536870912:n=Wm;break;default:n=xa}n=pv(n,av.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function av(t,e){if(fa=-1,ha=0,ne&6)throw Error(O(327));var n=t.callbackNode;if(_s()&&t.callbackNode!==n)return null;var r=ba(t,t===Re?Ne:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Ua(t,r);else{e=r;var s=ne;ne|=2;var i=uv();(Re!==t||Ne!==e)&&(an=null,Ws=_e()+500,jr(t,e));do try{sx();break}catch(a){lv(t,a)}while(!0);Td(),Da.current=i,ne=s,Se!==null?e=0:(Re=null,Ne=0,e=Te)}if(e!==0){if(e===2&&(s=Uu(t),s!==0&&(r=s,e=pc(t,s))),e===1)throw n=eo,jr(t,0),Nn(t,r),nt(t,_e()),n;if(e===6)Nn(t,r);else{if(s=t.current.alternate,!(r&30)&&!nx(s)&&(e=Ua(t,r),e===2&&(i=Uu(t),i!==0&&(r=i,e=pc(t,i))),e===1))throw n=eo,jr(t,0),Nn(t,r),nt(t,_e()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(O(345));case 2:wr(t,Je,an);break;case 3:if(Nn(t,r),(r&130023424)===r&&(e=Bd+500-_e(),10<e)){if(ba(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){qe(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Qu(wr.bind(null,t,Je,an),e);break}wr(t,Je,an);break;case 4:if(Nn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-Nt(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tx(r/1960))-r,10<r){t.timeoutHandle=Qu(wr.bind(null,t,Je,an),r);break}wr(t,Je,an);break;case 5:wr(t,Je,an);break;default:throw Error(O(329))}}}return nt(t,_e()),t.callbackNode===n?av.bind(null,t):null}function pc(t,e){var n=ji;return t.current.memoizedState.isDehydrated&&(jr(t,e).flags|=256),t=Ua(t,e),t!==2&&(e=Je,Je=n,e!==null&&mc(e)),t}function mc(t){Je===null?Je=t:Je.push.apply(Je,t)}function nx(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!$t(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Nn(t,e){for(e&=~zd,e&=~al,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Nt(e),r=1<<n;t[n]=-1,e&=~r}}function Uh(t){if(ne&6)throw Error(O(327));_s();var e=ba(t,0);if(!(e&1))return nt(t,_e()),null;var n=Ua(t,e);if(t.tag!==0&&n===2){var r=Uu(t);r!==0&&(e=r,n=pc(t,r))}if(n===1)throw n=eo,jr(t,0),Nn(t,e),nt(t,_e()),n;if(n===6)throw Error(O(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,wr(t,Je,an),nt(t,_e()),null}function Wd(t,e){var n=ne;ne|=1;try{return t(e)}finally{ne=n,ne===0&&(Ws=_e()+500,rl&&cr())}}function Mr(t){Hn!==null&&Hn.tag===0&&!(ne&6)&&_s();var e=ne;ne|=1;var n=bt.transition,r=ie;try{if(bt.transition=null,ie=1,t)return t()}finally{ie=r,bt.transition=n,ne=e,!(ne&6)&&cr()}}function Hd(){lt=ps.current,fe(ps)}function jr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,j_(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(Ed(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ta();break;case 3:zs(),fe(et),fe(Be),Id();break;case 5:jd(r);break;case 4:zs();break;case 13:fe(me);break;case 19:fe(me);break;case 10:Pd(r.type._context);break;case 22:case 23:Hd()}n=n.return}if(Re=t,Se=t=Zn(t.current,null),Ne=lt=e,Te=0,eo=null,zd=al=Dr=0,Je=ji=null,Sr!==null){for(e=0;e<Sr.length;e++)if(n=Sr[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Sr=null}return t}function lv(t,e){do{var n=Se;try{if(Td(),ua.current=$a,La){for(var r=ge.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}La=!1}if($r=0,Pe=ke=ge=null,Oi=!1,Ji=0,Ud.current=null,n===null||n.return===null){Te=1,eo=e,Se=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=Ne,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Th(o);if(p!==null){p.flags&=-257,Ph(p,o,a,i,e),p.mode&1&&Ch(i,u,e),e=p,l=u;var y=e.updateQueue;if(y===null){var m=new Set;m.add(l),e.updateQueue=m}else y.add(l);break e}else{if(!(e&1)){Ch(i,u,e),Vd();break e}l=Error(O(426))}}else if(he&&a.mode&1){var w=Th(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Ph(w,o,a,i,e),kd(Bs(l,a));break e}}i=l=Bs(l,a),Te!==4&&(Te=2),ji===null?ji=[i]:ji.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var v=Vg(i,l,e);_h(i,v);break e;case 1:a=l;var h=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Jn===null||!Jn.has(g)))){i.flags|=65536,e&=-e,i.lanes|=e;var x=qg(i,a,e);_h(i,x);break e}}i=i.return}while(i!==null)}dv(n)}catch(b){e=b,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(!0)}function uv(){var t=Da.current;return Da.current=$a,t===null?$a:t}function Vd(){(Te===0||Te===3||Te===2)&&(Te=4),Re===null||!(Dr&268435455)&&!(al&268435455)||Nn(Re,Ne)}function Ua(t,e){var n=ne;ne|=2;var r=uv();(Re!==t||Ne!==e)&&(an=null,jr(t,e));do try{rx();break}catch(s){lv(t,s)}while(!0);if(Td(),ne=n,Da.current=r,Se!==null)throw Error(O(261));return Re=null,Ne=0,Te}function rx(){for(;Se!==null;)cv(Se)}function sx(){for(;Se!==null&&!Rw();)cv(Se)}function cv(t){var e=hv(t.alternate,t,lt);t.memoizedProps=t.pendingProps,e===null?dv(t):Se=e,Ud.current=null}function dv(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=J_(n,e),n!==null){n.flags&=32767,Se=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Te=6,Se=null;return}}else if(n=Y_(n,e,lt),n!==null){Se=n;return}if(e=e.sibling,e!==null){Se=e;return}Se=e=t}while(e!==null);Te===0&&(Te=5)}function wr(t,e,n){var r=ie,s=bt.transition;try{bt.transition=null,ie=1,ix(t,e,n,r)}finally{bt.transition=s,ie=r}return null}function ix(t,e,n,r){do _s();while(Hn!==null);if(ne&6)throw Error(O(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(O(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(Fw(t,i),t===Re&&(Se=Re=null,Ne=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||qo||(qo=!0,pv(xa,function(){return _s(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=bt.transition,bt.transition=null;var o=ie;ie=1;var a=ne;ne|=4,Ud.current=null,Z_(t,n),iv(n,t),k_(qu),Sa=!!Vu,qu=Vu=null,t.current=n,ex(n),Ow(),ne=a,ie=o,bt.transition=i}else t.current=n;if(qo&&(qo=!1,Hn=t,Fa=s),i=t.pendingLanes,i===0&&(Jn=null),Iw(n.stateNode),nt(t,_e()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ma)throw Ma=!1,t=fc,fc=null,t;return Fa&1&&t.tag!==0&&_s(),i=t.pendingLanes,i&1?t===hc?Ii++:(Ii=0,hc=t):Ii=0,cr(),null}function _s(){if(Hn!==null){var t=Vm(Fa),e=bt.transition,n=ie;try{if(bt.transition=null,ie=16>t?16:t,Hn===null)var r=!1;else{if(t=Hn,Hn=null,Fa=0,ne&6)throw Error(O(331));var s=ne;for(ne|=4,L=t.current;L!==null;){var i=L,o=i.child;if(L.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(L=u;L!==null;){var c=L;switch(c.tag){case 0:case 11:case 15:Ai(8,c,i)}var d=c.child;if(d!==null)d.return=c,L=d;else for(;L!==null;){c=L;var f=c.sibling,p=c.return;if(nv(c),c===u){L=null;break}if(f!==null){f.return=p,L=f;break}L=p}}}var y=i.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}L=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,L=o;else e:for(;L!==null;){if(i=L,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ai(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,L=v;break e}L=i.return}}var h=t.current;for(L=h;L!==null;){o=L;var g=o.child;if(o.subtreeFlags&2064&&g!==null)g.return=o,L=g;else e:for(o=h;L!==null;){if(a=L,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ol(9,a)}}catch(b){we(a,a.return,b)}if(a===o){L=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,L=x;break e}L=a.return}}if(ne=s,cr(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(Xa,t)}catch{}r=!0}return r}finally{ie=n,bt.transition=e}}return!1}function zh(t,e,n){e=Bs(n,e),e=Vg(t,e,1),t=Yn(t,e,1),e=qe(),t!==null&&(mo(t,1,e),nt(t,e))}function we(t,e,n){if(t.tag===3)zh(t,t,n);else for(;e!==null;){if(e.tag===3){zh(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jn===null||!Jn.has(r))){t=Bs(n,t),t=qg(e,t,1),e=Yn(e,t,1),t=qe(),e!==null&&(mo(e,1,t),nt(e,t));break}}e=e.return}}function ox(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=qe(),t.pingedLanes|=t.suspendedLanes&n,Re===t&&(Ne&n)===n&&(Te===4||Te===3&&(Ne&130023424)===Ne&&500>_e()-Bd?jr(t,0):zd|=n),nt(t,e)}function fv(t,e){e===0&&(t.mode&1?(e=$o,$o<<=1,!($o&130023424)&&($o=4194304)):e=1);var n=qe();t=mn(t,e),t!==null&&(mo(t,e,n),nt(t,n))}function ax(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),fv(t,n)}function lx(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(e),fv(t,n)}var hv;hv=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||et.current)Ze=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ze=!1,G_(t,e,n);Ze=!!(t.flags&131072)}else Ze=!1,he&&e.flags&1048576&&vg(e,Oa,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;da(t,e),t=e.pendingProps;var s=Ms(e,Be.current);ws(e,n),s=Ld(null,e,r,t,s,n);var i=$d();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,tt(r)?(i=!0,Pa(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Od(e),s.updater=il,e.stateNode=s,s._reactInternals=e,tc(e,r,t,n),e=sc(null,e,r,!0,i,n)):(e.tag=0,he&&i&&Sd(e),Ve(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(da(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=cx(r),t=Pt(r,t),s){case 0:e=rc(null,e,r,t,n);break e;case 1:e=Ah(null,e,r,t,n);break e;case 11:e=Rh(null,e,r,t,n);break e;case 14:e=Oh(null,e,r,Pt(r.type,t),n);break e}throw Error(O(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Pt(r,s),rc(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Pt(r,s),Ah(t,e,r,s,n);case 3:e:{if(Yg(e),t===null)throw Error(O(387));r=e.pendingProps,i=e.memoizedState,s=i.element,Sg(t,e),Ia(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Bs(Error(O(423)),e),e=jh(t,e,r,n,s);break e}else if(r!==s){s=Bs(Error(O(424)),e),e=jh(t,e,r,n,s);break e}else for(ct=Gn(e.stateNode.containerInfo.firstChild),dt=e,he=!0,jt=null,n=xg(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fs(),r===s){e=gn(t,e,n);break e}Ve(t,e,r,n)}e=e.child}return e;case 5:return Eg(e),t===null&&Xu(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Ku(r,s)?o=null:i!==null&&Ku(r,i)&&(e.flags|=32),Gg(t,e),Ve(t,e,o,n),e.child;case 6:return t===null&&Xu(e),null;case 13:return Jg(t,e,n);case 4:return Ad(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Us(e,null,r,n):Ve(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Pt(r,s),Rh(t,e,r,s,n);case 7:return Ve(t,e,e.pendingProps,n),e.child;case 8:return Ve(t,e,e.pendingProps.children,n),e.child;case 12:return Ve(t,e,e.pendingProps.children,n),e.child;
vendor: 4,991 bytes, line 41
41case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,le(Aa,r._currentValue),r._currentValue=o,i!==null)if($t(i.value,o)){if(i.children===s.children&&!et.current){e=gn(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=fn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Zu(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(O(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Zu(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ve(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,ws(e,n),s=Et(s),r=r(s),e.flags|=1,Ve(t,e,r,n),e.child;case 14:return r=e.type,s=Pt(r,e.pendingProps),s=Pt(r.type,s),Oh(t,e,r,s,n);case 15:return Kg(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Pt(r,s),da(t,e),e.tag=1,tt(r)?(t=!0,Pa(e)):t=!1,ws(e,n),Hg(e,r,s),tc(e,r,s,n),sc(null,e,r,!0,t,n);case 19:return Xg(t,e,n);case 22:return Qg(t,e,n)}throw Error(O(156,e.tag))};function pv(t,e){return zm(t,e)}function ux(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(t,e,n,r){return new ux(t,e,n,r)}function qd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function cx(t){if(typeof t=="function")return qd(t)?1:0;if(t!=null){if(t=t.$$typeof,t===dd)return 11;if(t===fd)return 14}return 2}function Zn(t,e){var n=t.alternate;return n===null?(n=xt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function pa(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")qd(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ss:return Ir(n.children,s,i,e);case cd:o=8,s|=8;break;case ku:return t=xt(12,n,e,s|2),t.elementType=ku,t.lanes=i,t;case Cu:return t=xt(13,n,e,s),t.elementType=Cu,t.lanes=i,t;case Tu:return t=xt(19,n,e,s),t.elementType=Tu,t.lanes=i,t;case Em:return ll(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case bm:o=10;break e;case Sm:o=9;break e;case dd:o=11;break e;case fd:o=14;break e;case An:o=16,r=null;break e}throw Error(O(130,t==null?t:typeof t,""))}return e=xt(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Ir(t,e,n,r){return t=xt(7,t,r,e),t.lanes=n,t}function ll(t,e,n,r){return t=xt(22,t,r,e),t.elementType=Em,t.lanes=n,t.stateNode={isHidden:!1},t}function su(t,e,n){return t=xt(6,t,null,e),t.lanes=n,t}function iu(t,e,n){return e=xt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function dx(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fl(0),this.expirationTimes=Fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Kd(t,e,n,r,s,i,o,a,l){return t=new dx(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=xt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Od(i),t}function fx(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:rs,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function mv(t){if(!t)return nr;t=t._reactInternals;e:{if(Br(t)!==t||t.tag!==1)throw Error(O(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(tt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(O(171))}if(t.tag===1){var n=t.type;if(tt(n))return mg(t,n,e)}return e}
vendor: 2,423 bytes, line 41
41function gv(t,e,n,r,s,i,o,a,l){return t=Kd(n,r,!0,t,s,i,o,a,l),t.context=mv(null),n=t.current,r=qe(),s=Xn(n),i=fn(r,s),i.callback=e??null,Yn(n,i,s),t.current.lanes=s,mo(t,s,r),nt(t,r),t}function ul(t,e,n,r){var s=e.current,i=qe(),o=Xn(s);return n=mv(n),e.context===null?e.context=n:e.pendingContext=n,e=fn(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Yn(s,e,o),t!==null&&(Lt(t,s,o,i),la(t,s,o)),o}function za(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Bh(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Qd(t,e){Bh(t,e),(t=t.alternate)&&Bh(t,e)}function hx(){return null}var vv=typeof reportError=="function"?reportError:function(t){console.error(t)};function Gd(t){this._internalRoot=t}cl.prototype.render=Gd.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(O(409));ul(t,e,null,null)};cl.prototype.unmount=Gd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Mr(function(){ul(null,t,null,null)}),e[pn]=null}};function cl(t){this._internalRoot=t}cl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Qm();t={blockedOn:null,target:t,priority:e};for(var n=0;n<In.length&&e!==0&&e<In[n].priority;n++);In.splice(n,0,t),n===0&&Ym(t)}};function Yd(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function dl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Wh(){}function px(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=za(o);i.call(u)}}var o=gv(e,r,t,0,null,!1,!1,"",Wh);return t._reactRootContainer=o,t[pn]=o.current,qi(t.nodeType===8?t.parentNode:t),Mr(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=za(l);a.call(u)}}var l=Kd(t,0,!1,null,null,!1,!1,"",Wh);return t._reactRootContainer=l,t[pn]=l.current,qi(t.nodeType===8?t.parentNode:t),Mr(function(){ul(e,l,n,r)}),l}function fl(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=za(o);a.call(l)}}ul(e,o,t,s)}else o=px(n,e,t,s,r);return za(o)}qm=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=xi(e.pendingLanes);
41n!==0&&(md(e,n|1),nt(e,_e()),!(ne&6)&&(Ws=_e()+500,cr()))}break;case 13:Mr(function(){var r=mn(t,1);if(r!==null){var s=qe();Lt(r,t,1,s)}}),Qd(t,1)}};gd=function(t){if(t.tag===13){var e=mn(t,134217728);if(e!==null){var n=qe();Lt(e,t,134217728,n)}Qd(t,134217728)}};Km=function(t){if(t.tag===13){var e=Xn(t),n=mn(t,e);if(n!==null){var r=qe();Lt(n,t,e,r)}Qd(t,e)}};Qm=function(){return ie};Gm=function(t,e){var n=ie;try{return ie=t,e()}finally{ie=n}};Du=function(t,e,n){switch(e){case"input":if(Ou(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=nl(r);if(!s)throw Error(O(90));Cm(r),Ou(r,s)}}}break;case"textarea":Pm(t,n);break;case"select":e=n.value,e!=null&&ms(t,!!n.multiple,e,!1)}};Lm=Wd;$m=Mr;var mx={usingClientEntryPoint:!1,Events:[vo,ls,nl,Im,Nm,Wd]},hi={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gx={bundleType:hi.bundleType,version:hi.version,rendererPackageName:hi.rendererPackageName,rendererConfig:hi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Fm(t),t===null?null:t.stateNode},findFiberByHostInstance:hi.findFiberByHostInstance||hx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ko.isDisabled&&Ko.supportsFiber)try{Xa=Ko.inject(gx),Xt=Ko}catch{}}pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mx;pt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yd(e))throw Error(O(200));return fx(t,e,null,n)};pt.createRoot=function(t,e){if(!Yd(t))throw Error(O(299));var n=!1,r="",s=vv;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Kd(t,1,!1,null,null,n,!1,r,s),t[pn]=e.current,qi(t.nodeType===8?t.parentNode:t),new Gd(e)};pt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(O(188)):(t=Object.keys(t).join(","),Error(O(268,t)));return t=Fm(e),t=t===null?null:t.stateNode,t};pt.flushSync=function(t){return Mr(t)};pt.hydrate=function(t,e,n){if(!dl(e))throw Error(O(200));return fl(null,t,e,!0,n)};pt.hydrateRoot=function(t,e,n){if(!Yd(t))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=vv;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=gv(e,null,t,1,n??null,s,!1,i,o),t[pn]=e.current,qi(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new cl(e)};pt.render=function(t,e,n){if(!dl(e))throw Error(O(200));return fl(null,t,e,!1,n)};pt.unmountComponentAtNode=function(t){if(!dl(t))throw Error(O(40));return t._reactRootContainer?(Mr(function(){fl(null,null,t,!1,function(){t._reactRootContainer=null,t[pn]=null})}),!0):!1};pt.unstable_batchedUpdates=Wd;pt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!dl(n))throw Error(O(200));if(t==null||t._reactInternals===void 0)throw Error(O(38));return fl(t,e,n,!1,r)};pt.version="18.3.1-next-f1338f8080-20240426";function yv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yv)}catch(t){console.error(t)}}yv(),ym.exports=pt;var wo=ym.exports;const wv=im(wo);var _v,Hh=wo;_v=Hh.createRoot,Hh.hydrateRoot;const vx="modulepreload",yx=function(t){return"/"+t},Vh={},$e=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=yx(l),l in Vh)return;Vh[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":vx,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})},wx=1,_x=1e6;let ou=0;function xx(){return ou=(ou+1)%Number.MAX_SAFE_INTEGER,ou.toString()}const au=new Map,qh=t=>{if(au.has(t))return;const e=setTimeout(()=>{au.delete(t),Ni({type:"REMOVE_TOAST",toastId:t})},_x);au.set(t,e)},bx=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,wx)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
41return n?qh(n):t.toasts.forEach(r=>{qh(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},ma=[];let ga={toasts:[]};function Ni(t){ga=bx(ga,t),ma.forEach(e=>{e(ga)})}function Ue({...t}){const e=xx(),n=s=>Ni({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Ni({type:"DISMISS_TOAST",toastId:e});return Ni({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function Jd(){const[t,e]=_.useState(ga);return _.useEffect(()=>(ma.push(e),()=>{const n=ma.indexOf(e);n>-1&&ma.splice(n,1)}),[t]),{...t,toast:Ue,dismiss:n=>Ni({type:"DISMISS_TOAST",toastId:n})}}function Ce(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Sx(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function xv(...t){return e=>t.forEach(n=>Sx(n,e))}function Dt(...t){return _.useCallback(xv(...t),t)}function Ex(t,e=[]){let n=[];function r(i,o){const a=_.createContext(o),l=n.length;n=[...n,o];function u(d){const{scope:f,children:p,...y}=d,m=(f==null?void 0:f[t][l])||a,w=_.useMemo(()=>y,Object.values(y));return k.jsx(m.Provider,{value:w,children:p})}function c(d,f){const p=(f==null?void 0:f[t][l])||a,y=_.useContext(p);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const s=()=>{const i=n.map(o=>_.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,kx(s,...e)]}function kx(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var to=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(Cx);if(i){const o=i.props.children,a=s.map(l=>l===i?_.Children.count(o)>1?_.Children.only(null):_.isValidElement(o)?o.props.children:null:l);return k.jsx(gc,{...r,ref:e,children:_.isValidElement(o)?_.cloneElement(o,void 0,a):null})}return k.jsx(gc,{...r,ref:e,children:n})});to.displayName="Slot";var gc=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=Px(n);return _.cloneElement(n,{...Tx(r,n.props),ref:e?xv(e,s):s})}return _.Children.count(n)>1?_.Children.only(null):null});gc.displayName="SlotClone";var bv=({children:t})=>k.jsx(k.Fragment,{children:t});function Cx(t){return _.isValidElement(t)&&t.type===bv}function Tx(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function Px(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Rx(t){const e=t+"CollectionProvider",[n,r]=Ex(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:y,children:m}=p,w=j.useRef(null),v=j.useRef(new Map).current;return k.jsx(s,{scope:y,itemMap:v,collectionRef:w,children:m})};o.displayName=e;const a=t+"CollectionSlot",l=j.forwardRef((p,y)=>{const{scope:m,children:w}=p,v=i(a,m),h=Dt(y,v.collectionRef);return k.jsx(to,{ref:h,children:w})});l.displayName=a;const u=t+"CollectionItemSlot",c="data-radix-collection-item",d=j.forwardRef((p,y)=>{const{scope:m,children:w,...v}=p,h=j.useRef(null),g=Dt(y,h),x=i(u,m);return j.useEffect(()=>(x.itemMap.set(h,{ref:h,...v}),()=>void x.itemMap.delete(h))),k.jsx(to,{[c]:"",ref:g,children:w})});d.displayName=u;function f(p){const y=i(t+"CollectionConsumer",p);return j.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const v=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(y.itemMap.values()).sort((x,b)=>v.indexOf(x.ref.current)-v.indexOf(b.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:l,ItemSlot:d},f,r]}function hR(t,e){const n=_.createContext(e),r=i=>{const{children:o,...a}=i,l=_.useMemo(()=>a,Object.values(a));return k.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function s(i){const o=_.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function Sv(t,e=[]){let n=[];function r(i,o){const a=_.createContext(o),l=n.length;n=[...n,o];const u=d=>{var v;const{scope:f,children:p,...y}=d,m=((v=f==null?void 0:f[t])==null?void 0:v[l])||a,w=_.useMemo(()=>y,Object.values(y));return k.jsx(m.Provider,{value:w,children:p})};u.displayName=i+"Provider";function c(d,f){var m;const p=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,y=_.useContext(p);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=n.map(o=>_.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,Ox(s,...e)]}function Ox(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var Ax=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rt=Ax.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?to:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Ev(t,e){t&&wo.flushSync(()=>t.dispatchEvent(e))}function en(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function jx(t,e=globalThis==null?void 0:globalThis.document){const n=en(t);_.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}
vendor: 5,674 bytes, line 41
41var Ix="DismissableLayer",vc="dismissableLayer.update",Nx="dismissableLayer.pointerDownOutside",Lx="dismissableLayer.focusOutside",Kh,kv=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xd=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,u=_.useContext(kv),[c,d]=_.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=_.useState({}),y=Dt(e,E=>d(E)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(w),h=c?m.indexOf(c):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,x=h>=v,b=Dx(E=>{const T=E.target,R=[...u.branches].some(A=>A.contains(T));!x||R||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),C=Mx(E=>{const T=E.target;[...u.branches].some(A=>A.contains(T))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return jx(E=>{h===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),_.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Kh=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Qh(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Kh)}},[c,f,n,u]),_.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Qh())},[c,u]),_.useEffect(()=>{const E=()=>p({});return document.addEventListener(vc,E),()=>document.removeEventListener(vc,E)},[]),k.jsx(rt.div,{...l,ref:y,style:{pointerEvents:g?x?"auto":"none":void 0,...t.style},onFocusCapture:Ce(t.onFocusCapture,C.onFocusCapture),onBlurCapture:Ce(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ce(t.onPointerDownCapture,b.onPointerDownCapture)})});Xd.displayName=Ix;var $x="DismissableLayerBranch",Cv=_.forwardRef((t,e)=>{const n=_.useContext(kv),r=_.useRef(null),s=Dt(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),k.jsx(rt.div,{...t,ref:s})});Cv.displayName=$x;function Dx(t,e=globalThis==null?void 0:globalThis.document){const n=en(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Tv(Nx,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Mx(t,e=globalThis==null?void 0:globalThis.document){const n=en(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&Tv(Lx,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qh(){const t=new CustomEvent(vc);document.dispatchEvent(t)}function Tv(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Ev(s,i):s.dispatchEvent(i)}var Fx=Xd,Ux=Cv,rr=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},zx="Portal",Zd=_.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=_.useState(!1);rr(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?wv.createPortal(k.jsx(rt.div,{...r,ref:e}),o):null});Zd.displayName=zx;function Bx(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var hl=t=>{const{present:e,children:n}=t,r=Wx(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=Dt(r.ref,Hx(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};hl.displayName="Presence";function Wx(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),o=t?"mounted":"unmounted",[a,l]=Bx(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Qo(r.current);i.current=a==="mounted"?u:"none"},[a]),rr(()=>{const u=r.current,c=s.current;if(c!==t){const f=i.current,p=Qo(u);t?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),rr(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=p=>{const m=Qo(r.current).includes(p.animationName);if(p.target===e&&m&&(l("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},f=p=>{p.target===e&&(i.current=Qo(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Qo(t){return(t==null?void 0:t.animationName)||"none"}function Hx(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
41isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Pv({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=Vx({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=en(n),l=_.useCallback(u=>{if(i){const d=typeof u=="function"?u(t):u;d!==t&&a(d)}else s(u)},[i,t,s,a]);return[o,l]}function Vx({defaultProp:t,onChange:e}){const n=_.useState(t),[r]=n,s=_.useRef(r),i=en(e);return _.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var qx="VisuallyHidden",pl=_.forwardRef((t,e)=>k.jsx(rt.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));pl.displayName=qx;var Kx=pl,ef="ToastProvider",[tf,Qx,Gx]=Rx("Toast"),[Rv,pR]=Sv("Toast",[Gx]),[Yx,ml]=Rv(ef),Ov=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=_.useState(null),[u,c]=_.useState(0),d=_.useRef(!1),f=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ef}\`. Expected non-empty \`string\`.`),k.jsx(tf.Provider,{scope:e,children:k.jsx(Yx,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:_.useCallback(()=>c(p=>p+1),[]),onToastRemove:_.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Ov.displayName=ef;var Av="ToastViewport",Jx=["F8"],yc="toast.viewportPause",wc="toast.viewportResume",jv=_.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=Jx,label:s="Notifications ({hotkey})",...i}=t,o=ml(Av,n),a=Qx(n),l=_.useRef(null),u=_.useRef(null),c=_.useRef(null),d=_.useRef(null),f=Dt(e,d,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;_.useEffect(()=>{const w=v=>{var g;r.length!==0&&r.every(x=>v[x]||v.code===x)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),_.useEffect(()=>{const w=l.current,v=d.current;if(y&&w&&v){const h=()=>{if(!o.isClosePausedRef.current){const C=new CustomEvent(yc);v.dispatchEvent(C),o.isClosePausedRef.current=!0}},g=()=>{if(o.isClosePausedRef.current){const C=new CustomEvent(wc);v.dispatchEvent(C),o.isClosePausedRef.current=!1}},x=C=>{!w.contains(C.relatedTarget)&&g()},b=()=>{w.contains(document.activeElement)||g()};return w.addEventListener("focusin",h),w.addEventListener("focusout",x),w.addEventListener("pointermove",h),w.addEventListener("pointerleave",b),window.addEventListener("blur",h),window.addEventListener("focus",g),()=>{w.removeEventListener("focusin",h),w.removeEventListener("focusout",x),w.removeEventListener("pointermove",h),w.removeEventListener("pointerleave",b),window.removeEventListener("blur",h),window.removeEventListener("focus",g)}}},[y,o.isClosePausedRef]);const m=_.useCallback(({tabbingDirection:w})=>{const h=a().map(g=>{const x=g.ref.current,b=[x,...cb(x)];return w==="forwards"?b:b.reverse()});return(w==="forwards"?h.reverse():h).flat()},[a]);return _.useEffect(()=>{const w=d.current;if(w){const v=h=>{var b,C,E;const g=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!g){const T=document.activeElement,R=h.shiftKey;if(h.target===w&&R){(b=u.current)==null||b.focus();return}const D=m({tabbingDirection:R?"backwards":"forwards"}),K=D.findIndex(N=>N===T);lu(D.slice(K+1))?h.preventDefault():R?(C=u.current)==null||C.focus():(E=c.current)==null||E.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[a,m]),k.jsxs(Ux,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&k.jsx(_c,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});lu(w)}}),k.jsx(tf.Slot,{scope:n,children:k.jsx(rt.ol,{tabIndex:-1,...i,ref:f})}),y&&k.jsx(_c,{ref:c,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});lu(w)}})]})});
41jv.displayName=Av;var Iv="ToastFocusProxy",_c=_.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=ml(Iv,n);return k.jsx(pl,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});_c.displayName=Iv;var gl="Toast",Xx="toast.swipeStart",Zx="toast.swipeMove",eb="toast.swipeCancel",tb="toast.swipeEnd",Nv=_.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,l]=Pv({prop:r,defaultProp:s,onChange:i});return k.jsx(hl,{present:n||a,children:k.jsx(sb,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:en(t.onPause),onResume:en(t.onResume),onSwipeStart:Ce(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ce(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ce(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ce(t.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Nv.displayName=gl;var[nb,rb]=Rv(gl,{onClose(){}}),sb=_.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...y}=t,m=ml(gl,n),[w,v]=_.useState(null),h=Dt(e,N=>v(N)),g=_.useRef(null),x=_.useRef(null),b=s||m.duration,C=_.useRef(0),E=_.useRef(b),T=_.useRef(0),{onToastAdd:R,onToastRemove:A}=m,F=en(()=>{var G;(w==null?void 0:w.contains(document.activeElement))&&((G=m.viewport)==null||G.focus()),o()}),D=_.useCallback(N=>{!N||N===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(F,N))},[F]);_.useEffect(()=>{const N=m.viewport;if(N){const G=()=>{D(E.current),u==null||u()},B=()=>{const Y=new Date().getTime()-C.current;E.current=E.current-Y,window.clearTimeout(T.current),l==null||l()};return N.addEventListener(yc,B),N.addEventListener(wc,G),()=>{N.removeEventListener(yc,B),N.removeEventListener(wc,G)}}},[m.viewport,b,l,u,D]),_.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(b)},[i,b,m.isClosePausedRef,D]),_.useEffect(()=>(R(),()=>A()),[R,A]);const K=_.useMemo(()=>w?zv(w):null,[w]);return m.viewport?k.jsxs(k.Fragment,{children:[K&&k.jsx(ib,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),k.jsx(nb,{scope:n,onClose:F,children:wo.createPortal(k.jsx(tf.ItemSlot,{scope:n,children:k.jsx(Fx,{asChild:!0,onEscapeKeyDown:Ce(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||F(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:k.jsx(rt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:h,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ce(t.onKeyDown,N=>{N.key==="Escape"&&(a==null||a(N.nativeEvent),N.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:Ce(t.onPointerDown,N=>{N.button===0&&(g.current={x:N.clientX,y:N.clientY})}),onPointerMove:Ce(t.onPointerMove,N=>{if(!g.current)return;const G=N.clientX-g.current.x,B=N.clientY-g.current.y,Y=!!x.current,P=["left","right"].includes(m.swipeDirection),I=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,U=P?I(0,G):0,$=P?0:I(0,B),z=N.pointerType==="touch"?10:2,X={x:U,y:$},pe={originalEvent:N,delta:X};Y?(x.current=X,Go(Zx,d,pe,{discrete:!1})):Gh(X,m.swipeDirection,z)?(x.current=X,Go(Xx,c,pe,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(G)>z||Math.abs(B)>z)&&(g.current=null)}),onPointerUp:Ce(t.onPointerUp,N=>{const G=x.current,B=N.target;if(B.hasPointerCapture(N.pointerId)&&B.releasePointerCapture(N.pointerId),x.current=null,g.current=null,G){const Y=N.currentTarget,P={originalEvent:N,delta:G};Gh(G,m.swipeDirection,m.swipeThreshold)?Go(tb,p,P,{discrete:!0}):Go(eb,f,P,{discrete:!0}),Y.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),ib=t=>{const{__scopeToast:e,children:n,...r}=t,s=ml(gl,e),[i,o]=_.useState(!1),[a,l]=_.useState(!1);return lb(()=>o(!0)),_.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:k.jsx(Zd,{asChild:!0,children:k.jsx(pl,{...r,children:i&&k.jsxs(k.Fragment,{children:[s.label," ",n]})})})},ob="ToastTitle",Lv=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return k.jsx(rt.div,{...r,ref:e})});
vendor: 6,298 bytes, lines 41-81
41Lv.displayName=ob;var ab="ToastDescription",$v=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return k.jsx(rt.div,{...r,ref:e})});$v.displayName=ab;var Dv="ToastAction",Mv=_.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?k.jsx(Uv,{altText:n,asChild:!0,children:k.jsx(nf,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dv}\`. Expected non-empty \`string\`.`),null)});Mv.displayName=Dv;var Fv="ToastClose",nf=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=rb(Fv,n);return k.jsx(Uv,{asChild:!0,children:k.jsx(rt.button,{type:"button",...r,ref:e,onClick:Ce(t.onClick,s.onClose)})})});nf.displayName=Fv;var Uv=_.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return k.jsx(rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function zv(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),ub(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...zv(r))}}),e}function Go(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Ev(s,i):s.dispatchEvent(i)}var Gh=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function lb(t=()=>{}){const e=en(t);rr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function ub(t){return t.nodeType===t.ELEMENT_NODE}function cb(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function lu(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var db=Ov,Bv=jv,Wv=Nv,Hv=Lv,Vv=$v,qv=Mv,Kv=nf;function Qv(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=Qv(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Gv(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Qv(t))&&(r&&(r+=" "),r+=e);return r}const Yh=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Jh=Gv,rf=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Jh(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=Yh(c)||Yh(d);return s[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(y=>{let[m,w]=y;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...u,d,f]:u},[]);return Jh(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const fb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yv=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var hb={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const pb=_.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>_.createElement("svg",{ref:l,...hb,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Yv("lucide",s),...a},[...o.map(([u,c])=>_.createElement(u,c)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const _o=(t,e)=>{const n=_.forwardRef(({className:r,...s},i)=>_.createElement(pb,{ref:i,iconNode:e,className:Yv(`lucide-${fb(t)}`,r),...s}));return n.displayName=`${t}`,n};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const mb=_o("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const gb=_o("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const vb=_o("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const yb=_o("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}
vendor: 6,297 bytes, lines 81-86
81],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const wb=_o("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sf="-",_b=t=>{const e=bb(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(sf);return a[0]===""&&a.length!==1&&a.shift(),Jv(a,e)||xb(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Jv=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?Jv(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(sf);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Xh=/^\[(.+)\]$/,xb=t=>{if(Xh.test(t)){const e=Xh.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},bb=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return Eb(Object.entries(t.classGroups),n).forEach(([i,o])=>{xc(o,r,i,e)}),r},xc=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Zh(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(Sb(s)){xc(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{xc(o,Zh(e,i),n,r)})})},Zh=(t,e)=>{let n=t;return e.split(sf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Sb=t=>t.isThemeGetter,Eb=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,kb=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Xv="!",Cb=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let v=a[w];if(u===0){if(v===s&&(r||a.slice(w,w+i)===e)){l.push(a.slice(c,w)),c=w+i;continue}if(v==="/"){d=w;continue}}v==="["?u++:v==="]"&&u--}const f=l.length===0?a:a.substring(c),p=f.startsWith(Xv),y=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},Tb=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},Pb=t=>({cache:kb(t.cacheSize),parseClassName:Cb(t),..._b(t)}),Rb=/\s+/,Ob=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(Rb);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let y=!!p,m=r(y?f.substring(0,p):f);if(!m){if(!y){a=u+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=u+(a.length>0?" "+a:a);continue}y=!1}const w=Tb(c).join(":"),v=d?w+Xv:w,h=v+m;if(i.includes(h))continue;i.push(h);const g=s(m,y);for(let x=0;x<g.length;++x){const b=g[x];i.push(v+b)}a=u+(a.length>0?" "+a:a)}return a};function Ab(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Zv(e))&&(r&&(r+=" "),r+=n);return r}const Zv=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Zv(t[r]))&&(n&&(n+=" "),n+=e);return n};function jb(t,...e){let n,r,s,i=o;function o(l){const u=e.reduce((c,d)=>d(c),t());return n=Pb(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=Ob(l,n);return s(l,c),c}return function(){return i(Ab.apply(null,arguments))}}const ce=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},ey=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ib=/^\d+\/\d+$/,Nb=new Set(["px","full","screen"]),Lb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$b=/\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$/,Db=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rn=t=>xs(t)||Nb.has(t)||Ib.test(t),Cn=t=>Ys(t,"length",Kb),xs=t=>!!t&&!Number.isNaN(Number(t)),uu=t=>Ys(t,"number",xs),pi=t=>!!t&&Number.isInteger(Number(t)),Ub=t=>t.endsWith("%")&&xs(t.slice(0,-1)),q=t=>ey.test(t),Tn=t=>Lb.test(t),zb=new Set(["length","size","percentage"]),Bb=t=>Ys(t,zb,ty),Wb=t=>Ys(t,"position",ty),Hb=new Set(["image","url"]),Vb=t=>Ys(t,Hb,Gb),qb=t=>Ys(t,"",Qb),mi=()=>!0,Ys=(t,e,n)=>{const r=ey.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},Kb=t=>$b.test(t)&&!Db.test(t),ty=()=>!1,Qb=t=>Mb.test(t),Gb=t=>Fb.test(t),Yb=()=>{const t=ce("colors"),e=ce("spacing"),n=ce("blur"),r=ce("brightness"),s=ce("borderColor"),i=ce("borderRadius"),o=ce("borderSpacing"),a=ce("borderWidth"),l=ce("contrast"),u=ce("grayscale"),c=ce("hueRotate"),d=ce("invert"),f=ce("gap"),p=ce("gradientColorStops"),y=ce("gradientColorStopPositions"),m=ce("inset"),w=ce("margin"),v=ce("opacity"),h=ce("padding"),g=ce("saturate"),x=ce("scale"),b=ce("sepia"),C=ce("skew"),E=ce("space"),T=ce("translate"),R=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",q,e],D=()=>[q,e],K=()=>["",rn,Cn],N=()=>["auto",xs,q],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",q],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[xs,q];return{cacheSize:500,separator:":",theme:{colors:[mi],spacing:[rn,Cn],blur:["none","",Tn,q],brightness:$(),borderColor:[t],borderRadius:["n
86one","","full",Tn,q],borderSpacing:D(),borderWidth:K(),contrast:$(),grayscale:I(),hueRotate:$(),invert:I(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[Ub,Cn],inset:F(),margin:F(),opacity:$(),padding:D(),saturate:$(),scale:$(),sepia:I(),skew:$(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...G(),q]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],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",pi,q]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",q]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",pi,q]}],"grid-cols":[{"grid-cols":[mi]}],"col-start-end":[{col:["auto",{span:["full",pi,q]},q]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[mi]}],"row-start-end":[{row:["auto",{span:[pi,q]},q]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"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",q,e]}],"min-w":[{"min-w":[q,e,"min","max","fit"]}],"max-w":[{"max-w":[q,e,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[q,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",uu]}],"font-family":[{font:[mi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",q]}],"line-clamp":[{"line-clamp":["none",xs,uu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rn,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rn,Cn]}],"underline-offset":[{"underline-offset":["auto",rn,q]}],"text-decoration-color":[{decoration:[t]}],"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",q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),Wb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Bb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Vb]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[y]}
vendor: 5,172 bytes, line 86
86],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[rn,q]}],"outline-w":[{outline:[rn,Cn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[rn,Cn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Tn,qb]}],"shadow-color":[{shadow:[mi]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"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",q]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[pi,q]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q]}],"caret-color":[{caret:[t]}],"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"]}
86],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[rn,Cn,uu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Jb=jb(Yb);function Ut(...t){return Jb(Gv(t))}function mR(t){const n=Math.max(0,Math.min(1,t))*120,r=Math.max(0,n-15),s=Math.min(120,n+15),i=80,o=n>90?40:50;return{start:`hsl(${r}, ${i}%, ${o}%)`,end:`hsl(${s}, ${i}%, ${o}%)`,glow:`hsl(${n}, ${i}%, ${o}%)`,gradient:`linear-gradient(135deg, hsl(${r}, ${i}%, ${o}%), hsl(${s}, ${i}%, ${o}%))`}}const Xb=db,ny=_.forwardRef(({className:t,...e},n)=>k.jsx(Bv,{ref:n,className:Ut("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]",t),...e}));ny.displayName=Bv.displayName;const Zb=rf("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"}}),ry=_.forwardRef(({className:t,variant:e,...n},r)=>k.jsx(Wv,{ref:r,className:Ut(Zb({variant:e}),t),...n}));ry.displayName=Wv.displayName;const e1=_.forwardRef(({className:t,...e},n)=>k.jsx(qv,{ref:n,className:Ut("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));e1.displayName=qv.displayName;const sy=_.forwardRef(({className:t,...e},n)=>k.jsx(Kv,{ref:n,className:Ut("absolute right-2 top-2 rounded-md p-1 text-foreground
86/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:k.jsx(wb,{className:"h-4 w-4"})}));sy.displayName=Kv.displayName;const iy=_.forwardRef(({className:t,...e},n)=>k.jsx(Hv,{ref:n,className:Ut("text-sm font-semibold",t),...e}));iy.displayName=Hv.displayName;const oy=_.forwardRef(({className:t,...e},n)=>k.jsx(Vv,{ref:n,className:Ut("text-sm opacity-90",t),...e}));oy.displayName=Vv.displayName;function t1(){const{toasts:t}=Jd();return k.jsxs(Xb,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return k.jsxs(ry,{...i,children:[k.jsxs("div",{className:"grid gap-1",children:[n&&k.jsx(iy,{children:n}),r&&k.jsx(oy,{children:r})]}),s,k.jsx(sy,{})]},e)}),k.jsx(ny,{})]})}var ep=["light","dark"],n1="(prefers-color-scheme: dark)",r1=_.createContext(void 0),s1={setTheme:t=>{},themes:[]},i1=()=>{var t;return(t=_.useContext(r1))!=null?t:s1};_.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?ep.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,m=!1,w=!0)=>{let v=o?o[y]:y,h=m?y+"|| ''":`'${v}'`,g="";return s&&w&&!m&&ep.includes(y)&&(g+=`d.style.colorScheme = '${y}';`),n==="class"?m||v?g+=`c.add(${h})`:g+="null":v&&(g+=`d[s](n,${h})`),g},p=t?`!function(){${c}${f(t)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${n1}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return _.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var o1=t=>{switch(t){case"success":return u1;case"info":return d1;case"warning":return c1;case"error":return f1;default:return null}},a1=Array(12).fill(0),l1=({visible:t})=>j.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},j.createElement("div",{className:"sonner-spinner"},a1.map((e,n)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),u1=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),c1=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.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"})),d1=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),f1=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),h1=()=>{let[t,e]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{e(document.hidden)};
86return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},bc=1,p1=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:bc++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0;return r.then(async i=>{if(g1(i)&&!i.ok){s=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,a=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description;this.create({id:n,type:"error",message:o,description:a})}else if(e.success!==void 0){s=!1;let o=typeof e.success=="function"?await e.success(i):e.success,a=typeof e.description=="function"?await e.description(i):e.description;this.create({id:n,type:"success",message:o,description:a})}}).catch(async i=>{if(e.error!==void 0){s=!1;let o=typeof e.error=="function"?await e.error(i):e.error,a=typeof e.description=="function"?await e.description(i):e.description;this.create({id:n,type:"error",message:o,description:a})}}).finally(()=>{var i;s&&(this.dismiss(n),n=void 0),(i=e.finally)==null||i.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||bc++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},at=new p1,m1=(t,e)=>{let n=(e==null?void 0:e.id)||bc++;return at.addToast({title:t,...e,id:n}),n},g1=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",v1=m1,y1=()=>at.toasts,tp=Object.assign(v1,{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:y1});function w1(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}w1(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
86left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
86:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 87`);function Yo(t){return t.label!==void 0}var _1=3,x1="32px",b1=4e3,S1=356,E1=14,k1=20,C1=200;function T1(...t){return t.filter(Boolean).join(" ")}var P1=t=>{var e,n,r,s,i,o,a,l,u,c;let{invert:d,toast:f,unstyled:p,interacting:y,setHeights:m,visibleToasts:w,heights:v,index:h,toasts:g,expanded:x,removeToast:b,defaultRichColors:C,closeButton:E,style:T,cancelButtonStyle:R,actionButtonStyle:A,className:F="",descriptionClassName:D="",duration:K,position:N,gap:G,loadingIcon:B,expandByDefault:Y,classNames:P,icons:I,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:$,cn:z}=t,[X,pe]=j.useState(!1),[st,se]=j.useState(!1),[Ct,_n]=j.useState(!1),[xn,bn]=j.useState(!1),[Co,Hr]=j.useState(0),[pr,si]=j.useState(0),To=j.useRef(null),Sn=j.useRef(null),Rl=h===0,Ol=h+1<=w,Oe=f.type,Vr=f.dismissible!==!1,L0=f.className||"",$0=f.descriptionClassName||"",Po=j.useMemo(()=>v.findIndex(V=>V.toastId===f.id)||0,[v,f.id]),D0=j.useMemo(()=>{var V;return(V=f.closeButton)!=null?V:E},[f.closeButton,E]),Of=j.useMemo(()=>f.duration||K||b1,[f.duration,K]),Al=j.useRef(0),qr=j.useRef(0),Af=j.useRef(0),Kr=j.useRef(null),[jf,M0]=N.split("-"),If=j.useMemo(()=>v.reduce((V,ue,oe)=>oe>=Po?V:V+ue.height,0),[v,Po]),Nf=h1(),F0=f.invert||d,jl=Oe==="loading";qr.current=j.useMemo(()=>Po*G+If,[Po,If]),j.useEffect(()=>{pe(!0)},[]),j.useLayoutEffect(()=>{if(!X)return;let V=Sn.current,ue=V.style.height;V.style.height="auto";let oe=V.getBoundingClientRect().height;V.style.height=ue,si(oe),m(zt=>zt.find(Bt=>Bt.toastId===f.id)?zt.map(Bt=>Bt.toastId===f.id?{...Bt,height:oe}:Bt):[{toastId:f.id,height:oe,position:f.position},...zt])},[X,f.title,f.description,m,f.id]);let En=j.useCallback(()=>{se(!0),Hr(qr.current),m(V=>V.filter(ue=>ue.toastId!==f.id)),setTimeout(()=>{b(f)},C1)},[f,b,m,qr]);j.useEffect(()=>{if(f.promise&&Oe==="loading"||f.duration===1/0||f.type==="loading")return;let V,ue=Of;return x||y||$&&Nf?(()=>{if(Af.current<Al.current){let oe=new Date().getTime()-Al.current;ue=ue-oe}
87Af.current=new Date().getTime()})():ue!==1/0&&(Al.current=new Date().getTime(),V=setTimeout(()=>{var oe;(oe=f.onAutoClose)==null||oe.call(f,f),En()},ue)),()=>clearTimeout(V)},[x,y,Y,f,Of,En,f.promise,Oe,$,Nf]),j.useEffect(()=>{let V=Sn.current;if(V){let ue=V.getBoundingClientRect().height;return si(ue),m(oe=>[{toastId:f.id,height:ue,position:f.position},...oe]),()=>m(oe=>oe.filter(zt=>zt.toastId!==f.id))}},[m,f.id]),j.useEffect(()=>{f.delete&&En()},[En,f.delete]);function U0(){return I!=null&&I.loading?j.createElement("div",{className:"sonner-loader","data-visible":Oe==="loading"},I.loading):B?j.createElement("div",{className:"sonner-loader","data-visible":Oe==="loading"},B):j.createElement(l1,{visible:Oe==="loading"})}return j.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Sn,className:z(F,L0,P==null?void 0:P.toast,(e=f==null?void 0:f.classNames)==null?void 0:e.toast,P==null?void 0:P.default,P==null?void 0:P[Oe],(n=f==null?void 0:f.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:C,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":X,"data-promise":!!f.promise,"data-removed":st,"data-visible":Ol,"data-y-position":jf,"data-x-position":M0,"data-index":h,"data-front":Rl,"data-swiping":Ct,"data-dismissible":Vr,"data-type":Oe,"data-invert":F0,"data-swipe-out":xn,"data-expanded":!!(x||Y&&X),style:{"--index":h,"--toasts-before":h,"--z-index":g.length-h,"--offset":`${st?Co:qr.current}px`,"--initial-height":Y?"auto":`${pr}px`,...T,...f.style},onPointerDown:V=>{jl||!Vr||(To.current=new Date,Hr(qr.current),V.target.setPointerCapture(V.pointerId),V.target.tagName!=="BUTTON"&&(_n(!0),Kr.current={x:V.clientX,y:V.clientY}))},onPointerUp:()=>{var V,ue,oe,zt;if(xn||!Vr)return;Kr.current=null;let Bt=Number(((V=Sn.current)==null?void 0:V.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ro=new Date().getTime()-((ue=To.current)==null?void 0:ue.getTime()),z0=Math.abs(Bt)/Ro;if(Math.abs(Bt)>=k1||z0>.11){Hr(qr.current),(oe=f.onDismiss)==null||oe.call(f,f),En(),bn(!0);return}(zt=Sn.current)==null||zt.style.setProperty("--swipe-amount","0px"),_n(!1)},onPointerMove:V=>{var ue;if(!Kr.current||!Vr)return;let oe=V.clientY-Kr.current.y,zt=V.clientX-Kr.current.x,Bt=(jf==="top"?Math.min:Math.max)(0,oe),Ro=V.pointerType==="touch"?10:2;Math.abs(Bt)>Ro?(ue=Sn.current)==null||ue.style.setProperty("--swipe-amount",`${oe}px`):Math.abs(zt)>Ro&&(Kr.current=null)}},D0&&!f.jsx?j.createElement("button",{"aria-label":U,"data-disabled":jl,"data-close-button":!0,onClick:jl||!Vr?()=>{}:()=>{var V;En(),(V=f.onDismiss)==null||V.call(f,f)},className:z(P==null?void 0:P.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},j.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"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||j.isValidElement(f.title)?f.jsx||f.title:j.createElement(j.Fragment,null,Oe||f.icon||f.promise?j.createElement("div",{"data-icon":"",className:z(P==null?void 0:P.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||U0():null,f.type!=="loading"?f.icon||(I==null?void 0:I[Oe])||o1(Oe):null):null,j.createElement("div",{"data-content":"",className:z(P==null?void 0:P.content,(o=f==null?void 0:f.classNames)==null?void 0:o.content)},j.createElement("div",{"data-title":"",className:z(P==null?void 0:P.title,(a=f==null?void 0:f.classNames)==null?void 0:a.title)},f.title),f.description?j.createElement("div",{"data-description":"",className:z(D,$0,P==null?void 0:P.description,(l=f==null?void 0:f.classNames)==null?void 0:l.description)},f.description):null),j.isValidElement(f.cancel)?f.cancel:f.cancel&&Yo(f.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:V=>{var ue,oe;Yo(f.cancel)&&Vr&&((oe=(ue=f.cancel).onClick)==null||oe.call(ue,V),En())},className:z(P==null?void 0:P.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,j.isValidElement(f.action)?f.action:f.action&&Yo(f.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||A,onClick:V=>{var ue,oe;Yo(f.action)&&(V.defaultPrevented||((oe=(ue=f.action).onClick)==null||oe.call(ue,V),En()))},className:z(P==null?void 0:P.actionButton,(c=f==null?void 0:f.classNames)==null?void 0:c.actionButton)},f.action.label):null))};function np(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var R1=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:o,offset:a,theme:l="light",richColors:u,duration:c,style:d,visibleToasts:f=_1,toastOptions:p,dir:y=np(),gap:m=E1,loadingIcon:w,icons:v,containerAriaLabel:h="Notifications",pauseWhenPageIsHidden:g,cn:x=T1}=t,[b,C]=j.useState([]),E=j.useMemo(()=>Array.from(new Set([n].concat(b.filter($=>$.position).map($=>$.position)))),[b,n]),[T,R]=j.useState([]),[A,F]=j.useState(!1),[D,K]=j.useState(!1),[N,G]=j.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
87k":"light"),B=j.useRef(null),Y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=j.useRef(null),I=j.useRef(!1),U=j.useCallback($=>{var z;(z=b.find(X=>X.id===$.id))!=null&&z.delete||at.dismiss($.id),C(X=>X.filter(({id:pe})=>pe!==$.id))},[b]);return j.useEffect(()=>at.subscribe($=>{if($.dismiss){C(z=>z.map(X=>X.id===$.id?{...X,delete:!0}:X));return}setTimeout(()=>{wv.flushSync(()=>{C(z=>{let X=z.findIndex(pe=>pe.id===$.id);return X!==-1?[...z.slice(0,X),{...z[X],...$},...z.slice(X+1)]:[$,...z]})})})}),[]),j.useEffect(()=>{if(l!=="system"){G(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:$})=>{G($?"dark":"light")})},[l]),j.useEffect(()=>{b.length<=1&&F(!1)},[b]),j.useEffect(()=>{let $=z=>{var X,pe;r.every(st=>z[st]||z.code===st)&&(F(!0),(X=B.current)==null||X.focus()),z.code==="Escape"&&(document.activeElement===B.current||(pe=B.current)!=null&&pe.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),j.useEffect(()=>{if(B.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,I.current=!1)}},[B.current]),b.length?j.createElement("section",{"aria-label":`${h} ${Y}`,tabIndex:-1},E.map(($,z)=>{var X;let[pe,st]=$.split("-");return j.createElement("ol",{key:$,dir:y==="auto"?np():y,tabIndex:-1,ref:B,className:o,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":pe,"data-x-position":st,style:{"--front-toast-height":`${((X=T[0])==null?void 0:X.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||x1,"--width":`${S1}px`,"--gap":`${m}px`,...d},onBlur:se=>{I.current&&!se.currentTarget.contains(se.relatedTarget)&&(I.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||I.current||(I.current=!0,P.current=se.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{D||F(!1)},onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},b.filter(se=>!se.position&&z===0||se.position===$).map((se,Ct)=>{var _n,xn;return j.createElement(P1,{key:se.id,icons:v,index:Ct,toast:se,defaultRichColors:u,duration:(_n=p==null?void 0:p.duration)!=null?_n:c,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:e,visibleToasts:f,closeButton:(xn=p==null?void 0:p.closeButton)!=null?xn:i,interacting:D,position:$,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:U,toasts:b.filter(bn=>bn.position==se.position),heights:T.filter(bn=>bn.position==se.position),setHeights:R,expandByDefault:s,gap:m,loadingIcon:w,expanded:A,pauseWhenPageIsHidden:g,cn:x})}))})):null};const O1=({...t})=>{const{theme:e="system"}=i1();return k.jsx(R1,{theme:e,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"}},...t})};var A1=gm.useId||(()=>{}),j1=0;function I1(t){const[e,n]=_.useState(A1());return rr(()=>{t||n(r=>r??String(j1++))},[t]),t||(e?`radix-${e}`:"")}const N1=["top","right","bottom","left"],sr=Math.min,ut=Math.max,Ba=Math.round,Jo=Math.floor,ir=t=>({x:t,y:t}),L1={left:"right",right:"left",bottom:"top",top:"bottom"},$1={start:"end",end:"start"};function Sc(t,e,n){return ut(t,sr(e,n))}function vn(t,e){return typeof t=="function"?t(e):t}function yn(t){return t.split("-")[0]}function Js(t){return t.split("-")[1]}function of(t){return t==="x"?"y":"x"}function af(t){return t==="y"?"height":"width"}function or(t){return["top","bottom"].includes(yn(t))?"y":"x"}function lf(t){return of(or(t))}function D1(t,e,n){n===void 0&&(n=!1);const r=Js(t),s=lf(t),i=af(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Wa(o)),[o,Wa(o)]}function M1(t){const e=Wa(t);return[Ec(t),e,Ec(e)]}function Ec(t){return t.replace(/start|end/g,e=>$1[e])}function F1(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:o;default:return[]}}function U1(t,e,n,r){const s=Js(t);let i=F1(yn(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Ec)))),i}function Wa(t){return t.replace(/left|right|bottom|top/g,e=>L1[e])}function z1(t){return{top:0,right:0,bottom:0,left:0,...t}}function ay(t){return typeof t!="number"?z1(t):{top:t,right:t,bottom:t,left:t}}function Ha(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function rp(t,e,n){let{reference:r,floating:s}=t;const i=or(e),o=lf(e),a=af(o),l=yn(e),u=i==="y",c=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-s.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-s.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Js(e)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const B1=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,693 bytes, line 87
87=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:c,y:d}=rp(u,r,l),f=r,p={},y=0;for(let m=0;m<a.length;m++){const{name:w,fn:v}=a[m],{x:h,y:g,data:x,reset:b}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:t,floating:e}});c=h??c,d=g??d,p={...p,[w]:{...p[w],...x}},b&&y<=50&&(y++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(u=b.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):b.rects),{x:c,y:d}=rp(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:p}};async function no(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=vn(e,t),y=ay(p),w=a[f?d==="floating"?"reference":"floating":d],v=Ha(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),h=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},b=Ha(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:g,strategy:l}):h);return{top:(v.top-b.top+y.top)/x.y,bottom:(b.bottom-v.bottom+y.bottom)/x.y,left:(v.left-b.left+y.left)/x.x,right:(b.right-v.right+y.right)/x.x}}const W1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=vn(t,e)||{};if(u==null)return{};const d=ay(c),f={x:n,y:r},p=lf(s),y=af(p),m=await o.getDimensions(u),w=p==="y",v=w?"top":"left",h=w?"bottom":"right",g=w?"clientHeight":"clientWidth",x=i.reference[y]+i.reference[p]-f[p]-i.floating[y],b=f[p]-i.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=C?C[g]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=a.floating[g]||i.floating[y]);const T=x/2-b/2,R=E/2-m[y]/2-1,A=sr(d[v],R),F=sr(d[h],R),D=A,K=E-m[y]-F,N=E/2-m[y]/2+T,G=Sc(D,N,K),B=!l.arrow&&Js(s)!=null&&N!==G&&i.reference[y]/2-(N<D?A:F)-m[y]/2<0,Y=B?N<D?N-D:N-K:0;return{[p]:f[p]+Y,data:{[p]:G,centerOffset:N-G-Y,...B&&{alignmentOffset:Y}},reset:B}}}),H1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...w}=vn(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=yn(s),h=or(a),g=yn(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),b=f||(g||!m?[Wa(a)]:M1(a)),C=y!=="none";!f&&C&&b.push(...U1(a,m,y,x));const E=[a,...b],T=await no(e,w),R=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&R.push(T[v]),d){const N=D1(s,o,x);R.push(T[N[0]],T[N[1]])}if(A=[...A,{placement:s,overflows:R}],!R.every(N=>N<=0)){var F,D;const N=(((F=i.flip)==null?void 0:F.index)||0)+1,G=E[N];if(G)return{data:{index:N,overflows:A},reset:{placement:G}};let B=(D=A.filter(Y=>Y.overflows[0]<=0).sort((Y,P)=>Y.overflows[1]-P.overflows[1])[0])==null?void 0:D.placement;if(!B)switch(p){case"bestFit":{var K;const Y=(K=A.filter(P=>{if(C){const I=or(P.placement);return I===h||I==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((P,I)=>P[1]-I[1])[0])==null?void 0:K[0];Y&&(B=Y);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function sp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ip(t){return N1.some(e=>t[e]>=0)}const V1=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=vn(t,e);switch(r){case"referenceHidden":{const i=await no(e,{...s,elementContext:"reference"}),o=sp(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ip(o)}}}case"escaped":{const i=await no(e,{...s,altBoundary:!0}),o=sp(i,n.floating);return{data:{escapedOffsets:o,escaped:ip(o)}}}default:return{}}}}};async function q1(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=yn(n),a=Js(n),l=or(n)==="y",u=["left","top"].includes(o)?-1:1,c=i&&l?-1:1,d=vn(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(p=a==="end"?y*-1:y),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const K1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await q1(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},Q1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:v,y:h}=w;return{x:v,y:h}}},...l}=vn(t,e),u={x:n,y:r},c=await no(e,l),d=or(yn(s)),f=of(d);let p=u[f],y=u[d];if(i){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",h=p+c[w],g=p-c[v];p=Sc(h,p,g)}if(o){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",h=y+c[w],g=y-c[v];y=Sc(h,y,g)}const m=a.fn({...e,[f]:p,[d]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:o}}}}}},G1=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=vn(t,e),c={x:n,y:r},d=or(s),f=of(d);let p=c[f],y=c[d];const m=vn(a,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const g=f==="y"?"height":"width",x=i.reference[f]-i.floating[g]+w.mainAxis,b=i.reference[f]+i.reference[g]-w.mainAxis;p<x?p=x:p>b&&(p=b)}if(u){var v,h;const g=f==="y"?"width":"height",x=["top","left"].includes(yn(s)),b=i.reference[d]-i.floating[g]+(x&&((v=o.offset)==null?void 0:v[d])||0)+(x?0:w.crossAxis),C=i.reference[d]+i.reference[g]+(x?0:((h=o.offset)==null?void 0:h[d])||0)-(x?w.crossAxis:0);y<b?y=b:y>C&&(y=C)}return{[f]:p,[d]:y}}}},Y1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...u}=vn(t,e),c=await no(e,u),d=yn(s),f=Js(s),p=or(s)==="y",{width:y,height:m}=i.floating;let w,v;d==="top"||d==="bottom"?(w=d,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,w=f==="end"?"top":"bottom");const h=m-c.top-c.bottom,g=y-c.left-c.right,x=sr(m-c[w],h),b=sr(y-c[v],g),C=!e.middlewareData.shift;let E=x,T=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=g),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=h),C&&!f){const A=ut(c.left,0),F=ut(c.right,0),D=ut(c.top,0),K=ut(c.bottom,0);p?T=y-2*(A!==0||F!==0?A+F:ut(c.left,c.right)):E=m-2*(D!==0||K!==0?D+K:ut(c.top,c.bottom))}await l({...e,availableWidth:T,availableHeight:E});const R=await o.getDimensions(a.floating);return y!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}};function vl(){return typeof window<"u"}function Xs(t){return ly(t)?(t.nodeName||"").toLowerCase():"#document"}function ft(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function nn(t){var e;return(e=(ly(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ly(t){return vl()?t instanceof Node||t instanceof ft(t).Node:!1}function Mt(t){return vl()?t instanceof Element||t instanceof ft(t).Element:!1}function tn(t){return vl()?t instanceof HTMLElement||t instanceof ft(t).HTMLElement:!1}function op(t){return!vl()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ft(t).ShadowRoot}function xo(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Ft(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function J1(t){return["table","td","th"].includes(Xs(t))}function yl(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function uf(t){const e=cf(),n=Mt(t)?Ft(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function X1(t){let e=ar(t);for(;tn(e)&&!Hs(e);){if(uf(e))return e;if(yl(e))return null;e=ar(e)}return null}function cf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hs(t){return["html","body","#document"].includes(Xs(t))}function Ft(t){return ft(t).getComputedStyle(t)}function wl(t){return Mt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ar(t){if(Xs(t)==="html")return t;const e=t.assignedSlot||t.parentNode||op(t)&&t.host||nn(t);return op(e)?e.host:e}function uy(t){const e=ar(t);return Hs(e)?t.ownerDocument?t.ownerDocument.body:t.body:tn(e)&&xo(e)?e:uy(e)}function ro(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=uy(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=ft(s);if(i){const a=kc(o);
vendor: 4,651 bytes, line 87
87return e.concat(o,o.visualViewport||[],xo(s)?s:[],a&&n?ro(a):[])}return e.concat(s,ro(s,[],n))}function kc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function cy(t){const e=Ft(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=tn(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=Ba(n)!==i||Ba(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function df(t){return Mt(t)?t:t.contextElement}function bs(t){const e=df(t);if(!tn(e))return ir(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=cy(e);let o=(i?Ba(n.width):n.width)/r,a=(i?Ba(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Z1=ir(0);function dy(t){const e=ft(t);return!cf()||!e.visualViewport?Z1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function eS(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ft(t)?!1:e}function Fr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=df(t);let o=ir(1);e&&(r?Mt(r)&&(o=bs(r)):o=bs(t));const a=eS(i,n,r)?dy(i):ir(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const f=ft(i),p=r&&Mt(r)?ft(r):r;let y=f,m=kc(y);for(;m&&r&&p!==y;){const w=bs(m),v=m.getBoundingClientRect(),h=Ft(m),g=v.left+(m.clientLeft+parseFloat(h.paddingLeft))*w.x,x=v.top+(m.clientTop+parseFloat(h.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=g,u+=x,y=ft(m),m=kc(y)}}return Ha({width:c,height:d,x:l,y:u})}function tS(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=nn(r),a=e?yl(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ir(1);const c=ir(0),d=tn(r);if((d||!d&&!i)&&((Xs(r)!=="body"||xo(o))&&(l=wl(r)),tn(r))){const f=Fr(r);u=bs(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function nS(t){return Array.from(t.getClientRects())}function Cc(t,e){const n=wl(t).scrollLeft;return e?e.left+n:Fr(nn(t)).left+n}function rS(t){const e=nn(t),n=wl(t),r=t.ownerDocument.body,s=ut(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=ut(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Cc(t);const a=-n.scrollTop;return Ft(r).direction==="rtl"&&(o+=ut(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function sS(t,e){const n=ft(t),r=nn(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=cf();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function iS(t,e){const n=Fr(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=tn(t)?bs(t):ir(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function ap(t,e,n){let r;if(e==="viewport")r=sS(t,n);else if(e==="document")r=rS(nn(t));else if(Mt(e))r=iS(e,n);else{const s=dy(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return Ha(r)}function fy(t,e){const n=ar(t);return n===e||!Mt(n)||Hs(n)?!1:Ft(n).position==="fixed"||fy(n,e)}function oS(t,e){const n=e.get(t);if(n)return n;let r=ro(t,[],!1).filter(a=>Mt(a)&&Xs(a)!=="body"),s=null;const i=Ft(t).position==="fixed";let o=i?ar(t):t;for(;Mt(o)&&!Hs(o);){const a=Ft(o),l=uf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||xo(o)&&!l&&fy(t,o))?r=r.filter(c=>c!==o):s=a,o=ar(o)}return e.set(t,r),r}function aS(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?yl(e)?[]:oS(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=ap(e,c,s);return u.top=ut(d.top,u.top),u.right=sr(d.right,u.right),u.bottom=sr(d.bottom,u.bottom),u.left=ut(d.left,u.left),u},ap(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lS(t){const{width:e,height:n}=cy(t);return{width:e,height:n}}function uS(t,e,n){const r=tn(e),s=nn(e),i=n==="fixed",o=Fr(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=ir(0);if(r||!r&&!i)if((Xs(e)!=="body"||xo(s))&&(a=wl(e)),r){const p=Fr(e,!0,i,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else s&&(l.x=Cc(s));let u=0,c=0;if(s&&!r&&!i){const p=s.getBoundingClientRect();c=p.top+a.scrollTop,u=p.left+a.scrollLeft-Cc(s,p)}const d=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-c;return{x:d,y:f,width:o.width,height:o.height}}function cu(t){return Ft(t).position==="static"}function lp(t,e){if(!tn(t)||Ft(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return nn(t)===n&&(n=n.ownerDocument.body),n}function hy(t,e){const n=ft(t);if(yl(t))return n;if(!tn(t)){let s=ar(t);for(;s&&!Hs(s);
vendor: 8,923 bytes, line 87
87){if(Mt(s)&&!cu(s))return s;s=ar(s)}return n}let r=lp(t,e);for(;r&&J1(r)&&cu(r);)r=lp(r,e);return r&&Hs(r)&&cu(r)&&!uf(r)?n:r||X1(t)||n}const cS=async function(t){const e=this.getOffsetParent||hy,n=this.getDimensions,r=await n(t.floating);return{reference:uS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dS(t){return Ft(t).direction==="rtl"}const fS={convertOffsetParentRelativeRectToViewportRelativeRect:tS,getDocumentElement:nn,getClippingRect:aS,getOffsetParent:hy,getElementRects:cS,getClientRects:nS,getDimensions:lS,getScale:bs,isElement:Mt,isRTL:dS};function hS(t,e){let n=null,r;const s=nn(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(a||e(),!d||!f)return;const p=Jo(c),y=Jo(s.clientWidth-(u+d)),m=Jo(s.clientHeight-(c+f)),w=Jo(u),h={rootMargin:-p+"px "+-y+"px "+-m+"px "+-w+"px",threshold:ut(0,sr(1,l))||1};let g=!0;function x(b){const C=b[0].intersectionRatio;if(C!==l){if(!g)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(x,{...h,root:s.ownerDocument})}catch{n=new IntersectionObserver(x,h)}n.observe(t)}return o(!0),i}function pS(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=df(t),c=s||i?[...u?ro(u):[],...ro(e)]:[];c.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&a?hS(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(v=>{let[h]=v;h&&h.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=p)==null||g.observe(e)})),n()}),u&&!l&&p.observe(u),p.observe(e));let y,m=l?Fr(t):null;l&&w();function w(){const v=Fr(t);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,y=requestAnimationFrame(w)}return n(),()=>{var v;c.forEach(h=>{s&&h.removeEventListener("scroll",n),i&&h.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(y)}}const mS=K1,gS=Q1,vS=H1,yS=Y1,wS=V1,up=W1,_S=G1,xS=(t,e,n)=>{const r=new Map,s={platform:fS,...n},i={...s.platform,_c:r};return B1(t,e,{...s,platform:i})};var va=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Va(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Va(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Va(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function py(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cp(t,e){const n=py(t);return Math.round(e*n)/n}function du(t){const e=_.useRef(t);return va(()=>{e.current=t}),e}function bS(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=_.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);Va(f,r)||p(r);const[y,m]=_.useState(null),[w,v]=_.useState(null),h=_.useCallback(P=>{P!==C.current&&(C.current=P,m(P))},[]),g=_.useCallback(P=>{P!==E.current&&(E.current=P,v(P))},[]),x=i||y,b=o||w,C=_.useRef(null),E=_.useRef(null),T=_.useRef(c),R=l!=null,A=du(l),F=du(s),D=du(u),K=_.useCallback(()=>{if(!C.current||!E.current)return;const P={placement:e,strategy:n,middleware:f};F.current&&(P.platform=F.current),xS(C.current,E.current,P).then(I=>{const U={...I,isPositioned:D.current!==!1};N.current&&!Va(T.current,U)&&(T.current=U,wo.flushSync(()=>{d(U)}))})},[f,e,n,F,D]);va(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[u]);const N=_.useRef(!1);va(()=>(N.current=!0,()=>{N.current=!1}),[]),va(()=>{if(x&&(C.current=x),b&&(E.current=b),x&&b){if(A.current)return A.current(x,b,K);K()}},[x,b,K,A,R]);const G=_.useMemo(()=>({reference:C,floating:E,setReference:h,setFloating:g}),[h,g]),B=_.useMemo(()=>({reference:x,floating:b}),[x,b]),Y=_.useMemo(()=>{const P={position:n,left:0,top:0};if(!B.floating)return P;const I=cp(B.floating,c.x),U=cp(B.floating,c.y);return a?{...P,transform:"translate("+I+"px, "+U+"px)",...py(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:U}},[n,a,B.floating,c.x,c.y]);return _.useMemo(()=>({...c,update:K,refs:G,elements:B,floatingStyles:Y}),[c,K,G,B,Y])}const SS=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?up({element:r.current,padding:s}).fn(n):{}:r?up({element:r,padding:s}).fn(n):{}}}},ES=(t,e)=>({...mS(t),options:[t,e]}),kS=(t,e)=>({...gS(t),options:[t,e]}),CS=(t,e)=>({..._S(t),options:[t,e]}),TS=(t,e)=>({...vS(t),options:[t,e]}),PS=(t,e)=>({...yS(t),options:[t,e]}),RS=(t,e)=>({...wS(t),options:[t,e]}),OS=(t,e)=>({...SS(t),options:[t,e]});var AS="Arrow",my=_.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return k.jsx(rt.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:k.jsx("polygon",{points:"0,0 30,0 15,10"})})});my.displayName=AS;var jS=my;function IS(t,e=[]){let n=[];function r(i,o){const a=_.createContext(o),l=n.length;n=[...n,o];function u(d){const{scope:f,children:p,...y}=d,m=(f==null?void 0:f[t][l])||a,w=_.useMemo(()=>y,Object.values(y));return k.jsx(m.Provider,{value:w,children:p})}function c(d,f){const p=(f==null?void 0:f[t][l])||a,y=_.useContext(p);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const s=()=>{const i=n.map(o=>_.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,NS(s,...e)]}function NS(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function LS(t){const[e,n]=_.useState(void 0);return rr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var ff="Popper",[gy,vy]=IS(ff),[$S,yy]=gy(ff),wy=t=>{const{__scopePopper:e,children:n}=t,[r,s]=_.useState(null);return k.jsx($S,{scope:e,anchor:r,onAnchorChange:s,children:n})};wy.displayName=ff;var _y="PopperAnchor",xy=_.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=yy(_y,n),o=_.useRef(null),a=Dt(e,o);return _.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:k.jsx(rt.div,{...s,ref:a})});xy.displayName=_y;var hf="PopperContent",[DS,MS]=gy(hf),by=_.forwardRef((t,e)=>{var Ct,_n,xn,bn,Co,Hr;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:y,...m}=t,w=yy(hf,n),[v,h]=_.useState(null),g=Dt(e,pr=>h(pr)),[x,b]=_.useState(null),C=LS(x),E=(C==null?void 0:C.width)??0,T=(C==null?void 0:C.height)??0,R=r+(i!=="center"?"-"+i:""),A=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},F=Array.isArray(u)?u:[u],D=F.length>0,K={padding:A,boundary:F.filter(US),altBoundary:D},{refs:N,floatingStyles:G,placement:B,isPositioned:Y,middlewareData:P}=bS({strategy:"fixed",placement:R,whileElementsMounted:(...pr)=>pS(...pr,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[ES({mainAxis:s+T,alignmentAxis:o}),l&&kS({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?CS():void 0,...K}),l&&TS({...K}),PS({...K,apply:({elements:pr,rects:si,availableWidth:To,availableHeight:Sn})=>{const{width:Rl,height:Ol}=si.reference,Oe=pr.floating.style;Oe.setProperty("--radix-popper-available-width",`${To}px`),Oe.setProperty("--radix-popper-available-height",`${Sn}px`),Oe.setProperty("--radix-popper-anchor-width",`${Rl}px`),Oe.setProperty("--radix-popper-anchor-height",`${Ol}
87px`)}}),x&&OS({element:x,padding:a}),zS({arrowWidth:E,arrowHeight:T}),f&&RS({strategy:"referenceHidden",...K})]}),[I,U]=ky(B),$=en(y);rr(()=>{Y&&($==null||$())},[Y,$]);const z=(Ct=P.arrow)==null?void 0:Ct.x,X=(_n=P.arrow)==null?void 0:_n.y,pe=((xn=P.arrow)==null?void 0:xn.centerOffset)!==0,[st,se]=_.useState();return rr(()=>{v&&se(window.getComputedStyle(v).zIndex)},[v]),k.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:Y?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:st,"--radix-popper-transform-origin":[(bn=P.transformOrigin)==null?void 0:bn.x,(Co=P.transformOrigin)==null?void 0:Co.y].join(" "),...((Hr=P.hide)==null?void 0:Hr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:k.jsx(DS,{scope:n,placedSide:I,onArrowChange:b,arrowX:z,arrowY:X,shouldHideArrow:pe,children:k.jsx(rt.div,{"data-side":I,"data-align":U,...m,ref:g,style:{...m.style,animation:Y?void 0:"none"}})})})});by.displayName=hf;var Sy="PopperArrow",FS={top:"bottom",right:"left",bottom:"top",left:"right"},Ey=_.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=MS(Sy,r),o=FS[i.placedSide];return k.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:k.jsx(jS,{...s,ref:n,style:{...s.style,display:"block"}})})});Ey.displayName=Sy;function US(t){return t!==null}var zS=t=>({name:"transformOrigin",options:t,fn(e){var w,v,h;const{placement:n,rects:r,middlewareData:s}=e,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=ky(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,p=(((h=s.arrow)==null?void 0:h.y)??0)+l/2;let y="",m="";return u==="bottom"?(y=o?d:`${f}px`,m=`${-l}px`):u==="top"?(y=o?d:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,m=o?d:`${p}px`):u==="left"&&(y=`${r.floating.width+l}px`,m=o?d:`${p}px`),{data:{x:y,y:m}}}});function ky(t){const[e,n="center"]=t.split("-");return[e,n]}var BS=wy,WS=xy,HS=by,VS=Ey,[_l,gR]=Sv("Tooltip",[vy]),xl=vy(),Cy="TooltipProvider",qS=700,Tc="tooltip.open",[KS,pf]=_l(Cy),Ty=t=>{const{__scopeTooltip:e,delayDuration:n=qS,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=_.useState(!0),l=_.useRef(!1),u=_.useRef(0);return _.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),k.jsx(KS,{scope:e,isOpenDelayed:o,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:_.useCallback(c=>{l.current=c},[]),disableHoverableContent:s,children:i})};Ty.displayName=Cy;var bl="Tooltip",[QS,bo]=_l(bl),Py=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,l=pf(bl,t.__scopeTooltip),u=xl(e),[c,d]=_.useState(null),f=I1(),p=_.useRef(0),y=o??l.disableHoverableContent,m=a??l.delayDuration,w=_.useRef(!1),[v=!1,h]=Pv({prop:r,defaultProp:s,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Tc))):l.onClose(),i==null||i(E)}}),g=_.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),x=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w.current=!1,h(!0)},[h]),b=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h(!1)},[h]),C=_.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{w.current=!0,h(!0),p.current=0},m)},[m,h]);return _.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),k.jsx(BS,{...u,children:k.jsx(QS,{scope:e,contentId:f,open:v,stateAttribute:g,trigger:c,onTriggerChange:d,onTriggerEnter:_.useCallback(()=>{l.isOpenDelayed?C():x()},[l.isOpenDelayed,C,x]),onTriggerLeave:_.useCallback(()=>{y?b():(window.clearTimeout(p.current),p.current=0)},[b,y]),onOpen:x,onClose:b,disableHoverableContent:y,children:n})})};Py.displayName=bl;var Pc="TooltipTrigger",Ry=_.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=bo(Pc,n),i=pf(Pc,n),o=xl(n),a=_.useRef(null),l=Dt(e,a,s.onTriggerChange),u=_.useRef(!1),c=_.useRef(!1),d=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),k.jsx(WS,{asChild:!0,...o,children:k.jsx(rt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Ce(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ce(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Ce(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ce(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Ce(t.onBlur,s.onClose),onClick:Ce(t.onClick,s.onClose)})})});Ry.displayName=Pc;var mf="TooltipPortal",[GS,YS]=_l(mf,{forceMount:void 0}),Oy=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:s}=t,i=bo(mf,e);return k.jsx(GS,{scope:e,forceMount:n,children:k.jsx(hl,{present:n||i.open,children:k.jsx(Zd,{asChild:!0,container:s,children:r})})})};
vendor: 4,789 bytes, line 87
87Oy.displayName=mf;var Vs="TooltipContent",Ay=_.forwardRef((t,e)=>{const n=YS(Vs,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=bo(Vs,t.__scopeTooltip);return k.jsx(hl,{present:r||o.open,children:o.disableHoverableContent?k.jsx(jy,{side:s,...i,ref:e}):k.jsx(JS,{side:s,...i,ref:e})})}),JS=_.forwardRef((t,e)=>{const n=bo(Vs,t.__scopeTooltip),r=pf(Vs,t.__scopeTooltip),s=_.useRef(null),i=Dt(e,s),[o,a]=_.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,f=_.useCallback(()=>{a(null),d(!1)},[d]),p=_.useCallback((y,m)=>{const w=y.currentTarget,v={x:y.clientX,y:y.clientY},h=tE(v,w.getBoundingClientRect()),g=nE(v,h),x=rE(m.getBoundingClientRect()),b=iE([...g,...x]);a(b),d(!0)},[d]);return _.useEffect(()=>()=>f(),[f]),_.useEffect(()=>{if(l&&c){const y=w=>p(w,c),m=w=>p(w,l);return l.addEventListener("pointerleave",y),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",y),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),_.useEffect(()=>{if(o){const y=m=>{const w=m.target,v={x:m.clientX,y:m.clientY},h=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),g=!sE(v,o);h?f():g&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,c,o,u,f]),k.jsx(jy,{...t,ref:i})}),[XS,ZS]=_l(bl,{isInside:!1}),jy=_.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=bo(Vs,n),u=xl(n),{onClose:c}=l;return _.useEffect(()=>(document.addEventListener(Tc,c),()=>document.removeEventListener(Tc,c)),[c]),_.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),k.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:k.jsxs(HS,{"data-state":l.stateAttribute,...u,...a,ref:e,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:[k.jsx(bv,{children:r}),k.jsx(XS,{scope:n,isInside:!0,children:k.jsx(Kx,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Ay.displayName=Vs;var Iy="TooltipArrow",eE=_.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=xl(n);return ZS(Iy,n).isInside?null:k.jsx(VS,{...s,...r,ref:e})});eE.displayName=Iy;function tE(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nE(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function rE(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function sE(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i].x,l=e[i].y,u=e[o].x,c=e[o].y;l>r!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(s=!s)}return s}function iE(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),oE(e)}function oE(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var aE=Ty,lE=Py,uE=Ry,cE=Oy,Ny=Ay;const dE=aE,vR=lE,yR=uE,fE=_.forwardRef(({className:t,sideOffset:e=4,side:n="top",align:r="center",...s},i)=>k.jsx(cE,{children:k.jsx(Ny,{ref:i,sideOffset:e,side:n,align:r,className:Ut("z-[9999] pointer-events-auto overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
87de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s})}));fE.displayName=Ny.displayName;var So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ur=typeof window>"u"||"Deno"in globalThis;function yt(){}function hE(t,e){return typeof t=="function"?t(e):t}function Rc(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ly(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ss(t,e){return typeof t=="function"?t(e):t}function It(t,e){return typeof t=="function"?t(e):t}function dp(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==gf(o,e.options))return!1}else if(!io(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function fp(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(so(e.options.mutationKey)!==so(i))return!1}else if(!io(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function gf(t,e){return((e==null?void 0:e.queryKeyHashFn)||so)(t)}function so(t){return JSON.stringify(t,(e,n)=>Ac(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function io(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!io(t[n],e[n])):!1}function $y(t,e){if(t===e)return t;const n=hp(t)&&hp(e);if(n||Ac(t)&&Ac(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u];(!n&&r.includes(c)||n)&&t[c]===void 0&&e[c]===void 0?(a[c]=void 0,l++):(a[c]=$y(t[c],e[c]),a[c]===t[c]&&t[c]!==void 0&&l++)}return s===o&&l===s?t:a}return e}function Oc(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function hp(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ac(t){if(!pp(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!pp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function pp(t){return Object.prototype.toString.call(t)==="[object Object]"}function pE(t){return new Promise(e=>{setTimeout(e,t)})}function jc(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?$y(t,e):e}function mE(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function gE(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var vf=Symbol();function Dy(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===vf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var kr,$n,Es,Yp,vE=(Yp=class extends So{constructor(){super();W(this,kr);W(this,$n);W(this,Es);M(this,Es,e=>{if(!Ur&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,$n)||this.setEventListener(S(this,Es))}onUnsubscribe(){var e;this.hasListeners()||((e=S(this,$n))==null||e.call(this),M(this,$n,void 0))}setEventListener(e){var n;M(this,Es,e),(n=S(this,$n))==null||n.call(this),M(this,$n,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){S(this,kr)!==e&&(M(this,kr,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof S(this,kr)=="boolean"?S(this,kr):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},kr=new WeakMap,$n=new WeakMap,Es=new WeakMap,Yp),yf=new vE,ks,Dn,Cs,Jp,yE=(Jp=class extends So{constructor(){super();W(this,ks,!0);W(this,Dn);W(this,Cs);M(this,Cs,e=>{if(!Ur&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,Dn)||this.setEventListener(S(this,Cs))}onUnsubscribe(){var e;this.hasListeners()||((e=S(this,Dn))==null||e.call(this),M(this,Dn,void 0))}setEventListener(e){var n;M(this,Cs,e),(n=S(this,Dn))==null||n.call(this),M(this,Dn,e(this.setOnline.bind(this)))}setOnline(e){S(this,ks)!==e&&(M(this,ks,e),this.listeners.forEac
vendor: 28,790 bytes, line 87
87h(r=>{r(e)}))}isOnline(){return S(this,ks)}},ks=new WeakMap,Dn=new WeakMap,Cs=new WeakMap,Jp),qa=new yE;function Ic(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function wE(t){return Math.min(1e3*2**t,3e4)}function My(t){return(t??"online")==="online"?qa.isOnline():!0}var Fy=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function fu(t){return t instanceof Fy}function Uy(t){let e=!1,n=0,r=!1,s;const i=Ic(),o=m=>{var w;r||(f(new Fy(m)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>yf.isFocused()&&(t.networkMode==="always"||qa.isOnline())&&t.canRun(),c=()=>My(t.networkMode)&&t.canRun(),d=m=>{var w;r||(r=!0,(w=t.onSuccess)==null||w.call(t,m),s==null||s(),i.resolve(m))},f=m=>{var w;r||(r=!0,(w=t.onError)==null||w.call(t,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var w;s=v=>{(r||u())&&m(v)},(w=t.onPause)==null||w.call(t)}).then(()=>{var m;s=void 0,r||(m=t.onContinue)==null||m.call(t)}),y=()=>{if(r)return;let m;const w=n===0?t.initialPromise:void 0;try{m=w??t.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var C;if(r)return;const h=t.retry??(Ur?0:3),g=t.retryDelay??wE,x=typeof g=="function"?g(n,v):g,b=h===!0||typeof h=="number"&&n<h||typeof h=="function"&&h(n,v);if(e||!b){f(v);return}n++,(C=t.onFail)==null||C.call(t,n,v),pE(x).then(()=>u()?void 0:p()).then(()=>{e?f(v):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():p().then(y),i)}}function _E(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Ie=_E(),Cr,Xp,zy=(Xp=class{constructor(){W(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rc(this.gcTime)&&M(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ur?1/0:5*60*1e3))}clearGcTimeout(){S(this,Cr)&&(clearTimeout(S(this,Cr)),M(this,Cr,void 0))}},Cr=new WeakMap,Xp),Ts,Ps,vt,Fe,uo,Tr,Rt,on,Zp,xE=(Zp=class extends zy{constructor(e){super();W(this,Rt);W(this,Ts);W(this,Ps);W(this,vt);W(this,Fe);W(this,uo);W(this,Tr);M(this,Tr,!1),M(this,uo,e.defaultOptions),this.setOptions(e.options),this.observers=[],M(this,vt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,M(this,Ts,bE(this.options)),this.state=e.state??S(this,Ts),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=S(this,Fe))==null?void 0:e.promise}setOptions(e){this.options={...S(this,uo),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,vt).remove(this)}setData(e,n){const r=jc(this.state.data,e,this.options);return Z(this,Rt,on).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Z(this,Rt,on).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=S(this,Fe))==null?void 0:r.promise;return(s=S(this,Fe))==null||s.cancel(e),n?n.then(yt).catch(yt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Ts))}isActive(){return this.observers.some(e=>It(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Ly(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=S(this,Fe))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=S(this,Fe))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),S(this,vt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(S(this,Fe)&&(S(this,Tr)?S(this,Fe).cancel({revert:!0}):S(this,Fe).cancelRetry()),this.scheduleGc()),S(this,vt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Z(this,Rt,on).call(this,{type:"invalidate"})}fetch(e,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,Fe))return S(this,Fe).continueRetry(),S(this,Fe).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(M(this,Tr,!0),r.signal)})},i=()=>{const d=Dy(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return s(f),M(this,Tr,!1),this.options.persister?this.options.persister(d,f,this):d(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),M(this,Ps,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&Z(this,Rt,on).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,p,y,m;fu(d)&&d.silent||Z(this,Rt,on).call(this,{type:"error",error:d}),fu(d)||((p=(f=S(this,vt).config).onError)==null||p.call(f,d,this),(m=(y=S(this,vt).config).onSettled)==null||m.call(y,this.state.data,d,this)),this.scheduleGc()};return M(this,Fe,Uy({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,y,m;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){a(w);return}(p=(f=S(this,vt).config).onSuccess)==null||p.call(f,d,this),(m=(y=S(this,vt).config).onSettled)==null||m.call(y,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{Z(this,Rt,on).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{Z(this,Rt,on).call(this,{type:"pause"})},onContinue:()=>{Z(this,Rt,on).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,Fe).start()}},Ts=new WeakMap,Ps=new WeakMap,vt=new WeakMap,Fe=new WeakMap,uo=new WeakMap,Tr=new WeakMap,Rt=new WeakSet,on=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...By(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return fu(s)&&s.revert&&S(this,Ps)?{...S(this,Ps),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ie.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,vt).notify({query:this,type:"updated",action:e})})},Zp);function By(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:My(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function bE(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kt,em,SE=(em=class extends So{constructor(e={}){super();W(this,Kt);this.config=e,M(this,Kt,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??gf(s,n);let o=this.get(i);return o||(o=new xE({cache:this,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){S(this,Kt).has(e.queryHash)||(S(this,Kt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=S(this,Kt).get(e.queryHash);n&&(e.destroy(),n===e&&S(this,Kt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ie.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return S(this,Kt).get(e)}getAll(){return[...S(this,Kt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>dp(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>dp(e,r)):n}notify(e){Ie.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ie.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ie.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Kt=new WeakMap,em),Qt,We,Pr,Gt,Rn,tm,EE=(tm=class extends zy{constructor(e){super();W(this,Gt);W(this,Qt);W(this,We);W(this,Pr);this.mutationId=e.mutationId,M(this,We,e.mutationCache),M(this,Qt,[]),this.state=e.state||kE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){S(this,Qt).includes(e)||(S(this,Qt).push(e),this.clearGcTimeout(),S(this,We).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){M(this,Qt,S(this,Qt).filter(n=>n!==e)),this.scheduleGc(),S(this,We).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){S(this,Qt).length||(this.state.status==="pending"?this.scheduleGc():S(this,We).remove(this))}continue(){var e;return((e=S(this,Pr))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,i,o,a,l,u,c,d,f,p,y,m,w,v,h,g,x,b,C,E;M(this,Pr,Uy({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(T,R)=>{Z(this,Gt,Rn).call(this,{type:"failed",failureCount:T,error:R})},onPause:()=>{Z(this,Gt,Rn).call(this,{type:"pause"})},onContinue:()=>{Z(this,Gt,Rn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,We).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Pr).canStart();try{if(!n){Z(this,Gt,Rn).call(this,{type:"pending",variables:e,isPaused:r}),await((i=(s=S(this,We).config).onMutate)==null?void 0:i.call(s,e,this));const R=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));R!==this.state.context&&Z(this,Gt,Rn).call(this,{type:"pending",context:R,variables:e,isPaused:r})}const T=await S(this,Pr).start();return await((u=(l=S(this,We).config).onSuccess)==null?void 0:u.call(l,T,e,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,T,e,this.state.context)),await((p=(f=S(this,We).config).onSettled)==null?void 0:p.call(f,T,null,this.state.variables,this.state.context,this)),await((m=(y=this.options).onSettled)==null?void 0:m.call(y,T,null,e,this.state.context)),Z(this,Gt,Rn).call(this,{type:"success",data:T}),T}catch(T){try{throw await((v=(w=S(this,We).config).onError)==null?void 0:v.call(w,T,e,this.state.context,this)),await((g=(h=this.options).onError)==null?void 0:g.call(h,T,e,this.state.context)),await((b=(x=S(this,We).config).onSettled)==null?void 0:b.call(x,void 0,T,this.state.variables,this.state.context,this)),await((E=(C=this.options).onSettled)==null?void 0:E.call(C,void 0,T,e,this.state.context)),T}finally{Z(this,Gt,Rn).call(this,{type:"error",error:T})}}finally{S(this,We).runNext(this)}}},Qt=new WeakMap,We=new WeakMap,Pr=new WeakMap,Gt=new WeakSet,Rn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ie.batch(()=>{S(this,Qt).forEach(r=>{r.onMutationUpdate(e)}),S(this,We).notify({mutation:this,type:"updated",action:e})})},tm);function kE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ot,co,nm,CE=(nm=class extends So{constructor(e={}){super();W(this,ot);W(this,co);this.config=e,M(this,ot,new Map),M(this,co,Date.now())}build(e,n,r){const s=new EE({mutationCache:this,mutationId:++Oo(this,co)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){const n=Xo(e),r=S(this,ot).get(n)??[];r.push(e),S(this,ot).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=Xo(e);if(S(this,ot).has(n)){const s=(r=S(this,ot).get(n))==null?void 0:r.filter(i=>i!==e);s&&(s.length===0?S(this,ot).delete(n):S(this,ot).set(n,s))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=S(this,ot).get(Xo(e)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=S(this,ot).get(Xo(e)))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ie.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...S(this,ot).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>fp(n,r))}findAll(e={}){return this.getAll().filter(n=>fp(e,n))}notify(e){Ie.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ie.batch(()=>Promise.all(e.map(n=>n.continue().catch(yt))))}},ot=new WeakMap,co=new WeakMap,nm);function Xo(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function mp(t){return{onFetch:(e,n)=>{var c,d,f,p,y;const r=e.options,s=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=e.state.data)==null?void 0:p.pages)||[],o=((y=e.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const w=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},v=Dy(e.options,e.fetchOptions),h=async(g,x,b)=>{if(m)return Promise.reject();if(x==null&&g.pages.length)return Promise.resolve(g);const C={queryKey:e.queryKey,pageParam:x,direction:b?"backward":"forward",meta:e.options.meta};w(C);const E=await v(C),{maxPages:T}=e.options,R=b?gE:mE;return{pages:R(g.pages,E,T),pageParams:R(g.pageParams,x,T)}};if(s&&i.length){const g=s==="backward",x=g?TE:gp,b={pages:i,pageParams:o},C=x(r,b);a=await h(b,C,g)}else{const g=t??i.length;do{const x=l===0?o[0]??r.initialPageParam:gp(r,a);if(l>0&&x==null)break;a=await h(a,x),l++}while(l<g)}return a};e.options.persister?e.fetchFn=()=>{var m,w;return(w=(m=e.options).persister)==null?void 0:w.call(m,u,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function gp(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function TE(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var ye,Mn,Fn,Rs,Os,Un,As,js,rm,PE=(rm=class{constructor(t={}){W(this,ye);W(this,Mn);W(this,Fn);W(this,Rs);W(this,Os);W(this,Un);W(this,As);W(this,js);M(this,ye,t.queryCache||new SE),M(this,Mn,t.mutationCache||new CE),M(this,Fn,t.defaultOptions||{}),M(this,Rs,new Map),M(this,Os,new Map),M(this,Un,0)}mount(){Oo(this,Un)._++,S(this,Un)===1&&(M(this,As,yf.subscribe(async t=>{t&&(await this.resumePausedMutations(),S(this,ye).onFocus())})),M(this,js,qa.subscribe(async t=>{t&&(await this.resumePausedMutations(),S(this,ye).onOnline())})))}unmount(){var t,e;Oo(this,Un)._--,S(this,Un)===0&&((t=S(this,As))==null||t.call(this),M(this,As,void 0),(e=S(this,js))==null||e.call(this),M(this,js,void 0))}isFetching(t){return S(this,ye).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return S(this,Mn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=S(this,ye).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=S(this,ye).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Ss(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return S(this,ye).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=S(this,ye).get(r.queryHash),i=s==null?void 0:s.state.data,o=hE(e,i);if(o!==void 0)return S(this,ye).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Ie.batch(()=>S(this,ye).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=S(this,ye).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=S(this,ye);Ie.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=S(this,ye),r={type:"active",...t};return Ie.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Ie.batch(()=>S(this,ye).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(yt).catch(yt)}invalidateQueries(t={},e={}){return Ie.batch(()=>{if(S(this,ye).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Ie.batch(()=>S(this,ye).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(yt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(yt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=S(this,ye).build(this,e);return n.isStaleByTime(Ss(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(yt).catch(yt)}fetchInfiniteQuery(t){return t.behavior=mp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(yt).catch(yt)}ensureInfiniteQueryData(t){return t.behavior=mp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return qa.isOnline()?S(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,ye)}getMutationCache(){return S(this,Mn)}getDefaultOptions(){return S(this,Fn)}setDefaultOptions(t){M(this,Fn,t)}setQueryDefaults(t,e){S(this,Rs).set(so(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...S(this,Rs).values()];let n={};return e.forEach(r=>{io(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){S(this,Os).set(so(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...S(this,Os).values()];let n={};return e.forEach(r=>{io(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...S(this,Fn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=gf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===vf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...S(this,Fn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){S(this,ye).clear(),S(this,Mn).clear()}},ye=new WeakMap,Mn=new WeakMap,Fn=new WeakMap,Rs=new WeakMap,Os=new WeakMap,Un=new WeakMap,As=new WeakMap,js=new WeakMap,rm),Ye,ee,fo,He,Rr,Is,zn,Yt,ho,Ns,Ls,Or,Ar,Bn,$s,re,Si,Nc,Lc,$c,Dc,Mc,Fc,Uc,Wy,sm,RE=(sm=class extends So{constructor(e,n){super();W(this,re);W(this,Ye);W(this,ee);W(this,fo);W(this,He);W(this,Rr);W(this,Is);W(this,zn);W(this,Yt);W(this,ho);W(this,Ns);W(this,Ls);W(this,Or);W(this,Ar);W(this,Bn);W(this,$s,new Set);this.options=n,M(this,Ye,e),M(this,Yt,null),M(this,zn,Ic()),this.options.experimental_prefetchInRender||S(this,zn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,ee).addObserver(this),vp(S(this,ee),this.options)?Z(this,re,Si).call(this):this.updateResult(),Z(this,re,Dc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zc(S(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zc(S(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Z(this,re,Mc).call(this),Z(this,re,Fc).call(this),S(this,ee).removeObserver(this)}setOptions(e,n){const r=this.options,s=S(this,ee);if(this.options=S(this,Ye).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof It(this.options.enabled,S(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Z(this,re,Uc).call(this),S(this,ee).setOptions(this.options),r._defaulted&&!Oc(this.options,r)&&S(this,Ye).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ee),observer:this});const i=this.hasListeners();i&&yp(S(this,ee),s,this.options,r)&&Z(this,re,Si).call(this),this.updateResult(n),i&&(S(this,ee)!==s||It(this.options.enabled,S(this,ee))!==It(r.enabled,S(this,ee))||Ss(this.options.staleTime,S(this,ee))!==Ss(r.staleTime,S(this,ee)))&&Z(this,re,Nc).call(this);const o=Z(this,re,Lc).call(this);i&&(S(this,ee)!==s||It(this.options.enabled,S(this,ee))!==It(r.enabled,S(this,ee))||o!==S(this,Bn))&&Z(this,re,$c).call(this,o)}getOptimisticResult(e){const n=S(this,Ye).getQueryCache().build(S(this,Ye),e),r=this.createResult(n,e);return AE(this,r)&&(M(this,He,r),M(this,Is,this.options),M(this,Rr,S(this,ee).state)),r}getCurrentResult(){return S(this,He)}trackResult(e,n){const r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),e[s])})}),r}trackProp(e){S(this,$s).add(e)}getCurrentQuery(){return S(this,ee)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=S(this,Ye).defaultQueryOptions(e),r=S(this,Ye).getQueryCache().build(S(this,Ye),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Z(this,re,Si).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,He)))}createResult(e,n){var T;const r=S(this,ee),s=this.options,i=S(this,He),o=S(this,Rr),a=S(this,Is),u=e!==r?e.state:S(this,fo),{state:c}=e;let d={...c},f=!1,p;if(n._optimisticResults){const R=this.hasListeners(),A=!R&&vp(e,n),F=R&&yp(e,r,n,s);(A||F)&&(d={...d,...By(c.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:w}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(o==null?void 0:o.data)&&n.select===S(this,ho))p=S(this,Ns);else try{M(this,ho,n.select),p=n.select(d.data),p=jc(i==null?void 0:i.data,p,n),M(this,Ns,p),M(this,Yt,null)}catch(R){M(this,Yt,R)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&w==="pending"){let R;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))R=i.data;else if(R=typeof n.placeholderData=="function"?n.placeholderData((T=S(this,Ls))==null?void 0:T.state.data,S(this,Ls)):n.placeholderData,n.select&&R!==void 0)try{R=n.select(R),M(this,Yt,null)}catch(A){M(this,Yt,A)}R!==void 0&&(w="success",p=jc(i==null?void 0:i.data,R,n),f=!0)}S(this,Yt)&&(y=S(this,Yt),p=S(this,Ns),m=Date.now(),w="error");const v=d.fetchStatus==="fetching",h=w==="pending",g=w==="error",x=h&&v,b=p!==void 0,E={status:w,fetchStatus:d.fetchStatus,isPending:h,isSuccess:w==="success",isError:g,isInitialLoading:x,isLoading:x,data:p,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!h,isLoadingError:g&&!b,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:g&&b,isStale:wf(e,n),refetch:this.refetch,promise:S(this,zn)};if(this.options.experimental_prefetchInRender){const R=D=>{E.status==="error"?D.reject(E.error):E.data!==void 0&&D.resolve(E.data)},A=()=>{const D=M(this,zn,E.promise=Ic());R(D)},F=S(this,zn);switch(F.status){case"pending":e.queryHash===r.queryHash&&R(F);break;case"fulfilled":(E.status==="error"||E.data!==F.value)&&A();break;case"rejected":(E.status!=="error"||E.error!==F.reason)&&A();break}}return E}updateResult(e){const n=S(this,He),r=this.createResult(S(this,ee),this.options);if(M(this,Rr,S(this,ee).state),M(this,Is,this.options),S(this,Rr).data!==void 0&&M(this,Ls,S(this,ee)),Oc(r,n))return;M(this,He,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,$s).size)return!0;const l=new Set(a??S(this,$s));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,He)).some(u=>{const c=u;return S(this,He)[c]!==n[c]&&l.has(c)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),Z(this,re,Wy).call(this,{...s,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Z(this,re,Dc).call(this)}},Ye=new WeakMap,ee=new WeakMap,fo=new WeakMap,He=new WeakMap,Rr=new WeakMap,Is=new WeakMap,zn=new WeakMap,Yt=new WeakMap,ho=new WeakMap,Ns=new WeakMap,Ls=new WeakMap,Or=new WeakMap,Ar=new WeakMap,Bn=new WeakMap,$s=new WeakMap,re=new WeakSet,Si=function(e){Z(this,re,Uc).call(this);let n=S(this,ee).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(yt)),n},Nc=function(){Z(this,re,Mc).call(this);const e=Ss(this.options.staleTime,S(this,ee));if(Ur||S(this,He).isStale||!Rc(e))return;const r=Ly(S(this,He).dataUpdatedAt,e)+1;M(this,Or,setTimeout(()=>{S(this,He).isStale||this.updateResult()},r))},Lc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ee)):this.options.refetchInterval)??!1},$c=function(e){Z(this,re,Fc).call(this),M(this,Bn,e),!(Ur||It(this.options.enabled,S(this,ee))===!1||!Rc(S(this,Bn))||S(this,Bn)===0)&&M(this,Ar,setInterval(()=>{(this.options.refetchIntervalInBackground||yf.isFocused())&&Z(this,re,Si).call(this)},S(this,Bn)))},Dc=function(){Z(this,re,Nc).call(this),Z(this,re,$c).call(this,Z(this,re,Lc).call(this))},Mc=function(){S(this,Or)&&(clearTimeout(S(this,Or)),M(this,Or,void 0))},Fc=function(){S(this,Ar)&&(clearInterval(S(this,Ar)),M(this,Ar,void 0))},Uc=function(){const e=S(this,Ye).getQueryCache().build(S(this,Ye),this.options);if(e===S(this,ee))return;const n=S(this,ee);M(this,ee,e),M(this,fo,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Wy=function(e){Ie.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(S(this,He))}),S(this,Ye).getQueryCache().notify({query:S(this,ee),type:"observerResultsUpdated"})})},sm);function OE(t,e){return It(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOn
87Mount===!1)}function vp(t,e){return OE(t,e)||t.state.data!==void 0&&zc(t,e,e.refetchOnMount)}function zc(t,e,n){if(It(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&wf(t,e)}return!1}function yp(t,e,n,r){return(t!==e||It(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&wf(t,n)}function wf(t,e){return It(e.enabled,t)!==!1&&t.isStaleByTime(Ss(e.staleTime,t))}function AE(t,e){return!Oc(t.getCurrentResult(),e)}var Hy=_.createContext(void 0),Vy=t=>{const e=_.useContext(Hy);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},jE=({client:t,children:e})=>(_.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),k.jsx(Hy.Provider,{value:t,children:e})),qy=_.createContext(!1),IE=()=>_.useContext(qy);qy.Provider;function NE(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var LE=_.createContext(NE()),$E=()=>_.useContext(LE);function DE(t,e){return typeof t=="function"?t(...e):!!t}function ME(){}var FE=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},UE=t=>{_.useEffect(()=>{t.clearReset()},[t])},zE=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&DE(n,[t.error,r]),BE=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},WE=(t,e)=>t.isLoading&&t.isFetching&&!e,HE=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,wp=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function VE(t,e,n){var c,d,f,p,y;const r=Vy(),s=IE(),i=$E(),o=r.defaultQueryOptions(t);(d=(c=r.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||d.call(c,o),o._optimisticResults=s?"isRestoring":"optimistic",BE(o),FE(o,i),UE(i);const a=!r.getQueryCache().get(o.queryHash),[l]=_.useState(()=>new e(r,o)),u=l.getOptimisticResult(o);if(_.useSyncExternalStore(_.useCallback(m=>{const w=s?()=>{}:l.subscribe(Ie.batchCalls(m));return l.updateResult(),w},[l,s]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),_.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),HE(o,u))throw wp(o,l,i);if(zE({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,u),o.experimental_prefetchInRender&&!Ur&&WE(u,s)){const m=a?wp(o,l,i):(y=r.getQueryCache().get(o.queryHash))==null?void 0:y.promise;m==null||m.catch(ME).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function qE(t,e){return VE(t,RE)}var KE=function(){return null};/** 88 * @remix-run/router v1.20.0 89 * 90 * Copyright (c) Remix Software Inc. 91 * 92 * This source code is licensed under the MIT license found in the 93 * LICENSE.md file in the root directory of this source tree. 94 * 95 * @license MIT 96 */function oo(){return oo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},oo.apply(this,arguments)}var Vn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Vn||(Vn={}));const _p="popstate";function QE(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return Bc("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Ka(s)}return YE(e,n,null,t)}function xe(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ky(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function GE(){return Math.random().toString(36).substr(2,8)}function xp(t,e){return{usr:t.state,key:t.key,idx:e}}function Bc(t,e,n,r){return n===void 0&&(n=null),oo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Zs(e):e,{state:n,key:e&&e.key||r||GE()})}function Ka(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Zs(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function YE(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Vn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(oo({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=Vn.Pop;let w=c(),v=w==null?null:w-u;u=w,l&&l({action:a,location:m.location,delta:v})}function f(w,v){a=Vn.Push;let h=Bc(m.location,w,v);u=c()+1;let g=xp(h,u),x=m.createHref(h);try{o.pushState(g,"",x)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;s.location.assign(x)}i&&l&&l({action:a,location:m.location,delta:1})}function p(w,v){a=Vn.Replace;let h=Bc(m.location,w,v);u=c();let g=xp(h,u),x=m.createHref(h);o.replaceState(g,"",x),i&&l&&l({action:a,location:m.location,delta:0})}function y(w){let v=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof w=="string"?w:Ka(w);return h=h.replace(/ $/,"%20"),xe(v,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,v)}let m={get action(){return a},get location(){return t(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(_p,d),l=w,()=>{s.removeEventListener(_p,d),l=null}},createHref(w){return e(s,w)},createURL:y,encodeLocation(w){let v=y(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:p,go(w){return o.go(w)}};return m}var bp;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(bp||(bp={}));function JE(t,e,n){return n===void 0&&(n="/"),XE(t,e,n,!1)}function XE(t,e,n,r){let s=typeof e=="string"?Zs(e):e,i=_f(s.pathname||"/",n);if(i==null)return null;let o=Qy(t);ZE(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=ck(i);a=lk(o[l],u,r)}return a}function Qy(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");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("/")&&(xe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
96id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=er([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Qy(i.children,e,c,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:ok(u,i.index),routesMeta:c})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Gy(i.path))s(i,o,l)}),e}function Gy(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Gy(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function ZE(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:ak(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ek=/^:[\w-]+$/,tk=3,nk=2,rk=1,sk=10,ik=-2,Sp=t=>t==="*";function ok(t,e){let n=t.split("/"),r=n.length;return n.some(Sp)&&(r+=ik),e&&(r+=nk),n.filter(s=>!Sp(s)).reduce((s,i)=>s+(ek.test(i)?tk:i===""?rk:sk),r)}function ak(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function lk(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=Ep({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Ep({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 13,664 bytes, lines 96-114
96Object.assign(s,d.params),o.push({params:s,pathname:er([i,d.pathname]),pathnameBase:pk(er([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=er([i,d.pathnameBase]))}return o}function Ep(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=uk(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:p}=c;if(f==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const y=a[d];return p&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function uk(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Ky(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function ck(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ky(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function _f(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function dk(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Zs(t):t;return{pathname:n?n.startsWith("/")?n:fk(n,e):e,search:mk(r),hash:gk(s)}}function fk(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hu(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hk(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function xf(t,e){let n=hk(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function bf(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Zs(t):(s=oo({},t),xe(!s.pathname||!s.pathname.includes("?"),hu("?","pathname","search",s)),xe(!s.pathname||!s.pathname.includes("#"),hu("#","pathname","hash",s)),xe(!s.search||!s.search.includes("#"),hu("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=dk(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const er=t=>t.join("/").replace(/\/\/+/g,"/"),pk=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mk=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,gk=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function vk(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Yy=["post","put","patch","delete"];new Set(Yy);const yk=["get",...Yy];new Set(yk);/** 97 * React Router v6.27.0 98 * 99 * Copyright (c) Remix Software Inc. 100 * 101 * This source code is licensed under the MIT license found in the 102 * LICENSE.md file in the root directory of this source tree. 103 * 104 * @license MIT 105 */function ao(){return ao=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ao.apply(this,arguments)}const Sf=_.createContext(null),wk=_.createContext(null),dr=_.createContext(null),Sl=_.createContext(null),fr=_.createContext({outlet:null,matches:[],isDataRoute:!1}),Jy=_.createContext(null);function _k(t,e){let{relative:n}=e===void 0?{}:e;ei()||xe(!1);let{basename:r,navigator:s}=_.useContext(dr),{hash:i,pathname:o,search:a}=e0(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:er([r,o])),s.createHref({pathname:l,search:a,hash:i})}function ei(){return _.useContext(Sl)!=null}function ti(){return ei()||xe(!1),_.useContext(Sl).location}function Xy(t){_.useContext(dr).static||_.useLayoutEffect(t)}function Zy(){let{isDataRoute:t}=_.useContext(fr);return t?Ik():xk()}function xk(){ei()||xe(!1);let t=_.useContext(Sf),{basename:e,future:n,navigator:r}=_.useContext(dr),{matches:s}=_.useContext(fr),{pathname:i}=ti(),o=JSON.stringify(xf(s,n.v7_relativeSplatPath)),a=_.useRef(!1);return Xy(()=>{a.current=!0}),_.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=bf(u,JSON.parse(o),i,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:er([e,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[e,r,o,i,t])}function e0(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=_.useContext(dr),{matches:s}=_.useContext(fr),{pathname:i}=ti(),o=JSON.stringify(xf(s,r.v7_relativeSplatPath));return _.useMemo(()=>bf(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function bk(t,e){return Sk(t,e)}function Sk(t,e,n,r){ei()||xe(!1);let{navigator:s}=_.useContext(dr),{matches:i}=_.useContext(fr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ti(),c;if(e){var d;let w=typeof e=="string"?Zs(e):e;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||xe(!1),c=w}else c=u;let f=c.pathname||"/",p=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=JE(t,{pathname:p}),m=Pk(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:er([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:er([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return e&&m?_.createElement(Sl.Provider,{value:{location:ao({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vn.Pop}},m):m}function Ek(){let t=jk(),e=vk(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},e),n?_.createElement("pre",{style:s},n):null,null)}const kk=_.createElement(Ek,null);class Ck extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?_.createElement(fr.Provider,{value:this.props.routeContext},_.createElement(Jy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Tk(t){let{routeContext:e,match:n,children:r}=t,s=_.useContext(Sf);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(fr.Provider,{value:e},r)}function Pk(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||xe(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:p}=n,y=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let p,y=!1,m=null,w=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||kk,l&&(u<0&&f===0?(y=!0,w=null):u===f&&(y=!0,w=d.route.hydrateFallbackElement||null)));let v=e.concat(o.slice(0,f+1)),h=()=>{let g;return p?g=m:y?g=w:d.route.Component?g=_.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=c,_.createElement(Tk,{match:d,routeContext:{outlet:c,matches:v,isDataRoute:n!=null},children:g})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?_.createElement(Ck,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:h(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):h()},null)}var t0=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(t0||{}),Qa=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Qa||{});function Rk(t){let e=_.useContext(Sf);return e||xe(!1),e}function Ok(t){let e=_.useContext(wk);return e||xe(!1),e}function Ak(t){let e=_.useContext(fr);return e||xe(!1),e}function n0(t){let e=Ak(),n=e.matches[e.matches.length-1];return n.route.id||xe(!1),n.route.id}function jk(){var t;let e=_.useContext(Jy),n=Ok(Qa.UseRouteError),r=n0(Qa.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Ik(){let{router:t}=Rk(t0.UseNavigateStable),e=n0(Qa.UseNavigateStable),n=_.useRef(!1);return Xy(()=>{n.current=!0}),_.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,ao({fromRouteId:e},i)))},[t,e])}function Nk(t){let{to:e,replace:n,state:r,relative:s}=t;ei()||xe(!1);let{future:i,static:o}=_.useContext(dr),{matches:a}=_.useContext(fr),{pathname:l}=ti(),u=Zy(),c=bf(e,xf(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(c);return _.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:s}),[u,d,s,n,r]),null}function it(t){xe(!1)}function Lk(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Vn.Pop,navigator:i,static:o=!1,future:a}=t;ei()&&xe(!1);let l=e.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:l,navigator:i,static:o,future:ao({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Zs(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:y="default"}=r,m=_.useMemo(()=>{let w=_f(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:p,key:y},navigationType:s}},[l,c,d,f,p,y,s]);return m==null?null:_.createElement(dr.Provider,{value:u},_.createElement(Sl.Provider,{children:n,value:m}))}function $k(t){let{children:e,location:n}=t;return bk(Wc(e),n)}new Promise(()=>{});function Wc(t,e){e===void 0&&(e=[]);let n=[];return _.Children.forEach(t,(r,s)=>{if(!_.isValidElement(r))return;let i=[...e,s];if(r.type===_.Fragment){n.push.apply(n,Wc(r.props.children,i));return}r.type!==it&&xe(!1),!r.props.index||!r.props.children||xe(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Wc(r.props.children,i)),n.push(o)}),n}/** 106 * React Router DOM v6.27.0 107 * 108 * Copyright (c) Remix Software Inc. 109 * 110 * This source code is licensed under the MIT license found in the 111 * LICENSE.md file in the root directory of this source tree. 112 * 113 * @license MIT 114 */function Hc(){return Hc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Hc.apply(this,arguments)}function Dk(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function Mk(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Fk(t,e){return t.button===0&&(!e||e==="_self")&&!Mk(t)}const Uk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],zk="6";try{window.__reactRouterVersion=zk}catch{}const Bk="startTransition",kp=gm[Bk];function Wk(t){let{basename:e,children:n,future:r,window:s}=t,i=_.useRef();i.current==null&&(i.current=QE({window:s,v5Compat:!0}));let o=i.current,[a,l]=_.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=_.useCallback(d=>{u&&kp?kp(()=>l(d)):l(d)},[l,u]);return _.useLayoutEffect(()=>
114o.listen(c),[o,c]),_.createElement(Lk,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Hk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Vk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wR=_.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,f=Dk(e,Uk),{basename:p}=_.useContext(dr),y,m=!1;if(typeof u=="string"&&Vk.test(u)&&(y=u,Hk))try{let g=new URL(window.location.href),x=u.startsWith("//")?new URL(g.protocol+u):new URL(u),b=_f(x.pathname,p);x.origin===g.origin&&b!=null?u=b+x.search+x.hash:m=!0}catch{}let w=_k(u,{relative:s}),v=qk(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function h(g){r&&r(g),g.defaultPrevented||v(g)}return _.createElement("a",Hc({},f,{href:y||w,onClick:m||i?r:h,ref:n,target:l}))});var Cp;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Cp||(Cp={}));var Tp;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Tp||(Tp={}));function qk(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=Zy(),u=ti(),c=e0(t,{relative:o});return _.useCallback(d=>{if(Fk(d,n)){d.preventDefault();let f=r!==void 0?r:Ka(u)===Ka(c);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,t,i,o,a])}const Kk=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>$e(async()=>{const{default:r}=await Promise.resolve().then(()=>ni);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)};class Ef extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}}
114class Pp extends Ef{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Rp extends Ef{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Op extends Ef{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Vc;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Vc||(Vc={}));var Qk=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};class Gk{constructor(e,{headers:n={},customFetch:r,region:s=Vc.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=Kk(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,n={}){var r;return Qk(this,void 0,void 0,function*(){try{const{headers:s,method:i,body:o,signal:a}=n;let l={},{region:u}=n;u||(u=this.region);const c=new URL(`${this.url}/${e}`);u&&u!=="any"&&(l["x-region"]=u,c.searchParams.set("forceFunctionRegion",u));let d;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",d=o):typeof o=="string"?(l["Content-Type"]="text/plain",d=o):typeof FormData<"u"&&o instanceof FormData?d=o:(l["Content-Type"]="application/json",d=JSON.stringify(o)));const f=yield this.fetch(c.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),s),body:d,signal:a}).catch(w=>{throw w.name==="AbortError"?w:new Pp(w)}),p=f.headers.get("x-relay-error");if(p&&p==="true")throw new Rp(f);if(!f.ok)throw new Op(f);let y=((r=f.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),m;return y==="application/json"?m=yield f.json():y==="application/octet-stream"?m=yield f.blob():y==="text/event-stream"?m=f:y==="multipart/form-data"?m=yield f.formData():m=yield f.text(),{data:m,error:null,response:f}}catch(s){return s instanceof Error&&s.name==="AbortError"?{data:null,error:new Pp(s)}:{data:null,error:s,response:s instanceof Op||s instanceof Rp?s.context:void 0}}})}}var Xe={},kf={},El={},Eo={},kl={},Cl={},Yk=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},qs=Yk();const Jk=qs.fetch,r0=qs.fetch.bind(qs),s0=qs.Headers,Xk=qs.Request,Zk=qs.Response,ni=Object.freeze(Object.defineProperty({__proto__:null,Headers:s0,Request:Xk,Response:Zk,default:r0,fetch:Jk},Symbol.toStringTag,{value:"Module"})),eC=V0(ni);var Tl={};Object.defineProperty(Tl,"__esModule",{value:!0});let tC=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
114de=e.code}};Tl.default=tC;var i0=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cl,"__esModule",{value:!0});const nC=i0(eC),rC=i0(Tl);let sC=class{constructor(e){var n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(n=e.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=nC.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,n){return this.headers=new Headers(this.headers),this.headers.set(e,n),this}then(e,n){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 r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{var o,a,l,u;let c=null,d=null,f=null,p=i.status,y=i.statusText;if(i.ok){if(this.method!=="HEAD"){const h=await i.text();h===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((o=this.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?d=h:d=JSON.parse(h))}const w=(a=this.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),v=(l=i.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");w&&v&&v.length>1&&(f=parseInt(v[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(c={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,f=null,p=406,y="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const w=await i.text();try{c=JSON.parse(w),Array.isArray(c)&&i.status===404&&(d=[],c=null,p=200,y="OK")}catch{i.status===404&&w===""?(p=204,y="No Content"):c={message:w}}if(c&&this.isMaybeSingle&&(!((u=c==null?void 0:c.details)===null||u===void 0)&&u.includes("0 rows"))&&(c=null,p=200,y="OK"),c&&this.shouldThrowOnError)throw new rC.default(c)}return{error:c,data:d,count:f,status:p,statusText:y}});return this.shouldThrowOnError||(s=s.catch(i=>{var o,a,l;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(a=i==null?void 0:i.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=i==null?void 0:i.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(e,n)}returns(){return this}overrideTypes(){return this}};Cl.default=sC;var iC=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kl,"__esModule",{value:!0});const oC=iC(Cl);let aC=class extends oC.default{select(e){let n=!1;const r=(e??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:i=s}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,n,{foreignTable:r,referencedTable:s=r}={}){const i=typeof s>"u"?"offset":`${s}.offset`,o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${n-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
114explain({analyze:e=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:i=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${u}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};kl.default=aC;var lC=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Eo,"__esModule",{value:!0});const uC=lC(kl);let cC=class extends uC.default{eq(e,n){return this.url.searchParams.append(e,`eq.${n}`),this}neq(e,n){return this.url.searchParams.append(e,`neq.${n}`),this}gt(e,n){return this.url.searchParams.append(e,`gt.${n}`),this}gte(e,n){return this.url.searchParams.append(e,`gte.${n}`),this}lt(e,n){return this.url.searchParams.append(e,`lt.${n}`),this}lte(e,n){return this.url.searchParams.append(e,`lte.${n}`),this}like(e,n){return this.url.searchParams.append(e,`like.${n}`),this}likeAllOf(e,n){return this.url.searchParams.append(e,`like(all).{${n.join(",")}}`),this}likeAnyOf(e,n){return this.url.searchParams.append(e,`like(any).{${n.join(",")}}`),this}ilike(e,n){return this.url.searchParams.append(e,`ilike.${n}`),this}ilikeAllOf(e,n){return this.url.searchParams.append(e,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(e,n){return this.url.searchParams.append(e,`ilike(any).{${n.join(",")}}`),this}is(e,n){return this.url.searchParams.append(e,`is.${n}`),this}in(e,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cs.{${n.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(n)}`),this}containedBy(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cd.{${n.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(n)}`),this}rangeGt(e,n){return this.url.searchParams.append(e,`sr.${n}`),this}rangeGte(e,n){return this.url.searchParams.append(e,`nxl.${n}`),this}rangeLt(e,n){return this.url.searchParams.append(e,`sl.${n}`),this}rangeLte(e,n){return this.url.searchParams.append(e,`nxr.${n}`),this}rangeAdjacent(e,n){return this.url.searchParams.append(e,`adj.${n}`),this}overlaps(e,n){return typeof n=="string"?this.url.searchParams.append(e,`ov.${n}`):this.url.searchParams.append(e,`ov.{${n.join(",")}}`),this}textSearch(e,n,{config:r,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${o}.${n}`),this}match(e){return Object.entries(e).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(e,n,r){return this.url.searchParams.append(e,`not.${n}.${r}`),this}or(e,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,n,r){return this.url.searchParams.append(e,`${n}.${r}`),this}};Eo.default=cC;var dC=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(El,"__esModule",{value:!0});const gi=dC(Eo);let fC=class{constructor(e,{headers:n={},schema:r,fetch:s}){this.url=e,this.headers=new Headers(n),this.schema=r,this.fetch=s}select(e,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),r&&this.headers.append("Prefer",`count=${r}`),new gi.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:n,defaultToNull:r=!0}={}){var s;const i="POST";if(n&&this.headers.append("Prefer",`count=${n}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>
1140){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new gi.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}upsert(e,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:i=!0}={}){var o;const a="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),n!==void 0&&this.url.searchParams.set("on_conflict",n),s&&this.headers.append("Prefer",`count=${s}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new gi.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:n}={}){var r;const s="PATCH";return n&&this.headers.append("Prefer",`count=${n}`),new gi.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var n;const r="DELETE";return e&&this.headers.append("Prefer",`count=${e}`),new gi.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}};El.default=fC;var o0=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kf,"__esModule",{value:!0});const hC=o0(El),pC=o0(Eo);let mC=class a0{constructor(e,{headers:n={},schema:r,fetch:s}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.fetch=s}from(e){const n=new URL(`${this.url}/${e}`);return new hC.default(n,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new a0(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let u;r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([d,f])=>f!==void 0).map(([d,f])=>[d,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([d,f])=>{l.searchParams.append(d,f)})):(a="POST",u=n);const c=new Headers(this.headers);return i&&c.set("Prefer",`count=${i}`),new pC.default({method:a,url:l,headers:c,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};kf.default=mC;var ri=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.PostgrestError=Xe.PostgrestBuilder=Xe.PostgrestTransformBuilder=Xe.PostgrestFilterBuilder=Xe.PostgrestQueryBuilder=Xe.PostgrestClient=void 0;const l0=ri(kf);Xe.PostgrestClient=l0.default;const u0=ri(El);Xe.PostgrestQueryBuilder=u0.default;const c0=ri(Eo);Xe.PostgrestFilterBuilder=c0.default;const d0=ri(kl);Xe.PostgrestTransformBuilder=d0.default;const f0=ri(Cl);Xe.PostgrestBuilder=f0.default;const h0=ri(Tl);Xe.PostgrestError=h0.default;var gC=Xe.default={PostgrestClient:l0.default,PostgrestQueryBuilder:u0.default,PostgrestFilterBuilder:c0.default,PostgrestTransformBuilder:d0.default,PostgrestBuilder:f0.default,PostgrestError:h0.default};const{PostgrestClient:vC,PostgrestQueryBuilder:kR,PostgrestFilterBuilder:CR,PostgrestTransformBuilder:TR,PostgrestBuilder:PR,PostgrestError:RR}=gC;class yC{static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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."};if(typeof process<"u"){const n=process.versions;if(n&&n.node){const r=n.node,s=parseInt(r.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 115import ws from "ws" 116new 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 e=this.detectEnvironment();if(e.constructor)return e.constructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 117 118Suggested solution: ${e.workaround}`),new Error(n)}static createWebSocket(e,n){const r=this.getWebSocketConstructor();return new r(e,n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const wC="2.15.5",_C=`realtime-js/${wC}`,xC="1.0.0",qc=1e4,bC=1e3,SC=100;var Li;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Li||(Li={}));var Ee;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Ee||(Ee={}));var At;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(At||(At={}));var Kc;(function(t){t.websocket="websocket"})(Kc||(Kc={}));var xr;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(xr||(xr={}));class EC{constructor(){this.HEADER_LENGTH=1}decode(e,n){return e.constructor===ArrayBuffer?n(this._binaryDecode(e)):n(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const n=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,n,r)}_decodeBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2);let o=this.HEADER_LENGTH+2;const a=r.decode(e.slice(o,o+s));o=o+s;const l=r.decode(e.slice(o,o+i));o=o+i;const u=JSON.parse(r.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class p0{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var ae;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
vendor: 5,741 bytes, line 118
118srange="tsrange",t.tstzrange="tstzrange"})(ae||(ae={}));const Ap=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((i,o)=>(i[o]=kC(o,t,e,s),i),{})},kC=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?m0(i,o):Qc(o)},m0=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return RC(e,n)}switch(t){case ae.bool:return CC(e);case ae.float4:case ae.float8:case ae.int2:case ae.int4:case ae.int8:case ae.numeric:case ae.oid:return TC(e);case ae.json:case ae.jsonb:return PC(e);case ae.timestamp:return OC(e);case ae.abstime:case ae.date:case ae.daterange:case ae.int4range:case ae.int8range:case ae.money:case ae.reltime:case ae.text:case ae.time:case ae.timestamptz:case ae.timetz:case ae.tsrange:case ae.tstzrange:return Qc(e);default:return Qc(e)}},Qc=t=>t,CC=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},TC=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},PC=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},RC=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>m0(e,a))}return t},OC=t=>typeof t=="string"?t.replace(" ","T"):t,g0=t=>{let e=t;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"};class pu{constructor(e,n,r={},s=qc){this.channel=e,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,n){var r;return this._hasReceived(e)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var jp;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(jp||(jp={}));class $i{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=$i.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=$i.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=$i.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,r,s){const i=this.cloneDeep(e),o=this.transformState(n),a={},l={};return this.map(i,(u,c)=>{o[u]||(l[u]=c)}),this.map(o,(u,c)=>{const d=i[u];if(d){const f=c.map(w=>w.presence_ref),p=d.map(w=>w.presence_ref),y=c.filter(w=>p.indexOf(w.presence_ref)<0),m=d.filter(w=>f.indexOf(w.presence_ref)<0);y.length>0&&(a[u]=y),m.length>0&&(l[u]=m)}else a[u]=c}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(e,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var u;const c=(u=e[a])!==null&&u!==void 0?u:[];if(e[a]=this.cloneDeep(l),c.length>0){const d=e[a].map(p=>p.presence_ref),f=c.filter(p=>d.indexOf(p.presence_ref)<0);e[a].unshift(...f)}r(a,c,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;const c=l.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),e[a]=u,s(a,u,l),u.length===0&&delete e[a]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Ip;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
118E="DELETE"})(Ip||(Ip={}));var Di;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Di||(Di={}));var ln;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ln||(ln={}));class Cf{constructor(e,n={config:{}},r){this.topic=e,this.params=n,this.socket=r,this.bindings={},this.state=Ee.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new pu(this,At.join,this.params,this.timeout),this.rejoinTimer=new p0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ee.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ee.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Ee.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ee.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Ee.errored,this.rejoinTimer.scheduleTimeout())}),this._on(At.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new $i(this),this.broadcastEndpointURL=g0(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Ee.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[Di.PRESENCE]&&this.bindings[Di.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>e==null?void 0:e(ln.CHANNEL_ERROR,p)),this._onClose(()=>e==null?void 0:e(ln.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var y;if(this.socket.setAuth(),p===void 0){e==null||e(ln.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,w=(y=m==null?void 0:m.length)!==null&&y!==void 0?y:0,v=[];for(let h=0;h<w;h++){const g=m[h],{filter:{event:x,schema:b,table:C,filter:E}}=g,T=p&&p[h];if(T&&T.event===x&&T.schema===b&&T.table===C&&T.filter===E)v.push(Object.assign(Object.assign({},g),{id:T.id}));else{this.unsubscribe(),this.state=Ee.errored,e==null||e(ln.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,e&&e(ln.SUBSCRIBED);return}}).receive("error",p=>{this.state=Ee.errored,e==null||e(ln.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(ln.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){return this.state===Ee.joined&&e===Di.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,n,r)}async send(e,n={}){var r,s;if(!this._canPush()&&e.type==="broadcast"){const{event:i,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Ee.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(At.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new pu(this,At.leave,{},e),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}
118teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ee.closed,this.bindings={}}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_push(e,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new pu(this,e,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>SC){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(e,n,r){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,r){var s,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=At;if(r&&[a,l,u,c].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var y,m,w;return((y=p.filter)===null||y===void 0?void 0:y.event)==="*"||((w=(m=p.filter)===null||m===void 0?void 0:m.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===o}).map(p=>p.callback(f,r)):(i=this.bindings[o])===null||i===void 0||i.filter(p=>{var y,m,w,v,h,g;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const x=p.id,b=(y=p.filter)===null||y===void 0?void 0:y.event;return x&&((m=n.ids)===null||m===void 0?void 0:m.includes(x))&&(b==="*"||(b==null?void 0:b.toLocaleLowerCase())===((w=n.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const x=(h=(v=p==null?void 0:p.filter)===null||v===void 0?void 0:v.event)===null||h===void 0?void 0:h.toLocaleLowerCase();return x==="*"||x===((g=n==null?void 0:n.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof f=="object"&&"ids"in f){const y=f.data,{schema:m,table:w,commit_timestamp:v,type:h,errors:g}=y;f=Object.assign(Object.assign({},{schema:m,table:w,commit_timestamp:v,eventType:h,new:{},old:{},errors:g}),this._getPayloadRecords(y))}p.callback(f,r)})}_isClosed(){return this.state===Ee.closed}_isJoined(){return this.state===Ee.joined}_isJoining(){return this.state===Ee.joining}_isLeaving(){return this.state===Ee.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,r){const s=e.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,n){const r=e.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&Cf.isEqual(s.filter,n))})),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(At.close,{},e)}_onError(e){this._on(At.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ee.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=Ap(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=Ap(e.columns,e.old_record)),n}}const mu=()=>{},Zo={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},AC=[1e3,2e3,5e3,1e4],jC=1e4,IC=` 119 addEventListener("message", (e) => { 120 if (e.data.event === "start") { 121 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 122 } 123 });`;class NC{constructor(e,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=qc,this.transport=null,this.heartbeatIntervalMs=Zo.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=mu,this.ref=0,this.reconnectTimer=null,this.logger=mu,this.conn=null,this.sendBuffer=[],this.serializer
123=new EC,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>$e(async()=>{const{default:a}=await Promise.resolve().then(()=>ni);return{default:a}},void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${e}/${Kc.websocket}`,this.httpEndpoint=g0(e),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=yC.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const n=e.message;throw n.includes("Node.js")?new Error(`${n} 124 125To use Realtime in Node.js, you need to provide a WebSocket implementation: 126 127Option 1: Use Node.js 22+ which has native WebSocket support 128Option 2: Install and provide the "ws" package: 129 130 npm install ws 131 132 import ws from "ws" 133 const client = new RealtimeClient(url, { 134 ...options, 135 transport: ws 136 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:xC}))}disconnect(e,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},e?this.conn.close(e,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,n,r){this.logger(e,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Li.connecting:return xr.Connecting;case Li.open:return xr.Open;case Li.closing:return xr.Closing;default:return xr.Closed}}isConnected(){return this.connectionState()===xr.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Cf(`realtime:${e}`,n,this);return this.channels.push(i),i}}push(e){const{topic:n,event:r,payload:s,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(bC,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},Zo.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>
1360&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let n=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:s,payload:i,ref:o}=n,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${r} ${s} ${a}`.trim(),i),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(e){var n;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var n;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(At.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const r=e.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${e}${r}${s}`}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([IC],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(e,n=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(e=null){let n;e?n=e:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const s={access_token:n,version:_C};n&&r.updateJoinPayload(s),r.joinedOnce&&r._isJoined()&&r._push(At.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${e}`,n)})}_triggerStateCallbacks(e,n){try{this.stateChangeCallbacks[e].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new p0(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Zo.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var n,r,s,i,o,a,l,u,c;if(this.transport=(n=e==null?void 0:e.transport)!==null&&n!==void 0?n:null,this.timeout=(r=e==null?void 0:e.timeout)!==null&&r!==void 0?r:qc,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:Zo.HEARTBEAT_INTERVAL,this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=e==null?void 0:e.heartbeatCallback)!==null&&a!==void 0?a:mu,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(l=e==null?void 0:e.reconnectAfterMs)!==null&&l!==void 0?l:d=>AC[d-1]||jC,this.encode=(u=e==null?void 0:e.encode)!==null&&u!==void 0?u:(d,f)=>f(JSON.stringify(d)),this.decode=(c=e==null?void 0:e.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}
136class Tf extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function be(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class LC extends Tf{constructor(e,n,r){super(e),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Gc extends Tf{constructor(e,n){super(e),this.name="StorageUnknownError",this.originalError=n}}var $C=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};const v0=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>$e(async()=>{const{default:r}=await Promise.resolve().then(()=>ni);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},DC=()=>$C(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield $e(()=>Promise.resolve().then(()=>ni),void 0)).Response:Response}),Yc=t=>{if(Array.isArray(t))return t.map(n=>Yc(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Yc(r)}),e},MC=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};var Wr=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};const gu=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),FC=(t,e,n)=>Wr(void 0,void 0,void 0,function*(){const r=yield DC();t instanceof r&&!(n!=null&&n.noResolveJson)?t.json().then(s=>{const i=t.status||500,o=(s==null?void 0:s.statusCode)||i+"";e(new LC(gu(s),i,o))}).catch(s=>{e(new Gc(gu(s),s))}):e(new Gc(gu(t),t))}),UC=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!r?s:(MC(r)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(r)):s.body=r,e!=null&&e.duplex&&(s.duplex=e.duplex),Object.assign(Object.assign({},s),n))};function ko(t,e,n,r,s,i){return Wr(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(n,UC(e,r,s,i)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>FC(l,a,r))})})}function Ga(t,e,n,r){return Wr(this,void 0,void 0,function*(){return ko(t,"GET",e,n,r)})}function qt(t,e,n,r,s){return Wr(this,void 0,void 0,function*(){return ko(t,"POST",e,r,s,n)})}function Jc(t,e,n,r,s){return Wr(this,void 0,void 0,function*(){return ko(t,"PUT",e,r,s,n)})}function zC(t,e,n,r){return Wr(this,void 0,void 0,function*(){return ko(t,"HEAD",e,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function y0(t,e,n,r,s){return Wr(this,void 0,void 0,function*(){return ko(t,"DELETE",e,r,s,n)})}var BC=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};class WC{constructor(e,n){this.downloadFn=e,this.shouldThrowOnError=n}then(e,n){return this.execute().then(e,n)}execute(){return BC(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(be(e))return{data:null,error:e};throw e}})}}var HC=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};class VC{constructor(e,n){this.downloadFn=e,this.shouldThrowOnError=n}asStream(){return new WC(this.downloadFn,this.shouldThrowOnError)}then(e,n){return this.execute().then(e,n)}execute(){return HC(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(be(e))return{data:null,error:e};throw e}})}}var Ge=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
136return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};const qC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Np={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class KC{constructor(e,n={},r,s){this.shouldThrowOnError=!1,this.url=e,this.headers=n,this.bucketId=r,this.fetch=v0(s)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,n,r,s){return Ge(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},Np),s);let a=Object.assign(Object.assign({},this.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",this.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const u=this._removeEmptyFolders(n),c=this._getFinalPath(u),d=yield(e=="PUT"?Jc:qt)(this.fetch,`${this.url}/object/${c}`,i,Object.assign({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:d.Id,fullPath:d.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(be(i))return{data:null,error:i};throw i}})}upload(e,n,r){return Ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,n,r)})}uploadToSignedUrl(e,n,r,s){return Ge(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:Np.upsert},s),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield Jc(this.fetch,a.toString(),l,{headers:c});return{data:{path:i,fullPath:d.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(be(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,n){return Ge(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const i=yield qt(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(this.url+i.url),a=o.searchParams.get("token");if(!a)throw new Tf("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}update(e,n,r){return Ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,n,r)})}move(e,n,r){return Ge(this,void 0,void 0,function*(){try{return{data:yield qt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}copy(e,n,r){return Ge(this,void 0,void 0,function*(){try{return{data:{path:(yield qt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}createSignedUrl(e,n,r){return Ge(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),i=yield qt(this.fetch,`${this.url}/object/sign/${s}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}createSignedUrls(e,n,r){return Ge(this,void 0,void 0,function*(){try{const s=yield qt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:e},{headers:this.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}download(e,n){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=i?`?${i}`:"",a=this._getFinalPath(e),l=()=>Ga(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0});return new VC(l,this.shouldThrowOnError)}info(e){return Ge(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{const r=yield Ga(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Yc(r),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}exists(e){return Ge(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{return yield zC(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r)&&r instanceof Gc){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(e,n){const r=this._getFinalPath(e),s=[],i=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";i!==""&&s.push(i);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&s.push(l);let u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${u}`)}}}remove(e){return Ge(this,void 0,void 0,function*(){try{return{data:yield y0(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}list(e,n,r){return Ge(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},qC),n),{prefix:e||""});return{data:yield qt(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}listV2(e,n){return Ge(this,void 0,void 0,function*(){try{const r=Object.assign({},e);return{data:yield qt(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}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 n=[];return e.width&&n.push(`width=${e.width}`),e.height&&n.push(`height=${e.height}`),e.resize&&n.push(`resize=${e.resize}`),e.format&&n.push(`format=${e.format}`),e.quality&&n.push(`quality=${e.quality}`),n.join("&")}}const QC="2.12.2",GC={"X-Client-Info":`storage-js/${QC}`};var Gr=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
136return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};class YC{constructor(e,n={},r,s){this.shouldThrowOnError=!1;const i=new URL(e);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({},GC),n),this.fetch=v0(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return Gr(this,void 0,void 0,function*(){try{return{data:yield Ga(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(be(e))return{data:null,error:e};throw e}})}getBucket(e){return Gr(this,void 0,void 0,function*(){try{return{data:yield Ga(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}createBucket(e,n={public:!1}){return Gr(this,void 0,void 0,function*(){try{return{data:yield qt(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}updateBucket(e,n){return Gr(this,void 0,void 0,function*(){try{return{data:yield Jc(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}emptyBucket(e){return Gr(this,void 0,void 0,function*(){try{return{data:yield qt(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}deleteBucket(e){return Gr(this,void 0,void 0,function*(){try{return{data:yield y0(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}}class JC extends YC{constructor(e,n={},r,s){super(e,n,r,s)}from(e){return new KC(this.url,this.headers,e,this.fetch)}}const XC="2.58.0";let Ei="";typeof Deno<"u"?Ei="deno":typeof document<"u"?Ei="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ei="react-native":Ei="node";const ZC={"X-Client-Info":`supabase-js-${Ei}/${XC}`},eT={headers:ZC},tT={schema:"public"},nT={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},rT={};var sT=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};const iT=t=>{let e;return t?e=t:typeof fetch>"u"?e=r0:e=fetch,(...n)=>e(...n)},oT=()=>typeof Headers>"u"?s0:Headers,aT=(t,e,n)=>{const r=iT(n),s=oT();return(i,o)=>sT(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:t;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(i,Object.assign(Object.assign({},o),{headers:u}))})};var lT=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};function uT(t){return t.endsWith("/")?t:t+"/"}function cT(t,e){var n,r;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:u,realtime:c,global:d}=e,f={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},u),i),realtime:Object.assign(Object.assign({},c),o),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>lT(this,void 0,void 0,function*(){return""})};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}function dT(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");
136if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(uT(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const w0="2.72.0",ts=30*1e3,Xc=3,vu=Xc*ts,fT="http://localhost:9999",hT="supabase.auth.token",pT={"X-Client-Info":`gotrue-js/${w0}`},Zc="X-Supabase-Api-Version",_0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},mT=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,gT=10*60*1e3;class Pf extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function H(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class vT extends Pf{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function yT(t){return H(t)&&t.name==="AuthApiError"}class x0 extends Pf{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class hr extends Pf{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class On extends hr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function wT(t){return H(t)&&t.name==="AuthSessionMissingError"}class vi extends hr{constructor(){super("Auth session or user missing","AuthInvalidToken
136ResponseError",500,void 0)}}class ea extends hr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ta extends hr{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function _T(t){return H(t)&&t.name==="AuthImplicitGrantRedirectError"}class Lp extends hr{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class ed extends hr{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function yu(t){return H(t)&&t.name==="AuthRetryableFetchError"}class $p extends hr{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class td extends hr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ya="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Dp=` 137\r=`.split(""),xT=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Dp.length;e+=1)t[Dp[e].charCodeAt(0)]=-2;for(let e=0;e<Ya.length;e+=1)t[Ya[e].charCodeAt(0)]=e;return t})();function Mp(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Ya[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Ya[r]),e.queuedBits-=6}}function b0(t,e,n){const r=xT[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Fp(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{ET(o,r,n)};for(let o=0;o<t.length;o+=1)b0(t.charCodeAt(o),s,i);return e.join("")}function bT(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function ST(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}bT(r,e)}}function ET(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function kT(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)b0(t.charCodeAt(s),n,r);return new Uint8Array(e)}function CT(t){const e=[];return ST(t,n=>e.push(n)),new Uint8Array(e)}function TT(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>Mp(s,n,r)),Mp(null,n,r),e.join("")}function PT(t){return Math.round(Date.now()/1e3)+t}function RT(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const gt=()=>typeof window<"u"&&typeof document<"u",mr={tested:!1,writable:!1},S0=()=>{if(!gt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(mr.tested)return mr.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),mr.tested=!0,mr.writable=!0}catch{mr.tested=!0,mr.writable=!1}return mr.writable};function OT(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const E0=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>$e(async()=>{const{default:r}=await Promise.resolve().then(()=>ni);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},AT=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",ns=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},gr=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Pn=async(t,e)=>{await t.removeItem(e)};class Pl{constructor(){this.promise=new Pl.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}Pl.promiseConstructor=Promise;function wu(t){const e=t.split(".");if(e.length!==3)throw new td("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!mT.test(e[r]))throw new td("JWT not in base64url format");return{header:JSON.parse(Fp(e[0])),payload:JSON.parse(Fp(e[1])),signature:kT(e[2]),raw:{header:e[0],payload:e[1]}}}async function jT(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function IT(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function NT(t){return("0"+t.toString(16)).substr(-2)}function LT(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,NT).join("")}async function $T(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",
137n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function DT(t){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."),t;const n=await $T(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Yr(t,e,n=!1){const r=LT();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await ns(t,`${e}-code-verifier`,s);const i=await DT(r);return[i,r===i?"plain":"s256"]}const MT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function FT(t){const e=t.headers.get(Zc);if(!e||!e.match(MT))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function UT(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function zT(t){switch(t){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 BT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Jr(t){if(!BT.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function _u(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="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 "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Up(t){return JSON.parse(JSON.stringify(t))}var WT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};const _r=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),HT=[502,503,504];async function zp(t){var e;if(!AT(t))throw new ed(_r(t),0);if(HT.includes(t.status))throw new ed(_r(t),t.status);let n;try{n=await t.json()}catch(i){throw new x0(_r(i),i)}let r;const s=FT(t);if(s&&s.getTime()>=_0["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new $p(_r(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new On}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new $p(_r(n),t.status,n.weak_password.reasons);throw new vT(_r(n),t.status||500,r)}const VT=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function Q(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Zc]||(i[Zc]=_0["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await qT(t,e,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function qT(t,e,n,r,s,i){const o=VT(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw console.error(l),new ed(_r(l),0)}if(a.ok||await zp(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await zp(l)}}function Ht(t){var e;let n=null;YT(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=PT(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function Bp(t){const e=Ht(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Ln(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function KT(t){return{data:t,error:null}}function QT(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=WT(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function GT(t){return t}function YT(t){return t.access_token&&t.refresh_token&&t.expires_in}const xu=["global","local","others"];var JT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};class XT{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=E0(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,n=xu[0]){if(xu.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${xu.join(", ")}`);try{return await Q(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(H(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await Q(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ln})}catch(r){if(H(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=JT(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await Q(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:QT,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(H(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await Q(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ln})}catch(n){if(H(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await Q(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:GT});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
1370&&(p.forEach(y=>{const m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(H(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Jr(e);try{return await Q(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ln})}catch(n){if(H(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Jr(e);try{return await Q(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Ln})}catch(r){if(H(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Jr(e);try{return await Q(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ln})}catch(r){if(H(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Jr(e.userId);try{const{data:n,error:r}=await Q(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(H(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Jr(e.userId),Jr(e.id);try{return{data:await Q(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(H(n))return{data:null,error:n};throw n}}}function Wp(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}function ZT(){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)}}const Xr={debug:!!(globalThis&&S0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class k0 extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class eP extends k0{}async function tP(t,e,n){Xr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),Xr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){Xr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await n()}finally{Xr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw Xr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new eP(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Xr.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}function C0(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function nP(t){return parseInt(t,16)}function rP(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function sP(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:f}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)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(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 138`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const p=C0(t.address),y=c?`${c}://${r}`:r,m=t.statement?`${t.statement} 139`:"",w=`${y} wants you to sign in with your Ethereum account: 140${p} 141 142${m}`;let v=`URI: ${d} 143Version: ${f} 144Chain ID: ${n}${o?` 145Nonce: ${o}`:""} 146Issued At: ${i.toISOString()}`;if(s&&(v+=` 147Expiration Time: ${s.toISOString()}`),a&&(v+=` 148Not Before: ${a.toISOString()}`),l&&(v+=` 149Request ID: ${l}`),u){let h=` 150Resources:`;for(const g of u){if(!g||typeof g!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${g}`);h+=` 151- ${g}`}v+=h}return`${w} 152${v}`}ZT();const iP={url:fT,storageKey:hT,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:pT,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Hp(t,e,n){return await n()}const Zr={};class lo{constructor(e){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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,this.instanceID=lo.nextInstanceID,lo.nextInstanceID+=1,this.instanceID>0&>()&&console.warn("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.");const s=Object.assign(Object.assign({},iP),e);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new XT({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=E0(s.fetch),this.lock=s.lock||Hp,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:gt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=tP:this.lock=Hp,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)},this.persistSession?(s.storage?this.storage=s.storage:S0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Wp(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Wp(this.memoryStorage)),gt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var e,n;return(n=(e=Zr[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Zr[this.storageKey]=Object.assign(Object.assign({},Zr[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Zr[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Zr[this.storageKey]=Object.assign(Object.assign({},Zr[this.storageKey]),{cachedAt:e})}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${w0}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const n=OT(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),gt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),_T(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{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(n){return H(n)?{error:n}:{error:new x0("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await Q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Ht}),{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(H(i))return{data:{user:null,session:null},error:i};throw i}}async signUp(e){var n,r,s;try{let i;if("email"in e){const{email:c,password:d,options:f}=e;let p=null,y=null;this.flowType==="pkce"&&([p,y]=await Yr(this.storage,this.storageKey)),i=await Q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:y},xform:Ht})}else if("phone"in e){const{phone:c,password:d,options:f}=e;i=await Q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Ht})}else throw new ea("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(H(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await Q(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:Bp})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await Q(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:Bp})}else throw new ea("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new vi}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(H(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,u,c,d,f;let p,y;if("message"in e)p=e.message,y=e.signature;else{const{chain:m,wallet:w,statement:v,options:h}=e;let g;if(gt())if(typeof w=="object")g=w;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")g=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 w!="object"||!(h!=null&&h.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=w}const x=new URL((n=h==null?void 0:h.url)!==null&&n!==void 0?n:window.location.href),b=await g.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!b||b.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const C=C0(b[0]);
152let E=(r=h==null?void 0:h.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const R=await g.request({method:"eth_chainId"});E=nP(R)}const T={domain:x.host,address:C,statement:v,uri:x.href,version:"1",chainId:E,nonce:(s=h==null?void 0:h.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=h==null?void 0:h.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=h==null?void 0:h.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=h==null?void 0:h.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=h==null?void 0:h.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=h==null?void 0:h.signInWithEthereum)===null||c===void 0?void 0:c.resources};p=sP(T),y=await g.request({method:"personal_sign",params:[rP(p),C]})}try{const{data:m,error:w}=await Q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:y},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ht});if(w)throw w;return!m||!m.session||!m.user?{data:{user:null,session:null},error:new vi}:(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),{data:Object.assign({},m),error:w})}catch(m){if(H(m))return{data:{user:null,session:null},error:m};throw m}}async signInWithSolana(e){var n,r,s,i,o,a,l,u,c,d,f,p;let y,m;if("message"in e)y=e.message,m=e.signature;else{const{chain:w,wallet:v,statement:h,options:g}=e;let x;if(gt())if(typeof v=="object")x=v;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))x=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=v}const b=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in x&&x.signIn){const C=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:b.host,uri:b.href}),h?{statement:h}:null));let E;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")E=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)E=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)y=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),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 x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${b.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...h?["",h,""]:[""],"Version: 1",`URI: ${b.href}`,`Issued At: ${(s=(r=g==null?void 0:g.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=g==null?void 0:g.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((u=g==null?void 0:g.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(c=g==null?void 0:g.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 153`);const C=await x.signMessage(new TextEncoder().encode(y),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=C}}try{const{data:w,error:v}=await Q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:TT(m)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Ht});if(v)throw v;return!w||!w.session||!w.user?{data:{user:null,session:null},error:new vi}:(w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),{data:Object.assign({},w),error:v})}catch(w){if(H(w))return{data:{user:null,session:null},error:w};throw w}}async _exchangeCodeForSession(e){const n=await gr(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:i,error:o}=await Q(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:Ht});if(await Pn(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new vi}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(H(i))return{data:{user:null,session:null,redirectType:null},error:i};throw i}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await Q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Ht}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new vi}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(H(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(e){var n,r,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Yr(this.storage,this.storageKey));const{error:d}=await Q(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in e){const{phone:a,options:l}=e,{data:u,error:c}=await Q(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{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new ea("You must provide either an email or phone number.")}catch(a){if(H(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await Q(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Ht});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(H(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var n,r,s;try{let i=null,o=null;return this.flowType==="pkce"&&([i,o]=await Yr(this.storage,this.storageKey)),await Q(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:KT})}catch(i){if(H(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new On;const{error:s}=await Q(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(H(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:i}=e,{error:o}=await Q(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:r,type:s,options:i}=e,{data:o,error:a}=await Q(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new ea("You must provide either an email or phone number and a type")}catch(n){if(H(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}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 e=null;const n=await gr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
153id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<vu:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await gr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=_u()}if(this.storage.isServer&&e.user){let o=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,u,c)=>(!o&&u==="user"&&(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."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,u,c))})}return{data:{session:e},error:null}}const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await Q(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ln}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new On}:await Q(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:Ln})})}catch(n){if(H(n))return wT(n)&&(await this._removeSession(),await Pn(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new On;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Yr(this.storage,this.storageKey));const{data:u,error:c}=await Q(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Ln});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(H(r))return{data:{user:null},error:r};throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new On;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=wu(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{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(e.access_token);if(l)throw l;i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(n){if(H(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new On;const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(H(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(e,n){try{if(!gt())throw new ta("No browser detected.");
153if(e.error||e.error_description||e.error_code)throw new ta(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Lp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ta("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Lp("No code detected.");const{data:h,error:g}=await this._exchangeCodeForSession(e.code);if(g)throw g;const x=new URL(window.location.href);return x.searchParams.delete("code"),window.history.replaceState(window.history.state,"",x.toString()),{data:{session:h.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=e;if(!i||!a||!o||!u)throw new ta("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(a);let f=c+d;l&&(f=parseInt(l));const p=f-c;p*1e3<=ts&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const y=f-d;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,c);const{data:m,error:w}=await this._getUser(i);if(w)throw w;const v={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:f,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:e.type},error:null}}catch(r){if(H(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await gr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{error:i};const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(yT(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await Pn(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const n=RT(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Yr(this.storage,this.storageKey,!0));try{return await Q(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(H(i))return{data:null,error:i};throw i}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(n){if(H(n))return{data:null,error:n};throw n}}async linkIdentity(e){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Q(this.fetch,"GET",p,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return gt()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(H(r))return{data:{provider:e.provider,url:null},error:r};throw r}}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;
153if(o)throw o;return await Q(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(H(n))return{data:null,error:n};throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await IT(async s=>(s>0&&await jT(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await Q(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Ht})),(s,i)=>{const o=200*Math.pow(2,s);return i&&yu(i)&&Date.now()+o-r<ts})}catch(r){if(this._debug(n,"error",r),H(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),gt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await gr(this.storage,this.storageKey);if(s&&this.userStorage){let o=await gr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await ns(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:_u()}else if(s&&!s.user&&!s.user){const o=await gr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Pn(this.storage,this.storageKey+"-user"),await ns(this.storage,this.storageKey,s)):s.user=_u()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<vu;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${vu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),yu(o)||(this._debug(r,"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(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new On;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Pl;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new On;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={session:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),H(i)){const o={session:null,error:i};return yu(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}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(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await ns(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=Up(s);await ns(this.storage,this.storageKey,i)}else{const s=Up(n);await ns(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await Pn(this.storage,this.storageKey),await Pn(this.storage,this.storageKey+"-code-verifier"),await Pn(this.storage,this.storageKey+"-user"),this.userStorage&&await Pn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&>()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
153catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),ts);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}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 e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/ts);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ts}ms, refresh threshold is ${Xc} ticks`),s<=Xc&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof k0)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!gt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"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(e,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Yr(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await Q(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(H(n))return{data:null,error:n};throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:u}=await Q(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?{data:null,error:u}:(e.factorType==="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}`),{data:l,error:null})})}catch(n){if(H(n))return{data:null,error:n};throw n}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{data:null,error:i};const{data:o,error:a}=await Q(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(n){if(H(n))return{data:null,error:n};throw n}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await Q(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(H(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?{data:null,error:r}:await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){const{data:{user:e},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(e==null?void 0:e.factors)||[],s=r.filter(o=>o.factor_type==="totp"&&o.status==="verified"),i=r.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:r,totp:s,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var n,r;const{data:{session:s},error:i}=e;if(i)return{data:null,error:i};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=wu(s.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+gT>s)return r;const{data:i,error:o}=await Q(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,r=i.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:p,error:y}
153=await this.getSession();if(y||!p.session)return{data:null,error:y};r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=wu(r);n!=null&&n.allowExpired||UT(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const c=zT(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,CT(`${a}.${l}`)))throw new td("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(H(r))return{data:null,error:r};throw r}}}lo.nextInstanceID=0;const oP=lo;class aP extends oP{constructor(e){super(e)}}var lP=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};class uP{constructor(e,n,r){var s,i,o;this.supabaseUrl=e,this.supabaseKey=n;const a=dT(e);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const l=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:tT,realtime:rT,auth:Object.assign(Object.assign({},nT),{storageKey:l}),global:eT},c=cT(r??{},u);this.storageKey=(s=c.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=c.auth)!==null&&o!==void 0?o:{},this.headers,c.global.fetch),this.fetch=aT(n,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.rest=new vC(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new JC(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new Gk(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,n={},r={}){return this.rest.rpc(e,n,r)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,n;return lP(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,userStorage:i,storageKey:o,flowType:a,lock:l,debug:u},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new aP({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),c),storageKey:o,autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,userStorage:i,flowType:a,lock:l,debug:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new NC(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,n,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const cP=(t,e,n)=>new uP(t,e,n);function dP(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}dP()&&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 N
153ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const fP="https://icrqrgtcavxyyubdhlrs.supabase.co",hP="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImljcnFyZ3RjYXZ4eXl1YmRobHJzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTkwMDM2MzIsImV4cCI6MjA3NDU3OTYzMn0.jsoocuuY35WleiSkvuwtScuoWgRmkluBWRK47fulTN4",te=cP(fP,hP,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0,flowType:"pkce"},global:{headers:{"X-Client-Info":"slick-inbox-web"}}}),T0=_.createContext({session:null,user:null,loading:!0}),pP=()=>{const t=_.useContext(T0);if(!t)throw new Error("useAuth must be used within AuthProvider");return t},mP=({children:t})=>{const[e,n]=_.useState(null),[r,s]=_.useState(null),[i,o]=_.useState(!0),[a,l]=_.useState(null);return _.useEffect(()=>{const{data:{subscription:u}}=te.auth.onAuthStateChange(async(d,f)=>{var p;if(console.log("Auth state changed:",d,(p=f==null?void 0:f.user)==null?void 0:p.email),n(f),s((f==null?void 0:f.user)??null),d==="SIGNED_OUT"&&(localStorage.removeItem("supabase.auth.token"),n(null),s(null)),d==="TOKEN_REFRESHED"&&console.log("Token refreshed successfully"),d==="USER_UPDATED"&&console.log("User updated"),f!=null&&f.expires_at){a&&clearTimeout(a);const y=f.expires_at*1e3,m=Date.now(),w=y-m-5*60*1e3;if(w>0){const v=setTimeout(async()=>{console.log("Proactively refreshing token...");const{data:h,error:g}=await te.auth.refreshSession();g?(console.error("Failed to refresh token:",g),tp.error("Session expired. Please sign in again.")):console.log("Token refreshed proactively")},w);l(v)}}});te.auth.getSession().then(({data:{session:d}})=>{n(d),s((d==null?void 0:d.user)??null),o(!1)});const c=setInterval(async()=>{const{data:{session:d},error:f}=await te.auth.getSession();if(f){console.error("Session check error:",f);return}!d&&e&&(console.log("Session lost, signing out..."),n(null),s(null),tp.error("Session expired. Please sign in again.")),(d==null?void 0:d.access_token)!==(e==null?void 0:e.access_token)&&(console.log("Session changed, updating state"),n(d),s((d==null?void 0:d.user)??null))},3e4);return()=>{u.unsubscribe(),clearInterval(c),a&&clearTimeout(a)}},[]),k.jsx(T0.Provider,{value:{session:e,user:r,loading:i},children:t})},sn=({children:t})=>{const{session:e,loading:n}=pP(),r=ti(),[s,i]=_.useState(0);return _.useEffect(()=>{if(!n&&!e&&s<2){const o=setTimeout(()=>{te.auth.getSession().then(({data:{session:a}})=>{a&&i(l=>l+1)})},500);return()=>clearTimeout(o)}},[n,e,s]),_.useEffect(()=>{if(e&&typeof window<"u"&&window.opener){try{window.opener.postMessage({type:"auth-success"},window.location.origin)}catch{}setTimeout(()=>window.close(),100)}},[e]),n?k.jsx("div",{className:"min-h-screen flex items-center justify-center",children:k.jsx(gb,{className:"h-8 w-8 animate-spin text-primary"})}):e?k.jsx(k.Fragment,{children:t}):k.jsx(Nk,{to:"/auth",state:{from:r.pathname},replace:!0})},Ae=[];for(let t=0;t<256;++t)Ae.push((t+256).toString(16).slice(1));function gP(t,e=0){return(Ae[t[e+0]]+Ae[t[e+1]]+Ae[t[e+2]]+Ae[t[e+3]]+"-"+Ae[t[e+4]]+Ae[t[e+5]]+"-"+Ae[t[e+6]]+Ae[t[e+7]]+"-"+Ae[t[e+8]]+Ae[t[e+9]]+"-"+Ae[t[e+10]]+Ae[t[e+11]]+Ae[t[e+12]]+Ae[t[e+13]]+Ae[t[e+14]]+Ae[t[e+15]]).toLowerCase()}let bu;const vP=new Uint8Array(16);function yP(){if(!bu){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bu=crypto.getRandomValues.bind(crypto)}return bu(vP)}const wP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Vp={randomUUID:wP};function _P(t,e,n){var s;if(Vp.randomUUID&&!e&&!t)return Vp.randomUUID();t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??yP();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,gP(r)}const xP=t=>{var c,d,f,p,y,m,w,v,h,g,x;const e=((c=t.body)==null?void 0:c.originalPostLink)||((d=t.original_tweet)==null?void 0:d.url)||"",n=((f=t.body)==null?void 0:f.originalContent)||((p=t.original_tweet)==null?void 0:p.content)||"",r=((y=t.body)==null?void 0:y.profileLink)||"",s=((m=t.body)==null?void 0:m.postTimestamp)||((w=t.original_tweet)==null?void 0:w.created_at)||new Date().toISOString(),i=((v=t.body)==null?void 0:v.boardyReply)||((h=t.boardy_reply)==null?void 0:h.content)||"",o=e.split("/"),a=((g=o[o.length-1])==null?void 0:g.split("?")[0])||_P(),l=bP(r||e),u=((x=t.boardy_reply)==null?void 0:x.id)||`reply-${a}`;return{id:a,originalTweet:{id:a,url:e,content:n,createdAt:s,author:{id:l,username:l,name:l,profileImageUrl:`https://unavatar.io/twitter/${l}`}}
153,boardyReply:{id:u,content:i,createdAt:new Date().toISOString()},status:"pending"}},bP=t=>{if(!t)return"unknown";try{return(t.includes("twitter.com")||t.includes("x.com"))&&new URL(t).pathname.split("/").filter(r=>r)[0]||"unknown"}catch(e){return console.error("Error extracting username:",e),"unknown"}},SP=async()=>{try{const{data:{user:t}}=await te.auth.getUser();if(!t)return[];const{data:e,error:n}=await te.from("emails").select("*").eq("userid",t.id).eq("isprocessed",!1).order("received_at",{ascending:!1}).limit(50);if(n)throw console.error("Error fetching tweets from Supabase:",n),n;if(!e||e.length===0)return console.log("No tweets found in Supabase"),[];console.log("Data from Supabase:",e);const r=new Map;e.forEach(i=>{const o=i.sender||i.senderemail||"",a=new Date(i.createdat).toISOString().split("T")[0],l=`${o}-${a}`;r.has(l)||r.set(l,[]),r.get(l).push(i)});const s=[];return r.forEach((i,o)=>{const a=i.slice(0,3);s.push(...a)}),s.sort((i,o)=>new Date(o.createdat).getTime()-new Date(i.createdat).getTime()),console.log(`Limited to ${s.length} tweets after applying 3 per user per day limit`),s.map(EP)}catch(t){return console.error("Failed to fetch tweets:",t),[]}},EP=t=>({id:t.id,originalTweet:{id:t.id,url:"#",content:t.content||"",author:{id:t.senderemail||t.sender||"",username:t.sender||"",profileImageUrl:"",name:t.sender||""},createdAt:t.createdat},boardyReply:{id:`reply-${t.id}`,content:t.finalsenttext||"",createdAt:t.createdat},status:t.isprocessed?"approved":"pending"}),kP=async(t,e)=>{try{const{error:n}=await te.from("emails").update({finalsenttext:e,isprocessed:!0}).eq("id",t);if(n)throw console.error("Error approving tweet in Supabase:",n),n;console.log(`Updated email ${t} with content: ${e} and marked as processed`)}catch(n){throw console.error("Failed to approve tweet:",n),n}},qp=async(t,e,n,r,s)=>{try{const{error:i}=await te.from("emails").update({finalsenttext:n,isprocessed:!0,wasedited:s==="edited"}).eq("id",t);if(i)throw console.error("Error updating email in Supabase:",i),i;console.log(`Stored approval result for email ${t} with status: ${r}`)}catch(i){throw console.error("Failed to store approval result:",i),i}},CP=async t=>{try{const{error:e}=await te.from("emails").update({isprocessed:!0,isarchived:!0}).eq("id",t);if(e)throw console.error("Error marking tweet as rejected in Supabase:",e),e;console.log(`Marked email ${t} as processed (rejected)`)}catch(e){throw console.error("Failed to mark tweet as rejected:",e),e}},TP=async(t,e,n,r="approved")=>{try{const{data:{user:s}}=await te.auth.getUser(),i=s==null?void 0:s.id;if(!i)throw new Error("Not authenticated");const{data:o,error:a}=await te.from("emails").select("senderemail, subject, thread_id, gmail_message_id").eq("id",t).single();if(a||!o)throw new Error("Failed to fetch email details");const{error:l}=await te.functions.invoke("gmail-send",{body:{to:[o.senderemail],subject:o.subject.startsWith("Re:")?o.subject:`Re: ${o.subject}`,body:e,threadId:o.thread_id,inReplyTo:o.gmail_message_id}});if(l)throw console.error("Failed to send email:",l),new Error("Failed to send email: "+l.message);const{error:u}=await te.from("emails").update({finalsenttext:e,isprocessed:!0,wasedited:n||!1}).eq("id",t);if(u)throw console.error("Error approving cold email in Supabase:",u),u;const{data:c}=await te.from("teamscores").select("weeklypoints").eq("userid",i).single();if(c){const d=(c.weeklypoints||0)+1;await te.from("teamscores").update({weeklypoints:d}).eq("userid",i)}console.log(`Sent and approved cold email ${t} with content: ${e}, status: ${r}, edited: ${n?"yes":"no"}`)}catch(s){throw console.error("Failed to approve cold email:",s),s}},PP=async t=>{try{const{data:{user:e}}=await te.auth.getUser(),n=e==null?void 0:e.id,{error:r}=await te.from("emails").update({isarchived:!0,isprocessed:!0}).eq("id",t);if(r)throw console.error("Error rejecting cold email in Supabase:",r),r;if(n){const{data:s}=await te.from("teamscores").select("weeklypoints").eq("userid",n).single();if(s){const i=(s.weeklypoints||0)+.25;await te.from("teamscores").update({weeklypoints:i}).eq("userid",n)}}console.log(`Marked cold email ${t} as reviewed (rejected)`)}catch(e){throw console.error("Failed to reject cold email:",e),e}},RP=async t=>{try{const{error:e}=await te.from("emails").update({isprocessed:!0}).eq("id",t);if(e)throw console.error("Error marking handoff complete in Supabase:",e),e;console.log(`Marked handoff complete for email ${t}`)}catch(e){throw console.error("Failed to mark handoff complete:",e),e}},OP=_.createContext(void 0),Kp={incomingWebhookUrl:"",outgoingWebhookUrl:"https://clarkgronek.app.n8n.cloud/webhook/189f922b-20a8-458d-924f-e2d7266eff5c"},AP=()=>{try{const t=localStorage.getItem("webhook-config");return t?JSON.parse(t):Kp}catch(t){return console.error("Error loading webhook config:",t),Kp}},jP=({children:t})=>{const[e,n]=_.useState([]),[r,s]=_.useState(0),[i,o]=_.useState(!0),[a,l]=_.useState(AP),u=e.length>0&&r<e.length?e.filter(g=>g.status==="pending")[r]:null,c=e.filter(g=>g.status==="pending").length,d=e.filter(g=>g.status==="approved").length;_.useEffect(()=>{localStorage.setItem("webhook-config",JSON.stringify(a))},[a]);const f=g=>
153{try{const x=xP(g);return n(b=>b.some(E=>E.originalTweet.url===x.originalTweet.url)?(Ue({title:"Duplicate Tweet",description:"This tweet is already in the moderation queue."}),b):(Ue({title:"New Tweet Received",description:"A new tweet has been added to the moderation queue."}),[x,...b])),!0}catch(x){return console.error("Error processing webhook data:",x),Ue({title:"Error",description:"Failed to process webhook data.",variant:"destructive"}),!1}},p=async()=>{o(!0);try{const g=await SP();n(g),s(0)}catch(g){console.error("Error fetching tweets:",g),Ue({title:"Error",description:"Failed to load tweets from Supabase. Please try again.",variant:"destructive"})}finally{o(!1)}},y=async(g,x)=>{const b=x?e.find(C=>C.id===x):u;if(b){o(!0);try{const C=b.boardyReply.content!==g;await kP(b.id,g),await qp(b.id,b.originalTweet,g,"approved",C?"edited":null);const E={...b,status:"approved",boardyReply:{...b.boardyReply,content:g,createdAt:new Date().toISOString()}};try{const T=a.outgoingWebhookUrl||"https://clarkgronek.app.n8n.cloud/webhook/189f922b-20a8-458d-924f-e2d7266eff5c",R={boardyReply:g,postUrl:E.originalTweet.url};console.log("Sending to webhook:",R),console.log("Webhook URL:",T);const A=await fetch(T,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)});!A.ok&&A.status!==0?console.warn("Webhook response not OK:",A.status):console.log("Webhook call successful")}catch(T){console.error("Error sending to webhook:",T),Ue({title:"Warning",description:"The tweet was approved but the webhook notification failed.",variant:"destructive"})}n(T=>T.map(R=>R.id===b.id?E:R)),Ue({title:"Tweet Approved",description:"The tweet has been approved and sent for posting."}),(!x||x===(u==null?void 0:u.id))&&w()}catch(C){console.error("Error approving tweet:",C),Ue({title:"Error",description:"Failed to approve tweet. Please try again.",variant:"destructive"})}finally{o(!1)}}},m=async g=>{const x=g?e.find(b=>b.id===g):u;if(x){o(!0);try{await CP(x.id),await qp(x.id,x.originalTweet,x.boardyReply.content,"rejected",null),n(b=>b.map(C=>C.id===x.id?{...C,status:"rejected"}:C)),Ue({title:"Tweet Rejected",description:"The tweet has been rejected and removed from the queue."}),(!g||g===(u==null?void 0:u.id))&&w()}catch(b){console.error("Error rejecting tweet:",b),Ue({title:"Error",description:"Failed to reject tweet. Please try again.",variant:"destructive"})}finally{o(!1)}}},w=()=>{const g=e.filter(x=>x.status==="pending");g.length>0?r>=g.length-1?s(0):s(r+1):Ue({title:"Queue Empty",description:"All tweets have been processed."})},v=()=>{n(g=>g.map(x=>x.status==="pending"?{...x,status:"hidden"}:x)),s(0),Ue({title:"Queue Cleared",description:"All pending tweets have been removed from the queue."})},h=g=>{l(g),Ue({title:"Webhook Configuration Updated",description:"Your webhook settings have been saved."})};return _.useEffect(()=>{p()},[]),k.jsx(OP.Provider,{value:{tweets:e,currentTweetIndex:r,currentTweet:u,isLoading:i,fetchTweets:p,approveTweet:y,rejectTweet:m,remainingCount:c,approvedCount:d,webhookConfig:a,updateWebhookConfig:h,processWebhookData:f,clearQueue:v},children:t})},yi=(t,e)=>{Ue({title:t,description:e,duration:3e3})},na=(t="Something went wrong",e)=>{Ue({title:t,description:e||"Please try again or contact support if the issue persists.",variant:"destructive",duration:5e3})},IP=(t,e)=>{Ue({title:t,description:e,duration:4e3})},es={approved:()=>yi("Email Approved","The email has been sent successfully."),archived:()=>yi("Email Archived","The email has been moved to archive."),rejected:()=>yi("Email Rejected","The email has been deleted."),snoozed:t=>yi("Email Snoozed",`Will reappear on ${t.toLocaleDateString()}.`),sent:()=>yi("Email Sent","Your email has been sent successfully."),draftSaved:()=>IP("Draft Saved","Your draft has been saved."),approveFailed:()=>na("Failed to Approve","Could not approve the email. Please try again."),archiveFailed:()=>na("Failed to Archive","Could not archive the email. Please try again."),sendFailed:()=>na("Failed to Send","Could not send the email. Please check your connection."),syncFailed:()=>
153na("Sync Failed","Could not sync with Gmail. Please reconnect your account.")},OR=t=>{var f;if(!t)return"";const e=P0(t),n=document.createElement("div");n.innerHTML=e,n.querySelectorAll("script, style, iframe, object, embed, form, input, button").forEach(p=>p.remove()),n.querySelectorAll('[style*="display:none"], [style*="display: none"], [hidden]').forEach(p=>p.remove()),n.querySelectorAll("img").forEach(p=>{const y=p.getAttribute("width"),m=p.getAttribute("height");y==="1"&&m==="1"&&p.remove()});const o=n.textContent||"";if(/forwarded\s+message|begin\s+forwarded|from:/i.test(o)){const p=document.createTreeWalker(n,NodeFilter.SHOW_TEXT);let y;for(;y=p.nextNode();){const m=(y.textContent||"").toLowerCase();if(m.includes("forwarded message")||m.includes("from:")&&m.includes("date:")&&m.includes("subject:")){let w=y.parentElement;for(;w&&w!==n&&!["DIV","SECTION","BLOCKQUOTE"].includes(w.tagName);)w=w.parentElement;if(w&&w!==n&&!w.classList.contains("forwarded-message")){const v=document.createElement("div");v.className="forwarded-message",(f=w.parentNode)==null||f.insertBefore(v,w);let h=w;for(;h;){const g=h.nextSibling;v.appendChild(h),h=g}break}}}}n.querySelectorAll("a").forEach(p=>{const y=p.getAttribute("href");if(y){try{const m=new URL(y);["utm_source","utm_medium","utm_campaign","utm_term","utm_content","mc_eid","mc_cid","_hsenc","_hsmi","mkt_tok"].forEach(w=>{m.searchParams.delete(w)}),p.setAttribute("href",m.toString())}catch{}p.setAttribute("target","_blank"),p.setAttribute("rel","noopener noreferrer")}}),n.querySelectorAll("img").forEach(p=>{const y=p.getAttribute("width"),m=p.getAttribute("height");y==="1"&&m==="1"&&p.remove()}),n.querySelectorAll("*").forEach(p=>{Array.from(p.attributes).forEach(m=>{m.name.startsWith("on")&&p.removeAttribute(m.name)});const y=p.getAttribute("style");if(y){const m=y.replace(/position\s*:\s*(fixed|absolute|sticky)/gi,"").replace(/z-index\s*:\s*\d+/gi,"").replace(/overflow\s*:\s*hidden/gi,"").trim();m?p.setAttribute("style",m):p.removeAttribute("style")}});const c=document.createTreeWalker(n,NodeFilter.SHOW_TEXT);let d;for(;d=c.nextNode();)d.textContent&&(d.textContent=Rf(d.textContent));return n.innerHTML},AR=t=>{if(!t)return"";const e=P0(t),n=document.createElement("div");n.innerHTML=e,n.querySelectorAll("script, style, link, meta").forEach(l=>l.remove()),n.querySelectorAll("img").forEach(l=>{const u=l.getAttribute("width"),c=l.getAttribute("height");u==="1"&&c==="1"&&l.remove()}),n.querySelectorAll('[style*="display:none"], [style*="display: none"], [hidden]').forEach(l=>l.remove()),n.querySelectorAll("p, div, br, h1, h2, h3, h4, h5, h6, li").forEach(l=>{l.tagName==="BR"?l.replaceWith(` 154`):l.insertAdjacentText("afterend",` 155`)});let a=n.textContent||n.innerText||"";return a=Rf(a),a=a.replace(/https?:\/\/[^\s]{150,}/g,"[Link]"),a=a.replace(/(https?:\/\/[^\s?]+)\?[^\s]*/g,"$1"),a=a.split(/^[-_]{3,}$/m)[0],a=a.split(/^On.*wrote:$/m)[0],a=a.split(/^From:/m)[0],a=a.replace(/\n[ \t]+/g,` 156`).replace(/[ \t]+\n/g,` 157`).replace(/[ \t]+/g," ").replace(/\n{3,}/g,` 158 159`).replace(/\[Link\]\s*\[Link\]/g,"[Link]").trim(),a.length>5e3&&(a=a.substring(0,5e3)+"... [Content truncated]"),a},jR=t=>/<[a-z][\s\S]*>/i.test(t),P0=t=>{if(!t)return"";const e=document.createElement("textarea");e.innerHTML=t;let n=e.value;return e.innerHTML=n,n=e.value,n=n.replace(/(\u00AD){3,}/g,""),n},Rf=t=>t?t.normalize("NFKC").replace(/[\u00A0\u202F\u2007\u2009\u200A]/g," ").replace(/[\u200B-\u200D\uFEFF\u2060\u180E]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[\u2026]/g,"...").replace(/ââ¬â¢/g,"'").replace(/ââ¬Ë/g,"'").replace(/ââ¬Å/g,'"').replace(/ââ¬\x9d|ââ¬Â/g,'"').replace(/ââ¬â/g,"-").replace(/ââ¬â/g,"-").replace(/ââ¬Â¢/g,"â¢").replace(/ââ¬Â¦/g,"...").replace(/÷/g,"·").replace(/Ã/g,"").replace(/Ãâ/g,"Ã").replace(/âââ‰â¢/g,"'").replace(/ââ∠â/g,'"').replace(/âââ¬Ã¢/g,"â¢").replace(/ÃÃ\s*/g," ").replace(/à Ã/g," ").replace(/à /g,"à ").replace(/à/g,"à ").replace(/á/g,"á").replace(/â/g,"â").replace(/ã/g,"ã").replace(/ä/g,"ä").replace(/ÃÂ¥/g,"Ã¥").replace(/è/g,"è").replace(/é/g,"é").replace(/ê/g,"ê").replace(/ë/g,"ë").replace(/ì/g,"ì").replace(/ÃÂ/g,"Ã").replace(/î/g,"î").replace(/ï/g,"ï").replace(/ò/g,"ò").replace(/ó/g,"ó").replace(/ô/g,"ô").replace(/õ/g,"õ").replace(/ö/g,"ö").replace(/ù/g,"ù").replace(/ú/g,"ú").replace(/û/g,"û").replace(/ü/g,"ü").replace(/ñ/g,"ñ").replace(/ç/g,"ç").replace(/\u00AD+/g,"").replace(/\s{2,}/g," ").trim():"",NP=t=>{var u;if(!t)return"";const e=document.createElement("div");e.innerHTML=t;const n=["blockquote","div.gmail_quote","blockquote.gmail_quote",'blockquote[type="cite"]',"div.yahoo_quoted","div.OutlookMessageHeader",".moz-cite-prefix","div.gmail_attr"];
159e.querySelectorAll(n.join(",")).forEach(c=>{c.classList.contains("gmail_attr")&&c.nextElementSibling&&c.nextElementSibling.remove(),c.remove()});const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let s;for(;s=r.nextNode();){const c=(s.textContent||"").replace(/[\u00A0\u202F\u2007\u2009\u200A]/g," "),d=c.match(/On\s+\w+,\s+\w+\s+\d+,\s+\d{4}\s+at\s+\d+:\d+[^\n]*wrote:/i);if(d){const f=d.index;f+d[0].length;const p=c.substring(0,f).trim();p&&(s.textContent=p);let y=s.parentElement;for(;y&&!/^(DIV|P|SECTION|ARTICLE|BODY)$/i.test(y.tagName);)y=y.parentElement;if(y&&y.parentElement){let m=y.nextSibling;for(;m;){const w=m.nextSibling;(u=m.parentNode)==null||u.removeChild(m),m=w}p||y.remove()}break}}const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=[/forwarded\s+message/i,/begin\s+forwarded\s+message/i,/message\s+transféré/i];let a,l=!1;for(;a=i.nextNode();){const c=(a.textContent||"").replace(/[\u00A0\u202F\u2007\u2009\u200A]/g," ").trim();if(o.some(d=>d.test(c))){let d=a.parentElement;for(;d&&!/^(DIV|P|SECTION|ARTICLE|TABLE|BLOCKQUOTE|HR)$/i.test(d.tagName);)d=d.parentElement;if(d){const f=d.parentElement;if(f)for(d.remove();f.lastChild&&f.lastChild!==d;)f.lastChild.remove()}l=!0;break}}return e.innerHTML.trim()};class LP{constructor(){ii(this,"marks",new Map);ii(this,"measurements",[])}start(e){this.marks.set(e,performance.now())}end(e){const n=this.marks.get(e);if(!n)return console.warn(`Performance mark "${e}" not found`),null;const r=performance.now()-n;return this.measurements.push({name:e,startTime:n,duration:r}),this.marks.delete(e),r}getMeasurements(){return[...this.measurements]}clear(){this.marks.clear(),this.measurements=[]}getAverage(e){const n=this.measurements.filter(s=>s.name===e&&s.duration);return n.length===0?null:n.reduce((s,i)=>s+(i.duration||0),0)/n.length}}const Qp=new LP,$P=(t={})=>{const{page:e=0,pageSize:n=10,pendingOnly:r=!1,sentOnly:s=!1}=t;return qE({queryKey:["emails",e,n,r,s],placeholderData:i=>i,queryFn:async()=>{var o;const i=`emails-query-${r?"pending":"all"}-page-${e}`;try{const a=e*n,{data:l,error:u}=await te.auth.getUser();if(u)throw u;const c=(o=l.user)==null?void 0:o.id;if(!c)return{emails:[],totalCount:0};if(Qp.start(i),s){const{data:d,error:f,count:p}=await te.from("emails").select("id,gmail_message_id,thread_id,subject,sender,senderemail,content,preview,received_at,createdat,userid,isprocessed,isarchived,category,priority,to_recipients,cc_recipients,bcc_recipients,is_starred,custom_label,email_category,html_content,is_sent,finalsenttext",{count:"exact"}).eq("userid",c).eq("is_sent",!0).order("received_at",{ascending:!1}).range(a,a+n-1);if(f)throw f;const y=d||[],m=Array.from(new Set(y.map(h=>h.thread_id).filter(Boolean)));let w=[...y];if(m.length>0&&m.length<=30){const{data:h,error:g}=await te.from("emails").select("id,gmail_message_id,thread_id,subject,sender,senderemail,content,preview,received_at,createdat,userid,isprocessed,isarchived,category,priority,to_recipients,cc_recipients,bcc_recipients,is_starred,custom_label,email_category,html_content,is_sent,finalsenttext").eq("userid",c).in("thread_id",m).order("thread_id").order("received_at",{ascending:!0});if(!g&&h){const x=new Set(w.map(b=>b.id));w.push(...h.filter(b=>!x.has(b.id)))}}return{emails:(w||[]).map(h=>({...h,to_recipients:Array.isArray(h==null?void 0:h.to_recipients)?h.to_recipients:[],cc_recipients:Array.isArray(h==null?void 0:h.cc_recipients)?h.cc_recipients:[],bcc_recipients:Array.isArray(h==null?void 0:h.bcc_recipients)?h.bcc_recipients:[]})),totalCount:p||0}}else if(r){const{data:d,error:f,count:p}=await te.from("emails").select("id,gmail_message_id,thread_id,subject,sender,senderemail,content,preview,received_at,createdat,userid,isprocessed,isarchived,category,priority,to_recipients,cc_recipients,bcc_recipients,is_starred,custom_label,email_category,html_content",{count:"exact"}).eq("userid",c).eq("isprocessed",!1).order("received_at",{ascending:!1}).range(a,a+n-1);if(f)throw f;const y=d||[],m=Array.from(new Set(y.map(h=>h.thread_id).filter(Boolean)));let w=[...y];if(m.length>0&&m.length<=30){const{data:h,error:g}=await te.from("emails").select("id,gmail_message_id,thread_id,subject,sender,senderemail,content,preview,received_at,createdat,userid,isprocessed,isarchived,category,priority,to_recipients,cc_recipients,bcc_recipients,is_starred,custom_label,email_category,html_content").eq("userid",c).in("thread_id",m).order("thread_id").order("received_at",{ascending:!0});if(!g&&h){const x=new Set(w.map(b=>b.id));w.push(...h.filter(b=>!x.has(b.id)))}}return{emails:(w||[]).map(h=>
159({...h,to_recipients:Array.isArray(h==null?void 0:h.to_recipients)?h.to_recipients:[],cc_recipients:Array.isArray(h==null?void 0:h.cc_recipients)?h.cc_recipients:[],bcc_recipients:Array.isArray(h==null?void 0:h.bcc_recipients)?h.bcc_recipients:[]})),totalCount:p||0}}else{const{data:d,error:f,count:p}=await te.from("emails").select("id,gmail_message_id,thread_id,subject,sender,senderemail,content,preview,received_at,createdat,userid,isprocessed,isarchived,category,priority,to_recipients,cc_recipients,bcc_recipients,is_starred,custom_label,email_category,html_content",{count:"exact"}).eq("userid",c).order("received_at",{ascending:!1}).range(a,a+n-1);if(f)throw f;return{emails:(d||[]).map(m=>({...m,to_recipients:Array.isArray(m==null?void 0:m.to_recipients)?m.to_recipients:[],cc_recipients:Array.isArray(m==null?void 0:m.cc_recipients)?m.cc_recipients:[],bcc_recipients:Array.isArray(m==null?void 0:m.bcc_recipients)?m.bcc_recipients:[]})),totalCount:p||0}}}finally{Qp.end(i)}},staleTime:3e4,gcTime:3e5,refetchOnWindowFocus:!1,refetchOnMount:!1})},DP=15*60*1e3,Gp=5*60*1e3,Su=3,MP=2e3,FP=()=>{const{toast:t}=Jd(),e=_.useRef(0),n=_.useRef(!1),r=_.useRef(0),s=async(i=!0,o=1)=>{if(n.current)return console.log("Sync already in progress, skipping..."),{success:!1,error:"SYNC_IN_PROGRESS"};const a=Date.now();if(a-e.current<Gp)return console.log("Sync attempted too recently, skipping..."),{success:!1,error:"RATE_LIMITED"};try{n.current=!0,e.current=a;const{data:{user:l}}=await te.auth.getUser();if(!l)return console.log("No authenticated user, skipping sync"),{success:!1,error:"NO_USER"};const{data:u}=await te.from("gmail_sync_status").select("last_sync_at").eq("user_id",l.id).maybeSingle();if(u!=null&&u.last_sync_at){const f=new Date(u.last_sync_at).getTime();if(a-f<Gp)return console.log("Already synced recently, skipping..."),{success:!1,error:"RECENTLY_SYNCED"}}console.log("Triggering automatic Gmail sync...");const{data:c,error:d}=await te.functions.invoke("gmail-sync",{body:{backfillDays:u!=null&&u.last_sync_at?1:7,skipAIExtraction:!0,skipAICategorization:!0,skipAttachments:!0,insertBatchSize:20}});if(d)throw d;if(r.current=0,i){const f=(c==null?void 0:c.emailsSynced)||0,p=(c==null?void 0:c.emailsFailed)||0;console.log(`[Phase 1] Auto-sync complete: ${f} synced, ${p} failed`)}else{const f=(c==null?void 0:c.emailsSynced)||0,p=(c==null?void 0:c.emailsFailed)||0;p>0?t({title:"Sync Completed with Issues",description:`Synced ${f} emails, ${p} failed`,variant:"destructive"}):t({title:"Sync Complete",description:`Synced ${f} emails from Gmail`})}return{success:!0,count:(c==null?void 0:c.emailsSynced)||0}}catch(l){console.error(`Gmail auto-sync error (attempt ${o}/${Su}):`,l);const u=l.message||"",c=u.includes("refresh")||u.includes("token")||u.includes("expired"),d=u.includes("fetch")||u.includes("network")||l.name==="NetworkError",f=u.includes("PROFILE_")||u.includes("profile");if((d||!c&&!f)&&o<Su){const p=MP*Math.pow(2,o-1);return console.log(`Retrying sync in ${p}ms... (attempt ${o+1}/${Su})`),r.current=o,setTimeout(()=>{n.current=!1,s(i,o+1)},p),{success:!1,error:"RETRYING"}}if(r.current=0,c&&!i)t({title:"Gmail Connection Issue",description:"Your Gmail connection needs to be refreshed. Go to Settings to reconnect.",variant:"destructive"});else if(f&&!i)t({title:"Account Setup Required",description:"Please complete your account setup in Settings.",variant:"destructive"});else if(!i){const p=o>1?` (after ${o} attempts)`:"";t({title:"Sync Error",description:u||`Failed to sync Gmail${p}. Please check your connection.`,variant:"destructive"})}return{success:!1,error:c?"NO_TOKEN":"SYNC_FAILED"}}finally{n.current=!1}};return _.useEffect(()=>{(async()=>{await new Promise(a=>setTimeout(a,1e3)),await s(!0)})();const o=setInterval(()=>{s(!0)},DP);return()=>{clearInterval(o)}},[]),{triggerGmailSync:s}},R0=_.createContext(void 0),IR=()=>{const t=_.useContext(R0);if(!t)throw new Error("useEmails must be used within an EmailProvider");return t},vr=t=>t?Rf(t):"",UP=t=>{console.log("Converting emails grouped by thread:",t);const e=[];return t.forEach((n,r)=>{const s=n.sort((c,d)=>new Date(c.received_at||c.createdat).getTime()-new Date(d.received_at||d.createdat).getTime()),i=new Set,o=s.filter(c=>{const d=c.gmail_message_id||`${c.is_sent}-${c.received_at||c.createdat}-${c.subject}`;return i.has(d)?!1:(i.add(d),!0)}),a=o[o.length-1],l=o.map((c,d)=>{const f=c.html_content,p=f?d>0?NP(f):f:void 0,y=c.to_recipients&&Array.isArray(c.to_recipients)?c.to_recipients.map(w=>({email:w.email||w,name:w.name||""})):[],m=c.cc_recipients&&Array.isArray(c.cc_recipients)?c.cc_recipients.map(w=>({email:w.email||w,name:w.name||""})):[];return{id:`msg_${c.id}`,sender:vr(c.is_sent?"You":c.sender||c.senderemail||c.senderemail||"Unknown"),senderEmail:c.is_sent?void 0:c.senderemail,content:vr(c.content||""),htmlContent:p,timestamp:c.received_at||c.createdat||new Date().toISOString(),isFromProspect:!c.is_sent,toRecipients:y,ccRecipients:m}}),u={id:String(a.id??Math.random().toString()),originalMessage:vr(a.content||"No message content"),boardyReply:vr(a.finalsenttext||""),fullName:vr(a.sender||""),email:a.senderemail||"",linkedinUrl:"",senderName:"Slick Inbox",intent:vr(a.category||"General inquiry"),status:a.isarchived?"rejected":a.isprocessed?"approved":"pending",createdAt:a.received_at||a.createdat||new Date().toISOString(),campaignName:"",campaignId:"",targetReply:"",subject:vr(a.subject||"No Subject"),conversationThread:l,_rawData:a};e.push(u)}),e.sort((n,r)=>new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime())},zP=({children:t})=>{const e=Vy(),[n,r]=_.useState(new Set),[s,i]=_.useState("all"),[o,a]=_.useState(!1);FP();const[l,u]=_.useState({}),c=E=>l[E],d=(E,T)=>u(R=>({...R,[E]:T})),f=E=>u(T=>{const{[E]:R,...A}=T;return A});j.useEffect(()=>{const E=te.channel("emails_updates").on("postgres_changes",{event:"*",schema:"public",table:"emails"},()=>
159{e.invalidateQueries({queryKey:["emails"]})}).subscribe();return()=>{E.unsubscribe()}},[e]);const{data:p,isLoading:y,refetch:m}=$P({page:0,pageSize:100,pendingOnly:!0}),w=j.useMemo(()=>{if(!(p!=null&&p.emails))return[];const E=p.emails,T=new Map;E.forEach(A=>{const F=A.thread_id||A.id;T.has(F)||T.set(F,[]),T.get(F).push(A)});const R=UP(T);return console.log("Fetched and converted emails with threads:",R),R},[p]),v=async()=>{await m()},h=async(E,T,R=!1)=>{if(!o)try{a(!0),await TP(T,E,R,"approved"),e.invalidateQueries({queryKey:["emails"]}),e.invalidateQueries({queryKey:["weekly-stats"]}),e.invalidateQueries({queryKey:["daily-stats"]}),es.approved()}catch(A){throw console.error("Error approving email:",A),es.approveFailed(),A}finally{a(!1)}},g=async E=>{if(!o)try{a(!0),await PP(E),e.invalidateQueries({queryKey:["emails"]}),e.invalidateQueries({queryKey:["weekly-stats"]}),e.invalidateQueries({queryKey:["daily-stats"]}),es.archived()}catch(T){throw console.error("Error rejecting email:",T),es.archiveFailed(),T}finally{a(!1)}},x=async E=>{if(!o)try{a(!0),await RP(E),e.invalidateQueries({queryKey:["emails"]}),e.invalidateQueries({queryKey:["weekly-stats"]}),e.invalidateQueries({queryKey:["daily-stats"]}),es.approved()}catch(T){throw console.error("Error marking handoff complete:",T),es.approveFailed(),T}finally{a(!1)}},b=E=>{r(T=>new Set(T).add(E))},C=()=>{e.invalidateQueries({queryKey:["emails"]}),r(new Set)};return k.jsx(R0.Provider,{value:{emails:w,isLoading:y,isProcessing:o,readEmailIds:n,labelFilter:s,setLabelFilter:i,fetchEmails:v,approveEmail:h,rejectEmail:g,handoffCompleteEmail:x,markEmailAsRead:b,clearQueue:C,draftReplies:l,getDraft:c,setDraft:d,clearDraft:f},children:t})},BP={theme:"system",setTheme:()=>null},WP=_.createContext(BP);function HP({children:t,defaultTheme:e="system",storageKey:n="ui-theme",...r}){const[s,i]=_.useState(()=>localStorage.getItem(n)||e);_.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return k.jsx(WP.Provider,{...r,value:o,children:t})}const VP=()=>{const[t,e]=_.useState(!1),[n,r]=_.useState(!0);return _.useEffect(()=>{(async()=>{try{const{data:{user:i}}=await te.auth.getUser();if(!i){e(!1),r(!1);return}const{data:o}=await te.from("user_roles").select("role").eq("user_id",i.id).eq("role","admin").maybeSingle();e(!!o)}catch(i){console.error("Error checking admin status:",i),e(!1)}finally{r(!1)}})()},[]),{isAdmin:t,isLoading:n}},qP=rf("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-[image:var(--gradient-primary)] text-primary-foreground hover:opacity-90 transition-opacity",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-muted/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",minimal:"bg-card border hover:bg-muted/50 text-foreground"},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"}}),nd=_.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?to:"button";return k.jsx(o,{className:Ut(qP({variant:e,size:n,className:t})),ref:i,...s})});nd.displayName="Button";const KP=rf("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),O0=_.forwardRef(({className:t,variant:e,...n},r)=>k.jsx("div",{ref:r,role:"alert",className:Ut(KP({variant:e}),t),...n}));O0.displayName="Alert";const A0=_.forwardRef(({className:t,...e},n)=>k.jsx("h5",{ref:n,className:Ut("mb-1 font-medium leading-none tracking-tight",t),...e}));A0.displayName="AlertTitle";const j0=_.forwardRef(({className:t,...e},n)=>k.jsx("div",{ref:n,className:Ut("text-sm [&_p]:leading-relaxed",t),...e}));j0.displayName="AlertDescription";class I0 extends _.Component{constructor(){super(...arguments);ii(this,"state",{hasError:!1,error:null,errorInfo:null});ii(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null}),window.location.reload()})}static getDerivedStateFromError(n){return{hasError:!0,error:n,errorInfo:null}}componentDidCatch(n,r){console.error("ErrorBoundary caught an error:",n,r),this.setState({error:n,errorInfo:r})}render(){var n;return this.state.hasError?this.props.fallback?this.props.fallback:k.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:k.jsxs("div",{className:"max-w-md w-full",children:[k.jsxs(O0,{variant:"destructive",className:"mb-4",children:[k.jsx(mb,{className:"h-4 w-4"}),k.jsx(A0,{children:"Something went wrong"}),k.jsx(j0,{children:((n=this.state.error)==null?void 0:n.message)||"An unexpected error occurred"})]}),k.jsxs("div",{className:"flex gap-2",children:[k.jsxs(nd,{onClick:this.handleReset,className:"flex-1",children:[k.jsx(vb,{className:"h-4 w-4 mr-2"}),"Reload App"]}),k.jsx(nd,{variant:"minimal",onClick:()=>window.history.back(),className:"flex-1",children:"Go Back"})]}),!1]})}):this.props.children}}const QP=()=>{const[t,e]=_.useState(navigator.onLine);return _.useEffect(()=>{const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n),window.addEventListener("offline",r),
159()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}},[]),{isOnline:t}},GP=()=>{const{isOnline:t}=QP(),{toast:e}=Jd();return _.useEffect(()=>{t||e({title:"No Internet Connection",description:"You're offline. Some features may not work.",variant:"destructive"})},[t,e]),t?null:k.jsxs("div",{className:"fixed bottom-4 left-4 z-50 flex items-center gap-2 bg-destructive text-destructive-foreground px-4 py-2 rounded-lg shadow-lg",children:[k.jsx(yb,{className:"h-4 w-4"}),k.jsx("span",{className:"text-sm font-medium",children:"Offline"})]})},YP=_.lazy(()=>$e(()=>import("./Auth-DNhnVwIT.js"),__vite__mapDeps([0,1,2,3]))),JP=_.lazy(()=>$e(()=>import("./AuthCallback-73FxaSPA.js"),[])),XP=_.lazy(()=>$e(()=>import("./Inbox-BRkXvZau.js"),__vite__mapDeps([4,5,1,6,7,3,8,9,10,11,12]))),ZP=_.lazy(()=>$e(()=>import("./InboxList-CiNn1M--.js"),__vite__mapDeps([13,7,1,6,3,14,15,5,8,9,10,12,16,17]))),eR=_.lazy(()=>$e(()=>import("./Dashboard-CTrsmhyQ.js"),__vite__mapDeps([18,5,1,6,7,3,8,9,10,15,11,16]))),tR=_.lazy(()=>$e(()=>import("./Sent-DgVSDM2s.js"),__vite__mapDeps([19,13,7,1,6,3,14,15,5,8,9,10,12,16,17]))),nR=_.lazy(()=>$e(()=>import("./Drafts-B0ct0AMQ.js"),__vite__mapDeps([20,7,1,6,3,14,16,21,22,10,17,8]))),rR=_.lazy(()=>$e(()=>import("./Contacts-CNcHVpAC.js"),__vite__mapDeps([23,1,7,6,3,17,8,16,21]))),sR=_.lazy(()=>$e(()=>import("./Analytics-ByMDaMKZ.js"),__vite__mapDeps([24,7,1,6,3,15,12,25]))),iR=_.lazy(()=>$e(()=>import("./Admin-rrKGxjqy.js"),__vite__mapDeps([26,1,6,27,25,10]))),oR=_.lazy(()=>$e(()=>import("./Settings-C_kVT3uf.js"),__vite__mapDeps([28,7,1,6,3,27,2,22,9,10]))),aR=_.lazy(()=>$e(()=>import("./NotFound-CiSGPnxB.js"),[])),lR=new PE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:3e4,gcTime:3e5}}}),uR=()=>k.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:k.jsxs("div",{className:"flex flex-col items-center gap-4",children:[k.jsx("div",{className:"animate-spin w-8 h-8 border-4 border-primary border-t-transparent rounded-full"}),k.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}),cR=()=>{const{isAdmin:t}=VP();return t?k.jsx(KE,{initialIsOpen:!1}):null},dR=()=>k.jsx(j.StrictMode,{children:k.jsx(I0,{children:k.jsx(HP,{defaultTheme:"light",storageKey:"slick-inbox-theme",children:k.jsxs(jE,{client:lR,children:[k.jsx(cR,{}),k.jsxs(dE,{delayDuration:0,skipDelayDuration:0,children:[k.jsx(t1,{}),k.jsx(O1,{}),k.jsx(GP,{}),k.jsx(Wk,{children:k.jsx(mP,{children:k.jsx(jP,{children:k.jsx(zP,{children:k.jsx(_.Suspense,{fallback:k.jsx(uR,{}),children:k.jsxs($k,{children:[k.jsx(it,{path:"/auth",element:k.jsx(YP,{})}),k.jsx(it,{path:"/auth/callback",element:k.jsx(JP,{})}),k.jsx(it,{path:"/",element:k.jsx(sn,{children:k.jsx(XP,{})})}),k.jsx(it,{path:"/allemails",element:k.jsx(sn,{children:k.jsx(ZP,{})})}),k.jsx(it,{path:"/dashboard",element:k.jsx(sn,{children:k.jsx(eR,{})})}),k.jsx(it,{path:"/sent",element:k.jsx(sn,{children:k.jsx(tR,{})})}),k.jsx(it,{path:"/drafts",element:k.jsx(sn,{children:k.jsx(nR,{})})}),k.jsx(it,{path:"/contacts",element:k.jsx(sn,{children:k.jsx(rR,{})})}),k.jsx(it,{path:"/analytics",element:k.jsx(sn,{children:k.jsx(sR,{})})}),k.jsx(it,{path:"/admin",element:k.jsx(sn,{children:k.jsx(iR,{})})}),k.jsx(it,{path:"/settings",element:k.jsx(sn,{children:k.jsx(oR,{})})}),k.jsx(it,{path:"*",element:k.jsx(aR,{})})]})})})})})})]})]})})})}),N0=document.getElementById("root");if(!N0)throw new Error("Root element not found");_v(N0).render(k.jsx(j.StrictMode,{children:k.jsx(I0,{children:k.jsx(dR,{})})}));export{qP as $,Jd as A,nd as B,mb as C,Sv as D,Dt as E,Pv as F,Ce as G,hl as H,LS as I,tp as J,O0 as K,gb as L,A0 as M,j0 as N,St as O,rt as P,im as Q,vb as R,Gv as S,vR as T,na as U,yi as V,Rx as W,wb as X,en as Y,I1 as Z,bv as _,ti as a,vy as a0,WS as a1,rr as a2,to as a3,Xd as a4,HS as a5,VS as a6,pl as a7,BS as a8,Zd as a9,rf as aa,es as ab,wR as ac,hR as ad,Ut as b,_o as c,qE as d,yR as e,fE as f,IR as g,Vy as h,$P as i,k as j,NP as k,TP as l,PP as m,Rf as n,RP as o,Qp as p,mR as q,_ as r,te as s,j as t,Zy as u,wo as v,dE as w,AR as x,jR as y,OR as z};
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.