1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Index-CH4FMtvb.js","assets/Navigation-CqRujC2Z.js","assets/logo-Dtlqy6lQ.js","assets/calendar-Lm8OJrMM.js","assets/users-D56f5b6R.js","assets/Danke-C8tXg1is.js","assets/external-link-Dr_bgpA3.js","assets/DankeFormular-Dg4_v1Bp.js","assets/circle-check-big-JqvKUeGW.js","assets/DankeKontakt-DPhHMBo8.js","assets/mail-DkQ6T6XQ.js","assets/arrow-right-z3htBPbu.js","assets/Konzept-DM5TqbDD.js","assets/ContactForm-BReRoe9m.js","assets/label-CEY2dX1D.js","assets/textarea-pE4Eqfrz.js","assets/select-DRDq5ykd.js","assets/index-B7a7jMFN.js","assets/Combination-1Eay90PQ.js","assets/index-C2vFwThP.js","assets/chevron-down-BlkYgcRp.js","assets/check-D2RH5PKh.js","assets/send-DsFbtkhv.js","assets/DesignManual-CgQWIszu.js","assets/card-C5EbjDPc.js","assets/arrow-left-CAScA3_I.js","assets/download-DRNfoS1E.js","assets/film-D2t7-UYB.js","assets/camera-Ct3USKh-.js","assets/Elternformular-BdmvqJ0G.js","assets/checkbox-CRE7g1W8.js","assets/SignaturePad-szRkNml8.js","assets/loader-circle-dxCkgakK.js","assets/Beirat-DfEiSS0I.js","assets/Footer-L-VTunCL.js","assets/useScrollReveal-CNHvyjQh.js","assets/cindy-uliderks-C9J0BRjr.js","assets/user-DKBK35XN.js","assets/Sponsoring-CPonOedA.js","assets/Blog-BSifp2Oj.js","assets/blogPosts-COamsCon.js","assets/ef-education-first-CGa_Xpah.js","assets/berufswahltest-hero-VyHZ_0l7.js","assets/BlogPostFinanzfluss-BHDDhZ7D.js","assets/BlogSidebar-Bdesstez.js","assets/sparkles-DEBzaOqC.js","assets/RelatedPosts-BdcBxVv-.js","assets/BlogPostEF-Bmec6-RB.js","assets/BlogPostLerncoach-CWjPrAVE.js","assets/accordion-Dcx2nwXm.js","assets/clock-DCDY1UQb.
vendor: 6,734 bytes, lines 1-10
1js","assets/BlogPostMobbing-CGaZZsgj.js","assets/BlogPostBafoeg-zttlmuss.js","assets/BlogPostPruefungsangst-BkNVjOPH.js","assets/BlogPostSpickzettel-D3cRNjlS.js","assets/BlogPostSoftSkills-d5rwx6CG.js","assets/BlogPostRhetorik-BwRCeWZi.js","assets/Berufswahltest-B7RQaTz0.js","assets/BerufswahlTest-Crfiz-EO.js","assets/Admin-Jd1OU2Vs.js","assets/useCommunityMember-DufaIRYL.js","assets/dialog-BNObHGUd.js","assets/mic-DZA2EAuY.js","assets/handshake-BV7ztWlD.js","assets/circle-check-DajAuL_s.js","assets/ResetPassword-B3S65N9F.js","assets/Community-DoNuku2L.js","assets/lightbulb-DRuUkgiB.js","assets/book-open-mUEizqE5.js","assets/rocket-CO4vDnjk.js","assets/star-CX3m5Bdd.js","assets/flame-l53MJg_J.js","assets/compass-DCcrcoED.js","assets/types-B_38dTps.js","assets/chevron-right-Cjg2y2im.js","assets/CommunityBeitreten-bqdD7mGA.js","assets/shield-check-B6a2wHej.js","assets/CommunityEltern-BmmGHKAU.js"])))=>i.map(i=>d[i]); 2var ih=e=>{throw TypeError(e)};var _l=(e,t,r)=>t.has(e)||ih("Cannot "+r);var T=(e,t,r)=>(_l(e,t,"read from private field"),r?r.call(e):t.get(e)),re=(e,t,r)=>t.has(e)?ih("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),q=(e,t,r,n)=>(_l(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(_l(e,t,"access private method"),r);var mi=(e,t,r,n)=>({set _(s){q(e,t,s,r)},get _(){return T(e,t,n)}});function t0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var PP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lp={exports:{}},Ua={},$p={exports:{}},Y={};/** 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 ni=Symbol.for("react.element"),r0=Symbol.for("react.portal"),n0=Symbol.for("react.fragment"),s0=Symbol.for("react.strict_mode"),o0=Symbol.for("react.profiler"),i0=Symbol.for("react.provider"),a0=Symbol.for("react.context"),l0=Symbol.for("react.forward_ref"),u0=Symbol.for("react.suspense"),c0=Symbol.for("react.memo"),d0=Symbol.for("react.lazy"),ah=Symbol.iterator;function h0(e){return e===null||typeof e!="object"?null:(e=ah&&e[ah]||e["@@iterator"],typeof e=="function"?e:null)}var Dp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Up=Object.assign,Mp={};function Fs(e,t,r){this.props=e,this.context=t,this.refs=Mp,this.updater=r||Dp}Fs.prototype.isReactComponent={};Fs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Fs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zp(){}zp.prototype=Fs.prototype;function Ic(e,t,r){this.props=e,this.context=t,this.refs=Mp,this.updater=r||Dp}var jc=Ic.prototype=new zp;jc.constructor=Ic;Up(jc,Fs.prototype);jc.isPureReactComponent=!0;var lh=Array.isArray,Fp=Object.prototype.hasOwnProperty,Nc={current:null},Bp={key:!0,ref:!0,__self:!0,__source:!0};function Vp(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Fp.call(t,n)&&!Bp.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:ni,type:e,key:o,ref:i,props:s,_owner:Nc.current}}function f0(e,t){return{$$typeof:ni,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ni}function p0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var uh=/\/+/g;function bl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p0(""+e.key):t.toString(36)}function Bi(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case ni:case r0:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+bl(i,0):n,lh(s)?(r="",e!=null&&(r=e.replace(uh,"$&/")+"/"),Bi(s,t,r,"",function(u){return u})):s!=null&&(Lc(s)&&(s=f0(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(uh,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",lh(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+bl(o,a);i+=Bi(o,t,r,l,s)}else if(l=h0(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+bl(o,a++),i+=Bi(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function gi(e,t,r){if(e==null)return e;var n=[],s=0;return Bi(e,n,"","",function(o){return t.call(r,o,s++)}),n}function m0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ge={current:null},Vi={transition:null},g0={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:Vi,ReactCurrentOwner:Nc};function Wp(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 7,407 bytes, lines 10-26
10Y.Children={map:gi,forEach:function(e,t,r){gi(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return gi(e,function(){t++}),t},toArray:function(e){return gi(e,function(t){return t})||[]},only:function(e){if(!Lc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Fs;Y.Fragment=n0;Y.Profiler=o0;Y.PureComponent=Ic;Y.StrictMode=s0;Y.Suspense=u0;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g0;Y.act=Wp;Y.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Up({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Nc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Fp.call(t,l)&&!Bp.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:ni,type:e.type,key:s,ref:o,props:n,_owner:i}};Y.createContext=function(e){return e={$$typeof:a0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:i0,_context:e},e.Consumer=e};Y.createElement=Vp;Y.createFactory=function(e){var t=Vp.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:l0,render:e}};Y.isValidElement=Lc;Y.lazy=function(e){return{$$typeof:d0,_payload:{_status:-1,_result:e},_init:m0}};Y.memo=function(e,t){return{$$typeof:c0,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=Vi.transition;Vi.transition={};try{e()}finally{Vi.transition=t}};Y.unstable_act=Wp;Y.useCallback=function(e,t){return Ge.current.useCallback(e,t)};Y.useContext=function(e){return Ge.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return Ge.current.useDeferredValue(e)};Y.useEffect=function(e,t){return Ge.current.useEffect(e,t)};Y.useId=function(){return Ge.current.useId()};Y.useImperativeHandle=function(e,t,r){return Ge.current.useImperativeHandle(e,t,r)};Y.useInsertionEffect=function(e,t){return Ge.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return Ge.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return Ge.current.useMemo(e,t)};Y.useReducer=function(e,t,r){return Ge.current.useReducer(e,t,r)};Y.useRef=function(e){return Ge.current.useRef(e)};Y.useState=function(e){return Ge.current.useState(e)};Y.useSyncExternalStore=function(e,t,r){return Ge.current.useSyncExternalStore(e,t,r)};Y.useTransition=function(){return Ge.current.useTransition()};Y.version="18.3.1";$p.exports=Y;var _=$p.exports;const I=Np(_),$c=t0({__proto__:null,default:I},[_]);/** 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 v0=_,y0=Symbol.for("react.element"),w0=Symbol.for("react.fragment"),_0=Object.prototype.hasOwnProperty,b0=v0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E0={key:!0,ref:!0,__self:!0,__source:!0};function Hp(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)_0.call(t,n)&&!E0.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:y0,type:e,key:o,ref:i,props:s,_owner:b0.current}}Ua.Fragment=w0;Ua.jsx=Hp;Ua.jsxs=Hp;Lp.exports=Ua;var x=Lp.exports,qp={exports:{}},ht={},Kp={exports:{}},Gp={};/** 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(e){function t(C,R){var $=C.length;C.push(R);e:for(;0<$;){var G=$-1>>>1,M=C[G];if(0<s(M,R))C[G]=R,C[$]=M,$=G;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var R=C[0],$=C.pop();if($!==R){C[0]=$;e:for(var G=0,M=C.length,J=M>>>1;G<J;){var Z=2*(G+1)-1,xe=C[Z],De=Z+1,ne=C[De];if(0>s(xe,$))De<M&&0>s(ne,xe)?(C[G]=ne,C[De]=$,G=De):(C[G]=xe,C[Z]=$,G=Z);else if(De<M&&0>s(ne,$))C[G]=ne,C[De]=$,G=De;else break e}}return R}function s(C,R){var $=C.sortIndex-R.sortIndex;return $!==0?$:C.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,h=null,f=3,d=!1,y=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(C){for(var R=r(u);R!==null;){if(R.callback===null)n(u);else if(R.startTime<=C)n(u),R.sortIndex=R.expirationTime,t(l,R);else break;R=r(u)}}function b(C){if(v=!1,m(C),!y)if(r(l)!==null)y=!0,V(E);else{var R=r(u);R!==null&&K(b,R.startTime-C)}}function E(C,R){y=!1,v&&(v=!1,g(P),P=-1),d=!0;var $=f;try{for(m(R),h=r(l);h!==null&&(!(h.expirationTime>R)||C&&!B());){var G=h.callback;if(typeof G=="function"){h.callback=null,f=h.priorityLevel;var M=G(h.expirationTime<=R);R=e.unstable_now(),typeof M=="function"?h.callback=M:h===r(l)&&n(l),m(R)}else n(l);h=r(l)}if(h!==null)var J=!0;else{var Z=r(u);Z!==null&&K(b,Z.startTime-R),J=!1}return J}finally{h=null,f=$,d=!1}}var S=!1,k=null,P=-1,A=5,j=-1;function B(){return!(e.unstable_now()-j<A)}function L(){if(k!==null){var C=e.unstable_now();j=C;var R=!0;try{R=k(!0,C)}finally{R?W():(S=!1,k=null)}}else S=!1}var W;if(typeof p=="function")W=function(){p(L)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,X=N.port2;N.port1.onmessage=L,W=function(){X.postMessage(null)}}else W=function(){w(L,0)};function V(C){k=C,S||(S=!0,W())}function K(C,R){P=w(function(){C(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){y||d||(y=!0,V(E))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var R=3;break;default:R=f}var $=f;f=R;try{return C()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,R){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var $=f;f=C;try{return R()}finally{f=$}},e.unstable_scheduleCallback=function(C,R,$){var G=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?G+$:G):$=G,C){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}
vendor: 4,614 bytes, lines 26-34
26return M=$+M,C={id:c++,callback:R,priorityLevel:C,startTime:$,expirationTime:M,sortIndex:-1},$>G?(C.sortIndex=$,t(u,C),r(l)===null&&C===r(u)&&(v?(g(P),P=-1):v=!0,K(b,$-G))):(C.sortIndex=M,t(l,C),y||d||(y=!0,V(E))),C},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(C){var R=f;return function(){var $=f;f=R;try{return C.apply(this,arguments)}finally{f=$}}}})(Gp);Kp.exports=Gp;var x0=Kp.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 S0=_,dt=x0;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qp=new Set,ko={};function Dn(e,t){Is(e,t),Is(e+"Capture",t)}function Is(e,t){for(ko[e]=t,e=0;e<t.length;e++)Qp.add(t[e])}var ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=Object.prototype.hasOwnProperty,k0=/^[: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]*$/,ch={},dh={};function T0(e){return du.call(dh,e)?!0:du.call(ch,e)?!1:k0.test(e)?dh[e]=!0:(ch[e]=!0,!1)}function C0(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P0(e,t,r,n){if(t===null||typeof t>"u"||C0(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qe(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var $e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$e[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];$e[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$e[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$e[e]=new Qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){$e[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$e[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$e[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$e[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$e[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Dc=/[\-:]([a-z])/g;function Uc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
34-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Dc,Uc);$e[t]=new Qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Dc,Uc);$e[t]=new Qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Dc,Uc);$e[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$e[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});$e.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$e[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mc(e,t,r,n){var s=$e.hasOwnProperty(t)?$e[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(P0(t,r,s,n)&&(r=null),n||s===null?T0(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var gr=S0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vi=Symbol.for("react.element"),rs=Symbol.for("react.portal"),ns=Symbol.for("react.fragment"),zc=Symbol.for("react.strict_mode"),hu=Symbol.for("react.profiler"),Jp=Symbol.for("react.provider"),Yp=Symbol.for("react.context"),Fc=Symbol.for("react.forward_ref"),fu=Symbol.for("react.suspense"),pu=Symbol.for("react.suspense_list"),Bc=Symbol.for("react.memo"),Pr=Symbol.for("react.lazy"),Xp=Symbol.for("react.offscreen"),hh=Symbol.iterator;function Ys(e){return e===null||typeof e!="object"?null:(e=hh&&e[hh]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,El;function ao(e){if(El===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);El=t&&t[1]||""}return` 35`+El+e}var xl=!1;function Sl(e,t){if(!e||xl)return"";xl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),o=n.stack.split(` 37`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=` 38`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{xl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ao(e):""}function R0(e){switch(e.tag){case 5:return ao(e.type);case 16:return ao("Lazy");case 13:return ao("Suspense");case 19:return ao("SuspenseList");case 0:case 2:case 15:return e=Sl(e.type,!1),e;case 11:return e=Sl(e.type.render,!1),e;case 1:return e=Sl(e.type,!0),e;default:return""}}function mu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ns:return"Fragment";case rs:return"Portal";case hu:return"Profiler";case zc:return"StrictMode";case fu:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yp:return(e.displayName||"Context")+".Consumer";case Jp:return(e._context.displayName||"Context")+".Provider";case Fc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bc:return t=e.displayName||null,t!==null?t:mu(e.type)||"Memo";case Pr:t=e._payload,e=e._init;try{return mu(e(t))}catch{}}return null}function O0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mu(t);case 8:return t===zc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function A0(e){var t=Zp(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yi(e){e._valueTracker||(e._valueTracker=A0(e))}function em(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Zp(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function na(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function gu(e,t){var r=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function fh(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Yr(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tm(e,t){t=t.checked,t!=null&&Mc(e,"checked",t,!1)}function vu(e,t){tm(e,t);var r=Yr(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yu(e,t.type,r):t.hasOwnProperty("defaultValue")&&yu(e,t.type,Yr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ph(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function yu(e,t,r){(t!=="number"||na(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var lo=Array.isArray;function ms(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Yr(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function wu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mh(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(O(92));if(lo(r)){if(1<r.length)throw Error(O(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Yr(r)}}function rm(e,t){var r=Yr(t.value),n=Yr(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function gh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function nm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function _u(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?nm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wi,sm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wi=wi||document.createElement("div"),wi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function To(e,t){if(t){var r=e.firstChild;
vendor: 10,020 bytes, line 38
38if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var fo={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},I0=["Webkit","ms","Moz","O"];Object.keys(fo).forEach(function(e){I0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fo[t]=fo[e]})});function om(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||fo.hasOwnProperty(e)&&fo[e]?(""+t).trim():t+"px"}function im(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=om(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var j0=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 bu(e,t){if(t){if(j0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function Eu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function Vc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,gs=null,vs=null;function vh(e){if(e=ii(e)){if(typeof Su!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Va(t),Su(e.stateNode,e.type,t))}}function am(e){gs?vs?vs.push(e):vs=[e]:gs=e}function lm(){if(gs){var e=gs,t=vs;if(vs=gs=null,vh(e),t)for(e=0;e<t.length;e++)vh(t[e])}}function um(e,t){return e(t)}function cm(){}var kl=!1;function dm(e,t,r){if(kl)return e(t,r);kl=!0;try{return um(e,t,r)}finally{kl=!1,(gs!==null||vs!==null)&&(cm(),lm())}}function Co(e,t){var r=e.stateNode;if(r===null)return null;var n=Va(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(O(231,t,typeof r));return r}var ku=!1;if(ur)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){ku=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{ku=!1}function N0(e,t,r,n,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var po=!1,sa=null,oa=!1,Tu=null,L0={onError:function(e){po=!0,sa=e}};function $0(e,t,r,n,s,o,i,a,l){po=!1,sa=null,N0.apply(L0,arguments)}function D0(e,t,r,n,s,o,i,a,l){if($0.apply(this,arguments),po){if(po){var u=sa;po=!1,sa=null}else throw Error(O(198));oa||(oa=!0,Tu=u)}}function Un(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function hm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yh(e){if(Un(e)!==e)throw Error(O(188))}function U0(e){var t=e.alternate;if(!t){if(t=Un(e),t===null)throw Error(O(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return yh(s),e;if(o===n)return yh(s),t;o=o.sibling}throw Error(O(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(O(189))}}if(r.alternate!==n)throw Error(O(190))}if(r.tag!==3)throw Error(O(188));return r.stateNode.current===r?e:t}function fm(e){return e=U0(e),e!==null?pm(e):null}function pm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pm(e);if(t!==null)return t;e=e.sibling}return null}var mm=dt.unstable_scheduleCallback,wh=dt.unstable_cancelCallback,M0=dt.unstable_shouldYield,z0=dt.unstable_requestPaint,be=dt.unstable_now,F0=dt.unstable_getCurrentPriorityLevel,Wc=dt.unstable_ImmediatePriority,gm=dt.unstable_UserBlockingPriority,ia=dt.unstable_NormalPriority,B0=dt.unstable_LowPriority,vm=dt.unstable_IdlePriority,Ma=null,Qt=null;function V0(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Ma,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:q0,W0=Math.log,H0=Math.LN2;function q0(e){return e>>>=0,e===0?32:31-(W0(e)/H0|0)|0}var _i=64,bi=4194304;function uo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function aa(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=uo(a):(o&=i,o!==0&&(n=uo(o)))}else i=r&~s,i!==0?n=uo(i):o!==0&&(n=uo(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-$t(t),s=1<<r,n|=e[r],t&=~s;return n}function K0(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G0(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-$t(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=K0(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Cu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ym(){var e=_i;return _i<<=1,!(_i&4194240)&&(_i=64),e}function Tl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function si(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$t(t),e[t]=r}function Q0(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-$t(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Hc(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-$t(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var se=0;function wm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _m,qc,bm,Em,xm,Pu=!1,Ei=[],Br=null,Vr=null,Wr=null,Po=new Map,Ro=new Map,Ar=[],J0="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 _h(e,t){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Po.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ro.delete(t.pointerId)}}function Zs(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=ii(t),t!==null&&qc(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Y0(e,t,r,n,s){switch(t){case"focusin":return Br=Zs(Br,e,t,r,n,s),!0;case"dragenter":return Vr=Zs(Vr,e,t,r,n,s),!0;case"mouseover":return Wr=Zs(Wr,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Po.set(o,Zs(Po.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Ro.set(o,Zs(Ro.get(o)||null,e,t,r,n,s)),!0}return!1}function Sm(e){var t=wn(e.target);if(t!==null){var r=Un(t);if(r!==null){if(t=r.tag,t===13){if(t=hm(r),t!==null){e.blockedOn=t,xm(e.priority,function(){bm(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Ru(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);xu=n,r.target.dispatchEvent(n),xu=null}else return t=ii(r),t!==null&&qc(t),e.blockedOn=r,!1;t.shift()}return!0}function bh(e,t,r){Wi(e)&&r.delete(t)}function X0(){Pu=!1,Br!==null&&Wi(Br)&&(Br=null),Vr!==null&&Wi(Vr)&&(Vr=null),Wr!==null&&Wi(Wr)&&(Wr=null),Po.forEach(bh),Ro.forEac
vendor: 11,826 bytes, line 38
38h(bh)}function eo(e,t){e.blockedOn===t&&(e.blockedOn=null,Pu||(Pu=!0,dt.unstable_scheduleCallback(dt.unstable_NormalPriority,X0)))}function Oo(e){function t(s){return eo(s,e)}if(0<Ei.length){eo(Ei[0],e);for(var r=1;r<Ei.length;r++){var n=Ei[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Br!==null&&eo(Br,e),Vr!==null&&eo(Vr,e),Wr!==null&&eo(Wr,e),Po.forEach(t),Ro.forEach(t),r=0;r<Ar.length;r++)n=Ar[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ar.length&&(r=Ar[0],r.blockedOn===null);)Sm(r),r.blockedOn===null&&Ar.shift()}var ys=gr.ReactCurrentBatchConfig,la=!0;function Z0(e,t,r,n){var s=se,o=ys.transition;ys.transition=null;try{se=1,Kc(e,t,r,n)}finally{se=s,ys.transition=o}}function ew(e,t,r,n){var s=se,o=ys.transition;ys.transition=null;try{se=4,Kc(e,t,r,n)}finally{se=s,ys.transition=o}}function Kc(e,t,r,n){if(la){var s=Ru(e,t,r,n);if(s===null)$l(e,t,n,ua,r),_h(e,n);else if(Y0(s,e,t,r,n))n.stopPropagation();else if(_h(e,n),t&4&&-1<J0.indexOf(e)){for(;s!==null;){var o=ii(s);if(o!==null&&_m(o),o=Ru(e,t,r,n),o===null&&$l(e,t,n,ua,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else $l(e,t,n,null,r)}}var ua=null;function Ru(e,t,r,n){if(ua=null,e=Vc(n),e=wn(e),e!==null)if(t=Un(e),t===null)e=null;else if(r=t.tag,r===13){if(e=hm(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ua=e,null}function km(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(F0()){case Wc:return 1;case gm:return 4;case ia:case B0:return 16;case vm:return 536870912;default:return 16}default:return 16}}var Mr=null,Gc=null,Hi=null;function Tm(){if(Hi)return Hi;var e,t=Gc,r=t.length,n,s="value"in Mr?Mr.value:Mr.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return Hi=s.slice(e,1<n?1-n:void 0)}function qi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function xi(){return!0}function Eh(){return!1}function ft(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?xi:Eh,this.isPropagationStopped=Eh,this}return ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=xi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=xi)},persist:function(){},isPersistent:xi}),t}var Bs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qc=ft(Bs),oi=ve({},Bs,{view:0,detail:0}),tw=ft(oi),Cl,Pl,to,za=ve({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==to&&(to&&e.type==="mousemove"?(Cl=e.screenX-to.screenX,Pl=e.screenY-to.screenY):Pl=Cl=0,to=e),Cl)},movementY:function(e){return"movementY"in e?e.movementY:Pl}}),xh=ft(za),rw=ve({},za,{dataTransfer:0}),nw=ft(rw),sw=ve({},oi,{relatedTarget:0}),Rl=ft(sw),ow=ve({},Bs,{animationName:0,elapsedTime:0,pseudoElement:0}),iw=ft(ow),aw=ve({},Bs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lw=ft(aw),uw=ve({},Bs,{data:0}),Sh=ft(uw),cw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dw={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"},hw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hw[e])?!!t[e]:!1}function Jc(){return fw}var pw=ve({},oi,{key:function(e){if(e.key){var t=cw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jc,charCode:function(e){return e.type==="keypress"?qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mw=ft(pw),gw=ve({},za,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kh=ft(gw),vw=ve({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jc}),yw=ft(vw),ww=ve({},Bs,{propertyName:0,elapsedTime:0,pseudoElement:0}),_w=ft(ww),bw=ve({},za,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ew=ft(bw),xw=[9,13,27,32],Yc=ur&&"CompositionEvent"in window,mo=null;ur&&"documentMode"in document&&(mo=document.documentMode);var Sw=ur&&"TextEvent"in window&&!mo,Cm=ur&&(!Yc||mo&&8<mo&&11>=mo),Th=" ",Ch=!1;function Pm(e,t){switch(e){case"keyup":return xw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ss=!1;function kw(e,t){switch(e){case"compositionend":return Rm(t);case"keypress":return t.which!==32?null:(Ch=!0,Th);case"textInput":return e=t.data,e===Th&&Ch?null:e;default:return null}}function Tw(e,t){if(ss)return e==="compositionend"||!Yc&&Pm(e,t)?(e=Tm(),Hi=Gc=Mr=null,ss=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Cm&&t.locale!=="ko"?null:t.data;default:return null}}var Cw={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 Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Cw[e.type]:t==="textarea"}function Om(e,t,r,n){am(n),t=ca(t,"onChange"),0<t.length&&(r=new Qc("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var go=null,Ao=null;function Pw(e){Fm(e,0)}function Fa(e){var t=as(e);if(em(t))return e}function Rw(e,t){if(e==="change")return t}var Am=!1;if(ur){var Ol;if(ur){var Al="oninput"in document;if(!Al){var Rh=document.createElement("div");Rh.setAttribute("oninput","return;"),Al=typeof Rh.oninput=="function"}Ol=Al}else Ol=!1;Am=Ol&&(!document.documentMode||9<document.documentMode)}function Oh(){go&&(go.detachEvent("onpropertychange",Im),Ao=go=null)}function Im(e){if(e.propertyName==="value"&&Fa(Ao)){var t=[];Om(t,Ao,e,Vc(e)),dm(Pw,t)}}function Ow(e,t,r){e==="focusin"?(Oh(),go=t,Ao=r,go.attachEvent("onpropertychange",Im)):e==="focusout"&&Oh()}function Aw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fa(Ao)}function Iw(e,t){if(e==="click")return Fa(t)}function jw(e,t){if(e==="input"||e==="change")return Fa(t)}function Nw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:Nw;function Io(e,t){if(Ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!du.call(t,s)||!Ut(e[s],t[s]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ih(e,t){var r=Ah(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ah(r)}}function jm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nm(){for(var e=window,t=na();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=na(e.document)}return t}function Xc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Lw(e){var t=Nm(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&jm(r.ownerDocument.documentElement,r)){if(n!==null&&Xc(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=Ih(r,o);var i=Ih(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $w=ur&&"documentMode"in document&&11>=document.documentMode,os=null,Ou=null,vo=null,Au=!1;function jh(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Au||os==null||os!==na(n)||(n=os,"selectionStart"in n&&Xc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),vo&&Io(vo,n)||(vo=n,n=ca(Ou,"onSelect"),0<n.length&&(t=new Qc("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=os)))}function Si(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var is={animationend:Si("Animation","AnimationEnd"),animationiteration:Si("Animation","AnimationIteration"),animationstart:Si("Animation","AnimationStart"),transitionend:Si("Transition","TransitionEnd")},Il={},Lm={};ur&&(Lm=document.createElement("div").style,"AnimationEvent"in window||(delete is.animationend.animation,delete is.animationiteration.animation,delete is.animationstart.animation),"TransitionEvent"in window||delete is.transitionend.transition);function Ba(e){if(Il[e])return Il[e];if(!is[e])return e;var t=is[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Lm)return Il[e]=t[r];return e}var $m=Ba("animationend"),Dm=Ba("animationiteration"),Um=Ba("animationstart"),Mm=Ba("transitionend"),zm=new Map,Nh="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 rn(e,t){zm.set(e,t),Dn(t,[e])}for(var jl=0;jl<Nh.length;jl++){var Nl=Nh[jl],Dw=Nl.toLowerCase(),Uw=Nl[0].toUpperCase()+Nl.slice(1);rn(Dw,"on"+Uw)}rn($m,"onAnimationEnd");rn(Dm,"onAnimationIteration");rn(Um,"onAnimationStart");rn("dblclick","onDoubleClick");rn("focusin","onFocus");rn("focusout","onBlur");rn(Mm,"onTransitionEnd");Is("onMouseEnter",["mouseout","mouseover"]);Is("onMouseLeave",["mouseout","mouseover"]);Is("onPointerEnter",["pointerout","pointerover"]);Is("onPointerLeave",["pointerout","pointerover"]);Dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var co="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(" "),Mw=new Set("cancel close invalid load scroll toggle".split(" ").concat(co));function Lh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,D0(n,t,void 0,e),e.currentTarget=null}function Fm(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Lh(s,a,u),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Lh(s,a,u),o=l}}}if(oa)throw e=Tu,oa=!1,Tu=null,e}function ce(e,t){var r=t[$u];r===void 0&&(r=t[$u]=new Set);var n=e+"__bubble";r.has(n)||(Bm(t,e,2,!1),r.add(n))}function Ll(e,t,r){var n=0;t&&(n|=4),Bm(r,e,n,t)}var ki="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[ki]){e[ki]=!0,Qp.forEach(function(r){r!=="selectionchange"&&(Mw.has(r)||Ll(r,!1,e),Ll(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ki]||(t[ki]=!0,Ll("selectionchange",!1,t))}}function Bm(e,t,r,n){switch(km(t)){case 1:var s=Z0;break;case 4:s=ew;break;default:s=Kc}r=s.bind(null,t,r,e),s=void 0,!ku||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function $l(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;
vendor: 21,713 bytes, lines 38-39
38if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=wn(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}dm(function(){var u=o,c=Vc(r),h=[];e:{var f=zm.get(e);if(f!==void 0){var d=Qc,y=e;switch(e){case"keypress":if(qi(r)===0)break e;case"keydown":case"keyup":d=mw;break;case"focusin":y="focus",d=Rl;break;case"focusout":y="blur",d=Rl;break;case"beforeblur":case"afterblur":d=Rl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=xh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=nw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=yw;break;case $m:case Dm:case Um:d=iw;break;case Mm:d=_w;break;case"scroll":d=tw;break;case"wheel":d=Ew;break;case"copy":case"cut":case"paste":d=lw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=kh}var v=(t&4)!==0,w=!v&&e==="scroll",g=v?f!==null?f+"Capture":null:f;v=[];for(var p=u,m;p!==null;){m=p;var b=m.stateNode;if(m.tag===5&&b!==null&&(m=b,g!==null&&(b=Co(p,g),b!=null&&v.push(No(p,b,m)))),w)break;p=p.return}0<v.length&&(f=new d(f,y,null,r,c),h.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&r!==xu&&(y=r.relatedTarget||r.fromElement)&&(wn(y)||y[cr]))break e;if((d||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,d?(y=r.relatedTarget||r.toElement,d=u,y=y?wn(y):null,y!==null&&(w=Un(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(d=null,y=u),d!==y)){if(v=xh,b="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=kh,b="onPointerLeave",g="onPointerEnter",p="pointer"),w=d==null?f:as(d),m=y==null?f:as(y),f=new v(b,p+"leave",d,r,c),f.target=w,f.relatedTarget=m,b=null,wn(c)===u&&(v=new v(g,p+"enter",y,r,c),v.target=m,v.relatedTarget=w,b=v),w=b,d&&y)t:{for(v=d,g=y,p=0,m=v;m;m=qn(m))p++;for(m=0,b=g;b;b=qn(b))m++;for(;0<p-m;)v=qn(v),p--;for(;0<m-p;)g=qn(g),m--;for(;p--;){if(v===g||g!==null&&v===g.alternate)break t;v=qn(v),g=qn(g)}v=null}else v=null;d!==null&&$h(h,f,d,v,!1),y!==null&&w!==null&&$h(h,w,y,v,!0)}}e:{if(f=u?as(u):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var E=Rw;else if(Ph(f))if(Am)E=jw;else{E=Aw;var S=Ow}else(d=f.nodeName)&&d.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=Iw);if(E&&(E=E(e,u))){Om(h,E,r,c);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&yu(f,"number",f.value)}switch(S=u?as(u):window,e){case"focusin":(Ph(S)||S.contentEditable==="true")&&(os=S,Ou=u,vo=null);break;case"focusout":vo=Ou=os=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,jh(h,r,c);break;case"selectionchange":if($w)break;case"keydown":case"keyup":jh(h,r,c)}var k;if(Yc)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else ss?Pm(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(Cm&&r.locale!=="ko"&&(ss||P!=="onCompositionStart"?P==="onCompositionEnd"&&ss&&(k=Tm()):(Mr=c,Gc="value"in Mr?Mr.value:Mr.textContent,ss=!0)),S=ca(u,P),0<S.length&&(P=new Sh(P,e,null,r,c),h.push({event:P,listeners:S}),k?P.data=k:(k=Rm(r),k!==null&&(P.data=k)))),(k=Sw?kw(e,r):Tw(e,r))&&(u=ca(u,"onBeforeInput"),0<u.length&&(c=new Sh("onBeforeInput","beforeinput",null,r,c),h.push({event:c,listeners:u}),c.data=k))}Fm(h,t)})}function No(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ca(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Co(e,r),o!=null&&n.unshift(No(e,o,s)),o=Co(e,t),o!=null&&n.push(No(e,o,s))),e=e.return}return n}function qn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $h(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=Co(r,o),l!=null&&i.unshift(No(r,l,a))):s||(l=Co(r,o),l!=null&&i.push(No(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var zw=/\r\n?/g,Fw=/\u0000|\uFFFD/g;function Dh(e){return(typeof e=="string"?e:""+e).replace(zw,` 39`).replace(Fw,"")}function Ti(e,t,r){if(t=Dh(t),Dh(e)!==t&&r)throw Error(O(425))}function da(){}var Iu=null,ju=null;function Nu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Lu=typeof setTimeout=="function"?setTimeout:void 0,Bw=typeof clearTimeout=="function"?clearTimeout:void 0,Uh=typeof Promise=="function"?Promise:void 0,Vw=typeof queueMicrotask=="function"?queueMicrotask:typeof Uh<"u"?function(e){return Uh.resolve(null).then(e).catch(Ww)}:Lu;function Ww(e){setTimeout(function(){throw e})}function Dl(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Oo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Oo(t)}function Hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Mh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Vs=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Vs,Lo="__reactProps$"+Vs,cr="__reactContainer$"+Vs,$u="__reactEvents$"+Vs,Hw="__reactListeners$"+Vs,qw="__reactHandles$"+Vs;function wn(e){var t=e[Kt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[cr]||r[Kt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Mh(e);e!==null;){if(r=e[Kt])return r;e=Mh(e)}return t}e=r,r=e.parentNode}return null}function ii(e){return e=e[Kt]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function as(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function Va(e){return e[Lo]||null}var Du=[],ls=-1;function nn(e){return{current:e}}function de(e){0>ls||(e.current=Du[ls],Du[ls]=null,ls--)}function le(e,t){ls++,Du[ls]=e.current,e.current=t}var Xr={},Ve=nn(Xr),Ze=nn(!1),An=Xr;function js(e,t){var r=e.type.contextTypes;if(!r)return Xr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function et(e){return e=e.childContextTypes,e!=null}function ha(){de(Ze),de(Ve)}function zh(e,t,r){if(Ve.current!==Xr)throw Error(O(168));le(Ve,t),le(Ze,r)}function Vm(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(O(108,O0(e)||"Unknown",s));return ve({},r,n)}function fa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xr,An=Ve.current,le(Ve,e),le(Ze,Ze.current),!0}function Fh(e,t,r){var n=e.stateNode;if(!n)throw Error(O(169));r?(e=Vm(e,t,An),n.__reactInternalMemoizedMergedChildContext=e,de(Ze),de(Ve),le(Ve,e)):de(Ze),le(Ze,r)}var sr=null,Wa=!1,Ul=!1;function Wm(e){sr===null?sr=[e]:sr.push(e)}function Kw(e){Wa=!0,Wm(e)}function sn(){if(!Ul&&sr!==null){Ul=!0;var e=0,t=se;try{var r=sr;for(se=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}sr=null,Wa=!1}catch(s){throw sr!==null&&(sr=sr.slice(e+1)),mm(Wc,sn),s}finally{se=t,Ul=!1}}return null}var us=[],cs=0,pa=null,ma=0,gt=[],vt=0,In=null,ir=1,ar="";function pn(e,t){us[cs++]=ma,us[cs++]=pa,pa=e,ma=t}function Hm(e,t,r){gt[vt++]=ir,gt[vt++]=ar,gt[vt++]=In,In=e;var n=ir;e=ar;var s=32-$t(n)-1;n&=~(1<<s),r+=1;var o=32-$t(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,ir=1<<32-$t(t)+s|r<<s|n,ar=o+e}else ir=1<<o|r<<s|n,ar=e}function Zc(e){e.return!==null&&(pn(e,1),Hm(e,1,0))}function ed(e){for(;e===pa;)pa=us[--cs],us[cs]=null,ma=us[--cs],us[cs]=null;for(;e===In;)In=gt[--vt],gt[vt]=null,ar=gt[--vt],gt[vt]=null,ir=gt[--vt],gt[vt]=null}var ut=null,lt=null,fe=!1,Lt=null;function qm(e,t){var r=yt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Bh(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ut=e,lt=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=In!==null?{id:ir,overflow:ar}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ut=e,lt=null,!0):!1;default:return!1}}function Uu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mu(e){if(fe){var t=lt;if(t){var r=t;if(!Bh(e,t)){if(Uu(e))throw Error(O(418));t=Hr(r.nextSibling);var n=ut;t&&Bh(e,t)?qm(n,r):(e.flags=e.flags&-4097|2,fe=!1,ut=e)}}else{if(Uu(e))throw Error(O(418));e.flags=e.flags&-4097|2,fe=!1,ut=e}}}function Vh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function Ci(e){if(e!==ut)return!1;if(!fe)return Vh(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Nu(e.type,e.memoizedProps)),t&&(t=lt)){if(Uu(e))throw Km(),Error(O(418));for(;t;)qm(e,t),t=Hr(t.nextSibling)}if(Vh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){lt=Hr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}lt=null}}else lt=ut?Hr(e.stateNode.nextSibling):null;return!0}function Km(){for(var e=lt;e;)e=Hr(e.nextSibling)}function Ns(){lt=ut=null,fe=!1}function td(e){Lt===null?Lt=[e]:Lt.push(e)}var Gw=gr.ReactCurrentBatchConfig;function ro(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(O(309));var n=r.stateNode}if(!n)throw Error(O(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(O(284));if(!r._owner)throw Error(O(290,e))}return e}function Pi(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wh(e){var t=e._init;return t(e._payload)}function Gm(e){function t(g,p){if(e){var m=g.deletions;m===null?(g.deletions=[p],g.flags|=16):m.push(p)}}function r(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function n(g,p){for(g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function s(g,p){return g=Qr(g,p),g.index=0,g.sibling=null,g}function o(g,p,m){return g.index=m,e?(m=g.alternate,m!==null?(m=m.index,m<p?(g.flags|=2,p):m):(g.flags|=2,p)):(g.flags|=1048576,p)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,p,m,b){return p===null||p.tag!==6?(p=Hl(m,g.mode,b),p.return=g,p):(p=s(p,m),p.return=g,p)}function l(g,p,m,b){var E=m.type;return E===ns?c(g,p,m.props.children,b,m.key):p!==null&&(p.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Pr&&Wh(E)===p.type)?(b=s(p,m.props),b.ref=ro(g,p,m),b.return=g,b):(b=Zi(m.type,m.key,m.props,null,g.mode,b),b.ref=ro(g,p,m),b.return=g,b)}function u(g,p,m,b){return p===null||p.tag!==4||p.stateNode.containerInfo!==m.containerInfo||p.stateNode.implementation!==m.implementation?(p=ql(m,g.mode,b),p.return=g,p):(p=s(p,m.children||[]),p.return=g,p)}function c(g,p,m,b,E){return p===null||p.tag!==7?(p=On(m,g.mode,b,E),p.return=g,p):(p=s(p,m),p.return=g,p)}function h(g,p,m){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Hl(""+p,g.mode,m),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case vi:return m=Zi(p.type,p.key,p.props,null,g.mode,m),m.ref=ro(g,null,p),m.return=g,m;case rs:return p=ql(p,g.mode,m),p.return=g,p;case Pr:var b=p._init;return h(g,b(p._payload),m)}if(lo(p)||Ys(p))return p=On(p,g.mode,m,null),p.return=g,p;Pi(g,p)}return null}function f(g,p,m,b){var E=p!==null?p.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return E!==null?null:a(g,p,""+m,b);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case vi:return m.key===E?l(g,p,m,b):null;case rs:return m.key===E?u(g,p,m,b):null;case Pr:return E=m._init,f(g,p,E(m._payload),b)}if(lo(m)||Ys(m))return E!==null?null:c(g,p,m,b,null);Pi(g,m)}return null}function d(g,p,m,b,E){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(m)||null,a(p,g,""+b,E);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case vi:return g=g.get(b.key===null?m:b.key)||null,l(p,g,b,E);case rs:return g=g.get(b.key===null?m:b.key)||null,u(p,g,b,E);case Pr:var S=b._init;return d(g,p,m,S(b._payload),E)}if(lo(b)||Ys(b))return g=g.get(m)||null,c(p,g,b,E,null);Pi(p,b)}return null}function y(g,p,m,b){for(var E=null,S=null,k=p,P=p=0,A=null;k!==null&&P<m.length;P++){k.index>P?(A=k,k=null):A=k.sibling;var j=f(g,k,m[P],b);if(j===null){k===null&&(k=A);break}e&&k&&j.alternate===null&&t(g,k),p=o(j,p,P),S===null?E=j:S.sibling=j,S=j,k=A}if(P===m.length)return r(g,k),fe&&pn(g,P),E;if(k===null){for(;P<m.length;P++)k=h(g,m[P],b),k!==null&&(p=o(k,p,P),S===null?E=k:S.sibling=k,S=k);return fe&&pn(g,P),E}for(k=n(g,k);P<m.length;P++)A=d(k,g,P,m[P],b),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?P:A.key),p=o(A,p,P),S===null?E=A:S.sibling=A,S=A);return e&&k.forEach(function(B){return t(g,B)}),fe&&pn(g,P),E}function v(g,p,m,b){var E=Ys(m);if(typeof E!="function")throw Error(O(150));if(m=E.call(m),m==null)throw Error(O(151));for(var S=E=null,k=p,P=p=0,A=null,j=m.next();k!==null&&!j.done;P++,j=m.next()){k.index>P?(A=k,k=null):A=k.sibling;var B=f(g,k,j.value,b);if(B===null){k===null&&(k=A);break}e&&k&&B.alternate===null&&t(g,k),p=o(B,p,P),S===null?E=B:S.sibling=B,S=B,k=A}if(j.done)return r(g,k),fe&&pn(g,P),E;if(k===null){for(;!j.done;P++,j=m.next())j=h(g,j.value,b),j!==null&&(p=o(j,p,P),S===null?E=j:S.sibling=j,S=j);return fe&&pn(g,P),E}for(k=n(g,k);!j.done;P++,j=m.next())j=d(k,g,P,j.value,b),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),p=o(j,p,P),S===null?E=j:S.sibling=j,S=j);return e&&k.forEach(function(L){return t(g,L)}),fe&&pn(g,P),E}function w(g,p,m,b){if(typeof m=="object"&&m!==null&&m.type===ns&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case vi:e:{for(var E=m.key,S=p;S!==null;){if(S.key===E){if(E=m.type,E===ns){if(S.tag===7){r(g,S.sibling),p=s(S,m.props.children),p.return=g,g=p;break e}}else if(S.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Pr&&Wh(E)===S.type){r(g,S.sibling),p=s(S,m.props),p.ref=ro(g,S,m),p.return=g,g=p;break e}r(g,S);break}else t(g,S);S=S.sibling}m.type===ns?(p=On(m.props.children,g.mode,b,m.key),p.return=g,g=p):(b=Zi(m.type,m.key,m.props,null,g.mode,b),b.ref=ro(g,p,m),b.return=g,g=b)}return i(g);case rs:e:{for(S=m.key;p!==null;){if(p.key===S)if(p.tag===4&&p.stateNode.containerInfo===m.containerInfo&&p.stateNode.implementation===m.implementation){r(g,p.sibling),p=s(p,m.children||[]),p.return=g,g=p;break e}else{r(g,p);break}else t(g,p);p=p.sibling}p=ql(m,g.mode,b),p.return=g,g=p}return i(g);case Pr:return S=m._init,w(g,p,S(m._payload),b)}if(lo(m))return y(g,p,m,b);if(Ys(m))return v(g,p,m,b);Pi(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,p!==null&&p.tag===6?(r(g,p.sibling),p=s(p,m),p.return=g,g=p):(r(g,p),p=Hl(m,g.mode,b),p.return=g,g=p),i(g)):r(g,p)}return w}var Ls=Gm(!0),Qm=Gm(!1),ga=nn(null),va=null,ds=null,rd=null;function nd(){rd=ds=va=null}function sd(e){var t=ga.current;de(ga),e._currentValue=t}function zu(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ws(e,t){va=e,rd=ds=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xe=!0),e.firstContext=null)}function _t(e){var t=e._currentValue;if(rd!==e)if(e={context:e,memoizedValue:t,next:null},ds===null){if(va===null)throw Error(O(308));ds=e,va.dependencies={lanes:0,firstContext:e}}else ds=ds.next=e;return t}var _n=null;function od(e){_n===null?_n=[e]:_n.push(e)}function Jm(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,od(t)):(r.next=s.next,s.next=r),t.interleaved=r,dr(e,n)}function dr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Rr=!1;function id(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ym(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function lr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,te&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,dr(e,r)}return s=n.interleaved,s===null?(t.next=t,od(n)):(t.next=s.next,s.next=t),n.interleaved=t,dr(e,r)}function Ki(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hc(e,r)}}function Hh(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ya(e,t,r,n){var s=e.updateQueue;Rr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var h=s.baseState;i=0,c=u=l=null,a=o;do{var f=a.lane,d=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,v=a;switch(f=t,d=r,v.tag){case 1:if(y=v.payload,typeof y=="function"){h=y.call(d,h,f);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,f=typeof y=="function"?y.call(d,h,f):y,f==null)break e;h=ve({},h,f);break e;case 2:Rr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else d={eventTime:d,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=d,l=h):c=c.next=d,i|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(c===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Nn|=i,e.lanes=i,e.memoizedState=h}}function qh(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(O(191,s));s.call(n)}}}var ai={},Jt=nn(ai),$o=nn(ai),Do=nn(ai);function bn(e){if(e===ai)throw Error(O(174));return e}function ad(e,t){switch(le(Do,t),le($o,e),le(Jt,ai),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_u(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_u(t,e)}de(Jt),le(Jt,t)}function $s(){de(Jt),de($o),de(Do)}function Xm(e){bn(Do.current);var t=bn(Jt.current),r=_u(t,e.type);t!==r&&(le($o,e),le(Jt,r))}function ld(e){$o.current===e&&(de(Jt),de($o))}var me=nn(0);function wa(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ml=[];function ud(){for(var e=0;e<Ml.length;e++)Ml[e]._workInProgressVersionPrimary=null;Ml.length=0}var Gi=gr.ReactCurrentDispatcher,zl=gr.ReactCurrentBatchConfig,jn=0,ge=null,Ce=null,Oe=null,_a=!1,yo=!1,Uo=0,Qw=0;function Me(){throw Error(O(321))}function cd(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ut(e[r],t[r]))return!1;return!0}function dd(e,t,r,n,s,o){if(jn=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gi.current=e===null||e.memoizedState===null?Zw:e_,e=r(n,s),yo){o=0;
vendor: 5,409 bytes, line 39
39do{if(yo=!1,Uo=0,25<=o)throw Error(O(301));o+=1,Oe=Ce=null,t.updateQueue=null,Gi.current=t_,e=r(n,s)}while(yo)}if(Gi.current=ba,t=Ce!==null&&Ce.next!==null,jn=0,Oe=Ce=ge=null,_a=!1,t)throw Error(O(300));return e}function hd(){var e=Uo!==0;return Uo=0,e}function Vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oe===null?ge.memoizedState=Oe=e:Oe=Oe.next=e,Oe}function bt(){if(Ce===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=Oe===null?ge.memoizedState:Oe.next;if(t!==null)Oe=t,Ce=e;else{if(e===null)throw Error(O(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Oe===null?ge.memoizedState=Oe=e:Oe=Oe.next=e}return Oe}function Mo(e,t){return typeof t=="function"?t(e):t}function Fl(e){var t=bt(),r=t.queue;if(r===null)throw Error(O(311));r.lastRenderedReducer=e;var n=Ce,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,u=o;do{var c=u.lane;if((jn&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,i=n):l=l.next=h,ge.lanes|=c,Nn|=c}u=u.next}while(u!==null&&u!==o);l===null?i=n:l.next=a,Ut(n,t.memoizedState)||(Xe=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,ge.lanes|=o,Nn|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Bl(e){var t=bt(),r=t.queue;if(r===null)throw Error(O(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Ut(o,t.memoizedState)||(Xe=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Zm(){}function eg(e,t){var r=ge,n=bt(),s=t(),o=!Ut(n.memoizedState,s);if(o&&(n.memoizedState=s,Xe=!0),n=n.queue,fd(ng.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Oe!==null&&Oe.memoizedState.tag&1){if(r.flags|=2048,zo(9,rg.bind(null,r,n,s,t),void 0,null),Ae===null)throw Error(O(349));jn&30||tg(r,t,s)}return s}function tg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function rg(e,t,r,n){t.value=r,t.getSnapshot=n,sg(t)&&og(e)}function ng(e,t,r){return r(function(){sg(t)&&og(e)})}function sg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ut(e,r)}catch{return!0}}function og(e){var t=dr(e,1);t!==null&&Dt(t,e,1,-1)}function Kh(e){var t=Vt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t.queue=e,e=e.dispatch=Xw.bind(null,ge,e),[t.memoizedState,e]}function zo(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function ig(){return bt().memoizedState}function Qi(e,t,r,n){var s=Vt();ge.flags|=e,s.memoizedState=zo(1|t,r,void 0,n===void 0?null:n)}function Ha(e,t,r,n){var s=bt();n=n===void 0?null:n;var o=void 0;if(Ce!==null){var i=Ce.memoizedState;if(o=i.destroy,n!==null&&cd(n,i.deps)){s.memoizedState=zo(t,r,o,n);return}}ge.flags|=e,s.memoizedState=zo(1|t,r,o,n)}function Gh(e,t){return Qi(8390656,8,e,t)}function fd(e,t){return Ha(2048,8,e,t)}function ag(e,t){return Ha(4,2,e,t)}function lg(e,t){return Ha(4,4,e,t)}function ug(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cg(e,t,r){return r=r!=null?r.concat([e]):null,Ha(4,4,ug.bind(null,t,e),r)}function pd(){}function dg(e,t){var r=bt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&cd(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function hg(e,t){var r=bt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&cd(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function fg(e,t,r){return jn&21?(Ut(r,t)||(r=ym(),ge.lanes|=r,Nn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xe=!0),e.memoizedState=r)}function Jw(e,t){var r=se;se=r!==0&&4>r?r:4,e(!0);var n=zl.transition;zl.transition={};try{e(!1),t()}finally{se=r,zl.transition=n}}function pg(){return bt().memoizedState}function Yw(e,t,r){var n=Gr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},mg(e))gg(t,r);else if(r=Jm(e,t,r,n),r!==null){var s=Ke();Dt(r,e,n,s),vg(r,t,n)}}function Xw(e,t,r){var n=Gr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(mg(e))gg(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,Ut(a,i)){var l=t.interleaved;l===null?(s.next=s,od(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Jm(e,t,s,n),r!==null&&(s=Ke(),Dt(r,e,n,s),vg(r,t,n))}}function mg(e){var t=e.alternate;return e===ge||t!==null&&t===ge}
vendor: 7,105 bytes, lines 39-41
39function gg(e,t){yo=_a=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vg(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hc(e,r)}}var ba={readContext:_t,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},Zw={readContext:_t,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Gh,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Qi(4194308,4,ug.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Qi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qi(4,2,e,t)},useMemo:function(e,t){var r=Vt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Vt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Yw.bind(null,ge,e),[n.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:Kh,useDebugValue:pd,useDeferredValue:function(e){return Vt().memoizedState=e},useTransition:function(){var e=Kh(!1),t=e[0];return e=Jw.bind(null,e[1]),Vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ge,s=Vt();if(fe){if(r===void 0)throw Error(O(407));r=r()}else{if(r=t(),Ae===null)throw Error(O(349));jn&30||tg(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Gh(ng.bind(null,n,o,e),[e]),n.flags|=2048,zo(9,rg.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Vt(),t=Ae.identifierPrefix;if(fe){var r=ar,n=ir;r=(n&~(1<<32-$t(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Uo++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Qw++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},e_={readContext:_t,useCallback:dg,useContext:_t,useEffect:fd,useImperativeHandle:cg,useInsertionEffect:ag,useLayoutEffect:lg,useMemo:hg,useReducer:Fl,useRef:ig,useState:function(){return Fl(Mo)},useDebugValue:pd,useDeferredValue:function(e){var t=bt();return fg(t,Ce.memoizedState,e)},useTransition:function(){var e=Fl(Mo)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Zm,useSyncExternalStore:eg,useId:pg,unstable_isNewReconciler:!1},t_={readContext:_t,useCallback:dg,useContext:_t,useEffect:fd,useImperativeHandle:cg,useInsertionEffect:ag,useLayoutEffect:lg,useMemo:hg,useReducer:Bl,useRef:ig,useState:function(){return Bl(Mo)},useDebugValue:pd,useDeferredValue:function(e){var t=bt();return Ce===null?t.memoizedState=e:fg(t,Ce.memoizedState,e)},useTransition:function(){var e=Bl(Mo)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Zm,useSyncExternalStore:eg,useId:pg,unstable_isNewReconciler:!1};function Pt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Fu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ve({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var qa={isMounted:function(e){return(e=e._reactInternals)?Un(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ke(),s=Gr(e),o=lr(n,s);o.payload=t,r!=null&&(o.callback=r),t=qr(e,o,s),t!==null&&(Dt(t,e,s,n),Ki(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ke(),s=Gr(e),o=lr(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=qr(e,o,s),t!==null&&(Dt(t,e,s,n),Ki(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ke(),n=Gr(e),s=lr(r,n);s.tag=2,t!=null&&(s.callback=t),t=qr(e,s,n),t!==null&&(Dt(t,e,n,r),Ki(t,e,n))}};function Qh(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!Io(r,n)||!Io(s,o):!0}function yg(e,t,r){var n=!1,s=Xr,o=t.contextType;return typeof o=="object"&&o!==null?o=_t(o):(s=et(t)?An:Ve.current,n=t.contextTypes,o=(n=n!=null)?js(e,s):Xr),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qa,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Jh(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&qa.enqueueReplaceState(t,t.state,null)}function Bu(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},id(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=_t(o):(o=et(t)?An:Ve.current,s.context=js(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Fu(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&qa.enqueueReplaceState(s,s.state,null),ya(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ds(e,t){try{var r="",n=t;do r+=R0(n),n=n.return;while(n);var s=r}catch(o){s=` 40Error generating stack: `+o.message+` 41`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Vl(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Vu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var r_=typeof WeakMap=="function"?WeakMap:Map;function wg(e,t,r){r=lr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){xa||(xa=!0,Zu=n),Vu(e,t)},r}function _g(e,t,r){r=lr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Vu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Vu(e,t),typeof n!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Yh(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new r_;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=g_.bind(null,e,t,r),t.then(e,e))}function Xh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Zh(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=lr(-1,1),t.tag=2,qr(r,t,1))),r.lanes|=1),e)}var n_=gr.ReactCurrentOwner,Xe=!1;function He(e,t,r,n){t.child=e===null?Qm(t,null,r,n):Ls(t,e.child,r,n)}function ef(e,t,r,n,s){r=r.render;var o=t.ref;
vendor: 9,781 bytes, line 41
41return ws(t,s),n=dd(e,t,r,n,o,s),r=hd(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,hr(e,t,s)):(fe&&r&&Zc(t),t.flags|=1,He(e,t,n,s),t.child)}function tf(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Ed(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,bg(e,t,o,n,s)):(e=Zi(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:Io,r(i,n)&&e.ref===t.ref)return hr(e,t,s)}return t.flags|=1,e=Qr(o,n),e.ref=t.ref,e.return=t,t.child=e}function bg(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Io(o,n)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,hr(e,t,s)}return Wu(e,t,r,n,s)}function Eg(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(fs,st),st|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(fs,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,le(fs,st),st|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,le(fs,st),st|=n;return He(e,t,s,r),t.child}function xg(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Wu(e,t,r,n,s){var o=et(r)?An:Ve.current;return o=js(t,o),ws(t,s),r=dd(e,t,r,n,o,s),n=hd(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,hr(e,t,s)):(fe&&n&&Zc(t),t.flags|=1,He(e,t,r,s),t.child)}function rf(e,t,r,n,s){if(et(r)){var o=!0;fa(t)}else o=!1;if(ws(t,s),t.stateNode===null)Ji(e,t),yg(t,r,n),Bu(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=_t(u):(u=et(r)?An:Ve.current,u=js(t,u));var c=r.getDerivedStateFromProps,h=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Jh(t,i,n,u),Rr=!1;var f=t.memoizedState;i.state=f,ya(t,n,i,s),l=t.memoizedState,a!==n||f!==l||Ze.current||Rr?(typeof c=="function"&&(Fu(t,r,c,n),l=t.memoizedState),(a=Rr||Qh(t,r,a,n,f,l,u))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=u,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Ym(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Pt(t.type,a),i.props=u,h=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=_t(l):(l=et(r)?An:Ve.current,l=js(t,l));var d=r.getDerivedStateFromProps;(c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==h||f!==l)&&Jh(t,i,n,l),Rr=!1,f=t.memoizedState,i.state=f,ya(t,n,i,s);var y=t.memoizedState;a!==h||f!==y||Ze.current||Rr?(typeof d=="function"&&(Fu(t,r,d,n),y=t.memoizedState),(u=Rr||Qh(t,r,u,n,f,y,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,y,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,y,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),i.props=n,i.state=y,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Hu(e,t,r,n,o,s)}function Hu(e,t,r,n,s,o){xg(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&Fh(t,r,!1),hr(e,t,o);n=t.stateNode,n_.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Ls(t,e.child,null,o),t.child=Ls(t,null,a,o)):He(e,t,a,o),t.memoizedState=n.state,s&&Fh(t,r,!0),t.child}function Sg(e){var t=e.stateNode;t.pendingContext?zh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zh(e,t.context,!1),ad(e,t.containerInfo)}function nf(e,t,r,n,s){return Ns(),td(s),t.flags|=256,He(e,t,r,n),t.child}var qu={dehydrated:null,treeContext:null,retryLane:0};function Ku(e){return{baseLanes:e,cachePool:null,transitions:null}}function kg(e,t,r){var n=t.pendingProps,s=me.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),le(me,s&1),e===null)return Mu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Qa(i,n,0,null),e=On(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ku(r),t.memoizedState=qu,e):md(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return s_(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Qr(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=Qr(a,o):(o=On(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?Ku(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=qu,n}return o=e.child,e=o.sibling,n=Qr(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function md(e,t){return t=Qa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ri(e,t,r,n){return n!==null&&td(n),Ls(t,e.child,null,r),e=md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function s_(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=Vl(Error(O(422))),Ri(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Qa({mode:"visible",children:n.children},s,0,null),o=On(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Ls(t,e.child,null,i),t.child.memoizedState=Ku(i),t.memoizedState=qu,o);if(!(t.mode&1))return Ri(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(O(419)),n=Vl(o,n,void 0),Ri(e,t,i,n)}if(a=(i&e.childLanes)!==0,Xe||a){if(n=Ae,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,dr(e,s),Dt(n,e,s,-1))}return bd(),n=Vl(Error(O(421))),Ri(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=v_.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,lt=Hr(s.nextSibling),ut=t,fe=!0,Lt=null,e!==null&&(gt[vt++]=ir,gt[vt++]=ar,gt[vt++]=In,ir=e.id,ar=e.overflow,In=t),t=md(t,n.children),t.flags|=4096,t)}function sf(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zu(e.return,t,r)}function Wl(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function Tg(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(He(e,t,n.children,r),n=me.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sf(e,r,t);else if(e.tag===19)sf(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(le(me,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&wa(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Wl(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&wa(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Wl(t,!0,r,null,o);break;case"together":Wl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Nn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,r=Qr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;
vendor: 4,652 bytes, line 41
41)e=e.sibling,r=r.sibling=Qr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function o_(e,t,r){switch(t.tag){case 3:Sg(t),Ns();break;case 5:Xm(t);break;case 1:et(t.type)&&fa(t);break;case 4:ad(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;le(ga,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(le(me,me.current&1),t.flags|=128,null):r&t.child.childLanes?kg(e,t,r):(le(me,me.current&1),e=hr(e,t,r),e!==null?e.sibling:null);le(me,me.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Tg(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),le(me,me.current),n)break;return null;case 22:case 23:return t.lanes=0,Eg(e,t,r)}return hr(e,t,r)}var Cg,Gu,Pg,Rg;Cg=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Gu=function(){};Pg=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,bn(Jt.current);var o=null;switch(r){case"input":s=gu(e,s),n=gu(e,n),o=[];break;case"select":s=ve({},s,{value:void 0}),n=ve({},n,{value:void 0}),o=[];break;case"textarea":s=wu(e,s),n=wu(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=da)}bu(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ko.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ko.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ce("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Rg=function(e,t,r,n){r!==n&&(t.flags|=4)};function no(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function i_(e,t,r){var n=t.pendingProps;switch(ed(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return et(t.type)&&ha(),ze(t),null;case 3:return n=t.stateNode,$s(),de(Ze),de(Ve),ud(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ci(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Lt!==null&&(rc(Lt),Lt=null))),Gu(e,t),ze(t),null;case 5:ld(t);var s=bn(Do.current);if(r=t.type,e!==null&&t.stateNode!=null)Pg(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(O(166));return ze(t),null}if(e=bn(Jt.current),Ci(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Kt]=t,n[Lo]=o,e=(t.mode&1)!==0,r){case"dialog":ce("cancel",n),ce("close",n);break;case"iframe":case"object":case"embed":ce("load",n);break;case"video":case"audio":for(s=0;s<co.length;s++)ce(co[s],n);break;case"source":ce("error",n);break;case"img":case"image":case"link":ce("error",n),ce("load",n);break;case"details":ce("toggle",n);break;case"input":fh(n,o),ce("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},ce("invalid",n);break;case"textarea":mh(n,o),ce("invalid",n)}bu(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];
vendor: 30,254 bytes, line 41
41i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&Ti(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Ti(n.textContent,a,e),s=["children",""+a]):ko.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ce("scroll",n)}switch(r){case"input":yi(n),ph(n,o,!0);break;case"textarea":yi(n),gh(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=da)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=nm(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Kt]=t,e[Lo]=n,Cg(e,t,!1,!1),t.stateNode=e;e:{switch(i=Eu(r,n),r){case"dialog":ce("cancel",e),ce("close",e),s=n;break;case"iframe":case"object":case"embed":ce("load",e),s=n;break;case"video":case"audio":for(s=0;s<co.length;s++)ce(co[s],e);s=n;break;case"source":ce("error",e),s=n;break;case"img":case"image":case"link":ce("error",e),ce("load",e),s=n;break;case"details":ce("toggle",e),s=n;break;case"input":fh(e,n),s=gu(e,n),ce("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ve({},n,{value:void 0}),ce("invalid",e);break;case"textarea":mh(e,n),s=wu(e,n),ce("invalid",e);break;default:s=n}bu(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?im(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&sm(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&To(e,l):typeof l=="number"&&To(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ko.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ce("scroll",e):l!=null&&Mc(e,o,l,i))}switch(r){case"input":yi(e),ph(e,n,!1);break;case"textarea":yi(e),gh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Yr(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?ms(e,!!n.multiple,o,!1):n.defaultValue!=null&&ms(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=da)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ze(t),null;case 6:if(e&&t.stateNode!=null)Rg(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(O(166));if(r=bn(Do.current),bn(Jt.current),Ci(t)){if(n=t.stateNode,r=t.memoizedProps,n[Kt]=t,(o=n.nodeValue!==r)&&(e=ut,e!==null))switch(e.tag){case 3:Ti(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ti(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Kt]=t,t.stateNode=n}return ze(t),null;case 13:if(de(me),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&<!==null&&t.mode&1&&!(t.flags&128))Km(),Ns(),t.flags|=98560,o=!1;else if(o=Ci(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(O(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(O(317));o[Kt]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),o=!1}else Lt!==null&&(rc(Lt),Lt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||me.current&1?Re===0&&(Re=3):bd())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return $s(),Gu(e,t),e===null&&jo(t.stateNode.containerInfo),ze(t),null;case 10:return sd(t.type._context),ze(t),null;case 17:return et(t.type)&&ha(),ze(t),null;case 19:if(de(me),o=t.memoizedState,o===null)return ze(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)no(o,!1);else{if(Re!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=wa(e),i!==null){for(t.flags|=128,no(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return le(me,me.current&1|2),t.child}e=e.sibling}o.tail!==null&&be()>Us&&(t.flags|=128,n=!0,no(o,!1),t.lanes=4194304)}else{if(!n)if(e=wa(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),no(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!fe)return ze(t),null}else 2*be()-o.renderingStartTime>Us&&r!==1073741824&&(t.flags|=128,n=!0,no(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=be(),t.sibling=null,r=me.current,le(me,n?r&1|2:r&1),t):(ze(t),null);case 22:case 23:return _d(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?st&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function a_(e,t){switch(ed(t),t.tag){case 1:return et(t.type)&&ha(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $s(),de(Ze),de(Ve),ud(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ld(t),null;case 13:if(de(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(me),null;case 4:return $s(),null;case 10:return sd(t.type._context),null;case 22:case 23:return _d(),null;case 24:return null;default:return null}}var Oi=!1,Be=!1,l_=typeof WeakSet=="function"?WeakSet:Set,D=null;function hs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){_e(e,t,n)}else r.current=null}function Qu(e,t,r){try{r()}catch(n){_e(e,t,n)}}var of=!1;function u_(e,t){if(Iu=la,e=Nm(),Xc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,u=0,c=0,h=e,f=null;t:for(;;){for(var d;h!==r||s!==0&&h.nodeType!==3||(a=i+s),h!==o||n!==0&&h.nodeType!==3||(l=i+n),h.nodeType===3&&(i+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===e)break t;if(f===r&&++u===s&&(a=i),f===o&&++c===n&&(l=i),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ju={focusedElem:e,selectionRange:r},la=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,w=y.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Pt(t.type,v),w);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(b){_e(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return y=of,of=!1,y}function wo(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Qu(t,r,o)}s=s.next}while(s!==n)}}function Ka(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ju(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Og(e){var t=e.alternate;t!==null&&(e.alternate=null,Og(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kt],delete t[Lo],delete t[$u],delete t[Hw],delete t[qw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ag(e){return e.tag===5||e.tag===3||e.tag===4}function af(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ag(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=da));else if(n!==4&&(e=e.child,e!==null))for(Yu(e,t,r),e=e.sibling;e!==null;)Yu(e,t,r),e=e.sibling}function Xu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Xu(e,t,r),e=e.sibling;e!==null;)Xu(e,t,r),e=e.sibling}var Ne=null,jt=!1;function Sr(e,t,r){for(r=r.child;r!==null;)Ig(e,t,r),r=r.sibling}function Ig(e,t,r){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Ma,r)}catch{}switch(r.tag){case 5:Be||hs(r,t);case 6:var n=Ne,s=jt;Ne=null,Sr(e,t,r),Ne=n,jt=s,Ne!==null&&(jt?(e=Ne,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ne.removeChild(r.stateNode));break;case 18:Ne!==null&&(jt?(e=Ne,r=r.stateNode,e.nodeType===8?Dl(e.parentNode,r):e.nodeType===1&&Dl(e,r),Oo(e)):Dl(Ne,r.stateNode));break;case 4:n=Ne,s=jt,Ne=r.stateNode.containerInfo,jt=!0,Sr(e,t,r),Ne=n,jt=s;break;case 0:case 11:case 14:case 15:if(!Be&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Qu(r,t,i),s=s.next}while(s!==n)}Sr(e,t,r);break;case 1:if(!Be&&(hs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){_e(r,t,a)}Sr(e,t,r);break;case 21:Sr(e,t,r);break;case 22:r.mode&1?(Be=(n=Be)||r.memoizedState!==null,Sr(e,t,r),Be=n):Sr(e,t,r);break;default:Sr(e,t,r)}}function lf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new l_),t.forEach(function(n){var s=y_.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function kt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Ne=a.stateNode,jt=!1;break e;case 3:Ne=a.stateNode.containerInfo,jt=!0;break e;case 4:Ne=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(Ne===null)throw Error(O(160));Ig(o,i,s),Ne=null,jt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){_e(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jg(t,e),t=t.sibling}function jg(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kt(t,e),Bt(e),n&4){try{wo(3,e,e.return),Ka(3,e)}catch(v){_e(e,e.return,v)}try{wo(5,e,e.return)}catch(v){_e(e,e.return,v)}}break;case 1:kt(t,e),Bt(e),n&512&&r!==null&&hs(r,r.return);break;case 5:if(kt(t,e),Bt(e),n&512&&r!==null&&hs(r,r.return),e.flags&32){var s=e.stateNode;try{To(s,"")}catch(v){_e(e,e.return,v)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&tm(s,o),Eu(a,i);var u=Eu(a,o);for(i=0;i<l.length;i+=2){var c=l[i],h=l[i+1];c==="style"?im(s,h):c==="dangerouslySetInnerHTML"?sm(s,h):c==="children"?To(s,h):Mc(s,c,h,u)}switch(a){case"input":vu(s,o);break;case"textarea":rm(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?ms(s,!!o.multiple,d,!1):f!==!!o.multiple&&(o.defaultValue!=null?ms(s,!!o.multiple,o.defaultValue,!0):ms(s,!!o.multiple,o.multiple?[]:"",!1))}s[Lo]=o}catch(v){_e(e,e.return,v)}}break;case 6:if(kt(t,e),Bt(e),n&4){if(e.stateNode===null)throw Error(O(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){_e(e,e.return,v)}}break;case 3:if(kt(t,e),Bt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Oo(t.containerInfo)}catch(v){_e(e,e.return,v)}break;case 4:kt(t,e),Bt(e);break;case 13:kt(t,e),Bt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(yd=be())),n&4&&lf(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(u=Be)||c,kt(t,e),Be=u):kt(t,e),Bt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(D=e,c=e.child;c!==null;){for(h=D=c;D!==null;){switch(f=D,d=f.child,f.tag){case 0:case 11:case 14:case 15:wo(4,f,f.return);break;case 1:hs(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){_e(n,r,v)}}break;case 5:hs(f,f.return);break;case 22:if(f.memoizedState!==null){cf(h);continue}}d!==null?(d.return=f,D=d):cf(h)}c=c.sibling}e:for(c=null,h=e;;){if(h.tag===5){if(c===null){c=h;try{s=h.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=h.stateNode,l=h.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=om("display",i))}catch(v){_e(e,e.return,v)}}}else if(h.tag===6){if(c===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(v){_e(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;c===h&&(c=null),h=h.return}c===h&&(c=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:kt(t,e),Bt(e),n&4&&lf(e);break;case 21:break;default:kt(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Ag(r)){var n=r;break e}r=r.return}throw Error(O(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(To(s,""),n.flags&=-33);var o=af(e);Xu(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=af(e);Yu(e,a,i);break;default:throw Error(O(161))}}catch(l){_e(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function c_(e,t,r){D=e,Ng(e)}function Ng(e,t,r){for(var n=(e.mode&1)!==0;D!==null;){var s=D,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Oi;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Be;a=Oi;var u=Be;if(Oi=i,(Be=l)&&!u)for(D=s;D!==null;)i=D,l=i.child,i.tag===22&&i.memoizedState!==null?df(s):l!==null?(l.return=i,D=l):df(s);for(;o!==null;)D=o,Ng(o),o=o.sibling;D=s,Oi=a,Be=u}uf(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,D=o):uf(e)}}function uf(e){for(;D!==null;){var t=D;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||Ka(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Be)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Pt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&qh(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}qh(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var h=c.dehydrated;h!==null&&Oo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Be||t.flags&512&&Ju(t)}catch(f){_e(t,t.return,f)}}if(t===e){D=null;break}if(r=t.sibling,r!==null){r.return=t.return,D=r;break}D=t.return}}function cf(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var r=t.sibling;if(r!==null){r.return=t.return,D=r;break}D=t.return}}function df(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ka(4,t)}catch(l){_e(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){_e(t,s,l)}}var o=t.return;try{Ju(t)}catch(l){_e(t,o,l)}break;case 5:var i=t.return;try{Ju(t)}catch(l){_e(t,i,l)}}}catch(l){_e(t,t.return,l)}if(t===e){D=null;break}var a=t.sibling;if(a!==null){a.return=t.return,D=a;break}D=t.return}}var d_=Math.ceil,Ea=gr.ReactCurrentDispatcher,gd=gr.ReactCurrentOwner,wt=gr.ReactCurrentBatchConfig,te=0,Ae=null,ke=null,Le=0,st=0,fs=nn(0),Re=0,Fo=null,Nn=0,Ga=0,vd=0,_o=null,Ye=null,yd=0,Us=1/0,rr=null,xa=!1,Zu=null,Kr=null,Ai=!1,zr=null,Sa=0,bo=0,ec=null,Yi=-1,Xi=0;function Ke(){return te&6?be():Yi!==-1?Yi:Yi=be()}function Gr(e){return e.mode&1?te&2&&Le!==0?Le&-Le:Gw.transition!==null?(Xi===0&&(Xi=ym()),Xi):(e=se,e!==0||(e=window.event,e=e===void 0?16:km(e.type)),e):1}function Dt(e,t,r,n){if(50<bo)throw bo=0,ec=null,Error(O(185));si(e,r,n),(!(te&2)||e!==Ae)&&(e===Ae&&(!(te&2)&&(Ga|=r),Re===4&&Ir(e,Le)),tt(e,n),r===1&&te===0&&!(t.mode&1)&&(Us=be()+500,Wa&&sn()))}function tt(e,t){var r=e.callbackNode;G0(e,t);var n=aa(e,e===Ae?Le:0);if(n===0)r!==null&&wh(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&wh(r),t===1)e.tag===0?Kw(hf.bind(null,e)):Wm(hf.bind(null,e)),Vw(function(){!(te&6)&&sn()}),r=null;else{switch(wm(n)){case 1:r=Wc;break;case 4:r=gm;break;case 16:r=ia;break;case 536870912:r=vm;break;default:r=ia}r=Bg(r,Lg.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Lg(e,t){if(Yi=-1,Xi=0,te&6)throw Error(O(327));var r=e.callbackNode;if(_s()&&e.callbackNode!==r)return null;var n=aa(e,e===Ae?Le:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=ka(e,n);else{t=n;var s=te;te|=2;var o=Dg();(Ae!==e||Le!==t)&&(rr=null,Us=be()+500,Rn(e,t));do try{p_();break}catch(a){$g(e,a)}while(!0);nd(),Ea.current=o,te=s,ke!==null?t=0:(Ae=null,Le=0,t=Re)}if(t!==0){if(t===2&&(s=Cu(e),s!==0&&(n=s,t=tc(e,s))),t===1)throw r=Fo,Rn(e,0),Ir(e,n),tt(e,be()),r;if(t===6)Ir(e,n);else{if(s=e.current.alternate,!(n&30)&&!h_(s)&&(t=ka(e,n),t===2&&(o=Cu(e),o!==0&&(n=o,t=tc(e,o))),t===1))throw r=Fo,Rn(e,0),Ir(e,n),tt(e,be()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(O(345));case 2:mn(e,Ye,rr);break;case 3:if(Ir(e,n),(n&130023424)===n&&(t=yd+500-be(),10<t)){if(aa(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ke(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Lu(mn.bind(null,e,Ye,rr),t);break}mn(e,Ye,rr);break;case 4:if(Ir(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-$t(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=be()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*d_(n/1960))-n,10<n){e.timeoutHandle=Lu(mn.bind(null,e,Ye,rr),n);break}mn(e,Ye,rr);break;case 5:mn(e,Ye,rr);break;default:throw Error(O(329))}}}return tt(e,be()),e.callbackNode===r?Lg.bind(null,e):null}function tc(e,t){var r=_o;return e.current.memoizedState.isDehydrated&&(Rn(e,t).flags|=256),e=ka(e,t),e!==2&&(t=Ye,Ye=r,t!==null&&rc(t)),e}function rc(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function h_(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!Ut(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ir(e,t){for(t&=~vd,t&=~Ga,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-$t(t),n=1<<r;e[r]=-1,t&=~n}}function hf(e){if(te&6)throw Error(O(327));_s();var t=aa(e,0);if(!(t&1))return tt(e,be()),null;var r=ka(e,t);if(e.tag!==0&&r===2){var n=Cu(e);n!==0&&(t=n,r=tc(e,n))}if(r===1)throw r=Fo,Rn(e,0),Ir(e,t),tt(e,be()),r;if(r===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,mn(e,Ye,rr),tt(e,be()),null}function wd(e,t){var r=te;te|=1;try{return e(t)}finally{te=r,te===0&&(Us=be()+500,Wa&&sn())}}function Ln(e){zr!==null&&zr.tag===0&&!(te&6)&&_s();var t=te;te|=1;var r=wt.transition,n=se;try{if(wt.transition=null,se=1,e)return e()}finally{se=n,wt.transition=r,te=t,!(te&6)&&sn()}}function _d(){st=fs.current,de(fs)}function Rn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Bw(r)),ke!==null)for(r=ke.return;r!==null;){var n=r;switch(ed(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ha();break;case 3:$s(),de(Ze),de(Ve),ud();break;case 5:ld(n);break;case 4:$s();break;case 13:de(me);break;case 19:de(me);break;case 10:sd(n.type._context);break;case 22:case 23:_d()}r=r.return}if(Ae=e,ke=e=Qr(e.current,null),Le=st=t,Re=0,Fo=null,vd=Ga=Nn=0,Ye=_o=null,_n!==null){for(t=0;t<_n.length;t++)if(r=_n[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}_n=null}return e}function $g(e,t){do{var r=ke;try{if(nd(),Gi.current=ba,_a){for(var n=ge.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}_a=!1}if(jn=0,Oe=Ce=ge=null,yo=!1,Uo=0,gd.current=null,r===null||r.return===null){Re=1,Fo=t,ke=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=Le,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,h=c.tag;if(!(c.mode&1)&&(h===0||h===11||h===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 d=Xh(i);if(d!==null){d.flags&=-257,Zh(d,i,a,o,t),d.mode&1&&Yh(o,u,t),t=d,l=u;var y=t.updateQueue;if(y===null){var v=new Set;v.add(l),t.updateQueue=v}else y.add(l);break e}else{if(!(t&1)){Yh(o,u,t),bd();break e}l=Error(O(426))}}else if(fe&&a.mode&1){var w=Xh(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Zh(w,i,a,o,t),td(Ds(l,a));break e}}o=l=Ds(l,a),Re!==4&&(Re=2),_o===null?_o=[o]:_o.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=wg(o,l,t);Hh(o,g);break e;case 1:a=l;var p=o.type,m=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Kr===null||!Kr.has(m)))){o.flags|=65536,t&=-t,o.lanes|=t;var b=_g(o,a,t);Hh(o,b);break e}}o=o.return}while(o!==null)}Mg(r)}catch(E){t=E,ke===r&&r!==null&&(ke=r=r.return);continue}break}while(!0)}function Dg(){var e=Ea.current;return Ea.current=ba,e===null?ba:e}function bd(){(Re===0||Re===3||Re===2)&&(Re=4),Ae===null||!(Nn&268435455)&&!(Ga&268435455)||Ir(Ae,Le)}function ka(e,t){var r=te;te|=2;var n=Dg();(Ae!==e||Le!==t)&&(rr=null,Rn(e,t));do try{f_();break}catch(s){$g(e,s)}while(!0);if(nd(),te=r,Ea.current=n,ke!==null)throw Error(O(261));return Ae=null,Le=0,Re}function f_(){for(;ke!==null;)Ug(ke)}function p_(){for(;ke!==null&&!M0();)Ug(ke)}function Ug(e){var t=Fg(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?Mg(e):ke=t,gd.current=null}function Mg(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=a_(r,t),r!==null){r.flags&=32767,ke=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Re=6,ke=null;return}}else if(r=i_(r,t,st),r!==null){ke=r;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Re===0&&(Re=5)}function mn(e,t,r){var n=se,s=wt.transition;try{wt.transition=null,se=1,m_(e,t,r,n)}finally{wt.transition=s,se=n}return null}function m_(e,t,r,n){do _s();while(zr!==null);if(te&6)throw Error(O(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(Q0(e,o),e===Ae&&(ke=Ae=null,Le=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ai||(Ai=!0,Bg(ia,function(){return _s(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=wt.transition,wt.transition=null;var i=se;se=1;var a=te;te|=4,gd.current=null,u_(e,r),jg(r,e),Lw(ju),la=!!Iu,ju=Iu=null,e.current=r,c_(r),z0(),te=a,se=i,wt.transition=o}else e.current=r;if(Ai&&(Ai=!1,zr=e,Sa=s),o=e.pendingLanes,o===0&&(Kr=null),V0(r.stateNode),tt(e,be()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(xa)throw xa=!1,e=Zu,Zu=null,e;return Sa&1&&e.tag!==0&&_s(),o=e.pendingLanes,o&1?e===ec?bo++:(bo=0,ec=e):bo=0,sn(),null}function _s(){if(zr!==null){var e=wm(Sa),t=wt.transition,r=se;try{if(wt.transition=null,se=16>e?16:e,zr===null)var n=!1;else{if(e=zr,zr=null,Sa=0,te&6)throw Error(O(331));var s=te;for(te|=4,D=e.current;D!==null;){var o=D,i=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(D=u;D!==null;){var c=D;switch(c.tag){case 0:case 11:case 15:wo(8,c,o)}var h=c.child;if(h!==null)h.return=c,D=h;else for(;D!==null;){c=D;var f=c.sibling,d=c.return;if(Og(c),c===u){D=null;break}if(f!==null){f.return=d,D=f;break}D=d}}}var y=o.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}D=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,D=i;else e:for(;D!==null;){if(o=D,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wo(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,D=g;break e}D=o.return}}var p=e.current;for(D=p;D!==null;){i=D;var m=i.child;if(i.subtreeFlags&2064&&m!==null)m.return=i,D=m;else e:for(i=p;D!==null;){if(a=D,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ka(9,a)}}catch(E){_e(a,a.return,E)}if(a===i){D=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,D=b;break e}D=a.return}}if(te=s,sn(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Ma,e)}catch{}n=!0}return n}finally{se=r,wt.transition=t}}return!1}function ff(e,t,r){t=Ds(r,t),t=wg(e,t,1),e=qr(e,t,1),t=Ke(),e!==null&&(si(e,1,t),tt(e,t))}function _e(e,t,r){if(e.tag===3)ff(e,e,r);else for(;t!==null;){if(t.tag===3){ff(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Kr===null||!Kr.has(n))){e=Ds(r,e),e=_g(t,e,1),t=qr(t,e,1),e=Ke(),t!==null&&(si(t,1,e),tt(t,e));break}}t=t.return}}function g_(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ke(),e.pingedLanes|=e.suspendedLanes&r,Ae===e&&(Le&r)===r&&(Re===4||Re===3&&(Le&130023424)===Le&&500>be()-yd?Rn(e,0):vd|=r),tt(e,t)}function zg(e,t){t===0&&(e.mode&1?(t=bi,bi<<=1,!(bi&130023424)&&(bi=4194304)):t=1);var r=Ke();e=dr(e,t),e!==null&&(si(e,t,r),tt(e,r))}function v_(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),zg(e,r)}function y_(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(O(314))}n!==null&&n.delete(t),zg(e,r)}var Fg;Fg=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Xe=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Xe=!1,o_(e,t,r);Xe=!!(e.flags&131072)}else Xe=!1,fe&&t.flags&1048576&&Hm(t,ma,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ji(e,t),e=t.pendingProps;var s=js(t,Ve.current);ws(t,r),s=dd(null,t,n,e,s,r);var o=hd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(n)?(o=!0,fa(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,id(t),s.updater=qa,t.stateNode=s,s._reactInternals=t,Bu(t,n,e,r),t=Hu(null,t,n,!0,o,r)):(t.tag=0,fe&&o&&Zc(t),He(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=__(n),e=Pt(n,e),s){case 0:t=Wu(null,t,n,e,r);break e;case 1:t=rf(null,t,n,e,r);break e;case 11:t=ef(null,t,n,e,r);break e;case 14:t=tf(null,t,n,Pt(n.type,e),r);break e}throw Error(O(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Pt(n,s),Wu(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Pt(n,s),rf(e,t,n,s,r);case 3:e:{if(Sg(t),e===null)throw Error(O(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Ym(e,t),ya(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Ds(Error(O(423)),t),t=nf(e,t,n,r,s);break e}else if(n!==s){s=Ds(Error(O(424)),t),t=nf(e,t,n,r,s);break e}else for(lt=Hr(t.stateNode.containerInfo.firstChild),ut=t,fe=!0,Lt=null,r=Qm(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ns(),n===s){t=hr(e,t,r);break e}He(e,t,n,r)}t=t.child}return t;case 5:return Xm(t),e===null&&Mu(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Nu(n,s)?i=null:o!==null&&Nu(n,o)&&(t.flags|=32),xg(e,t),He(e,t,i,r),t.child;case 6:return e===null&&Mu(t),null;case 13:return kg(e,t,r);case 4:return ad(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ls(t,null,n,r):He(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Pt(n,s),ef(e,t,n,s,r);case 7:return He(e,t,t.pendingProps,r),t.child;case 8:return He(e,t,t.pendingProps.children,r),t.child;case 12:return He(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,le(ga,n._currentValue),n._currentValue=i,o!==null)if(Ut(
vendor: 4,416 bytes, line 41
41o.value,i)){if(o.children===s.children&&!Ze.current){t=hr(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=lr(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),zu(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(O(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),zu(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}He(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ws(t,r),s=_t(s),n=n(s),t.flags|=1,He(e,t,n,r),t.child;case 14:return n=t.type,s=Pt(n,t.pendingProps),s=Pt(n.type,s),tf(e,t,n,s,r);case 15:return bg(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Pt(n,s),Ji(e,t),t.tag=1,et(n)?(e=!0,fa(t)):e=!1,ws(t,r),yg(t,n,s),Bu(t,n,s,r),Hu(null,t,n,!0,e,r);case 19:return Tg(e,t,r);case 22:return Eg(e,t,r)}throw Error(O(156,t.tag))};function Bg(e,t){return mm(e,t)}function w_(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,r,n){return new w_(e,t,r,n)}function Ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function __(e){if(typeof e=="function")return Ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fc)return 11;if(e===Bc)return 14}return 2}function Qr(e,t){var r=e.alternate;return r===null?(r=yt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Zi(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")Ed(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ns:return On(r.children,s,o,t);case zc:i=8,s|=8;break;case hu:return e=yt(12,r,t,s|2),e.elementType=hu,e.lanes=o,e;case fu:return e=yt(13,r,t,s),e.elementType=fu,e.lanes=o,e;case pu:return e=yt(19,r,t,s),e.elementType=pu,e.lanes=o,e;case Xp:return Qa(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jp:i=10;break e;case Yp:i=9;break e;case Fc:i=11;break e;case Bc:i=14;break e;case Pr:i=16,n=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=yt(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function On(e,t,r,n){return e=yt(7,e,n,t),e.lanes=r,e}function Qa(e,t,r,n){return e=yt(22,e,n,t),e.elementType=Xp,e.lanes=r,e.stateNode={isHidden:!1},e}function Hl(e,t,r){return e=yt(6,e,null,t),e.lanes=r,e}function ql(e,t,r){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function b_(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tl(0),this.expirationTimes=Tl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tl(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function xd(e,t,r,n,s,o,i,a,l){return e=new b_(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=yt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},id(o),e}function E_(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 6,662 bytes, line 41
41return{$$typeof:rs,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Vg(e){if(!e)return Xr;e=e._reactInternals;e:{if(Un(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var r=e.type;if(et(r))return Vm(e,r,t)}return t}function Wg(e,t,r,n,s,o,i,a,l){return e=xd(r,n,!0,e,s,o,i,a,l),e.context=Vg(null),r=e.current,n=Ke(),s=Gr(r),o=lr(n,s),o.callback=t??null,qr(r,o,s),e.current.lanes=s,si(e,s,n),tt(e,n),e}function Ja(e,t,r,n){var s=t.current,o=Ke(),i=Gr(s);return r=Vg(r),t.context===null?t.context=r:t.pendingContext=r,t=lr(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=qr(s,t,i),e!==null&&(Dt(e,s,i,o),Ki(e,s,i)),i}function Ta(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function pf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Sd(e,t){pf(e,t),(e=e.alternate)&&pf(e,t)}function x_(){return null}var Hg=typeof reportError=="function"?reportError:function(e){console.error(e)};function kd(e){this._internalRoot=e}Ya.prototype.render=kd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));Ja(e,t,null,null)};Ya.prototype.unmount=kd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ln(function(){Ja(null,e,null,null)}),t[cr]=null}};function Ya(e){this._internalRoot=e}Ya.prototype.unstable_scheduleHydration=function(e){if(e){var t=Em();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ar.length&&t!==0&&t<Ar[r].priority;r++);Ar.splice(r,0,e),r===0&&Sm(e)}};function Td(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mf(){}function S_(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=Ta(i);o.call(u)}}var i=Wg(t,n,e,0,null,!1,!1,"",mf);return e._reactRootContainer=i,e[cr]=i.current,jo(e.nodeType===8?e.parentNode:e),Ln(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Ta(l);a.call(u)}}var l=xd(e,0,!1,null,null,!1,!1,"",mf);return e._reactRootContainer=l,e[cr]=l.current,jo(e.nodeType===8?e.parentNode:e),Ln(function(){Ja(t,l,r,n)}),l}function Za(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Ta(i);a.call(l)}}Ja(t,i,e,s)}else i=S_(r,t,e,s,n);return Ta(i)}_m=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=uo(t.pendingLanes);r!==0&&(Hc(t,r|1),tt(t,be()),!(te&6)&&(Us=be()+500,sn()))}break;case 13:Ln(function(){var n=dr(e,1);if(n!==null){var s=Ke();Dt(n,e,1,s)}}),Sd(e,1)}};qc=function(e){if(e.tag===13){var t=dr(e,134217728);if(t!==null){var r=Ke();Dt(t,e,134217728,r)}Sd(e,134217728)}};bm=function(e){if(e.tag===13){var t=Gr(e),r=dr(e,t);if(r!==null){var n=Ke();Dt(r,e,t,n)}Sd(e,t)}};Em=function(){return se};xm=function(e,t){var r=se;try{return se=e,t()}finally{se=r}};Su=function(e,t,r){switch(t){case"input":if(vu(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Va(n);if(!s)throw Error(O(90));em(n),vu(n,s)}}}break;case"textarea":rm(e,r);break;case"select":t=r.value,t!=null&&ms(e,!!r.multiple,t,!1)}};um=wd;cm=Ln;var k_={usingClientEntryPoint:!1,Events:[ii,as,Va,am,lm,wd]},so={findFiberByHostInstance:wn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T_={bundleType:so.bundleType,version:so.version,rendererPackageName:so.rendererPackageName,rendererConfig:so.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fm(e),e===null?null:e.stateNode},findFiberByHostInstance:so.findFiberByHostInstance||x_,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 Ii=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ii.isDisabled&&Ii.supportsFiber)try{Ma=Ii.inject(T_),Qt=Ii}catch{}}ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k_;ht.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Td(t))throw Error(O(200));return E_(e,t,null,r)};ht.createRoot=function(e,t){if(!Td(e))throw Error(O(299));var r=!1,n="",s=Hg;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=xd(e,1,!1,null,null,r,!1,n,s),e[cr]=t.current,jo(e.nodeType===8?e.parentNode:e),new kd(t)};ht.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=fm(t),e=e===null?null:e.stateNode,e};ht.flushSync=function(e){return Ln(e)};ht.hydrate=function(e,t,r){if(!Xa(t))throw Error(O(200));return Za(null,e,t,!0,r)};ht.hydrateRoot=function(e,t,r){if(!Td(e))throw Error(O(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=Hg;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Wg(t,null,e,1,r??null,s,!1,o,i),e[cr]=t.current,jo(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Ya(t)};ht.render=function(e,t,r){if(!Xa(t))throw Error(O(200));return Za(null,e,t,!1,r)};ht.unmountComponentAtNode=function(e){if(!Xa(e))throw Error(O(40));return e._reactRootContainer?(Ln(function(){Za(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};ht.unstable_batchedUpdates=wd;ht.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Xa(r))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return Za(e,t,r,!1,n)};
41ht.version="18.3.1-next-f1338f8080-20240426";function qg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qg)}catch(e){console.error(e)}}qg(),qp.exports=ht;var li=qp.exports;const Kg=Np(li);var Gg,gf=li;Gg=gf.createRoot,gf.hydrateRoot;const C_="modulepreload",P_=function(e){return"/"+e},vf={},oe=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=P_(l),l in vf)return;vf[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":C_,u||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((f,d)=>{h.addEventListener("load",f),h.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},R_=1,O_=1e6;let Kl=0;function A_(){return Kl=(Kl+1)%Number.MAX_SAFE_INTEGER,Kl.toString()}const Gl=new Map,yf=e=>{if(Gl.has(e))return;const t=setTimeout(()=>{Gl.delete(e),Eo({type:"REMOVE_TOAST",toastId:e})},O_);Gl.set(e,t)},I_=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,R_)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?yf(r):e.toasts.forEach(n=>{yf(n.id)}),{...e,toasts:e.toasts.map(n=>
41n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ea=[];let ta={toasts:[]};function Eo(e){ta=I_(ta,e),ea.forEach(t=>{t(ta)})}function j_({...e}){const t=A_(),r=s=>Eo({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Eo({type:"DISMISS_TOAST",toastId:t});return Eo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function N_(){const[e,t]=_.useState(ta);return _.useEffect(()=>(ea.push(t),()=>{const r=ea.indexOf(t);r>-1&&ea.splice(r,1)}),[e]),{...e,toast:j_,dismiss:r=>Eo({type:"DISMISS_TOAST",toastId:r})}}function Pe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function wf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qg(...e){return t=>{let r=!1;const n=e.map(s=>{const o=wf(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():wf(e[s],null)}}}}function Mt(...e){return _.useCallback(Qg(...e),e)}function RP(e,t){const r=_.createContext(t),n=o=>{const{children:i,...a}=o,l=_.useMemo(()=>a,Object.values(a));return x.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function s(o){const i=_.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function el(e,t=[]){let r=[];function n(o,i){const a=_.createContext(i),l=r.length;r=[...r,i];const u=h=>{var g;const{scope:f,children:d,...y}=h,v=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,w=_.useMemo(()=>y,Object.values(y));return x.jsx(v.Provider,{value:w,children:d})};u.displayName=o+"Provider";function c(h,f){var v;const d=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,y=_.useContext(d);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,c]}const s=()=>{const o=r.map(i=>_.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,L_(s,...t)]}function L_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(o)[`__scope${u}`];return{...a,...h}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Ca(e){const t=D_(e),r=_.forwardRef((n,s)=>{const{children:o,...i}=n,a=_.Children.toArray(o),l=a.find(M_);if(l){const u=l.props.children,c=a.map(h=>h===l?_.Children.count(u)>1?_.Children.only(null):_.isValidElement(u)?u.props.children:null:h);return x.jsx(t,{...i,ref:s,children:_.isValidElement(u)?_.cloneElement(u,void 0,c):null})}return x.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var $_=Ca("Slot");function D_(e){const t=_.forwardRef((r,n)=>{const{children:s,...o}=r;if(_.isValidElement(s)){const i=F_(s),a=z_(o,s.props);return s.type!==_.Fragment&&(a.ref=n?Qg(n,i):i),_.cloneElement(s,a)}return _.Children.count(s)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jg=Symbol("radix.slottable");function U_(e){const t=({children:r})=>x.jsx(x.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Jg,t}function M_(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jg}function z_(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function F_(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function B_(e){const t=e+"CollectionProvider",[r,n]=el(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:w,children:g}=v,p=I.useRef(null),m=I.useRef(new Map).current;return x.jsx(s,{scope:w,itemMap:m,collectionRef:p,children:g})};i.displayName=t;const a=e+"CollectionSlot",l=Ca(a),u=I.forwardRef((v,w)=>{const{scope:g,children:p}=v,m=o(a,g),b=Mt(w,m.collectionRef);return x.jsx(l,{ref:b,children:p})});u.displayName=a;const c=e+"CollectionItemSlot",h="data-radix-collection-item",f=Ca(c),d=I.forwardRef((v,w)=>{const{scope:g,children:p,...m}=v,b=I.useRef(null),E=Mt(w,b),S=o(c,g);return I.useEffect(()=>(S.itemMap.set(b,{ref:b,...m}),()=>void S.itemMap.delete(b))),x.jsx(f,{[h]:"",ref:E,children:p})});d.displayName=c;function y(v){const w=o(e+"CollectionConsumer",v);return I.useCallback(()=>{const p=w.collectionRef.current;
vendor: 8,855 bytes, line 41
41if(!p)return[];const m=Array.from(p.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((S,k)=>m.indexOf(S.ref.current)-m.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:u,ItemSlot:d},y,n]}var V_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rt=V_.reduce((e,t)=>{const r=Ca(`Primitive.${t}`),n=_.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Yg(e,t){e&&li.flushSync(()=>e.dispatchEvent(t))}function Zr(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function W_(e,t=globalThis==null?void 0:globalThis.document){const r=Zr(e);_.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var H_="DismissableLayer",nc="dismissableLayer.update",q_="dismissableLayer.pointerDownOutside",K_="dismissableLayer.focusOutside",_f,Xg=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cd=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=_.useContext(Xg),[c,h]=_.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=_.useState({}),y=Mt(t,k=>h(k)),v=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(w),p=c?v.indexOf(c):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,b=p>=g,E=Q_(k=>{const P=k.target,A=[...u.branches].some(j=>j.contains(P));!b||A||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},f),S=J_(k=>{const P=k.target;[...u.branches].some(j=>j.contains(P))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},f);return W_(k=>{p===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),_.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_f=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),bf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=_f)}},[c,f,r,u]),_.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),bf())},[c,u]),_.useEffect(()=>{const k=()=>d({});return document.addEventListener(nc,k),()=>document.removeEventListener(nc,k)},[]),x.jsx(rt.div,{...l,ref:y,style:{pointerEvents:m?b?"auto":"none":void 0,...e.style},onFocusCapture:Pe(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Pe(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Pe(e.onPointerDownCapture,E.onPointerDownCapture)})});Cd.displayName=H_;var G_="DismissableLayerBranch",Zg=_.forwardRef((e,t)=>{const r=_.useContext(Xg),n=_.useRef(null),s=Mt(t,n);return _.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),x.jsx(rt.div,{...e,ref:s})});Zg.displayName=G_;function Q_(e,t=globalThis==null?void 0:globalThis.document){const r=Zr(e),n=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){ev(q_,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function J_(e,t=globalThis==null?void 0:globalThis.document){const r=Zr(e),n=_.useRef(!1);return _.useEffect(()=>{const s=o=>{o.target&&!n.current&&ev(K_,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bf(){const e=new CustomEvent(nc);document.dispatchEvent(e)}function ev(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Yg(s,o):s.dispatchEvent(o)}var Y_=Cd,X_=Zg,fr=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Z_="Portal",tv=_.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=_.useState(!1);fr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Kg.createPortal(x.jsx(rt.div,{...n,ref:t}),i):null});tv.displayName=Z_;function eb(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var Pd=e=>{const{present:t,children:r}=e,n=tb(t),s=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),o=Mt(n.ref,rb(s));return typeof r=="function"||n.isPresent?_.cloneElement(s,{ref:o}):null};Pd.displayName="Presence";function tb(e){const[t,r]=_.useState(),n=_.useRef(null),s=_.useRef(e),o=_.useRef("none"),i=e?"mounted":"unmounted",[a,l]=eb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=ji(n.current);o.current=a==="mounted"?u:"none"},[a]),fr(()=>{const u=n.current,c=s.current;if(c!==e){const f=o.current,d=ji(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==d?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),fr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,h=d=>{const v=ji(n.current).includes(d.animationName);if(d.target===t&&v&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=d=>{d.target===t&&(o.current=ji(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ji(e){return(e==null?void 0:e.animationName)||"none"}function rb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var nb=$c[" useInsertionEffect ".trim().toString()]||fr;function rv({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=sb({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=_.useRef(e!==void 0);_.useEffect(()=>{const h=c.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,n])}const u=_.useCallback(c=>{var h;if(a){const f=ob(c)?c(e):c;f!==e&&((h=i.current)==null||h.call(i,f))}else o(c)},[a,e,o,i]);return[l,u]}function sb({defaultProp:e,onChange:t}){const[r,n]=_.useState(e),s=_.useRef(r),o=_.useRef(t);return nb(()=>{o.current=t},[t]),_.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function ob(e){return typeof e=="function"}var ib=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ab="VisuallyHidden",tl=_.forwardRef((e,t)=>x.jsx(rt.span,{...e,ref:t,style:{...ib,...e.style}}));tl.displayName=ab;var lb=tl,Rd="ToastProvider",[Od,ub,cb]=B_("Toast"),[nv,OP]=el("Toast",[cb]),[db,rl]=nv(Rd),sv=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=_.useState(null),[u,c]=_.useState(0),h=_.useRef(!1),f=_.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Rd}\`. Expected non-empty \`string\`.`),x.jsx(Od.Provider,{scope:t,children:x.jsx(db,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:_.useCallback(()=>c(d=>d+1),[]),onToastRemove:_.useCallback(()=>c(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:i})})};
41sv.displayName=Rd;var ov="ToastViewport",hb=["F8"],sc="toast.viewportPause",oc="toast.viewportResume",iv=_.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=hb,label:s="Notifications ({hotkey})",...o}=e,i=rl(ov,r),a=ub(r),l=_.useRef(null),u=_.useRef(null),c=_.useRef(null),h=_.useRef(null),f=Mt(t,h,i.onViewportChange),d=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;_.useEffect(()=>{const w=g=>{var m;n.length!==0&&n.every(b=>g[b]||g.code===b)&&((m=h.current)==null||m.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),_.useEffect(()=>{const w=l.current,g=h.current;if(y&&w&&g){const p=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(sc);g.dispatchEvent(S),i.isClosePausedRef.current=!0}},m=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(oc);g.dispatchEvent(S),i.isClosePausedRef.current=!1}},b=S=>{!w.contains(S.relatedTarget)&&m()},E=()=>{w.contains(document.activeElement)||m()};return w.addEventListener("focusin",p),w.addEventListener("focusout",b),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",E),window.addEventListener("blur",p),window.addEventListener("focus",m),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",b),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",p),window.removeEventListener("focus",m)}}},[y,i.isClosePausedRef]);const v=_.useCallback(({tabbingDirection:w})=>{const p=a().map(m=>{const b=m.ref.current,E=[b,...kb(b)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?p.reverse():p).flat()},[a]);return _.useEffect(()=>{const w=h.current;if(w){const g=p=>{var E,S,k;const m=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!m){const P=document.activeElement,A=p.shiftKey;if(p.target===w&&A){(E=u.current)==null||E.focus();return}const L=v({tabbingDirection:A?"backwards":"forwards"}),W=L.findIndex(N=>N===P);Ql(L.slice(W+1))?p.preventDefault():A?(S=u.current)==null||S.focus():(k=c.current)==null||k.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[a,v]),x.jsxs(X_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&x.jsx(ic,{ref:u,onFocusFromOutsideViewport:()=>{const w=v({tabbingDirection:"forwards"});Ql(w)}}),x.jsx(Od.Slot,{scope:r,children:x.jsx(rt.ol,{tabIndex:-1,...o,ref:f})}),y&&x.jsx(ic,{ref:c,onFocusFromOutsideViewport:()=>{const w=v({tabbingDirection:"backwards"});Ql(w)}})]})});iv.displayName=ov;var av="ToastFocusProxy",ic=_.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=rl(av,r);return x.jsx(tl,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&n()}})});ic.displayName=av;var ui="Toast",fb="toast.swipeStart",pb="toast.swipeMove",mb="toast.swipeCancel",gb="toast.swipeEnd",lv=_.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=rv({prop:n,defaultProp:s??!0,onChange:o,caller:ui});return x.jsx(Pd,{present:r||a,children:x.jsx(wb,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Zr(e.onPause),onResume:Zr(e.onResume),onSwipeStart:Pe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Pe(e.onSwipeMove,u=>{const{x:c,y:h}=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",`${h}px`)}),onSwipeCancel:Pe(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Pe(e.onSwipeEnd,u=>{const{x:c,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});lv.displayName=ui;var[vb,yb]=nv(ui,{onClose(){}}),wb=_.forwardRef((e,t)=>
41{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:d,...y}=e,v=rl(ui,r),[w,g]=_.useState(null),p=Mt(t,N=>g(N)),m=_.useRef(null),b=_.useRef(null),E=s||v.duration,S=_.useRef(0),k=_.useRef(E),P=_.useRef(0),{onToastAdd:A,onToastRemove:j}=v,B=Zr(()=>{var X;(w==null?void 0:w.contains(document.activeElement))&&((X=v.viewport)==null||X.focus()),i()}),L=_.useCallback(N=>{!N||N===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(B,N))},[B]);_.useEffect(()=>{const N=v.viewport;if(N){const X=()=>{L(k.current),u==null||u()},V=()=>{const K=new Date().getTime()-S.current;k.current=k.current-K,window.clearTimeout(P.current),l==null||l()};return N.addEventListener(sc,V),N.addEventListener(oc,X),()=>{N.removeEventListener(sc,V),N.removeEventListener(oc,X)}}},[v.viewport,E,l,u,L]),_.useEffect(()=>{o&&!v.isClosePausedRef.current&&L(E)},[o,E,v.isClosePausedRef,L]),_.useEffect(()=>(A(),()=>j()),[A,j]);const W=_.useMemo(()=>w?mv(w):null,[w]);return v.viewport?x.jsxs(x.Fragment,{children:[W&&x.jsx(_b,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),x.jsx(vb,{scope:r,onClose:B,children:li.createPortal(x.jsx(Od.ItemSlot,{scope:r,children:x.jsx(Y_,{asChild:!0,onEscapeKeyDown:Pe(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||B(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(rt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...y,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Pe(e.onKeyDown,N=>{N.key==="Escape"&&(a==null||a(N.nativeEvent),N.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:Pe(e.onPointerDown,N=>{N.button===0&&(m.current={x:N.clientX,y:N.clientY})}),onPointerMove:Pe(e.onPointerMove,N=>{if(!m.current)return;const X=N.clientX-m.current.x,V=N.clientY-m.current.y,K=!!b.current,C=["left","right"].includes(v.swipeDirection),R=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,$=C?R(0,X):0,G=C?0:R(0,V),M=N.pointerType==="touch"?10:2,J={x:$,y:G},Z={originalEvent:N,delta:J};K?(b.current=J,Ni(pb,h,Z,{discrete:!1})):Ef(J,v.swipeDirection,M)?(b.current=J,Ni(fb,c,Z,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(X)>M||Math.abs(V)>M)&&(m.current=null)}),onPointerUp:Pe(e.onPointerUp,N=>{const X=b.current,V=N.target;if(V.hasPointerCapture(N.pointerId)&&V.releasePointerCapture(N.pointerId),b.current=null,m.current=null,X){const K=N.currentTarget,C={originalEvent:N,delta:X};Ef(X,v.swipeDirection,v.swipeThreshold)?Ni(gb,d,C,{discrete:!0}):Ni(mb,f,C,{discrete:!0}),K.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),_b=e=>{const{__scopeToast:t,children:r,...n}=e,s=rl(ui,t),[o,i]=_.useState(!1),[a,l]=_.useState(!1);return xb(()=>i(!0)),_.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(tv,{asChild:!0,children:x.jsx(tl,{...n,children:o&&x.jsxs(x.Fragment,{children:[s.label," ",r]})})})},bb="ToastTitle",uv=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(rt.div,{...n,ref:t})});uv.displayName=bb;var Eb="ToastDescription",cv=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(rt.div,{...n,ref:t})});cv.displayName=Eb;var dv="ToastAction",hv=_.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?x.jsx(pv,{altText:r,asChild:!0,children:x.jsx(Ad,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${dv}\`. Expected non-empty \`string\`.`),null)});hv.displayName=dv;var fv="ToastClose",Ad=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=yb(fv,r);return x.jsx(pv,{asChild:!0,children:x.jsx(rt.button,{type:"button",...n,ref:t,onClick:Pe(e.onClick,s.onClose)})})});Ad.displayName=fv;var pv=_.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return x.jsx(rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function mv(e){const t=[];
vendor: 4,679 bytes, lines 41-71
41return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Sb(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...mv(n))}}),t}function Ni(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Yg(s,o):s.dispatchEvent(o)}var Ef=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function xb(e=()=>{}){const t=Zr(e);fr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Sb(e){return e.nodeType===e.ELEMENT_NODE}function kb(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ql(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Tb=sv,gv=iv,vv=lv,yv=uv,wv=cv,_v=hv,bv=Ad;function Ev(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Ev(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function xv(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ev(e))&&(n&&(n+=" "),n+=t);return n}const xf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sf=xv,Sv=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Sf(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],h=o==null?void 0:o[u];if(c===null)return null;const f=xf(c)||xf(h);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[h,f]=c;return f===void 0||(u[h]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:h,className:f,...d}=c;return Object.entries(d).every(y=>{let[v,w]=y;return Array.isArray(w)?w.includes({...o,...a}[v]):{...o,...a}[v]===w})?[...u,h,f]:u},[]);return Sf(e,i,l,r==null?void 0:r.class,r==null?void 0:r.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 Cb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),kv=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).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 Pb={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 Rb=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>_.createElement("svg",{ref:l,...Pb,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:kv("lucide",s),...a},[...i.map(([u,c])=>_.createElement(u,c)),...Array.isArray(o)?o:[o]]));/** 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 Tv=(e,t)=>{const r=_.forwardRef(({className:n,...s},o)=>_.createElement(Rb,{ref:o,iconNode:t,className:kv(`lucide-${Cb(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 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 Ob=Tv("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/** 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 Ab=Tv("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,223 bytes, line 71
71],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Id="-",Ib=e=>{const t=Nb(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(Id);return a[0]===""&&a.length!==1&&a.shift(),Cv(a,t)||jb(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},Cv=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Cv(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Id);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},kf=/^\[(.+)\]$/,jb=e=>{if(kf.test(e)){const t=kf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Nb=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return $b(Object.entries(e.classGroups),r).forEach(([o,i])=>{ac(i,n,o,t)}),n},ac=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Tf(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(Lb(s)){ac(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{ac(i,Tf(t,o),r,n)})})},Tf=(e,t)=>{let r=e;return t.split(Id).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Lb=e=>e.isThemeGetter,$b=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e,Db=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},Pv="!",Ub=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,c=0,h;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(n||a.slice(w,w+o)===t)){l.push(a.slice(c,w)),c=w+o;continue}if(g==="/"){h=w;continue}}g==="["?u++:g==="]"&&u--}const f=l.length===0?a:a.substring(c),d=f.startsWith(Pv),y=d?f.substring(1):f,v=h&&h>c?h-c:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:y,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:i}):i},Mb=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},zb=e=>({cache:Db(e.cacheSize),parseClassName:Ub(e),...Ib(e)}),Fb=/\s+/,Bb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(Fb);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:c,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:d}=r(u);let y=!!d,v=n(y?f.substring(0,d):f);if(!v){if(!y){a=u+(a.length>0?" "+a:a);continue}if(v=n(f),!v){a=u+(a.length>0?" "+a:a);continue}y=!1}const w=Mb(c).join(":"),g=h?w+Pv:w,p=g+v;if(o.includes(p))continue;o.push(p);const m=s(v,y);for(let b=0;b<m.length;++b){const E=m[b];o.push(g+E)}a=u+(a.length>0?" "+a:a)}return a};function Vb(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Rv(t))&&(n&&(n+=" "),n+=r);return n}const Rv=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Rv(e[n]))&&(r&&(r+=" "),r+=t);return r};function Wb(e,...t){let r,n,s,o=i;function i(l){const u=t.reduce((c,h)=>h(c),e());return r=zb(u),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=Bb(l,r);return s(l,c),c}return function(){return o(Vb.apply(null,arguments))}}const ue=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ov=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hb=/^\d+\/\d+$/,qb=new Set(["px","full","screen"]),Kb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gb=/\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$/,Qb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,er=e=>bs(e)||qb.has(e)||Hb.test(e),kr=e=>Ws(e,"length",oE),bs=e=>!!e&&!Number.isNaN(Number(e)),Jl=e=>Ws(e,"number",bs),oo=e=>!!e&&Number.isInteger(Number(e)),Xb=e=>e.endsWith("%")&&bs(e.slice(0,-1)),Q=e=>Ov.test(e),Tr=e=>Kb.test(e),Zb=new Set(["length","size","percentage"]),eE=e=>Ws(e,Zb,Av),tE=e=>Ws(e,"position",Av),rE=new Set(["image","url"]),nE=e=>Ws(e,rE,aE),sE=e=>Ws(e,"",iE),io=()=>!0,Ws=(e,t,r)=>{const n=Ov.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},oE=e=>Gb.test(e)&&!Qb.test(e),Av=()=>!1,iE=e=>Jb.test(e),aE=e=>Yb.test(e),lE=()=>{const e=ue("colors"),t=ue("spacing"),r=ue("blur"),n=ue("brightness"),s=ue("borderColor"),o=ue("borderRadius"),i=ue("borderSpacing"),a=ue("borderWidth"),l=ue("contrast"),u=ue("grayscale"),c=ue("hueRotate"),h=ue("invert"),f=ue("gap"),d=ue("gradientColorStops"),y=ue("gradientColorStopPositions"),v=ue("inset"),w=ue("margin"),g=ue("opacity"),p=ue("padding"),m=ue("saturate"),b=ue("scale"),E=ue("sepia"),S=ue("skew"),k=ue("space"),P=ue("translate"),A=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",Q,t],L=()=>[Q,t],W=()=>["",er,kr],N=()=>["auto",bs,Q],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Q],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[bs,Q];return{cacheSize:500,separator:":",theme:{colors:[io],spacing:[er,kr],blur:["none","",Tr,Q],brightness:G(),borderColor:[e],borderRadius:["none","","full",Tr,Q],borderSpacing:L(),borderWidth:W(),contrast:G(),grayscale:R(),hueRotate:G(),invert:R(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Xb,kr],inset:B(),margin:B(),opacity:G(),padding:L(),saturate:G(),scale:G(),sepia:R(),skew:G(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[Tr]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),Q]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",oo,Q]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",oo,Q]}],"grid-cols":[{"grid-cols":[io]}],"col-start-end":[{col:["auto",{span:["full",oo,Q]},Q]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[io]}],"row-start-end":[{row:["auto",{span:[oo,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",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],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":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[Tr]},Tr]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Tr,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jl]}],"font-family":[{font:[io]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",bs,Jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",er,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",er,kr]}],"underline-offset":[{"underline-offset":["auto",er,Q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),tE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",eE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}
vendor: 5,172 bytes, line 71
71],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[er,Q]}],"outline-w":[{outline:[er,kr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[er,kr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tr,sE]}],"shadow-color":[{shadow:[io]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tr,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[h]}],saturate:[{saturate:[m]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[oo,Q]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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"]}
71],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[er,kr,Jl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},uE=Wb(lE);function on(...e){return uE(xv(e))}const cE=Tb,Iv=_.forwardRef(({className:e,...t},r)=>x.jsx(gv,{ref:r,className:on("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Iv.displayName=gv.displayName;const dE=Sv("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"}}),jv=_.forwardRef(({className:e,variant:t,...r},n)=>x.jsx(vv,{ref:n,className:on(dE({variant:t}),e),...r}));jv.displayName=vv.displayName;const hE=_.forwardRef(({className:e,...t},r)=>x.jsx(_v,{ref:r,className:on("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));hE.displayName=_v.displayName;const Nv=_.forwardRef(({className:e,...t},r)=>x.jsx(bv,{ref:r,className:on("absolute right-2 top-2 rounded-md p-1 text-foreground
71/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(Ab,{className:"h-4 w-4"})}));Nv.displayName=bv.displayName;const Lv=_.forwardRef(({className:e,...t},r)=>x.jsx(yv,{ref:r,className:on("text-sm font-semibold",e),...t}));Lv.displayName=yv.displayName;const $v=_.forwardRef(({className:e,...t},r)=>x.jsx(wv,{ref:r,className:on("text-sm opacity-90",e),...t}));$v.displayName=wv.displayName;function fE(){const{toasts:e}=N_();return x.jsxs(cE,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return x.jsxs(jv,{...o,children:[x.jsxs("div",{className:"grid gap-1",children:[r&&x.jsx(Lv,{children:r}),n&&x.jsx($v,{children:n})]}),s,x.jsx(Nv,{})]},t)}),x.jsx(Iv,{})]})}var Cf=["light","dark"],pE="(prefers-color-scheme: dark)",mE=_.createContext(void 0),gE={setTheme:e=>{},themes:[]},vE=()=>{var e;return(e=_.useContext(mE))!=null?e:gE};_.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let u=o==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?Cf.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,v=!1,w=!0)=>{let g=i?i[y]:y,p=v?y+"|| ''":`'${g}'`,m="";return s&&w&&!v&&Cf.includes(y)&&(m+=`d.style.colorScheme = '${y}';`),r==="class"?v||g?m+=`c.add(${p})`:m+="null":g&&(m+=`d[s](n,${p})`),m},d=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${pE}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}${u?"":"else{"+f(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}else{${f(o,!1,!1)};}${h}}catch(t){}}();`;return _.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:d}})});var yE=e=>{switch(e){case"success":return bE;case"info":return xE;case"warning":return EE;case"error":return SE;default:return null}},wE=Array(12).fill(0),_E=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},wE.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),bE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),EE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),xE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),kE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),TE=()=>
71{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},lc=1,CE=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:lc++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
71this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async l=>{if(o=["resolve",l],I.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(RE(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:c})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||lc++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Je=new CE,PE=(e,t)=>{let r=(t==null?void 0:t.id)||lc++;return Je.addToast({title:e,...t,id:r}),r},RE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",OE=PE,AE=()=>Je.toasts,IE=()=>Je.getActiveToasts(),AP=Object.assign(OE,{success:Je.success,info:Je.info,warning:Je.warning,error:Je.error,custom:Je.custom,message:Je.message,promise:Je.promise,dismiss:Je.dismiss,loading:Je.loading},{getHistory:AE,getToasts:IE});function jE(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}jE(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
71left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
71:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
71--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 72`);function Li(e){return e.label!==void 0}var NE=3,LE="32px",$E="16px",Pf=4e3,DE=356,UE=14,ME=20,zE=200;function Tt(...e){return e.filter(Boolean).join(" ")}function FE(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var BE=e=>{var t,r,n,s,o,i,a,l,u,c,h;let{invert:f,toast:d,unstyled:y,interacting:v,setHeights:w,visibleToasts:g,heights:p,index:m,toasts:b,expanded:E,removeToast:S,defaultRichColors:k,closeButton:P,style:A,cancelButtonStyle:j,actionButtonStyle:B,className:L="",descriptionClassName:W="",duration:N,position:X,gap:V,loadingIcon:K,expandByDefault:C,classNames:R,icons:$,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:M}
72=e,[J,Z]=I.useState(null),[xe,De]=I.useState(null),[ne,zn]=I.useState(!1),[yr,un]=I.useState(!1),[wr,Fn]=I.useState(!1),[_r,hi]=I.useState(!1),[gl,fi]=I.useState(!1),[vl,Qs]=I.useState(0),[Bn,eh]=I.useState(0),Js=I.useRef(d.duration||N||Pf),th=I.useRef(null),cn=I.useRef(null),qy=m===0,Ky=m+1<=g,pt=d.type,Vn=d.dismissible!==!1,Gy=d.className||"",Qy=d.descriptionClassName||"",pi=I.useMemo(()=>p.findIndex(H=>H.toastId===d.id)||0,[p,d.id]),Jy=I.useMemo(()=>{var H;return(H=d.closeButton)!=null?H:P},[d.closeButton,P]),rh=I.useMemo(()=>d.duration||N||Pf,[d.duration,N]),yl=I.useRef(0),Wn=I.useRef(0),nh=I.useRef(0),Hn=I.useRef(null),[Yy,Xy]=X.split("-"),sh=I.useMemo(()=>p.reduce((H,ie,he)=>he>=pi?H:H+ie.height,0),[p,pi]),oh=TE(),Zy=d.invert||f,wl=pt==="loading";Wn.current=I.useMemo(()=>pi*V+sh,[pi,sh]),I.useEffect(()=>{Js.current=rh},[rh]),I.useEffect(()=>{zn(!0)},[]),I.useEffect(()=>{let H=cn.current;if(H){let ie=H.getBoundingClientRect().height;return eh(ie),w(he=>[{toastId:d.id,height:ie,position:d.position},...he]),()=>w(he=>he.filter(Et=>Et.toastId!==d.id))}},[w,d.id]),I.useLayoutEffect(()=>{if(!ne)return;let H=cn.current,ie=H.style.height;H.style.height="auto";let he=H.getBoundingClientRect().height;H.style.height=ie,eh(he),w(Et=>Et.find(xt=>xt.toastId===d.id)?Et.map(xt=>xt.toastId===d.id?{...xt,height:he}:xt):[{toastId:d.id,height:he,position:d.position},...Et])},[ne,d.title,d.description,w,d.id]);let br=I.useCallback(()=>{un(!0),Qs(Wn.current),w(H=>H.filter(ie=>ie.toastId!==d.id)),setTimeout(()=>{S(d)},zE)},[d,S,w,Wn]);I.useEffect(()=>{if(d.promise&&pt==="loading"||d.duration===1/0||d.type==="loading")return;let H;return E||v||M&&oh?(()=>{if(nh.current<yl.current){let ie=new Date().getTime()-yl.current;Js.current=Js.current-ie}nh.current=new Date().getTime()})():Js.current!==1/0&&(yl.current=new Date().getTime(),H=setTimeout(()=>{var ie;(ie=d.onAutoClose)==null||ie.call(d,d),br()},Js.current)),()=>clearTimeout(H)},[E,v,d,pt,M,oh,br]),I.useEffect(()=>{d.delete&&br()},[br,d.delete]);function e0(){var H,ie,he;return $!=null&&$.loading?I.createElement("div",{className:Tt(R==null?void 0:R.loader,(H=d==null?void 0:d.classNames)==null?void 0:H.loader,"sonner-loader"),"data-visible":pt==="loading"},$.loading):K?I.createElement("div",{className:Tt(R==null?void 0:R.loader,(ie=d==null?void 0:d.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":pt==="loading"},K):I.createElement(_E,{className:Tt(R==null?void 0:R.loader,(he=d==null?void 0:d.classNames)==null?void 0:he.loader),visible:pt==="loading"})}return I.createElement("li",{tabIndex:0,ref:cn,className:Tt(L,Gy,R==null?void 0:R.toast,(t=d==null?void 0:d.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[pt],(r=d==null?void 0:d.classNames)==null?void 0:r[pt]),"data-sonner-toast":"","data-rich-colors":(n=d.richColors)!=null?n:k,"data-styled":!(d.jsx||d.unstyled||y),"data-mounted":ne,"data-promise":!!d.promise,"data-swiped":gl,"data-removed":yr,"data-visible":Ky,"data-y-position":Yy,"data-x-position":Xy,"data-index":m,"data-front":qy,"data-swiping":wr,"data-dismissible":Vn,"data-type":pt,"data-invert":Zy,"data-swipe-out":_r,"data-swipe-direction":xe,"data-expanded":!!(E||C&&ne),style:{"--index":m,"--toasts-before":m,"--z-index":b.length-m,"--offset":`${yr?vl:Wn.current}px`,"--initial-height":C?"auto":`${Bn}px`,...A,...d.style},onDragEnd:()=>{Fn(!1),Z(null),Hn.current=null},onPointerDown:H=>{wl||!Vn||(th.current=new Date,Qs(Wn.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(Fn(!0),Hn.current={x:H.clientX,y:H.clientY}))},onPointerUp:()=>{var H,ie,he,Et;if(_r||!Vn)return;Hn.current=null;let xt=Number(((H=cn.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Er=Number(((ie=cn.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dn=new Date().getTime()-((he=th.current)==null?void 0:he.getTime()),St=J==="x"?xt:Er,xr=Math.abs(St)/dn;if(Math.abs(St)>=ME||xr>.11){Qs(Wn.current),(Et=d.onDismiss)==null||Et.call(d,d),De(J==="x"?xt>0?"right":"left":Er>0?"down":"up"),br(),hi(!0),fi(!1);return}Fn(!1),Z(null)},onPointerMove:H=>{var ie,he,Et,xt;if(!Hn.current||!Vn||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;let Er=H.clientY-Hn.current.y,dn=H.clientX-Hn.current.x,St=(he=e.swipeDirections)!=null?he:FE(X);!J&&(Math.abs(dn)>1||Math.abs(Er)>1)&&Z(Math.abs(dn)>Math.abs(Er)?"x":"y");let xr={x:0,y:0};J==="y"?(St.includes("top")||St.includes("bottom"))&&(St.includes("top")&&Er<0||St.includes("bottom")&&Er>0)&&(xr.y=Er):J==="x"&&(St.includes("left")||St.includes("right"))&&(St.includes("left")&&dn<0||St.includes("right")&&dn>0)&&(xr.x=dn),(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&fi(!0),(Et=cn.current)==null||Et.style.setProperty("--swipe-amount-x",`${xr.x}px`),(xt=cn.current)==null||xt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}}
72,Jy&&!d.jsx?I.createElement("button",{"aria-label":G,"data-disabled":wl,"data-close-button":!0,onClick:wl||!Vn?()=>{}:()=>{var H;br(),(H=d.onDismiss)==null||H.call(d,d)},className:Tt(R==null?void 0:R.closeButton,(s=d==null?void 0:d.classNames)==null?void 0:s.closeButton)},(o=$==null?void 0:$.close)!=null?o:kE):null,d.jsx||_.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:I.createElement(I.Fragment,null,pt||d.icon||d.promise?I.createElement("div",{"data-icon":"",className:Tt(R==null?void 0:R.icon,(i=d==null?void 0:d.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||e0():null,d.type!=="loading"?d.icon||($==null?void 0:$[pt])||yE(pt):null):null,I.createElement("div",{"data-content":"",className:Tt(R==null?void 0:R.content,(a=d==null?void 0:d.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Tt(R==null?void 0:R.title,(l=d==null?void 0:d.classNames)==null?void 0:l.title)},typeof d.title=="function"?d.title():d.title),d.description?I.createElement("div",{"data-description":"",className:Tt(W,Qy,R==null?void 0:R.description,(u=d==null?void 0:d.classNames)==null?void 0:u.description)},typeof d.description=="function"?d.description():d.description):null),_.isValidElement(d.cancel)?d.cancel:d.cancel&&Li(d.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||j,onClick:H=>{var ie,he;Li(d.cancel)&&Vn&&((he=(ie=d.cancel).onClick)==null||he.call(ie,H),br())},className:Tt(R==null?void 0:R.cancelButton,(c=d==null?void 0:d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,_.isValidElement(d.action)?d.action:d.action&&Li(d.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||B,onClick:H=>{var ie,he;Li(d.action)&&((he=(ie=d.action).onClick)==null||he.call(ie,H),!H.defaultPrevented&&br())},className:Tt(R==null?void 0:R.actionButton,(h=d==null?void 0:d.classNames)==null?void 0:h.actionButton)},d.action.label):null))};function Rf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function VE(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?$E:LE;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${i}-${u}`]=a:r[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var WE=_.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:h,duration:f,style:d,visibleToasts:y=NE,toastOptions:v,dir:w=Rf(),gap:g=UE,loadingIcon:p,icons:m,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=e,[S,k]=I.useState([]),P=I.useMemo(()=>Array.from(new Set([n].concat(S.filter(M=>M.position).map(M=>M.position)))),[S,n]),[A,j]=I.useState([]),[B,L]=I.useState(!1),[W,N]=I.useState(!1),[X,V]=I.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=I.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=I.useRef(null),$=I.useRef(!1),G=I.useCallback(M=>{k(J=>{var Z;return(Z=J.find(xe=>xe.id===M.id))!=null&&Z.delete||Je.dismiss(M.id),J.filter(({id:xe})=>xe!==M.id)})},[]);return I.useEffect(()=>Je.subscribe(M=>{if(M.dismiss){k(J=>J.map(Z=>Z.id===M.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{Kg.flushSync(()=>{k(J=>{let Z=J.findIndex(xe=>xe.id===M.id);return Z!==-1?[...J.slice(0,Z),{...J[Z],...M},...J.slice(Z+1)]:[M,...J]})})})}),[]),I.useEffect(()=>{if(c!=="system"){V(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:J})=>{V(J?"dark":"light")})}catch{M.addListener(({matches:Z})=>{try{V(Z?"dark":"light")}catch(xe){console.error(xe)}})}},[c]),I.useEffect(()=>{S.length<=1&&L(!1)},[S]),I.useEffect(()=>{let M=J=>{var Z,xe;s.every(De=>J[De]||J.code===De)&&(L(!0),(Z=K.current)==null||Z.focus()),J.code==="Escape"&&(document.activeElement===K.current||(xe=K.current)!=null&&xe.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[s]),I.useEffect(()=>{if(K.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,$.current=!1)}},[K.current]),I.createElement("section",{ref:t,"aria-label":`${b} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((M,J)=>{var Z;let[xe,De]=M.split("-");return S.length?I.createElement("ol",{key:M,dir:w==="auto"?Rf():w,tabIndex:-1,ref:K,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":xe,"data-lifted":B&&S.length>1&&!o,"data-x-position":De,style:{"--front-toast-height":`${((Z=A[0])==null?void 0:Z.height)||0}px`,"--width":`${DE}px`,"--gap":`${g}px`,...d,...VE(l,u)},onBlur:ne=>{$.current&&!ne.currentTarget.contains(ne.relatedTarget)&&($.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||$.current||($.current=!0,R.current=ne.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{W||L(!1)},onDragEnd:()=>L(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},S.filter(ne=>!ne.position&&J===0||ne.position===M).map((ne,zn)=>{var yr,un;return I.createElement(BE,{key:ne.id,icons:m,index:zn,toast:ne,defaultRichColors:h,duration:(yr=v==null?void 0:v.duration)!=null?yr:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:y,closeButton:(un=v==null?void 0:v.closeButton)!=null?un:i,interacting:W,position:M,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:G,toasts:S.filter(wr=>wr.position==ne.position),heights:A.filter(wr=>wr.position==ne.position),setHeights:j,expandByDefault:o,gap:g,loadingIcon:p,expanded:B,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const HE=({...e})=>{const{theme:t="system"}=vE();return x.jsx(WE,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var qE=$c[" useId ".trim().toString()]||(()=>{}),KE=0;function GE(e){const[t,r]=_.useState(qE());return fr(()=>{r(n=>n??String(KE++))},[e]),t?`radix-${t}`:""}const QE=["top","right","bottom","left"],en=Math.min,ot=Math.max,Pa=Math.round,$i=Math.floor,Yt=e=>({x:e,y:e}
vendor: 9,256 bytes, line 72
72),JE={left:"right",right:"left",bottom:"top",top:"bottom"},YE={start:"end",end:"start"};function uc(e,t,r){return ot(e,en(t,r))}function pr(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function Hs(e){return e.split("-")[1]}function jd(e){return e==="x"?"y":"x"}function Nd(e){return e==="y"?"height":"width"}const XE=new Set(["top","bottom"]);function Gt(e){return XE.has(mr(e))?"y":"x"}function Ld(e){return jd(Gt(e))}function ZE(e,t,r){r===void 0&&(r=!1);const n=Hs(e),s=Ld(e),o=Nd(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ra(i)),[i,Ra(i)]}function ex(e){const t=Ra(e);return[cc(e),t,cc(t)]}function cc(e){return e.replace(/start|end/g,t=>YE[t])}const Of=["left","right"],Af=["right","left"],tx=["top","bottom"],rx=["bottom","top"];function nx(e,t,r){switch(e){case"top":case"bottom":return r?t?Af:Of:t?Of:Af;case"left":case"right":return t?tx:rx;default:return[]}}function sx(e,t,r,n){const s=Hs(e);let o=nx(mr(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(cc)))),o}function Ra(e){return e.replace(/left|right|bottom|top/g,t=>JE[t])}function ox(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dv(e){return typeof e!="number"?ox(e):{top:e,right:e,bottom:e,left:e}}function Oa(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function If(e,t,r){let{reference:n,floating:s}=e;const o=Gt(t),i=Ld(t),a=Nd(i),l=mr(t),u=o==="y",c=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let d;switch(l){case"top":d={x:c,y:n.y-s.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:h};break;case"left":d={x:n.x-s.width,y:h};break;default:d={x:n.x,y:n.y}}switch(Hs(t)){case"start":d[i]-=f*(r&&u?-1:1);break;case"end":d[i]+=f*(r&&u?-1:1);break}return d}const ix=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:h}=If(u,n,l),f=n,d={},y=0;for(let v=0;v<a.length;v++){const{name:w,fn:g}=a[v],{x:p,y:m,data:b,reset:E}=await g({x:c,y:h,initialPlacement:n,placement:f,strategy:s,middlewareData:d,rects:u,platform:i,elements:{reference:e,floating:t}});c=p??c,h=m??h,d={...d,[w]:{...d[w],...b}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:c,y:h}=If(u,f,l)),v=-1)}return{x:c,y:h,placement:f,strategy:s,middlewareData:d}};async function Bo(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:f=!1,padding:d=0}=pr(t,e),y=Dv(d),w=a[f?h==="floating"?"reference":"floating":h],g=Oa(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),p=h==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,m=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),b=await(o.isElement==null?void 0:o.isElement(m))?await(o.getScale==null?void 0:o.getScale(m))||{x:1,y:1}:{x:1,y:1},E=Oa(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:m,strategy:l}):p);return{top:(g.top-E.top+y.top)/b.y,bottom:(E.bottom-g.bottom+y.bottom)/b.y,left:(g.left-E.left+y.left)/b.x,right:(E.right-g.right+y.right)/b.x}}const ax=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=pr(e,t)||{};if(u==null)return{};const h=Dv(c),f={x:r,y:n},d=Ld(s),y=Nd(d),v=await i.getDimensions(u),w=d==="y",g=w?"top":"left",p=w?"bottom":"right",m=w?"clientHeight":"clientWidth",b=o.reference[y]+o.reference[d]-f[d]-o.floating[y],E=f[d]-o.reference[d],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let k=S?S[m]:0;(!k||!await(i.isElement==null?void 0:i.isElement(S)))&&(k=a.floating[m]||o.floating[y]);const P=b/2-E/2,A=k/2-v[y]/2-1,j=en(h[g],A),B=en(h[p],A),L=j,W=k-v[y]-B,N=k/2-v[y]/2+P,X=uc(L,N,W),V=!l.arrow&&Hs(s)!=null&&N!==X&&o.reference[y]/2-(N<L?j:B)-v[y]/2<0,K=V?N<L?N-L:N-W:0;return{[d]:f[d]+K,data:{[d]:X,centerOffset:N-X-K,...V&&{alignmentOffset:K}},reset:V}}}),lx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...w}=pr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const g=mr(s),p=Gt(a),m=mr(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=f||(m||!v?[Ra(a)]:ex(a)),S=y!=="none";!f&&S&&E.push(...sx(a,v,y,b));const k=[a,...E],P=await Bo(t,w),A=[];let j=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&A.push(P[g]),h){const N=ZE(s,i,b);A.push(P[N[0]],P[N[1]])}if(j=[...j,{placement:s,overflows:A}],!A.every(N=>N<=0)){var B,L;const N=(((B=o.flip)==null?void 0:B.index)||0)+1,X=k[N];if(X&&(!(h==="alignment"?p!==Gt(X):!1)||j.every(C=>C.overflows[0]>0&&Gt(C.placement)===p)))return{data:{index:N,overflows:j},reset:{placement:X}};let V=(L=j.filter(K=>K.overflows[0]<=0).sort((K,C)=>K.overflows[1]-C.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(d){case"bestFit":{var W;const K=(W=j.filter(C=>{if(S){const R=Gt(C.placement);return R===p||R==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(R=>R>0).reduce((R,$)=>R+$,0)]).sort((C,R)=>C[1]-R[1])[0])==null?void 0:W[0];K&&(V=K);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function jf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nf(e){return QE.some(t=>e[t]>=0)}const ux=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=pr(e,t);switch(n){case"referenceHidden":{const o=await Bo(t,{...s,elementContext:"reference"}),i=jf(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Nf(i)}}}case"escaped":{const o=await Bo(t,{...s,altBoundary:!0}),i=jf(o,r.floating);return{data:{escapedOffsets:i,escaped:Nf(i)}}}default:return{}}}}},Uv=new Set(["left","top"]);async function cx(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=mr(r),a=Hs(r),l=Gt(r)==="y",u=Uv.has(i)?-1:1,c=o&&l?-1:1,h=pr(t,e);let{mainAxis:f,crossAxis:d,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof y=="number"&&(d=a==="end"?y*-1:y),l?{x:d*c,y:f*u}:{x:f*u,y:d*c}}const dx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await cx(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},hx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:g,y:p}=w;return{x:g,y:p}}},...l}=pr(e,t),u={x:r,y:n},c=await Bo(t,l),h=Gt(mr(s)),f=jd(h);let d=u[f],y=u[h];if(o){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",p=d+c[w],m=d-c[g];d=uc(p,d,m)}if(i){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",p=y+c[w],m=y-c[g];y=uc(p,y,m)}const v=a.fn({...t,[f]:d,[h]:y});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[h]:i}}}}}},fx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=pr(e,t),c={x:r,y:n},h=Gt(s),f=jd(h);let d=c[f],y=c[h];const v=pr(a,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const m=f==="y"?"height":"width",b=o.reference[f]-o.floating[m]+w.mainAxis,E=o.reference[f]+o.reference[m]-w.mainAxis;d<b?d=b:d>E&&(d=E)}if(u){var g,p;const m=f==="y"?"width":"height",b=Uv.has(mr(s)),E=o.reference[h]-o.floating[m]+(b&&((g=i.offset)==null?void 0:g[h])||0)+(b?0:w.crossAxis),S=o.reference[h]+o.reference[m]+(b?0:((p=i.offset)==null?void 0:p[h])||0)-(b?w.crossAxis:0);y<E?y=E:y>S&&(y=S)}return{[f]:d,[h]:y}}}},px=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...u}=pr(e,t),c=await Bo(t,u),h=mr(s),f=Hs(s),d=Gt(s)==="y",{width:y,height:v}=o.floating;let w,g;h==="top"||h==="bottom"?(w=h,g=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=h,w=f==="end"?"top":"bottom");const p=v-c.top-c.bottom,m=y-c.left-c.right,b=en(v-c[w],p),E=en(y-c[g],m),S=!t.middlewareData.shift;let k=b,P=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=m),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=p),S&&
vendor: 5,211 bytes, line 72
72!f){const j=ot(c.left,0),B=ot(c.right,0),L=ot(c.top,0),W=ot(c.bottom,0);d?P=y-2*(j!==0||B!==0?j+B:ot(c.left,c.right)):k=v-2*(L!==0||W!==0?L+W:ot(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:k});const A=await i.getDimensions(a.floating);return y!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function nl(){return typeof window<"u"}function qs(e){return Mv(e)?(e.nodeName||"").toLowerCase():"#document"}function ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zt(e){var t;return(t=(Mv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mv(e){return nl()?e instanceof Node||e instanceof ct(e).Node:!1}function zt(e){return nl()?e instanceof Element||e instanceof ct(e).Element:!1}function Xt(e){return nl()?e instanceof HTMLElement||e instanceof ct(e).HTMLElement:!1}function Lf(e){return!nl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ct(e).ShadowRoot}const mx=new Set(["inline","contents"]);function ci(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!mx.has(s)}const gx=new Set(["table","td","th"]);function vx(e){return gx.has(qs(e))}const yx=[":popover-open",":modal"];function sl(e){return yx.some(t=>{try{return e.matches(t)}catch{return!1}})}const wx=["transform","translate","scale","rotate","perspective"],_x=["transform","translate","scale","rotate","perspective","filter"],bx=["paint","layout","strict","content"];function $d(e){const t=Dd(),r=zt(e)?Ft(e):e;return wx.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||_x.some(n=>(r.willChange||"").includes(n))||bx.some(n=>(r.contain||"").includes(n))}function Ex(e){let t=tn(e);for(;Xt(t)&&!Ms(t);){if($d(t))return t;if(sl(t))return null;t=tn(t)}return null}function Dd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xx=new Set(["html","body","#document"]);function Ms(e){return xx.has(qs(e))}function Ft(e){return ct(e).getComputedStyle(e)}function ol(e){return zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tn(e){if(qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lf(e)&&e.host||Zt(e);return Lf(t)?t.host:t}function zv(e){const t=tn(e);return Ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xt(t)&&ci(t)?t:zv(t)}function Vo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=zv(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=ct(s);if(o){const a=dc(i);return t.concat(i,i.visualViewport||[],ci(s)?s:[],a&&r?Vo(a):[])}return t.concat(s,Vo(s,[],r))}function dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fv(e){const t=Ft(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Xt(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=Pa(r)!==o||Pa(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function Ud(e){return zt(e)?e:e.contextElement}function Es(e){const t=Ud(e);if(!Xt(t))return Yt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Fv(t);let i=(o?Pa(r.width):r.width)/n,a=(o?Pa(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Sx=Yt(0);function Bv(e){const t=ct(e);return!Dd()||!t.visualViewport?Sx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ct(e)?!1:t}function $n(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Ud(e);let i=Yt(1);t&&(n?zt(n)&&(i=Es(n)):i=Es(e));const a=kx(o,r,n)?Bv(o):Yt(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,c=s.width/i.x,h=s.height/i.y;if(o){const f=ct(o),d=n&&zt(n)?ct(n):n;let y=f,v=dc(y);for(;v&&n&&d!==y;){const w=Es(v),g=v.getBoundingClientRect(),p=Ft(v),m=g.left+(v.clientLeft+parseFloat(p.paddingLeft))*w.x,b=g.top+(v.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,h*=w.y,l+=m,u+=b,y=ct(v),v=dc(y)}}return Oa({width:c,height:h,x:l,y:u})}function Md(e,t){const r=ol(e).scrollLeft;return t?t.left+r:$n(Zt(e)).left+r}function Vv(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Md(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function Tx(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=Zt(n),a=t?sl(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=Yt(1);const c=Yt(0),h=Xt(n);if((h||!h&&!o)&&((qs(n)!=="body"||ci(i))&&(l=ol(n)),Xt(n))){const d=$n(n);u=Es(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}const f=i&&!h&&!o?Vv(i,l,!0):Yt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Cx(e){return Array.from(e.getClientRects())}function Px(e){const t=Zt(e),r=ol(e),n=e.ownerDocument.body,s=ot(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ot(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Md(e);const a=-r.scrollTop;return Ft(n).direction==="rtl"&&(i+=ot(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}
vendor: 13,522 bytes, line 72
72function Rx(e,t){const r=ct(e),n=Zt(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=Dd();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const Ox=new Set(["absolute","fixed"]);function Ax(e,t){const r=$n(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Xt(e)?Es(e):Yt(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function $f(e,t,r){let n;if(t==="viewport")n=Rx(e,r);else if(t==="document")n=Px(Zt(e));else if(zt(t))n=Ax(t,r);else{const s=Bv(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Oa(n)}function Wv(e,t){const r=tn(e);return r===t||!zt(r)||Ms(r)?!1:Ft(r).position==="fixed"||Wv(r,t)}function Ix(e,t){const r=t.get(e);if(r)return r;let n=Vo(e,[],!1).filter(a=>zt(a)&&qs(a)!=="body"),s=null;const o=Ft(e).position==="fixed";let i=o?tn(e):e;for(;zt(i)&&!Ms(i);){const a=Ft(i),l=$d(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&Ox.has(s.position)||ci(i)&&!l&&Wv(e,i))?n=n.filter(c=>c!==i):s=a,i=tn(i)}return t.set(e,n),n}function jx(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?sl(t)?[]:Ix(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((u,c)=>{const h=$f(t,c,s);return u.top=ot(h.top,u.top),u.right=en(h.right,u.right),u.bottom=en(h.bottom,u.bottom),u.left=ot(h.left,u.left),u},$f(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Nx(e){const{width:t,height:r}=Fv(e);return{width:t,height:r}}function Lx(e,t,r){const n=Xt(t),s=Zt(t),o=r==="fixed",i=$n(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Yt(0);function u(){l.x=Md(s)}if(n||!n&&!o)if((qs(t)!=="body"||ci(s))&&(a=ol(t)),n){const d=$n(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&u();o&&!n&&s&&u();const c=s&&!n&&!o?Vv(s,a):Yt(0),h=i.left+a.scrollLeft-l.x-c.x,f=i.top+a.scrollTop-l.y-c.y;return{x:h,y:f,width:i.width,height:i.height}}function Yl(e){return Ft(e).position==="static"}function Df(e,t){if(!Xt(e)||Ft(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Zt(e)===r&&(r=r.ownerDocument.body),r}function Hv(e,t){const r=ct(e);if(sl(e))return r;if(!Xt(e)){let s=tn(e);for(;s&&!Ms(s);){if(zt(s)&&!Yl(s))return s;s=tn(s)}return r}let n=Df(e,t);for(;n&&vx(n)&&Yl(n);)n=Df(n,t);return n&&Ms(n)&&Yl(n)&&!$d(n)?r:n||Ex(e)||r}const $x=async function(e){const t=this.getOffsetParent||Hv,r=this.getDimensions,n=await r(e.floating);return{reference:Lx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Dx(e){return Ft(e).direction==="rtl"}const Ux={convertOffsetParentRelativeRectToViewportRelativeRect:Tx,getDocumentElement:Zt,getClippingRect:jx,getOffsetParent:Hv,getElementRects:$x,getClientRects:Cx,getDimensions:Nx,getScale:Es,isElement:zt,isRTL:Dx};function qv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mx(e,t){let r=null,n;const s=Zt(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:h,width:f,height:d}=u;if(a||t(),!f||!d)return;const y=$i(h),v=$i(s.clientWidth-(c+f)),w=$i(s.clientHeight-(h+d)),g=$i(c),m={rootMargin:-y+"px "+-v+"px "+-w+"px "+-g+"px",threshold:ot(0,en(1,l))||1};let b=!0;function E(S){const k=S[0].intersectionRatio;if(k!==l){if(!b)return i();k?i(!1,k):n=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!qv(u,e.getBoundingClientRect())&&i(),b=!1}try{r=new IntersectionObserver(E,{...m,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,m)}r.observe(e)}return i(!0),o}function zx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ud(e),c=s||o?[...u?Vo(u):[],...Vo(t)]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});const h=u&&a?Mx(u,r):null;let f=-1,d=null;i&&(d=new ResizeObserver(g=>{let[p]=g;p&&p.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var m;(m=d)==null||m.observe(t)})),r()}),u&&!l&&d.observe(u),d.observe(t));let y,v=l?$n(e):null;l&&w();function w(){const g=$n(e);v&&!qv(v,g)&&r(),v=g,y=requestAnimationFrame(w)}return r(),()=>{var g;c.forEach(p=>{s&&p.removeEventListener("scroll",r),o&&p.removeEventListener("resize",r)}),h==null||h(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(y)}}const Fx=dx,Bx=hx,Vx=lx,Wx=px,Hx=ux,Uf=ax,qx=fx,Kx=(e,t,r)=>{const n=new Map,s={platform:Ux,...r},o={...s.platform,_c:n};return ix(e,t,{...s,platform:o})};var Gx=typeof document<"u",Qx=function(){},ra=Gx?_.useLayoutEffect:Qx;function Aa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Aa(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!Aa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Kv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mf(e,t){const r=Kv(e);return Math.round(t*r)/r}function Xl(e){const t=_.useRef(e);return ra(()=>{t.current=e}),t}function Jx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,h]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,d]=_.useState(n);Aa(f,n)||d(n);const[y,v]=_.useState(null),[w,g]=_.useState(null),p=_.useCallback(C=>{C!==S.current&&(S.current=C,v(C))},[]),m=_.useCallback(C=>{C!==k.current&&(k.current=C,g(C))},[]),b=o||y,E=i||w,S=_.useRef(null),k=_.useRef(null),P=_.useRef(c),A=l!=null,j=Xl(l),B=Xl(s),L=Xl(u),W=_.useCallback(()=>{if(!S.current||!k.current)return;const C={placement:t,strategy:r,middleware:f};B.current&&(C.platform=B.current),Kx(S.current,k.current,C).then(R=>{const $={...R,isPositioned:L.current!==!1};N.current&&!Aa(P.current,$)&&(P.current=$,li.flushSync(()=>{h($)}))})},[f,t,r,B,L]);ra(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[u]);const N=_.useRef(!1);ra(()=>(N.current=!0,()=>{N.current=!1}),[]),ra(()=>{if(b&&(S.current=b),E&&(k.current=E),b&&E){if(j.current)return j.current(b,E,W);W()}},[b,E,W,j,A]);const X=_.useMemo(()=>({reference:S,floating:k,setReference:p,setFloating:m}),[p,m]),V=_.useMemo(()=>({reference:b,floating:E}),[b,E]),K=_.useMemo(()=>{const C={position:r,left:0,top:0};if(!V.floating)return C;const R=Mf(V.floating,c.x),$=Mf(V.floating,c.y);return a?{...C,transform:"translate("+R+"px, "+$+"px)",...Kv(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:$}},[r,a,V.floating,c.x,c.y]);return _.useMemo(()=>({...c,update:W,refs:X,elements:V,floatingStyles:K}),[c,W,X,V,K])}const Yx=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Uf({element:n.current,padding:s}).fn(r):{}:n?Uf({element:n,padding:s}).fn(r):{}}}},Xx=(e,t)=>({...Fx(e),options:[e,t]}),Zx=(e,t)=>({...Bx(e),options:[e,t]}),eS=(e,t)=>({...qx(e),options:[e,t]}),tS=(e,t)=>({...Vx(e),options:[e,t]}),rS=(e,t)=>({...Wx(e),options:[e,t]}),nS=(e,t)=>({...Hx(e),options:[e,t]}),sS=(e,t)=>({...Yx(e),options:[e,t]});var oS="Arrow",Gv=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return x.jsx(rt.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gv.displayName=oS;var iS=Gv;function aS(e){const[t,r]=_.useState(void 0);return fr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var zd="Popper",[Qv,Jv]=el(zd),[lS,Yv]=Qv(zd),Xv=e=>{const{__scopePopper:t,children:r}=e,[n,s]=_.useState(null);return x.jsx(lS,{scope:t,anchor:n,onAnchorChange:s,children:r})};Xv.displayName=zd;var Zv="PopperAnchor",ey=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Yv(Zv,r),i=_.useRef(null),a=Mt(t,i);return _.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:x.jsx(rt.div,{...s,ref:a})});ey.displayName=Zv;var Fd="PopperContent",[uS,cS]=Qv(Fd),ty=_.forwardRef((e,t)=>{var ne,zn,yr,un,wr,Fn;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:d="optimized",onPlaced:y,...v}=e,w=Yv(Fd,r),[g,p]=_.useState(null),m=Mt(t,_r=>p(_r)),[b,E]=_.useState(null),S=aS(b),k=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,A=n+(o!=="center"?"-"+o:""),j=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},B=Array.isArray(u)?u:[u],L=B.length>0,W={padding:j,boundary:B.filter(hS),altBoundary:L},{refs:N,floatingStyles:X,placement:V,isPositioned:K,middlewareData:C}=Jx({strategy:"fixed",placement:A,whileElementsMounted:(..._r)=>zx(..._r,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Xx({mainAxis:s+P,alignmentAxis:i}),l&&Zx({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?eS():void 0,...W}),l&&tS({...W}),rS({...W,apply:({elements:_r,rects:hi,availableWidth:gl,availableHeight:fi})=>{const{width:vl,height:Qs}=hi.reference,Bn=_r.floating.style;Bn.setProperty("--radix-popper-available-width",`${gl}px`),Bn.setProperty("--radix-popper-available-height",`${fi}px`),Bn.setProperty("--radix-popper-anchor-width",`${vl}px`),Bn.setProperty("--radix-popper-anchor-height",`${Qs}px`)}}),b&&sS({element:b,padding:a}),fS({arrowWidth:k,arrowHeight:P}),f&&nS({strategy:"referenceHidden",...W})]}),[R,$]=sy(V),G=Zr(y);fr(()=>{K&&(G==null||G())},[K,G]);const M=(ne=C.arrow)==null?void 0:ne.x,J=(zn=C.arrow)==null?void 0:zn.y,Z=((yr=C.arrow)==null?void 0:yr.centerOffset)!==0,[xe,De]=_.useState();return fr(()=>{g&&De(window.getComputedStyle(g).zIndex)},[g]),x.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(un=C.transformOrigin)==null?void 0:un.x,(wr=C.transformOrigin)==null?void 0:wr.y].join(" "),...((Fn=C.hide)==null?void 0:Fn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(uS,{scope:r,placedSide:R,onArrowChange:E,arrowX:M,arrowY:J,shouldHideArrow:Z,children:x.jsx(rt.div,{"data-side":R,"data-align":$,...v,ref:m,style:{...v.style,animation:K?void 0:"none"}})})})});ty.displayName=Fd;var ry="PopperArrow",dS={top:"bottom",right:"left",bottom:"top",left:"right"},ny=_.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=cS(ry,n),i=dS[o.placedSide];return x.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:x.jsx(iS,{...s,ref:r,style:{...s.style,display:"block"}})})});ny.displayName=ry;function hS(e){return e!==null}var fS=e=>({name:"transformOrigin",options:e,fn(t){var w,g,p;const{placement:r,rects:n,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=sy(r),h={start:"0%",center:"50%",end:"100%"}[c],f=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,d=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let y="",v="";return u==="bottom"?(y=i?h:`${f}px`,v=`${-l}px`):u==="top"?(y=i?h:`${f}px`,v=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,v=i?h:`${d}px`):u==="left"&&(y=`${n.floating.width+l}px`,v=i?h:`${d}px`),{data:{x:y,y:v}}}});function sy(e){const[t,r="center"]=e.split("-");return[t,r]}var pS=Xv,mS=ey,gS=ty,vS=ny,[il,IP]=el("Tooltip",[Jv]),al=Jv(),oy="TooltipProvider",yS=700,hc="tooltip.open",[wS,Bd]=il(oy),iy=e=>{const{__scopeTooltip:t,delayDuration:r=yS,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=_.useRef(!0),a=_.useRef(!1),l=_.useRef(0);return _.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(wS,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:_.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:_.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:o})};iy.displayName=oy;var Wo="Tooltip",[_S,ll]=il(Wo),ay=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:i,delayDuration:a}
vendor: 4,734 bytes, line 72
72=e,l=Bd(Wo,e.__scopeTooltip),u=al(t),[c,h]=_.useState(null),f=GE(),d=_.useRef(0),y=i??l.disableHoverableContent,v=a??l.delayDuration,w=_.useRef(!1),[g,p]=rv({prop:n,defaultProp:s??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(hc))):l.onClose(),o==null||o(k)},caller:Wo}),m=_.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),b=_.useCallback(()=>{window.clearTimeout(d.current),d.current=0,w.current=!1,p(!0)},[p]),E=_.useCallback(()=>{window.clearTimeout(d.current),d.current=0,p(!1)},[p]),S=_.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{w.current=!0,p(!0),d.current=0},v)},[v,p]);return _.useEffect(()=>()=>{d.current&&(window.clearTimeout(d.current),d.current=0)},[]),x.jsx(pS,{...u,children:x.jsx(_S,{scope:t,contentId:f,open:g,stateAttribute:m,trigger:c,onTriggerChange:h,onTriggerEnter:_.useCallback(()=>{l.isOpenDelayedRef.current?S():b()},[l.isOpenDelayedRef,S,b]),onTriggerLeave:_.useCallback(()=>{y?E():(window.clearTimeout(d.current),d.current=0)},[E,y]),onOpen:b,onClose:E,disableHoverableContent:y,children:r})})};ay.displayName=Wo;var fc="TooltipTrigger",ly=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=ll(fc,r),o=Bd(fc,r),i=al(r),a=_.useRef(null),l=Mt(t,a,s.onTriggerChange),u=_.useRef(!1),c=_.useRef(!1),h=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),x.jsx(mS,{asChild:!0,...i,children:x.jsx(rt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Pe(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Pe(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Pe(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Pe(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:Pe(e.onBlur,s.onClose),onClick:Pe(e.onClick,s.onClose)})})});ly.displayName=fc;var bS="TooltipPortal",[jP,ES]=il(bS,{forceMount:void 0}),zs="TooltipContent",uy=_.forwardRef((e,t)=>{const r=ES(zs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=ll(zs,e.__scopeTooltip);return x.jsx(Pd,{present:n||i.open,children:i.disableHoverableContent?x.jsx(cy,{side:s,...o,ref:t}):x.jsx(xS,{side:s,...o,ref:t})})}),xS=_.forwardRef((e,t)=>{const r=ll(zs,e.__scopeTooltip),n=Bd(zs,e.__scopeTooltip),s=_.useRef(null),o=Mt(t,s),[i,a]=_.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:h}=n,f=_.useCallback(()=>{a(null),h(!1)},[h]),d=_.useCallback((y,v)=>{const w=y.currentTarget,g={x:y.clientX,y:y.clientY},p=PS(g,w.getBoundingClientRect()),m=RS(g,p),b=OS(v.getBoundingClientRect()),E=IS([...m,...b]);a(E),h(!0)},[h]);return _.useEffect(()=>()=>f(),[f]),_.useEffect(()=>{if(l&&c){const y=w=>d(w,c),v=w=>d(w,l);return l.addEventListener("pointerleave",y),c.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),c.removeEventListener("pointerleave",v)}}},[l,c,d,f]),_.useEffect(()=>{if(i){const y=v=>{const w=v.target,g={x:v.clientX,y:v.clientY},p=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),m=!AS(g,i);p?f():m&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,c,i,u,f]),x.jsx(cy,{...e,ref:o})}),[SS,kS]=il(Wo,{isInside:!1}),TS=U_("TooltipContent"),cy=_.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=ll(zs,r),u=al(r),{onClose:c}=l;return _.useEffect(()=>(document.addEventListener(hc,c),()=>document.removeEventListener(hc,c)),[c]),_.useEffect(()=>{if(l.trigger){const h=f=>{const d=f.target;d!=null&&d.contains(l.trigger)&&c()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,c]),x.jsx(Cd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:c,children:x.jsxs(gS,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(TS,{children:n}),x.jsx(SS,{scope:r,isInside:!0,children:x.jsx(lb,{id:l.contentId,role:"tooltip",children:s||n})})]})})});uy.displayName=zs;var dy="TooltipArrow",CS=_.forwardRef((e,t)=>
72{const{__scopeTooltip:r,...n}=e,s=al(r);return kS(dy,r).isInside?null:x.jsx(vS,{...s,...n,ref:t})});CS.displayName=dy;function PS(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function RS(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function OS(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function AS(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],u=a.x,c=a.y,h=l.x,f=l.y;c>n!=f>n&&r<(h-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function IS(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),jS(t)}function jS(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var NS=iy,LS=ay,$S=ly,hy=uy;const DS=NS,NP=LS,LP=$S,US=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>x.jsx(hy,{ref:n,sideOffset:t,className:on("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));US.displayName=hy.displayName;var ul=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},cl=typeof window>"u"||"Deno"in globalThis;function Rt(){}function MS(e,t){return typeof e=="function"?e(t):e}function zS(e){return typeof e=="number"&&e>=0&&e!==1/0}function FS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pc(e,t){return typeof e=="function"?e(t):e}function BS(e,t){return typeof e=="function"?e(t):e}function zf(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==Vd(i,t.options))return!1}else if(!qo(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function Ff(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ho(t.options.mutationKey)!==Ho(o))return!1}else if(!qo(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Vd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ho)(e)}function Ho(e){return JSON.stringify(e,(t,r)=>mc(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function qo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>qo(e[r],t[r])):!1}function fy(e,t){if(e===t)return e;const r=Bf(e)&&Bf(t);if(r||mc(e)&&mc(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<i;c++){const h=r?c:o[c];(!r&&l.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,u++):(a[h]=fy(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&u++)}return s===i&&u===s?e:a}return t}function Bf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mc(e){if(!Vf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Vf(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vf(e){return Object.prototype.toString.call(e)==="[object Object]"}function VS(e){return new Promise(t=>{setTimeout(t,e)})}function WS(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?fy(e,t):t}function HS(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function qS(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Wd=Symbol();function py(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Wd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var xn,Nr,Ss,Tp,KS=(Tp=class extends ul{constructor(){super();re(this,xn);re(this,Nr);re(this,Ss);q(this,Ss,t=>{if(!cl&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,Nr)||this.setEventListener(T(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Nr))==null||t.call(this),q(this,Nr,void 0))}setEventListener(t){var r;
vendor: 4,800 bytes, line 72
72q(this,Ss,t),(r=T(this,Nr))==null||r.call(this),q(this,Nr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){T(this,xn)!==t&&(q(this,xn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof T(this,xn)=="boolean"?T(this,xn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},xn=new WeakMap,Nr=new WeakMap,Ss=new WeakMap,Tp),my=new KS,ks,Lr,Ts,Cp,GS=(Cp=class extends ul{constructor(){super();re(this,ks,!0);re(this,Lr);re(this,Ts);q(this,Ts,t=>{if(!cl&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){T(this,Lr)||this.setEventListener(T(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Lr))==null||t.call(this),q(this,Lr,void 0))}setEventListener(t){var r;q(this,Ts,t),(r=T(this,Lr))==null||r.call(this),q(this,Lr,t(this.setOnline.bind(this)))}setOnline(t){T(this,ks)!==t&&(q(this,ks,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return T(this,ks)}},ks=new WeakMap,Lr=new WeakMap,Ts=new WeakMap,Cp),Ia=new GS;function QS(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function JS(e){return Math.min(1e3*2**e,3e4)}function gy(e){return(e??"online")==="online"?Ia.isOnline():!0}var vy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zl(e){return e instanceof vy}function yy(e){let t=!1,r=0,n=!1,s;const o=QS(),i=v=>{var w;n||(f(new vy(v)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>my.isFocused()&&(e.networkMode==="always"||Ia.isOnline())&&e.canRun(),c=()=>gy(e.networkMode)&&e.canRun(),h=v=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,v),s==null||s(),o.resolve(v))},f=v=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,v),s==null||s(),o.reject(v))},d=()=>new Promise(v=>{var w;s=g=>{(n||u())&&v(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;s=void 0,n||(v=e.onContinue)==null||v.call(e)}),y=()=>{if(n)return;let v;const w=r===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(g){v=Promise.reject(g)}Promise.resolve(v).then(h).catch(g=>{var S;if(n)return;const p=e.retry??(cl?0:3),m=e.retryDelay??JS,b=typeof m=="function"?m(r,g):m,E=p===!0||typeof p=="number"&&r<p||typeof p=="function"&&p(r,g);if(t||!E){f(g);return}r++,(S=e.onFail)==null||S.call(e,r,g),VS(b).then(()=>u()?void 0:d()).then(()=>{t?f(g):y()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():d().then(y),o)}}var YS=e=>setTimeout(e,0);function XS(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=YS;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var qe=XS(),Sn,Pp,wy=(Pp=class{constructor(){re(this,Sn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zS(this.gcTime)&&q(this,Sn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(cl?1/0:5*60*1e3))}clearGcTimeout(){T(this,Sn)&&(clearTimeout(T(this,Sn)),q(this,Sn,void 0))}},Sn=new WeakMap,Pp),Cs,kn,mt,Tn,Fe,ti,Cn,At,tr,Rp,ZS=(Rp=class extends wy{constructor(t){super();re(this,At);re(this,Cs);re(this,kn);re(this,mt);re(this,Tn);re(this,Fe);re(this,ti);re(this,Cn);q(this,Cn,!1),q(this,ti,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,Tn,t.client),q(this,mt,T(this,Tn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Cs,t1(this.options)),this.state=t.state??T(this,Cs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Fe))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ti),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,mt).remove(this)}setData(t,r){const n=WS(this.state.data,t,this.options);return Ue(this,At,tr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ue(this,At,tr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=T(this,Fe))==null?void 0:n.promise;return(s=T(this,Fe))==null||s.cancel(t),r?r.then(Rt).catch(Rt):Prom
72ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Cs))}isActive(){return this.observers.some(t=>BS(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pc(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!FS(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Fe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Fe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(T(this,Fe)&&(T(this,Cn)?T(this,Fe).cancel({revert:!0}):T(this,Fe).cancelRetry()),this.scheduleGc()),T(this,mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,At,tr).call(this,{type:"invalidate"})}fetch(t,r){var u,c,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(T(this,Fe))return T(this,Fe).continueRetry(),T(this,Fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(q(this,Cn,!0),n.signal)})},o=()=>{const f=py(this.options,r),y=(()=>{const v={client:T(this,Tn),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return q(this,Cn,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,Tn),state:this.state,fetchFn:o};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),q(this,kn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Ue(this,At,tr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=f=>{var d,y,v,w;Zl(f)&&f.silent||Ue(this,At,tr).call(this,{type:"error",error:f}),Zl(f)||((y=(d=T(this,mt).config).onError)==null||y.call(d,f,this),(w=(v=T(this,mt).config).onSettled)==null||w.call(v,this.state.data,f,this)),this.scheduleGc()};return q(this,Fe,yy({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var d,y,v,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(y=(d=T(this,mt).config).onSuccess)==null||y.call(d,f,this),(w=(v=T(this,mt).config).onSettled)==null||w.call(v,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,d)=>{Ue(this,At,tr).call(this,{type:"failed",failureCount:f,error:d})},onPause:()=>{Ue(this,At,tr).call(this,{type:"pause"})},onContinue:()=>{Ue(this,At,tr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,Fe).start()}},Cs=new WeakMap,kn=new WeakMap,mt=new WeakMap,Tn=new WeakMap,Fe=new WeakMap,ti=new WeakMap,Cn=new WeakMap,At=new WeakSet,tr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...e1(n.data,this.options),fetchMeta:t.meta??null};case"success":return q(this,kn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Zl(s)&&s.revert&&T(this,kn)?{...T(this,kn),fetchStatus:"idle"}
vendor: 5,100 bytes, line 72
72:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),T(this,mt).notify({query:this,type:"updated",action:t})})},Rp);function e1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function t1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Wt,Op,r1=(Op=class extends ul{constructor(t={}){super();re(this,Wt);this.config=t,q(this,Wt,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??Vd(s,r);let i=this.get(o);return i||(i=new ZS({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){T(this,Wt).has(t.queryHash)||(T(this,Wt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=T(this,Wt).get(t.queryHash);r&&(t.destroy(),r===t&&T(this,Wt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Wt).get(t)}getAll(){return[...T(this,Wt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>zf(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>zf(t,n)):r}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wt=new WeakMap,Op),Ht,We,Pn,qt,Cr,Ap,n1=(Ap=class extends wy{constructor(t){super();re(this,qt);re(this,Ht);re(this,We);re(this,Pn);this.mutationId=t.mutationId,q(this,We,t.mutationCache),q(this,Ht,[]),this.state=t.state||s1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Ht).includes(t)||(T(this,Ht).push(t),this.clearGcTimeout(),T(this,We).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,Ht,T(this,Ht).filter(r=>r!==t)),this.scheduleGc(),T(this,We).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Ht).length||(this.state.status==="pending"?this.scheduleGc():T(this,We).remove(this))}continue(){var t;return((t=T(this,Pn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,c,h,f,d,y,v,w,g,p,m,b,E,S,k,P;const r=()=>{Ue(this,qt,Cr).call(this,{type:"continue"})};q(this,Pn,yy({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,j)=>{Ue(this,qt,Cr).call(this,{type:"failed",failureCount:A,error:j})},onPause:()=>{Ue(this,qt,Cr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,We).canRun(this)}));const n=this.state.status==="pending",s=!T(this,Pn).canStart();try{if(n)r();else{Ue(this,qt,Cr).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=T(this,We).config).onMutate)==null?void 0:i.call(o,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&Ue(this,qt,Cr).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const A=await T(this,Pn).start();return await((c=(u=T(this,We).config).onSuccess)==null?void 0:c.call(u,A,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,A,t,this.state.context)),await((y=(d=T(this,We).config).onSettled)==null?void 0:y.call(d,A,null,this.state.variables,this.state.context,this)),await((w=(v=this.options).onSettled)==null?void 0:w.call(v,A,null,t,this.state.context)),Ue(this,qt,Cr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((p=(g=T(this,We).config).onError)==null?void 0:p.call(g,A,t,this.state.context,this)),await((b=(m=this.options).onError)==null?void 0:b.call(m,A,t,this.state.context)),await((S=(E=T(this,We).config).onSettled)==null?void 0:S.call(E,void 0,A,this.state.variables,this.state.context,this)),await((P=(k=this.options).onSettled)==null?void 0:P.call(k,void 0,A,t,this.state.context)),A}finally{Ue(this,qt,Cr).call(this,{type:"error",error:A})}}finally{T(this,We).runNext(this)}}},Ht=new WeakMap,We=new WeakMap,Pn=new WeakMap,qt=new WeakSet,Cr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
72case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),qe.batch(()=>{T(this,Ht).forEach(n=>{n.onMutationUpdate(t)}),T(this,We).notify({mutation:this,type:"updated",action:t})})},Ap);function s1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var or,It,ri,Ip,o1=(Ip=class extends ul{constructor(t={}){super();re(this,or);re(this,It);re(this,ri);this.config=t,q(this,or,new Set),q(this,It,new Map),q(this,ri,0)}build(t,r,n){const s=new n1({mutationCache:this,mutationId:++mi(this,ri)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){T(this,or).add(t);const r=Di(t);if(typeof r=="string"){const n=T(this,It).get(r);n?n.push(t):T(this,It).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,or).delete(t)){const r=Di(t);if(typeof r=="string"){const n=T(this,It).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&T(this,It).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Di(t);if(typeof r=="string"){const n=T(this,It).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Di(t);if(typeof r=="string"){const s=(n=T(this,It).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qe.batch(()=>{T(this,or).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,or).clear(),T(this,It).clear()})}getAll(){return Array.from(T(this,or))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ff(r,n))}findAll(t={}){return this.getAll().filter(r=>Ff(t,r))}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 6,352 bytes, line 72
72r.state.isPaused);return qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(Rt))))}},or=new WeakMap,It=new WeakMap,ri=new WeakMap,Ip);function Di(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Wf(e){return{onFetch:(t,r)=>{var c,h,f,d,y;const n=t.options,s=(f=(h=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,o=((d=t.state.data)==null?void 0:d.pages)||[],i=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const w=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},g=py(t.options,t.fetchOptions),p=async(m,b,E)=>{if(v)return Promise.reject();if(b==null&&m.pages.length)return Promise.resolve(m);const k=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:b,direction:E?"backward":"forward",meta:t.options.meta};return w(B),B})(),P=await g(k),{maxPages:A}=t.options,j=E?qS:HS;return{pages:j(m.pages,P,A),pageParams:j(m.pageParams,b,A)}};if(s&&o.length){const m=s==="backward",b=m?i1:Hf,E={pages:o,pageParams:i},S=b(n,E);a=await p(E,S,m)}else{const m=e??o.length;do{const b=l===0?i[0]??n.initialPageParam:Hf(n,a);if(l>0&&b==null)break;a=await p(a,b),l++}while(l<m)}return a};t.options.persister?t.fetchFn=()=>{var v,w;return(w=(v=t.options).persister)==null?void 0:w.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Hf(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function i1(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ye,$r,Dr,Ps,Rs,Ur,Os,As,jp,a1=(jp=class{constructor(e={}){re(this,ye);re(this,$r);re(this,Dr);re(this,Ps);re(this,Rs);re(this,Ur);re(this,Os);re(this,As);q(this,ye,e.queryCache||new r1),q(this,$r,e.mutationCache||new o1),q(this,Dr,e.defaultOptions||{}),q(this,Ps,new Map),q(this,Rs,new Map),q(this,Ur,0)}mount(){mi(this,Ur)._++,T(this,Ur)===1&&(q(this,Os,my.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ye).onFocus())})),q(this,As,Ia.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ye).onOnline())})))}unmount(){var e,t;mi(this,Ur)._--,T(this,Ur)===0&&((e=T(this,Os))==null||e.call(this),q(this,Os,void 0),(t=T(this,As))==null||t.call(this),q(this,As,void 0))}isFetching(e){return T(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,$r).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,ye).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=T(this,ye).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(pc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return T(this,ye).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=T(this,ye).get(n.queryHash),o=s==null?void 0:s.state.data,i=MS(t,o);if(i!==void 0)return T(this,ye).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return qe.batch(()=>T(this,ye).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,ye).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=T(this,ye);qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=T(this,ye);return qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=qe.batch(()=>T(this,ye).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Rt).catch(Rt)}invalidateQueries(e,t={}){return qe.batch(()=>(T(this,ye).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=qe.batch(()=>T(this,ye).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(Rt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=T(this,ye).build(this,t);return r.isStaleByTime(pc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rt).catch(Rt)}fetchInfiniteQuery(e){return e.behavior=Wf(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rt).catch(Rt)}ensureInfiniteQueryData(e){return e.behavior=Wf(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ia.isOnline()?T(this,$r).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,ye)}getMutationCache(){return T(this,$r)}getDefaultOptions(){return T(this,Dr)}setDefaultOptions(e){q(this,Dr,e)}setQueryDefaults(e,t){T(this,Ps).set(Ho(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Ps).values()],r={};return t.forEach(n=>{qo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){T(this,Rs).set(Ho(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Rs).values()],r={};return t.forEach(n=>{qo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Dr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Wd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Dr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,ye).clear(),T(this,$r).clear()}},ye=new WeakMap,$r=new WeakMap,Dr=new WeakMap,Ps=new WeakMap,Rs=new WeakMap,Ur=new WeakMap,O
72s=new WeakMap,As=new WeakMap,jp),l1=_.createContext(void 0),u1=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(l1.Provider,{value:e,children:t}));/** 73 * @remix-run/router v1.23.0 74 * 75 * Copyright (c) Remix Software Inc. 76 * 77 * This source code is licensed under the MIT license found in the 78 * LICENSE.md file in the root directory of this source tree. 79 * 80 * @license MIT 81 */function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ko.apply(this,arguments)}var Fr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Fr||(Fr={}));const qf="popstate";function c1(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return gc("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:ja(s)}return h1(t,r,null,e)}function Ee(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _y(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function d1(){return Math.random().toString(36).substr(2,8)}function Kf(e,t){return{usr:e.state,key:e.key,idx:t}}function gc(e,t,r,n){return r===void 0&&(r=null),Ko({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ks(t):t,{state:r,key:t&&t.key||n||d1()})}function ja(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ks(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function h1(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=Fr.Pop,l=null,u=c();u==null&&(u=0,i.replaceState(Ko({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function h(){a=Fr.Pop;let w=c(),g=w==null?null:w-u;u=w,l&&l({action:a,location:v.location,delta:g})}function f(w,g){a=Fr.Push;let p=gc(v.location,w,g);u=c()+1;let m=Kf(p,u),b=v.createHref(p);try{i.pushState(m,"",b)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(b)}o&&l&&l({action:a,location:v.location,delta:1})}function d(w,g){a=Fr.Replace;let p=gc(v.location,w,g);u=c();let m=Kf(p,u),b=v.createHref(p);i.replaceState(m,"",b),o&&l&&l({action:a,location:v.location,delta:0})}function y(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof w=="string"?w:ja(w);return p=p.replace(/ $/,"%20"),Ee(g,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,g)}let v={get action(){return a},get location(){return e(s,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(qf,h),l=w,()=>{s.removeEventListener(qf,h),l=null}},createHref(w){return t(s,w)},createURL:y,encodeLocation(w){let g=y(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:d,go(w){return i.go(w)}};return v}var Gf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gf||(Gf={}));function f1(e,t,r){return r===void 0&&(r="/"),p1(e,t,r,!1)}function p1(e,t,r,n){let s=typeof t=="string"?Ks(t):t,o=Hd(s.pathname||"/",r);if(o==null)return null;let i=by(e);m1(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=T1(o);a=S1(i[l],u,n)}return a}function by(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Ee(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Jr([n,l.relativePath]),c=r.concat(l);o.children&&o.children.length>0&&(Ee(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),b
vendor: 10,515 bytes, lines 81-90
81y(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:E1(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Ey(o.path))s(o,i,l)}),t}function Ey(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=Ey(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function m1(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:x1(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const g1=/^:[\w-]+$/,v1=3,y1=2,w1=1,_1=10,b1=-2,Qf=e=>e==="*";function E1(e,t){let r=e.split("/"),n=r.length;return r.some(Qf)&&(n+=b1),t&&(n+=y1),r.filter(s=>!Qf(s)).reduce((s,o)=>s+(g1.test(o)?v1:o===""?w1:_1),n)}function x1(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function S1(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=o==="/"?t:t.slice(o.length)||"/",h=Jf({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=Jf({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!h)return null;Object.assign(s,h.params),i.push({params:s,pathname:Jr([o,h.pathname]),pathnameBase:O1(Jr([o,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(o=Jr([o,h.pathnameBase]))}return i}function Jf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=k1(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,h)=>{let{paramName:f,isOptional:d}=c;if(f==="*"){let v=a[h]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const y=a[h];return d&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function k1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),_y(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function T1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _y(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Hd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function C1(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Ks(e):e;return{pathname:r?r.startsWith("/")?r:P1(r,t):t,search:A1(n),hash:I1(s)}}function P1(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function eu(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function R1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function qd(e,t){let r=R1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Kd(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ks(e):(s=Ko({},e),Ee(!s.pathname||!s.pathname.includes("?"),eu("?","pathname","search",s)),Ee(!s.pathname||!s.pathname.includes("#"),eu("#","pathname","hash",s)),Ee(!s.search||!s.search.includes("#"),eu("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let h=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?t[h]:"/"}let l=C1(s,a),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Jr=e=>e.join("/").replace(/\/\/+/g,"/"),O1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function j1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xy=["post","put","patch","delete"];new Set(xy);const N1=["get",...xy];new Set(N1);/** 82 * React Router v6.30.1 83 * 84 * Copyright (c) Remix Software Inc. 85 * 86 * This source code is licensed under the MIT license found in the 87 * LICENSE.md file in the root directory of this source tree. 88 * 89 * @license MIT 90 */function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Go.apply(this,arguments)}const Gd=_.createContext(null),L1=_.createContext(null),an=_.createContext(null),dl=_.createContext(null),ln=_.createContext({outlet:null,matches:[],isDataRoute:!1}),Sy=_.createContext(null);function $1(e,t){let{relative:r}=t===void 0?{}:t;Gs()||Ee(!1);let{basename:n,navigator:s}=_.useContext(an),{hash:o,pathname:i,search:a}=Ty(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:Jr([n,i])),s.createHref({pathname:l,search:a,hash:o})}function Gs(){return _.useContext(dl)!=null}function Mn(){return Gs()||Ee(!1),_.useContext(dl).location}function ky(e){_.useContext(an).static||_.useLayoutEffect(e)}function hl(){let{isDataRoute:e}=_.useContext(ln);return e?Q1():D1()}function D1(){Gs()||Ee(!1);let e=_.useContext(Gd),{basename:t,future:r,navigator:n}=_.useContext(an),{matches:s}=_.useContext(ln),{pathname:o}=Mn(),i=JSON.stringify(qd(s,r.v7_relativeSplatPath)),a=_.useRef(!1);return ky(()=>{a.current=!0}),_.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let h=Kd(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Jr([t,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[t,n,i,o,e])}function Ty(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=_.useContext(an),{matches:s}=_.useContext(ln),{pathname:o}=Mn(),i=JSON.stringify(qd(s,n.v7_relativeSplatPath));return _.useMemo(()=>Kd(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function U1(e,t){return M1(e,t)}function M1(e,t,r,n){Gs()||Ee(!1);let{navigator:s}=_.useContext(an),{matches:o}=_.useContext(ln),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=Mn(),c;if(t){var h;let w=typeof t=="string"?Ks(t):t;l==="/"||(h=w.pathname)!=null&&h.startsWith(l)||Ee(!1),c=w}else c=u;let f=c.pathname||"/",d=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=f1(e,{pathname:d}),v=W1(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Jr([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Jr([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return t&&v?_.createElement(dl.Provider,{value:{location:Go({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Fr.Pop}},v):v}function z1(){let e=G1(),t=j1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:s},r):null,null)}const F1=_.createElement(z1,null);class B1 extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?_.createElement(ln.Provider,{value:this.props.routeContext},_.createElement(Sy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function V1(e){let{routeContext:t,match:r,children:n}=e,s=_.useContext(Gd);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),_.createElement(ln.Provider,{value:t},n)}function W1(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);c>=0||Ee(!1),i=i.slice(0,Math.min(i.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<i.length;c++){let h=i[c];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=c),h.route.id){let{loaderData:f,errors:d}=r,y=h.route.loader&&f[h.route.id]===void 0&&(!d||d[h.route.id]===void 0);if(h.route.lazy||y){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((c,h,f)=>{let d,y=!1,v=null,w=null;r&&(d=a&&h.route.id?a[h.route.id]:void 0,v=h.route.errorElement||F1,l&&(u<0&&f===0?(y=!0,w=null):u===f&&(y=!0,w=h.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,f+1)),p=()=>{let m;return d?m=v:y?m=w:h.route.Component?m=_.createElement(h.route.Component,null):h.route.element?m=h.route.element:m=c,_.createElement(V1,{match:h,routeC
90ontext:{outlet:c,matches:g,isDataRoute:r!=null},children:m})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?_.createElement(B1,{location:r.location,revalidation:r.revalidation,component:v,error:d,children:p(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):p()},null)}var Cy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Cy||{}),Na=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Na||{});function H1(e){let t=_.useContext(Gd);return t||Ee(!1),t}function q1(e){let t=_.useContext(L1);return t||Ee(!1),t}function K1(e){let t=_.useContext(ln);return t||Ee(!1),t}function Py(e){let t=K1(),r=t.matches[t.matches.length-1];return r.route.id||Ee(!1),r.route.id}function G1(){var e;let t=_.useContext(Sy),r=q1(Na.UseRouteError),n=Py(Na.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Q1(){let{router:e}=H1(Cy.UseNavigateStable),t=Py(Na.UseNavigateStable),r=_.useRef(!1);return ky(()=>{r.current=!0}),_.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Go({fromRouteId:t},o)))},[e,t])}function J1(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Y1(e){let{to:t,replace:r,state:n,relative:s}=e;Gs()||Ee(!1);let{future:o,static:i}=_.useContext(an),{matches:a}=_.useContext(ln),{pathname:l}=Mn(),u=hl(),c=Kd(t,qd(a,o.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(c);return _.useEffect(()=>u(JSON.parse(h),{replace:r,state:n,relative:s}),[u,h,s,r,n]),null}function ee(e){Ee(!1)}function X1(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Fr.Pop,navigator:o,static:i=!1,future:a}=e;Gs()&&Ee(!1);let l=t.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:l,navigator:o,static:i,future:Go({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=Ks(n));let{pathname:c="/",search:h="",hash:f="",state:d=null,key:y="default"}=n,v=_.useMemo(()=>{let w=Hd(c,l);return w==null?null:{location:{pathname:w,search:h,hash:f,state:d,key:y},navigationType:s}},[l,c,h,f,d,y,s]);return v==null?null:_.createElement(an.Provider,{value:u},_.createElement(dl.Provider,{children:r,value:v}))}function Z1(e){let{children:t,location:r}=e;return U1(vc(t),r)}new Promise(()=>{});function vc(e,t){t===void 0&&(t=[]);let r=[];return _.Children.forEach(e,(n,s)=>{if(!_.isValidElement(n))return;let o=[...t,s];if(n.type===_.Fragment){r.push.apply(r,vc(n.props.children,o));return}n.type!==ee&&Ee(!1),!n.props.index||!n.props.children||Ee(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=vc(n.props.children,o)),r.push(i)}),r}/** 91 * React Router DOM v6.30.1 92 * 93 * Copyright (c) Remix Software Inc. 94 * 95 * This source code is licensed under the MIT license found in the 96 * LICENSE.md file in the root directory of this source tree. 97 * 98 * @license MIT 99 */function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yc.apply(this,arguments)}function ek(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function tk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rk(e,t){return e.button===0&&(!t||t==="_self")&&!tk(e)}function wc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function nk(e,t){let r=wc(e);return t&&t.forEach((n,s)=>
99{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const sk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ok="6";try{window.__reactRouterVersion=ok}catch{}const ik="startTransition",Yf=$c[ik];function ak(e){let{basename:t,children:r,future:n,window:s}=e,o=_.useRef();o.current==null&&(o.current=c1({window:s,v5Compat:!0}));let i=o.current,[a,l]=_.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=_.useCallback(h=>{u&&Yf?Yf(()=>l(h)):l(h)},[l,u]);return _.useLayoutEffect(()=>i.listen(c),[i,c]),_.useEffect(()=>J1(n),[n]),_.createElement(X1,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const lk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ck=_.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:c,viewTransition:h}=t,f=ek(t,sk),{basename:d}=_.useContext(an),y,v=!1;if(typeof u=="string"&&uk.test(u)&&(y=u,lk))try{let m=new URL(window.location.href),b=u.startsWith("//")?new URL(m.protocol+u):new URL(u),E=Hd(b.pathname,d);b.origin===m.origin&&E!=null?u=E+b.search+b.hash:v=!0}catch{}let w=$1(u,{relative:s}),g=dk(u,{replace:i,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:h});function p(m){n&&n(m),m.defaultPrevented||g(m)}return _.createElement("a",yc({},f,{href:y||w,onClick:v||o?n:p,ref:r,target:l}))});var Xf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Xf||(Xf={}));var Zf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Zf||(Zf={}));function dk(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=hl(),u=Mn(),c=Ty(e,{relative:i});return _.useCallback(h=>{if(rk(h,r)){h.preventDefault();let f=n!==void 0?n:ja(u)===ja(c);l(e,{replace:f,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[u,l,c,n,s,r,e,o,i,a])}function $P(e){let t=_.useRef(wc(e)),r=_.useRef(!1),n=Mn(),s=_.useMemo(()=>nk(n.search,r.current?null:t.current),[n.search]),o=hl(),i=_.useCallback((a,l)=>{const u=wc(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,l)},[o,s]);return[s,i]}const hk=Sv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-gradient-to-r from-primary via-primary to-accent text-primary-foreground font-bold text-lg px-8 py-6 rounded-xl shadow-lg hover:shadow-xl hover:scale-105 transition-all duration-300"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-12 rounded-xl px-8 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_c=_.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?$_:"button";return x.jsx(i,{className:on(hk({variant:t,size:r,className:e})),ref:o,...s})});_c.displayName="Button";const tu="cookie-consent",fk=()=>{const[e,t]=_.useState(!1);_.useEffect(()=>{if(!localStorage.getItem(tu)){const o=setTimeout(()=>t(!0),1e3);return()=>clearTimeout(o)}},[]);const r=()=>{localStorage.setItem(tu,"accepted"),t(!1)},n=()=>{localStorage.setItem(tu,"declined"),t(!1)};return e?x.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-50 p-4 md:p-6 animate-in slide-in-from-bottom duration-500",children:x.jsx("div",{className:"container mx-auto max-w-4xl",children:x.jsx("div",{className:"bg-card border border-border rounded-2xl shadow-2xl p-4 md:p-6",children:x.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-4",children:[x.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[x.jsx("div",{className:"bg-primary/10 p-2 rounded-lg shrink-0",children:x.jsx(Ob,{className:"w-5 h-5 text-primary"})}),x.jsxs("div",{className:"space-y-1",children:[x.jsx("p",{className:"text-sm text-foreground font-medium",children:"Wir nutzen Cookies"}),x.jsxs("p",{className:"text-sm text-muted-foreground",children:["Diese Website verwendet technisch notwendige Cookies, um dir die bestmögliche Nutzererfahrung zu bieten."," ",x.jsx(ck,{to:"/datenschutz",className:"text-primary hover:underline",children:"Mehr erfahren"})]})]})]}),x.jsxs("div",{className:"flex gap-3 w-full md:w-auto shrink-0",children:[x.jsx(_c,{variant:"outline",size:"sm",onClick:n,className:"flex-1 md:flex-none",children:"Ablehnen"}),x.jsx(_c,{size:"sm",onClick:r,className:"flex-1 md:flex-none",children:"Akzeptieren"})]})]})})})}):null};var ep=function(){return ep=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ep.apply(this,arguments)};function fl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function pk(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(c){try{u(n.next(c))}catch(h){i(h)}}function l(c){try{u(n.throw(c))}catch(h){i(h)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}function DP(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;
99n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}const mk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Qd extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class gk extends Qd{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class tp extends Qd{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class rp extends Qd{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var bc;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(bc||(bc={}));class vk{constructor(t,{headers:r={},customFetch:n,region:s=bc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=mk(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return pk(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:u,signal:c,timeout:h}=n;let f={},{region:d}=n;d||(d=this.region);const y=new URL(`${this.url}/${r}`);d&&d!=="any"&&(f["x-region"]=d,y.searchParams.set("forceFunctionRegion",d));let v;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",v=u):typeof u=="string"?(f["Content-Type"]="text/plain",v=u):typeof FormData<"u"&&u instanceof FormData?v=u:(f["Content-Type"]="application/json",v=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?v=JSON.stringify(u):v=u;let w=c;h&&(i=new AbortController,o=setTimeout(()=>i.abort(),h),c?(w=i.signal,c.addEventListener("abort",()=>i.abort())):w=i.signal);const g=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:v,signal:w}).catch(E=>{throw new gk(E)}),p=g.headers.get("x-relay-error");if(p&&p==="true")throw new tp(g);if(!g.ok)throw new rp(g);let m=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),b;return m==="application/json"?b=yield g.json():m==="application/octet-stream"||m==="application/pdf"?b=yield g.blob():m==="text/event-stream"?b=g:m==="multipart/form-data"?b=yield g.formData():b=yield g.text(),{data:b,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof rp||a instanceof tp?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var yk=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
99de=e.code}},wk=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let i=null,a=null,l=null,u=o.status,c=o.statusText;if(o.ok){var h,f;if(r.method!=="HEAD"){var d;const g=await o.text();g===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((d=r.headers.get("Accept"))===null||d===void 0)&&d.includes("application/vnd.pgrst.plan+text"))?a=g:a=JSON.parse(g))}const v=(h=r.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),w=(f=o.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");v&&w&&w.length>1&&(l=parseInt(w[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(a)&&(a.length>1?(i={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var y;const v=await o.text();try{i=JSON.parse(v),Array.isArray(i)&&o.status===404&&(a=[],i=null,u=200,c="OK")}catch{o.status===404&&v===""?(u=204,c="No Content"):i={message:v}}if(i&&r.isMaybeSingle&&(!(i==null||(y=i.details)===null||y===void 0)&&y.includes("0 rows"))&&(i=null,u=200,c="OK"),i&&r.shouldThrowOnError)throw new yk(i)}return{error:i,data:a,count:l,status:u,statusText:c}});return this.shouldThrowOnError||(s=s.catch(o=>{var i;let a="";const l=o==null?void 0:o.cause;if(l){var u,c,h,f;const y=(u=l==null?void 0:l.message)!==null&&u!==void 0?u:"",v=(c=l==null?void 0:l.code)!==null&&c!==void 0?c:"";a=`${(h=o==null?void 0:o.name)!==null&&h!==void 0?h:"FetchError"}: ${o==null?void 0:o.message}`,a+=` 100 101Caused by: ${(f=l==null?void 0:l.name)!==null&&f!==void 0?f:"Error"}: ${y}`,v&&(a+=` (${v})`),l!=null&&l.stack&&(a+=` 102${l.stack}`)}else{var d;a=(d=o==null?void 0:o.stack)!==null&&d!==void 0?d:""}return{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:a,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},_k=class extends wk{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.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}
102explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const np=new RegExp("[,()]");var Zn=class extends _k{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&np.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&np.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},bk=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(u=>/\s/.test(u)&&!o?"":(u==='"'&&(o=!o),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",i),n&&l.append("Prefer",`count=${n}`),new Zn({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1020){const l=[...new Set(a)].map(u=>`"${u}"`);o.searchParams.set("columns",l.join(","))}}return new Zn({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const i="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,h)=>c.concat(Object.keys(h)),[]);if(u.length>0){const c=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",c.join(","))}}return new Zn({method:i,url:a,headers:l,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Zn({method:n,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Zn({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},Ek=class Ry{constructor(t,{headers:r={},schema:n,fetch:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new bk(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Ry(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var i;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=d=>d!==null&&typeof d=="object"&&(!Array.isArray(d)||d.some(c)),h=n&&Object.values(r).some(c);h?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([d,y])=>y!==void 0).map(([d,y])=>[d,Array.isArray(y)?`{${y.join(",")}}`:`${y}`]).forEach(([d,y])=>{l.searchParams.append(d,y)})):(a="POST",u=r);const f=new Headers(this.headers);return h?f.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&f.set("Prefer",`count=${o}`),new Zn({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}};class xk{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 103import ws from "ws" 104new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 105 106Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const Sk="2.90.1",kk=`realtime-js/${Sk}`,Oy="1.0.0",Tk="2.0.0",sp=Oy,Ec=1e4,Ck=1e3,Pk=100;var Or;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Or||(Or={}));var Te;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Te||(Te={}));var Nt;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Nt||(Nt={}));var xc;(function(e){e.websocket="websocket"})(xc||(xc={}));var vn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(vn||(vn={}));class Rk{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+u.length+h.length,d=new ArrayBuffer(this.HEADER_LENGTH+f);let y=new DataView(d),v=0;y.setUint8(v++,this.KINDS.userBroadcastPush),y.setUint8(v++,l.length),y.setUint8(v++,a.length),y.setUint8(v++,i.length),y.setUint8(v++,u.length),y.setUint8(v++,h.length),y.setUint8(v++,r),Array.from(l,g=>y.setUint8(v++,g.charCodeAt(0))),Array.from(a,g=>y.setUint8(v++,g.charCodeAt(0))),Array.from(i,g=>y.setUint8(v++,g.charCodeAt(0))),Array.from(u,g=>y.setUint8(v++,g.charCodeAt(0))),Array.from(h,g=>y.setUint8(v++,g.charCodeAt(0)));var w=new Uint8Array(d.byteLength+n.byteLength);return w.set(new Uint8Array(d),0),w.set(new Uint8Array(n),d.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;
106const c=n.decode(t.slice(l,l+o));l=l+o;const h=n.decode(t.slice(l,l+i));l=l+i;const f=t.slice(l,t.byteLength),d=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,y={type:this.BROADCAST_EVENT,event:c,payload:d};return i>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class Ay{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var ae;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ae||(ae={}));const op=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=Ok(i,e,t,s),o),{}):{}},Ok=(e,t,r,n)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?Iy(o,i):Sc(i)},Iy=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Nk(t,r)}switch(e){case ae.bool:return Ak(t);case ae.float4:case ae.float8:case ae.int2:case ae.int4:case ae.int8:case ae.numeric:case ae.oid:return Ik(t);case ae.json:case ae.jsonb:return jk(t);case ae.timestamp:return Lk(t);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 Sc(t);default:return Sc(t)}},Sc=e=>e,Ak=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Ik=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},jk=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Nk=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>Iy(t,a))}return e},Lk=e=>typeof e=="string"?e.replace(" ","T"):e,jy=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class ru{constructor(t,r,n={},s=Ec){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}
106_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var ip;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(ip||(ip={}));class xo{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=xo.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=xo.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=xo.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const o=this.cloneDeep(t),i=this.transformState(r),a={},l={};return this.map(o,(u,c)=>{i[u]||(l[u]=c)}),this.map(i,(u,c)=>{const h=o[u];if(h){const f=c.map(w=>w.presence_ref),d=h.map(w=>w.presence_ref),y=c.filter(w=>d.indexOf(w.presence_ref)<0),v=h.filter(w=>f.indexOf(w.presence_ref)<0);y.length>0&&(a[u]=y),v.length>0&&(l[u]=v)}else a[u]=c}),this.syncDiff(o,{joins:a,leaves:l},n,s)}static syncDiff(t,r,n,s){const{joins:o,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var u;const c=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),c.length>0){const h=t[a].map(d=>d.presence_ref),f=c.filter(d=>h.indexOf(d.presence_ref)<0);t[a].unshift(...f)}n(a,c,l)}),this.map(i,(a,l)=>{let u=t[a];if(!u)return;const c=l.map(h=>h.presence_ref);u=u.filter(h=>c.indexOf(h.presence_ref)<0),t[a]=u,s(a,u,l),u.length===0&&delete t[a]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var ap;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(ap||(ap={}));var So;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(So||(So={}));var nr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(nr||(nr={}));class ps{constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Te.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new ru(this,Nt.join,this.params,this.timeout),this.rejoinTimer=new Ay(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Te.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Te.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Te.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Te.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Te.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Nt.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new xo(this),this.broadcastEndpointURL=jy(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==Te.closed){const{config:{broadcast:i,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(d=>d.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[So.PRESENCE]&&this.bindings[So.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},f={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(d=>t==null?void 0:t(nr.CHANNEL_ERROR,d)),this._onClose(()=>t==null?void 0:t(nr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:d})=>{var y;if(this.socket._isManualToken()||this.socket.setAuth(),d===void 0){t==null||t(nr.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,w=(y=v==null?void 0:v.length)!==null&&y!==void 0?y:0,g=[];for(let p=0;p<w;p++){const m=v[p],{filter:{event:b,schema:E,table:S,filter:k}}=m,P=d&&d[p];
106if(P&&P.event===b&&ps.isFilterValueEqual(P.schema,E)&&ps.isFilterValueEqual(P.table,S)&&ps.isFilterValueEqual(P.filter,k))g.push(Object.assign(Object.assign({},m),{id:P.id}));else{this.unsubscribe(),this.state=Te.errored,t==null||t(nr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g,t&&t(nr.SUBSCRIBED);return}}).receive("error",d=>{this.state=Te.errored,t==null||t(nr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(nr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===Te.joined&&t===So.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
106in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Te.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Nt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new ru(this,Nt.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Te.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new ru(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>Pk){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=Nt;if(n&&[a,l,u,c].indexOf(i)>=0&&n!==this._joinRef())return;let f=this._onMessage(i,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(d=>{var y,v,w;return((y=d.filter)===null||y===void 0?void 0:y.event)==="*"||((w=(v=d.filter)===null||v===void 0?void 0:v.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===i}).map(d=>d.callback(f,n)):(o=this.bindings[i])===null||o===void 0||o.filter(d=>{var y,v,w,g,p,m,b,E;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in d){const S=d.id,k=(y=d.filter)===null||y===void 0?void 0:y.event;return S&&((v=r.ids)===null||v===void 0?void 0:v.includes(S))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))&&(!(!((g=d.filter)===null||g===void 0)&&g.table)||d.filter.table===((p=r.data)===null||p===void 0?void 0:p.table))}else{const S=(b=(m=d==null?void 0:d.filter)===null||m===void 0?void 0:m.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return S==="*"||S===((E=r==null?void 0:r.event)===null||E===void 0?void 0:E.toLocaleLowerCase())}else return d.type.toLocaleLowerCase()===i}).map(d=>{if(typeof f=="object"&&"ids"in f){const y=f.data,{schema:v,table:w,commit_timestamp:g,type:p,errors:m}=y;f=Object.assign(Object.assign({},{schema:v,table:w,commit_timestamp:g,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(y))}d.callback(f,n)})}_isClosed(){return this.state===Te.closed}_isJoined(){return this.state===Te.joined}_isJoining(){return this.state===Te.joining}_isLeaving(){return this.state===Te.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&ps.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Nt.close,{},t)}_onError(t){this._on(Nt.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Te.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=op(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=op(t.columns,t.old_record)),r}}const nu=()=>{},Ui={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},$k=[1e3,2e3,5e3,1e4],Dk=1e4,Uk=` 107 addEventListener("message", (e) => { 108 if (e.data.event === "start") { 109 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 110 } 111 });`;class Mk{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Ec,this.transport=null,this.heartbeatIntervalMs=Ui.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=nu,this.ref=0,this.reconnectTimer=null,this.vsn=sp,this.logger=nu,this.conn=null,this.sendBuffer=[],this.serializer
111=new Rk,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${xc.websocket}`,this.httpEndpoint=jy(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=xk.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 112 113To use Realtime in Node.js, you need to provide a WebSocket implementation: 114 115Option 1: Use Node.js 22+ which has native WebSocket support 116Option 2: Install and provide the "ws" package: 117 118 npm install ws 119 120 import ws from "ws" 121 const client = new RealtimeClient(url, { 122 ...options, 123 transport: ws 124 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Or.connecting:return vn.Connecting;case Or.open:return vn.Open;case Or.closing:return vn.Closing;default:return vn.Closed}}isConnected(){return this.connectionState()===vn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new ps(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){const{topic:r,event:n,payload:s,ref:o}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(Ck,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
124heduleTimeout()},Ui.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",u)}catch(c){this.log("error","error in heartbeat callback",c)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:o,ref:i}=r,a=i?`(${i})`:"",l=o.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),o),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,o,i)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Or.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Or.open||this.conn.readyState===Or.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
124heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Nt.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([Uk],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:kk};r&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(Nt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new Ay(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Ui.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,o,i,a,l,u,c,h,f,d;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:Ec,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Ui.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:nu,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:sp,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:y=>$k[y-1]||Dk,this.vsn){case Oy:this.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:(y,v)=>v(JSON.stringify(y)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(y,v)=>v(JSON.parse(y));break;case Tk:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Qo=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function zk(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function Fk(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function Bk(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=zk(e.baseUrl,n,s),l=await Fk(e.auth),u=await t(a,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...i},body:o?JSON.stringify(o):void 0}),c=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&c?JSON.parse(c):c;if(!u.ok){const d=h?f:void 0,y=d==null?void 0:d.error;throw new Qo((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:d})}return{status:u.status,headers:u.headers,data:f}}}}function Mi(e){return e.join("�")}var Vk=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Mi(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Mi(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Mi(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Mi(e.namespace)}`}),!0}catch(t){if(t instanceof Qo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Qo&&r.status===409)return;throw r}}};function Kn(e){return e.join("�")}var Wk=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Kn(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Kn(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Kn(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Kn(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Kn(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Kn(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Qo&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Qo&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},Hk=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=Bk({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new Vk(this.client,t),this.tableOps=new Wk(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
124async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},pl=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function pe(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var qk=class extends pl{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},kc=class extends pl{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const Jd=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Kk=()=>Response,Tc=e=>{if(Array.isArray(e))return e.map(r=>Tc(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Tc(n)}),t},Gk=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Qk=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Jo(e){"@babel/helpers - typeof";return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(e)}function Jk(e,t){if(Jo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yk(e){var t=Jk(e,"string");return Jo(t)=="symbol"?t:t+""}function Xk(e,t,r){return(t=Yk(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(r),!0).forEach(function(n){Xk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const su=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},Zk=async(e,t,r)=>{e instanceof await Kk()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,o=(n==null?void 0:n.statusCode)||s+"";t(new qk(su(n),s,o))}).catch(n=>{t(new kc(su(n),n))}):t(new kc(su(e),e))},eT=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(Gk(n)?(s.headers=F({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),F(F({},s),r))};async function di(e,t,r,n,s,o){return new Promise((i,a)=>{e(r,eT(t,n,s,o)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>Zk(l,a,n))})}async function Yo(e,t,r,n){return di(e,"GET",t,r,n)}async function Ot(e,t,r,n,s){return di(e,"POST",t,n,s,r)}async function Cc(e,t,r,n,s){return di(e,"PUT",t,n,s,r)}async function tT(e,t,r,n){return di(e,"HEAD",t,F(F({},r),{},{noResolveJson:!0}),n)}async function Yd(e,t,r,n,s){return di(e,"DELETE",t,n,s,r)}var rT=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(pe(t))return{data:null,error:t};throw t}}};let Ny;Ny=Symbol.toStringTag;var nT=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ny]="BlobDownloadBuilder",this.promise=null}asStream(){return new rT(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(pe(t))return{data:null,error:t};throw t}}};const sT={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},up={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var oT=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=Jd(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let o;const i=F(F({},up),n);let a=F(F({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",s.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),l&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers&&(a=F(F({},a),n.headers));const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),h=await(e=="PUT"?Cc:Ot)(s.fetch,`${s.url}/object/${c}`,o,F({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(o){if(s.shouldThrowOnError)throw o;if(pe(o))return{data:null,error:o};throw o}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),a=new URL(s.url+`/object/upload/sign/${i}`);a.searchParams.set("token",t);try{let l;const u=F({upsert:up.upsert},n),c=F(F({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cac
124he-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{data:{path:o,fullPath:(await Cc(s.fetch,a.toString(),l,{headers:c})).Key},error:null}}catch(l){if(s.shouldThrowOnError)throw l;if(pe(l))return{data:null,error:l};throw l}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=F({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Ot(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),a=i.searchParams.get("token");if(!a)throw new pl("No token returned by API");return{data:{signedUrl:i.toString(),path:e,token:a},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(pe(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await Ot(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(pe(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await Ot(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
124stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(pe(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),o=await Ot(n.fetch,`${n.url}/object/sign/${s}`,F({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${n.url}${o.signedURL}${i}`)},{data:o,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(pe(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await Ot(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(i=>F(F({},i),{},{signedUrl:i.signedURL?encodeURI(`${n.url}${i.signedURL}${o}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(pe(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",o=this._getFinalPath(e),i=()=>Yo(this.fetch,`${this.url}/${r}/${o}${s}`,{headers:this.headers,noResolveJson:!0});return new nT(i,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:Tc(await Yo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pe(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await tT(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pe(n)&&n instanceof kc){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});i!==""&&n.push(i);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${a}`)}}}async remove(e){var t=this;try{return{data:await Yd(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=F(F(F({},sT),t),{},{prefix:e||""});return{data:await Ot(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(pe(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=F({},e);return{data:await Ot(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(pe(n))return{data:null,error:n};throw n}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const Ly="2.90.1",$y={"X-Client-Info":`storage-js/${Ly}`};var iT=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=F(F({},$y),t),this.fetch=Jd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await Yo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Yo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Ot(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(pe(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await Cc(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(pe(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Ot(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Yd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},aT=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=F(F({},$y),t),this.fetch=Jd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Ot(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;
124try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return{data:await Yo(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Yd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pe(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!Qk(e))throw new pl("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new Hk({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...a)=>{try{return{data:await i.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}};const Xd={"X-Client-Info":`storage-js/${Ly}`,"Content-Type":"application/json"};var Dy=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function it(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var ou=class extends Dy{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},lT=class extends Dy{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Zd=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),uT=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cp=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),cT=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(o=>{const i=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||n+"";t(new ou(cp(o),n,i))}).catch(()=>{const o=n+"";t(new ou(s.statusText||`HTTP ${n} error`,n,o))});else{const o=n+"";t(new ou(s.statusText||`HTTP ${n} error`,n,o))}}else t(new lT(cp(e),e))},dT=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(uT(n)?(s.headers=F({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,F(F({},s),r)):s};async function hT(e,t,r,n,s,o){return new Promise((i,a)=>{e(r,dT(t,n,s,o)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const u=l.headers.get("content-type");return!u||!u.includes("application/json")?{}:l.json()}).then(l=>i(l)).catch(l=>cT(l,a,n))})}async function at(e,t,r,n,s){return hT(e,"POST",t,n,s,r)}var fT=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=F(F({},Xd),t),this.fetch=Zd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await at(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(it(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await at(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(it(n))return{data:null,error:n};throw n}}},pT=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=F(F({},Xd),t),this.fetch=Zd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await at(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
124if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await at(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await at(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}},mT=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=F(F({},Xd),t),this.fetch=Zd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await at(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await at(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(it(r))return{data:null,error:r};throw r}}},gT=class extends mT{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new vT(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},vT=class extends fT{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new yT(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},yT=class extends pT{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,F(F({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},wT=class extends iT{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new oT(this.url,this.headers,e,this.fetch)}get vectors(){return new gT(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new aT(this.url+"/iceberg",this.headers,this.fetch)}};const Uy="2.90.1",es=30*1e3,Pc=3,iu=Pc*es,_T="http://localhost:9999",bT="supabase.auth.token",ET={"X-Client-Info":`gotrue-js/${Uy}`},Rc="X-Supabase-Api-Version",My={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},xT=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ST=10*60*1e3;
124class Xo extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function U(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class kT extends Xo{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function TT(e){return U(e)&&e.name==="AuthApiError"}class yn extends Xo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class vr extends Xo{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class nt extends vr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function CT(e){return U(e)&&e.name==="AuthSessionMissingError"}class Gn extends vr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class zi extends vr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Fi extends vr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function PT(e){return U(e)&&e.name==="AuthImplicitGrantRedirectError"}class dp extends vr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class RT extends vr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Oc extends vr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function au(e){return U(e)&&e.name==="AuthRetryableFetchError"}class hp extends vr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Ac extends vr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const La="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),fp=` 125\r=`.split(""),OT=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<fp.length;t+=1)e[fp[t].charCodeAt(0)]=-2;for(let t=0;t<La.length;t+=1)e[La[t].charCodeAt(0)]=t;return e})();function pp(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(La[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(La[n]),t.queuedBits-=6}}function zy(e,t,r){const n=OT[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function mp(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{jT(i,n,r)};for(let i=0;i<e.length;i+=1)zy(e.charCodeAt(i),s,o);return t.join("")}function AT(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function IT(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}AT(n,t)}}function jT(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function xs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
125s+=1)zy(e.charCodeAt(s),r,n);return new Uint8Array(t)}function NT(e){const t=[];return IT(e,r=>t.push(r)),new Uint8Array(t)}function En(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>pp(s,r,n)),pp(null,r,n),t.join("")}function LT(e){return Math.round(Date.now()/1e3)+e}function $T(){return Symbol("auth-callback")}const je=()=>typeof window<"u"&&typeof document<"u",hn={tested:!1,writable:!1},Fy=()=>{if(!je())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(hn.tested)return hn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),hn.tested=!0,hn.writable=!0}catch{hn.tested=!0,hn.writable=!1}return hn.writable};function DT(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const By=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),UT=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ts=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},fn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ie=async(e,t)=>{await e.removeItem(t)};class ml{constructor(){this.promise=new ml.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}ml.promiseConstructor=Promise;function lu(e){const t=e.split(".");if(t.length!==3)throw new Ac("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!xT.test(t[n]))throw new Ac("JWT not in base64url format");return{header:JSON.parse(mp(t[0])),payload:JSON.parse(mp(t[1])),signature:xs(t[2]),raw:{header:t[0],payload:t[1]}}}async function MT(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function zT(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function FT(e){return("0"+e.toString(16)).substr(-2)}function BT(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,FT).join("")}async function VT(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function WT(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await VT(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Qn(e,t,r=!1){const n=BT();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await ts(e,`${t}-code-verifier`,s);const o=await WT(n);return[o,n===o?"plain":"s256"]}const HT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function qT(e){const t=e.headers.get(Rc);if(!t||!t.match(HT))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function KT(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function GT(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const QT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Jn(e){if(!QT.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function uu(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function JT(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
125if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function gp(e){return JSON.parse(JSON.stringify(e))}const gn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),YT=[502,503,504];async function vp(e){var t;if(!UT(e))throw new Oc(gn(e),0);if(YT.includes(e.status))throw new Oc(gn(e),e.status);let r;try{r=await e.json()}catch(o){throw new yn(gn(o),o)}let n;const s=qT(e);if(s&&s.getTime()>=My["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new hp(gn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new nt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new hp(gn(r),e.status,r.weak_password.reasons);throw new kT(gn(r),e.status||500,n)}const XT=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function z(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Rc]||(o[Rc]=My["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await ZT(e,t,r+a,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function ZT(e,t,r,n,s,o){const i=XT(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new Oc(gn(l),0)}if(a.ok||await vp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await vp(l)}}function Ct(e){var t;let r=null;rC(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=LT(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function yp(e){const t=Ct(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function jr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function eC(e){return{data:e,error:null}}function tC(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=fl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function wp(e){return e}function rC(e){return e.access_token&&e.refresh_token&&e.expires_in}const cu=["global","local","others"];class nC{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=By(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=cu[0]){if(cu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${cu.join(", ")}`);try{return await z(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await z(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:jr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=fl(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:tC,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(U(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await z(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:jr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:wp});if(c.error)throw c.error;const h=await c.json(),f=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,d=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return d.length>
1250&&(d.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=v}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(U(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Jn(t);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:jr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Jn(t);try{return await z(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:jr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Jn(t);try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:jr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Jn(t.userId);try{const{data:r,error:n}=await z(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Jn(t.userId),Jn(t.id);try{return{data:await z(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:wp});if(c.error)throw c.error;const h=await c.json(),f=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,d=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return d.length>0&&(d.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=v}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(U(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await z(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await z(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}}function _p(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Yn={debug:!!(globalThis&&Fy()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
125class Vy extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class sC extends Vy{}async function oC(e,t,r){Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new sC(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Yn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function iC(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Wy(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function aC(e){return parseInt(e,16)}function lC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function uC(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:u,scheme:c,uri:h,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 126`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const d=Wy(e.address),y=c?`${c}://${n}`:n,v=e.statement?`${e.statement} 127`:"",w=`${y} wants you to sign in with your Ethereum account: 128${d} 129 130${v}`;let g=`URI: ${h} 131Version: ${f} 132Chain ID: ${r}${i?` 133Nonce: ${i}`:""} 134Issued At: ${o.toISOString()}`;if(s&&(g+=` 135Expiration Time: ${s.toISOString()}`),a&&(g+=` 136Not Before: ${a.toISOString()}`),l&&(g+=` 137Request ID: ${l}`),u){let p=` 138Resources:`;for(const m of u){if(!m||typeof m!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${m}`);p+=` 139- ${m}`}g+=p}return`${w} 140${g}`}class Se extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class $a extends Se{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function cC({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Se({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Se({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Se({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Se({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Se({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Se({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Se({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Se({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(Hy(i)){if(o.rp.id!==i)return new Se({message:`The RP ID "${o.rp.id}
140" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Se({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Se({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Se({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Se({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function dC({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Se({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Se({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Hy(n)){if(r.rpId!==n)return new Se({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Se({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Se({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Se({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class hC{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const fC=new hC;function pC(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=fl(e,["challenge","user","excludeCredentials"]),o=xs(t).buffer,i=Object.assign(Object.assign({},r),{id:xs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:o,user:i});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:xs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function mC(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=fl(e,["challenge","allowCredentials"]),s=xs(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:xs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function gC(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:En(new Uint8Array(e.response.attestationObject)),clientDataJSON:En(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function vC(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:En(new Uint8Array(s.authenticatorData)),clientDataJSON:En(new Uint8Array(s.clientDataJSON)),signature:En(new Uint8Array(s.signature)),userHandle:s.userHandle?En(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Hy(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function bp(){var e,t;return!!(je()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function yC(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new $a("Browser returned unexpected credential type",t)}:{data:null,error:new $a("Empty credential response",t)}}
140catch(t){return{data:null,error:cC({error:t,options:e})}}}async function wC(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new $a("Browser returned unexpected credential type",t)}:{data:null,error:new $a("Empty credential response",t)}}catch(t){return{data:null,error:dC({error:t,options:e})}}}const _C={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},bC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Da(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const a=n[o];t(a)?n[o]=Da(a,i):n[o]=Da(i)}else n[o]=i}return n}function EC(e,t){return Da(_C,e,t||{})}function xC(e,t){return Da(bC,e,t||{})}class SC{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){try{const{data:i,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!i)return{data:null,error:a};const l=s??fC.createNewAbortSignal();if(i.webauthn.type==="create"){const{user:u}=i.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(i.webauthn.type){case"create":{const u=EC(i.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:c,error:h}=await yC({publicKey:u,signal:l});return c?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}case"request":{const u=xC(i.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:c,error:h}=await wC(Object.assign(Object.assign({},i.webauthn.credential_options),{publicKey:u,signal:l}));return c?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}}}catch(i){return U(i)?{data:null,error:i}:{data:null,error:new yn("Unexpected error in challenge",i)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Xo("rpId is required for WebAuthn authentication")};try{if(!bp())return{data:null,error:new yn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return U(i)?{data:null,error:i}:{data:null,error:new yn("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Xo("rpId is required for WebAuthn registration")};try{if(!bp())return{data:null,error:new yn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(c=>{var h;return(h=c.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(i){return U(i)?{data:null,error:i}:{data:null,error:new yn("Unexpected error in register",i)}}}}iC();const kC={url:_T,storageKey:bT,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ET,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function Ep(e,t,r){return await r()}const Xn={};class Zo{get jwks(){var t,r;return(r=(t=Xn[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Xn[this.storageKey]=Object.assign(Object.assign({}
140,Xn[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Xn[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Xn[this.storageKey]=Object.assign(Object.assign({},Xn[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},kC),t);if(this.storageKey=o.storageKey,this.instanceID=(r=Zo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Zo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&je()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new nC({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=By(o.fetch),this.lock=o.lock||Ep,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&je()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=oC:this.lock=Ep,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new SC(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:Fy()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=_p(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=_p(this.memoryStorage)),je()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Uy}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(je()&&(r=DT(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),je()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),PT(o)){const l=(t=o.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return U(r)?this._returnResult({error:r}):this._returnResult({error:new yn("Unexpected error during initialization",r)}
140)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Ct}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(U(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:c,password:h,options:f}=t;let d=null,y=null;this.flowType==="pkce"&&([d,y]=await Qn(this.storage,this.storageKey)),o=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:d,code_challenge_method:y},xform:Ct})}else if("phone"in t){const{phone:c,password:h,options:f}=t;o=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Ct})}else throw new zi("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await Ie(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:a}=t;r=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:yp})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:yp})}else throw new zi("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new Gn;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,a,l,u,c,h,f;let d,y;if("message"in t)d=t.message,y=t.signature;else{const{chain:v,wallet:w,statement:g,options:p}=t;let m;if(je())if(typeof w=="object")m=w;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")m=A.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(p!=null&&p.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");m=w}const b=new URL((r=p==null?void 0:p.url)!==null&&r!==void 0?r:window.location.href),E=await m.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=Wy(E[0]);
140let k=(n=p==null?void 0:p.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const A=await m.request({method:"eth_chainId"});k=aC(A)}const P={domain:b.host,address:S,statement:g,uri:b.href,version:"1",chainId:k,nonce:(s=p==null?void 0:p.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=p==null?void 0:p.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=p==null?void 0:p.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=p==null?void 0:p.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=p==null?void 0:p.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=p==null?void 0:p.signInWithEthereum)===null||c===void 0?void 0:c.resources};d=uC(P),y=await m.request({method:"personal_sign",params:[lC(d),S]})}try{const{data:v,error:w}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:d,signature:y},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ct});if(w)throw w;if(!v||!v.session||!v.user){const g=new Gn;return this._returnResult({data:{user:null,session:null},error:g})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:w})}catch(v){if(U(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(t){var r,n,s,o,i,a,l,u,c,h,f,d;let y,v;if("message"in t)y=t.message,v=t.signature;else{const{chain:w,wallet:g,statement:p,options:m}=t;let b;if(je())if(typeof g=="object")b=g;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))b=S.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=g}const E=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in b&&b.signIn){const S=await b.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},m==null?void 0:m.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),p?{statement:p}:null));let k;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")k=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)k=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)y=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),v=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in b)||typeof b.signMessage!="function"||!("publicKey"in b)||typeof b!="object"||!b.publicKey||!("toBase58"in b.publicKey)||typeof b.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${E.host} wants you to sign in with your Solana account:`,b.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(n=m==null?void 0:m.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=m==null?void 0:m.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${m.signInWithSolana.notBefore}`]:[],...!((i=m==null?void 0:m.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${m.signInWithSolana.expirationTime}`]:[],...!((a=m==null?void 0:m.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${m.signInWithSolana.chainId}`]:[],...!((l=m==null?void 0:m.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${m.signInWithSolana.nonce}`]:[],...!((u=m==null?void 0:m.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${m.signInWithSolana.requestId}`]:[],...!((h=(c=m==null?void 0:m.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||h===void 0)&&h.length?["Resources",...m.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(` 141`);
141const S=await b.signMessage(new TextEncoder().encode(y),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=S}}try{const{data:w,error:g}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:En(v)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(d=t.options)===null||d===void 0?void 0:d.captchaToken}}:null),xform:Ct});if(g)throw g;if(!w||!w.session||!w.user){const p=new Gn;return this._returnResult({data:{user:null,session:null},error:p})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:g})}catch(w){if(U(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await fn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new RT;const{data:o,error:i}=await z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Ct});if(await Ie(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new Gn;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,a=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Ct}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new Gn;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Qn(this.storage,this.storageKey));const{error:h}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new zi("You must provide either an email or phone number.")}catch(a){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Ct});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,u=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Qn(this.storage,this.storageKey));const u=await z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:eC});return!((o=u.data)===null||o===void 0)&&o.url&&je()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new nt;const{error:s}=await z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(U(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:i}=await z(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:a}=await z(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new zi("You must provide either an email or phone number and a type")}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await fn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
141id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<iu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await fn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=uu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=JT(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:jr}):await this._useSession(async r=>{var n,s,o;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new nt}:await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:jr})})}catch(r){if(U(r))return CT(r)&&(await this._removeSession(),await Ie(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new nt;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Qn(this.storage,this.storageKey));const{data:u,error:c}=await z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:jr});if(c)throw c;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new nt;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=lu(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(U(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new nt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!je())throw new Fi("No browser detected.");
141if(t.error||t.error_description||t.error_code)throw new Fi(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new dp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Fi("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new dp("No code detected.");const{data:p,error:m}=await this._exchangeCodeForSession(t.code);if(m)throw m;const b=new URL(window.location.href);return b.searchParams.delete("code"),window.history.replaceState(window.history.state,"",b.toString()),{data:{session:p.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:u}=t;if(!o||!a||!i||!u)throw new Fi("No session defined in URL");const c=Math.round(Date.now()/1e3),h=parseInt(a);let f=c+h;l&&(f=parseInt(l));const d=f-c;d*1e3<=es&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${d}s, should have been closer to ${h}s`);const y=f-h;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:v,error:w}=await this._getUser(o);if(w)throw w;const g={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:f,refresh_token:i,token_type:u,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(n){if(U(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await fn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(TT(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Ie(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=$T(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Qn(this.storage,this.storageKey,!0));try{return await z(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,a,l,u,c;const{data:h,error:f}=o;if(f)throw f;const d=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await z(this.fetch,"GET",d,{headers:this.headers,jwt:(c=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return je()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(U(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:u,nonce:c}=t,h=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:Ct}),{data:f,error:d}=h;return d?this._returnResult({data:{user:null,session:null},error:d}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Gn}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:d}))}catch(s){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;
141return await z(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await zT(async s=>(s>0&&await MT(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ct})),(s,o)=>{const i=200*Math.pow(2,s);return o&&au(o)&&Date.now()+i-n<es})}catch(n){if(this._debug(r,"error",n),U(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),je()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await fn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await fn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await ts(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:uu()}else if(s&&!s.user&&!s.user){const i=await fn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Ie(this.storage,this.storageKey+"-user"),await ts(this.storage,this.storageKey,s)):s.user=uu()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<iu;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${iu}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),au(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new nt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new ml;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new nt;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),U(o)){const i={data:null,error:o};return au(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ie(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await ts(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=gp(s);await ts(this.storage,this.storageKey,o)}else{const s=gp(r);await ts(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ie(this.storage,this.storageKey),await Ie(this.storage,this.storageKey+"-code-verifier"),await Ie(this.storage,this.storageKey+"-user"),this.userStorage&&await Ie(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&je()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
141catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),es);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/es);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${es}ms, refresh threshold is ${Pc} ticks`),s<=Pc&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Vy)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!je()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await Qn(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await z(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await z(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?gC(t.webauthn.credential_response):vC(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data:a}=i;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:pC(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:mC(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}
141=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=lu(n.access_token);let i=null;o.aal&&(i=o.aal);let a=i;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(c=>c.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const u=o.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await z(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new nt})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new nt});const i=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&je()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new nt});const i=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&je()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await z(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new nt})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await z(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new nt})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+ST>s)return n;const{data:o,error:i}=await z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:d,error:y}
141=await this.getSession();if(y||!d.session)return this._returnResult({data:null,error:y});n=d.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=lu(n);r!=null&&r.allowExpired||KT(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:d}=await this.getUser(n);if(d)throw d;return{data:{claims:o,header:s,signature:i},error:null}}const c=GT(s.alg),h=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,h,i,NT(`${a}.${l}`)))throw new Ac("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}}Zo.nextInstanceID={};const TC=Zo,CC="2.90.1";let ho="";typeof Deno<"u"?ho="deno":typeof document<"u"?ho="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ho="react-native":ho="node";const PC={"X-Client-Info":`supabase-js-${ho}/${CC}`},RC={headers:PC},OC={schema:"public"},AC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},IC={};function ei(e){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(e)}function jC(e,t){if(ei(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NC(e){var t=jC(e,"string");return ei(t)=="symbol"?t:t+""}function LC(e,t,r){return(t=NC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xp(Object(r),!0).forEach(function(n){LC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const $C=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),DC=()=>Headers,UC=(e,t,r)=>{const n=$C(r),s=DC();return async(o,i)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(o,we(we({},i),{},{headers:u}))}};function MC(e){return e.endsWith("/")?e:e+"/"}function zC(e,t){var r,n;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:u,realtime:c,global:h}=t,f={db:we(we({},l),s),auth:we(we({},u),o),realtime:we(we({},c),i),storage:{},global:we(we(we({},h),a),{},{headers:we(we({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function FC(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(MC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var BC=class extends TC{constructor(e){super(e)}},VC=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=FC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,a={db:OC,realtime:IC,auth:we(we({},AC),{},{storageKey:i}),global:RC},l=zC(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(c,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=UC(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(we({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&this.accessToken().then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new Ek(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new wT(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new vk(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
141channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:i,lock:a,debug:l,throwOnError:u},c,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new BC({url:this.authUrl.href,headers:we(we({},f),c),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:a,debug:l,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(d=>d.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new Mk(this.realtimeUrl.href,we(we({},e),{},{params:we(we({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const WC=(e,t,r)=>new VC(e,t,r);function HC(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}HC()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function qC(){var w,g;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(p=>e===p||e.endsWith("."+p)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((w=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:w[1])??((g=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:g[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&a.test(l)?[l]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",h=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),d=(p,m,b)=>new Promise(E=>{const S=f();let k=!1,P;const A=L=>{k||(k=!0,clearTimeout(P),window.removeEventListener("message",j),E(L))},j=L=>{if(u.indexOf(L.origin)<0)return;const W=L.data;W&&W.type===c&&W.requestId===S&&A(W)};window.addEventListener("message",j);const B={type:p,requestId:S,projectId:s,key:m};b!==void 0&&(B.value=b);for(const L of u)window.parent.postMessage(B,L);P=setTimeout(()=>A(null),h)});let y=!0;const v=250;return{getItem:async p=>{let m=await d("lovable-preview-auth:get",p);return!m&&y&&(await new Promise(b=>setTimeout(b,v)),m=await d("lovable-preview-auth:get",p)),y=!1,m&&m.ok&&typeof m.value=="string"?m.value===""?(localStorage.removeItem(p),null):m.value:localStorage.getItem(p)},setItem:(p,m)=>(localStorage.setItem(p,m),d("lovable-preview-auth:set",p,m).then(b=>{b&&b.ok&&typeof b.value=="string"&&localStorage.getItem(p)===m&&(b.value===""?localStorage.removeItem(p):localStorage.setItem(p,b.value))})),removeItem:p=>(localStorage.removeItem(p),d("lovable-preview-auth:remove",p).then(()=>{}))}}const KC="https://jxwpfnmygracxnlvszeu.supabase.co",GC="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imp4d3Bmbm15Z3JhY3hubHZzemV1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjgyODIyMTYsImV4cCI6MjA4Mzg1ODIxNn0.k8trPItb3VQjW0cEXphXhw0TQu84l0LQ6pvCMvKgH7A",Sp=WC(KC,GC,{auth:{storage:qC(),persistSession:!0,autoRefreshToken:!0}}),QC=_.lazy(()=>oe(()=>import("./Index-CH4FMtvb.js").then(e=>e.I),__vite__mapDeps([0,1,2,3,4]))),JC=_.lazy(()=>oe(()=>import("./Impressum-CpR8uP3C.js"),[])),YC=_.lazy(()=>oe(()=>import("./Datenschutz-NrtsC20_.js"),[])),XC=_.lazy(()=>oe(()=>import("./AGB-BFzBpE7k.js"),[])),ZC=_.lazy(()=>oe(()=>import("./Danke-C8tXg1is.js"),__vite__mapDeps([5,6]))),eP=_.lazy(()=>oe(()=>import("./DankeFormular-Dg4_v1Bp.js"),__vite__mapDeps([7,8]))),tP=_.lazy(()=>oe(()=>
141import("./DankeKontakt-DPhHMBo8.js"),__vite__mapDeps([9,8,10,11]))),rP=_.lazy(()=>oe(()=>import("./NotFound-BFlLglmz.js"),[])),nP=_.lazy(()=>oe(()=>import("./Konzept-DM5TqbDD.js"),__vite__mapDeps([12,13,14,15,16,17,18,19,20,21,22]))),sP=_.lazy(()=>oe(()=>import("./DesignManual-CgQWIszu.js"),__vite__mapDeps([23,24,2,25,26,21,27,6,28]))),oP=_.lazy(()=>oe(()=>import("./Elternformular-BdmvqJ0G.js"),__vite__mapDeps([29,14,15,30,19,21,31,25,11,32]))),iP=_.lazy(()=>oe(()=>import("./Beirat-DfEiSS0I.js"),__vite__mapDeps([33,1,2,34,35,36,37]))),aP=_.lazy(()=>oe(()=>import("./Sponsoring-CPonOedA.js"),__vite__mapDeps([38,1,2,34,35,21,14,15]))),lP=_.lazy(()=>oe(()=>import("./Blog-BSifp2Oj.js"),__vite__mapDeps([39,1,2,34,40,41,42,3,11]))),uP=_.lazy(()=>oe(()=>import("./BlogPostFinanzfluss-BHDDhZ7D.js"),__vite__mapDeps([43,1,2,34,44,45,11,3,46,40,41,42,25]))),cP=_.lazy(()=>oe(()=>import("./BlogPostEF-Bmec6-RB.js"),__vite__mapDeps([47,1,2,34,44,45,11,3,46,40,41,42,25]))),dP=_.lazy(()=>oe(()=>import("./BlogPostLerncoach-CWjPrAVE.js"),__vite__mapDeps([48,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),hP=_.lazy(()=>oe(()=>import("./BlogPostMobbing-CGaZZsgj.js"),__vite__mapDeps([51,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),fP=_.lazy(()=>oe(()=>import("./BlogPostBafoeg-zttlmuss.js"),__vite__mapDeps([52,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),pP=_.lazy(()=>oe(()=>import("./BlogPostPruefungsangst-BkNVjOPH.js"),__vite__mapDeps([53,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),mP=_.lazy(()=>oe(()=>import("./BlogPostSpickzettel-D3cRNjlS.js"),__vite__mapDeps([54,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),gP=_.lazy(()=>oe(()=>import("./BlogPostSoftSkills-d5rwx6CG.js"),__vite__mapDeps([55,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),vP=_.lazy(()=>oe(()=>import("./BlogPostRhetorik-BwRCeWZi.js"),__vite__mapDeps([56,1,2,34,44,45,11,3,46,40,41,42,49,17,20,25,50,37]))),yP=_.lazy(()=>oe(()=>import("./Berufswahltest-B7RQaTz0.js"),__vite__mapDeps([57,1,2,34,44,45,11,3,58,25,49,17,20,42]))),wP=_.lazy(()=>oe(()=>import("./Admin-Jd1OU2Vs.js"),__vite__mapDeps([59,60,14,15,61,18,25,32,4,62,63,10,64,20,22,26]))),_P=_.lazy(()=>oe(()=>import("./ResetPassword-B3S65N9F.js"),__vite__mapDeps([65,14,64,32]))),bP=_.lazy(()=>oe(()=>import("./Community-DoNuku2L.js"),__vite__mapDeps([66,14,15,61,18,24,16,17,19,20,21,45,62,67,68,69,70,71,72,73,58,11,25,60,32,10,50,22,74,4,28]))),EP=_.lazy(()=>oe(()=>import("./CommunityBeitreten-bqdD7mGA.js"),__vite__mapDeps([75,14,15,30,19,21,16,17,18,20,24,73,60,11,76,32]))),xP=_.lazy(()=>oe(()=>import("./CommunityEltern-BmmGHKAU.js"),__vite__mapDeps([77,14,30,19,21,31,64,3,76,32]))),SP=new a1,kp=({url:e})=>(_.useEffect(()=>{window.location.href=e},[e]),null),kP=()=>{const e=Mn(),t=hl();return _.useEffect(()=>{if(e.pathname!=="/")return;const r=new URLSearchParams(e.search),n=new URLSearchParams(e.hash.replace(/^#/,""));if(!(r.has("code")||r.has("token_hash")||n.has("access_token")||n.has("refresh_token")||n.has("error")))return;let o=!0;(async()=>{const{data:l}=await Sp.auth.getSession();o&&l.session&&t("/community",{replace:!0})})();const{data:a}=Sp.auth.onAuthStateChange(l=>{o&&l==="SIGNED_IN"&&t("/community",{replace:!0})});return()=>{o=!1,a.subscription.unsubscribe()}},[e.hash,e.pathname,e.search,t]),null},TP=()=>x.jsx(u1,{client:SP,children:x.jsxs(DS,{children:[x.jsx(fE,{}),x.jsx(HE,{}),x.jsxs(ak,{children:[x.jsx(kP,{}),x.jsx(_.Suspense,{fallback:x.jsx("div",{className:"min-h-screen flex items-center justify-center",children:"Laden..."}),children:x.jsxs(Z1,{children:[x.jsx(ee,{path:"/",element:x.jsx(QC,{})}),x.jsx(ee,{path:"/home",element:x.jsx(Y1,{to:"/",replace:!0})}),x.jsx(ee,{path:"/impressum",element:x.jsx(JC,{})}),x.jsx(ee,{path:"/datenschutz",element:x.jsx(YC,{})}),x.jsx(ee,{path:"/agb",element:x.jsx(XC,{})}),x.jsx(ee,{path:"/danke",element:x.jsx(ZC,{})}),x.jsx(ee,{path:"/danke-formular",element:x.jsx(eP,{})}),x.jsx(ee,{path:"/danke-kontakt",element:x.jsx(tP,{})}),x.jsx(ee,{path:"/konzept",element:x.jsx(nP,{})}),x.jsx(ee,{path:"/info",element:x.jsx(sP,{})}),x.jsx(ee,{path:"/elternformular",element:x.jsx(oP,{})}),x.jsx(ee,{path:"/beirat",element:x.jsx(iP,{})}),x.jsx(ee,{path:"/sponsoring",element:x.jsx(aP,{})}),x.jsx(ee,{path:"/blog",element:x.jsx(lP,{})}),x.jsx(ee,{path:"/blog/finanzfluss-unterstuetzt-school-next-level",element:x.jsx(uP,{})}),x.jsx(ee,{path:"/blog/ef-education-first-partner-school-next-level",element:x.jsx(cP,{})}),x.jsx(ee,{path:"/blog/lerncoach-werden-ausbildung-ratgeber",element:x.jsx(dP,{})}),x.jsx(ee,{path:"/blog/schule-mobbing-hilfe-praevention-was-tun",element:x.jsx(hP,{})}),x.jsx(ee,{path:"/blog/schueler-bafoeg-anspruch-antrag-hoehe",element:x.jsx(fP,{})}),x.jsx(ee,{path:"/blog/pruefungsangst-was-tun-ueberwinden",element:x.jsx(pP,{})}),x.jsx(ee,{path:"/blog/spickzettel-ideen-kreativ-lernen",element:x.jsx(mP,{})}),x.jsx(ee,{path:"/blog/soft-skills-was-die-schule-nicht-lehrt",element:x.jsx(gP,{})}),x.jsx(ee,{path:"/blog/rhetorik-fuer-schueler-selbstbewusst-auftreten",element:x.jsx(vP,{})}),x.jsx(ee,{path:"/berufswahltest",element:x.jsx(yP,{})}),x.jsx(ee,{path:"/admin",element:x.jsx(wP,{})}),x.jsx(ee,{path:"/reset-password",element:x.jsx(_P,{})}),x.jsx(ee,{path:"/Finanzfluss",element:x.jsx(kp,{url:"https://myablefy.com/s/Finanzfluss-Campus/bildung/payment?coupon=SNL-FF-100&upsells=none"})}),x.jsx(ee,{path:"/community",element:x.jsx(bP,{})}),x.jsx(ee,{path:"/community/beitreten",element:x.jsx(EP,{})}),x.jsx(ee,{path:"/community/eltern",element:x.jsx(xP,{})}),x.jsx(ee,{path:"/whatsapp",element:x.jsx(kp,{url:"https://chat.whatsapp.com/Cg6fzEjGZD7EUYrSAntau9"})}),x.jsx(ee,{path:"*",element:x.jsx(rP,{})})]})}),x.jsx(fk,{})]})]})});Gg(document.getElementById("root")).render(x.jsx(TP,{}));export{Np as A,_c as B,PP as C,Cd as D,aS as E,B_ as F,Jv as G,mS as H,li as I,gS as J,vS as K,ck as L,pS as M,ep as N,fl as O,rt as P,DP as Q,I as R,$_ as S,DS as T,ib as V,Ab as X,oe as _,hl as a,AP as b,Tv as c,N_ as d,el as e,Zr as f,fr as g,on as h,Sv as i,x as j,NP as k,LP as l,US as m,Mt as n,Pe as o,Pd as p,RP as q,_ as r,Sp as s,j_ as t,Mn as u,rv as v,GE as w,tv as x,Ca as y,$P 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.