vendor: 5,691 bytes, lines 1-9
1var Gd=e=>{throw TypeError(e)};var ml=(e,t,r)=>t.has(e)||Gd("Cannot "+r);var C=(e,t,r)=>(ml(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?Gd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),H=(e,t,r,n)=>(ml(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(ml(e,t,"access private method"),r);var uo=(e,t,r,n)=>({set _(s){H(e,t,s,r)},get _(){return C(e,t,n)}});function Vv(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xp={exports:{}},ja={},Ep={exports:{}},Y={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Ji=Symbol.for("react.element"),Wv=Symbol.for("react.portal"),Hv=Symbol.for("react.fragment"),Kv=Symbol.for("react.strict_mode"),qv=Symbol.for("react.profiler"),Gv=Symbol.for("react.provider"),Qv=Symbol.for("react.context"),Jv=Symbol.for("react.forward_ref"),Yv=Symbol.for("react.suspense"),Xv=Symbol.for("react.memo"),Zv=Symbol.for("react.lazy"),Qd=Symbol.iterator;function ey(e){return e===null||typeof e!="object"?null:(e=Qd&&e[Qd]||e["@@iterator"],typeof e=="function"?e:null)}var Sp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kp=Object.assign,Cp={};function Fs(e,t,r){this.props=e,this.context=t,this.refs=Cp,this.updater=r||Sp}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 Tp(){}Tp.prototype=Fs.prototype;function Ec(e,t,r){this.props=e,this.context=t,this.refs=Cp,this.updater=r||Sp}var Sc=Ec.prototype=new Tp;Sc.constructor=Ec;kp(Sc,Fs.prototype);Sc.isPureReactComponent=!0;var Jd=Array.isArray,Pp=Object.prototype.hasOwnProperty,kc={current:null},Rp={key:!0,ref:!0,__self:!0,__source:!0};function Op(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Pp.call(t,n)&&!Rp.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:Ji,type:e,key:i,ref:o,props:s,_owner:kc.current}}function ty(e,t){return{$$typeof:Ji,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Cc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ji}function ry(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Yd=/\/+/g;function gl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ry(""+e.key):t.toString(36)}function Do(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ji:case Wv:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+gl(o,0):n,Jd(s)?(r="",e!=null&&(r=e.replace(Yd,"$&/")+"/"),Do(s,t,r,"",function(u){return u})):s!=null&&(Cc(s)&&(s=ty(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Yd,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Jd(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+gl(i,a);o+=Do(i,t,r,l,s)}else if(l=ey(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+gl(i,a++),o+=Do(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function co(e,t,r){if(e==null)return e;var n=[],s=0;return Do(e,n,"","",function(i){return t.call(r,i,s++)}),n}function ny(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 He={current:null},Mo={transition:null},sy={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:Mo,ReactCurrentOwner:kc};function Ap(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,730 bytes, lines 9-25
9Y.Children={map:co,forEach:function(e,t,r){co(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return co(e,function(){t++}),t},toArray:function(e){return co(e,function(t){return t})||[]},only:function(e){if(!Cc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Fs;Y.Fragment=Hv;Y.Profiler=qv;Y.PureComponent=Ec;Y.StrictMode=Kv;Y.Suspense=Yv;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sy;Y.act=Ap;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=kp({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=kc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Pp.call(t,l)&&!Rp.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:Ji,type:e.type,key:s,ref:i,props:n,_owner:o}};Y.createContext=function(e){return e={$$typeof:Qv,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Gv,_context:e},e.Consumer=e};Y.createElement=Op;Y.createFactory=function(e){var t=Op.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:Jv,render:e}};Y.isValidElement=Cc;Y.lazy=function(e){return{$$typeof:Zv,_payload:{_status:-1,_result:e},_init:ny}};Y.memo=function(e,t){return{$$typeof:Xv,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=Mo.transition;Mo.transition={};try{e()}finally{Mo.transition=t}};Y.unstable_act=Ap;Y.useCallback=function(e,t){return He.current.useCallback(e,t)};Y.useContext=function(e){return He.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return He.current.useDeferredValue(e)};Y.useEffect=function(e,t){return He.current.useEffect(e,t)};Y.useId=function(){return He.current.useId()};Y.useImperativeHandle=function(e,t,r){return He.current.useImperativeHandle(e,t,r)};Y.useInsertionEffect=function(e,t){return He.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return He.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return He.current.useMemo(e,t)};Y.useReducer=function(e,t,r){return He.current.useReducer(e,t,r)};Y.useRef=function(e){return He.current.useRef(e)};Y.useState=function(e){return He.current.useState(e)};Y.useSyncExternalStore=function(e,t,r){return He.current.useSyncExternalStore(e,t,r)};Y.useTransition=function(){return He.current.useTransition()};Y.version="18.3.1";Ep.exports=Y;var _=Ep.exports;const N=bp(_),Np=Vv({__proto__:null,default:N},[_]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var iy=_,oy=Symbol.for("react.element"),ay=Symbol.for("react.fragment"),ly=Object.prototype.hasOwnProperty,uy=iy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cy={key:!0,ref:!0,__self:!0,__source:!0};function jp(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)ly.call(t,n)&&!cy.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:oy,type:e,key:i,ref:o,props:s,_owner:uy.current}}ja.Fragment=ay;ja.jsx=jp;ja.jsxs=jp;xp.exports=ja;var x=xp.exports,Ip={exports:{}},dt={},$p={exports:{}},Lp={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(T,R){var $=T.length;T.push(R);e:for(;0<$;){var q=$-1>>>1,U=T[q];if(0<s(U,R))T[q]=R,T[$]=U,$=q;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var R=T[0],$=T.pop();if($!==R){T[0]=$;e:for(var q=0,U=T.length,J=U>>>1;q<J;){var Z=2*(q+1)-1,_e=T[Z],Ie=Z+1,re=T[Ie];if(0>s(_e,$))Ie<U&&0>s(re,_e)?(T[q]=re,T[Ie]=$,q=Ie):(T[q]=_e,T[Z]=$,q=Z);else if(Ie<U&&0>s(re,$))T[q]=re,T[Ie]=$,q=Ie;else break e}}return R}function s(T,R){var $=T.sortIndex-R.sortIndex;return $!==0?$:T.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,h=3,d=!1,y=!1,m=!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 v(T){for(var R=r(u);R!==null;){if(R.callback===null)n(u);else if(R.startTime<=T)n(u),R.sortIndex=R.expirationTime,t(l,R);else break;R=r(u)}}function b(T){if(m=!1,v(T),!y)if(r(l)!==null)y=!0,V(E);else{var R=r(u);R!==null&&K(b,R.startTime-T)}}function E(T,R){y=!1,m&&(m=!1,g(P),P=-1),d=!0;var $=h;try{for(v(R),f=r(l);f!==null&&(!(f.expirationTime>R)||T&&!B());){var q=f.callback;if(typeof q=="function"){f.callback=null,h=f.priorityLevel;var U=q(f.expirationTime<=R);R=e.unstable_now(),typeof U=="function"?f.callback=U:f===r(l)&&n(l),v(R)}else n(l);f=r(l)}if(f!==null)var J=!0;else{var Z=r(u);Z!==null&&K(b,Z.startTime-R),J=!1}return J}finally{f=null,h=$,d=!1}
vendor: 8,870 bytes, lines 25-34
25}var S=!1,k=null,P=-1,A=5,j=-1;function B(){return!(e.unstable_now()-j<A)}function D(){if(k!==null){var T=e.unstable_now();j=T;var R=!0;try{R=k(!0,T)}finally{R?Q():(S=!1,k=null)}}else S=!1}var Q;if(typeof p=="function")Q=function(){p(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,X=I.port2;I.port1.onmessage=D,Q=function(){X.postMessage(null)}}else Q=function(){w(D,0)};function V(T){k=T,S||(S=!0,Q())}function K(T,R){P=w(function(){T(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){y||d||(y=!0,V(E))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(h){case 1:case 2:case 3:var R=3;break;default:R=h}var $=h;h=R;try{return T()}finally{h=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var $=h;h=T;try{return R()}finally{h=$}},e.unstable_scheduleCallback=function(T,R,$){var q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?q+$:q):$=q,T){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=$+U,T={id:c++,callback:R,priorityLevel:T,startTime:$,expirationTime:U,sortIndex:-1},$>q?(T.sortIndex=$,t(u,T),r(l)===null&&T===r(u)&&(m?(g(P),P=-1):m=!0,K(b,$-q))):(T.sortIndex=U,t(l,T),y||d||(y=!0,V(E))),T},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(T){var R=h;return function(){var $=h;h=R;try{return T.apply(this,arguments)}finally{h=$}}}})(Lp);$p.exports=Lp;var dy=$p.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var hy=_,ct=dy;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 Dp=new Set,bi={};function In(e,t){Os(e,t),Os(e+"Capture",t)}function Os(e,t){for(bi[e]=t,e=0;e<t.length;e++)Dp.add(t[e])}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),su=Object.prototype.hasOwnProperty,fy=/^[: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]*$/,Xd={},Zd={};function py(e){return su.call(Zd,e)?!0:su.call(Xd,e)?!1:fy.test(e)?Zd[e]=!0:(Xd[e]=!0,!1)}function my(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 gy(e,t,r,n){if(t===null||typeof t>"u"||my(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 Ke(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){je[e]=new Ke(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];je[t]=new Ke(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){je[e]=new Ke(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){je[e]=new Ke(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){je[e]=new Ke(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){je[e]=new Ke(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){je[e]=new Ke(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){je[e]=new Ke(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){je[e]=new Ke(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tc=/[\-:]([a-z])/g;function Pc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Tc,Pc);je[t]=new Ke(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(Tc,Pc);je[t]=new Ke(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(Tc,Pc);je[t]=new Ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){je[e]=new Ke(e,1,!1,e.toLowerCase(),null,!1,!1)});je.xlinkHref=new Ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){je[e]=new Ke(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rc(e,t,r,n){var s=je.hasOwnProperty(t)?je[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gy(t,r,s,n)&&(r=null),n||s===null?py(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 pr=hy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ho=Symbol.for("react.element"),Zn=Symbol.for("react.portal"),es=Symbol.for("react.fragment"),Oc=Symbol.for("react.strict_mode"),iu=Symbol.for("react.profiler"),Mp=Symbol.for("react.provider"),Up=Symbol.for("react.context"),Ac=Symbol.for("react.forward_ref"),ou=Symbol.for("react.suspense"),au=Symbol.for("react.suspense_list"),Nc=Symbol.for("react.memo"),Tr=Symbol.for("react.lazy"),Fp=Symbol.for("react.offscreen"),eh=Symbol.iterator;function Gs(e){return e===null||typeof e!="object"?null:(e=eh&&e[eh]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,vl;function si(e){if(vl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);vl=t&&t[1]||""}return` 34`+vl+e}var yl=!1;function wl(e,t){if(!e||yl)return"";yl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 18,177 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=n.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{yl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?si(e):""}function vy(e){switch(e.tag){case 5:return si(e.type);case 16:return si("Lazy");case 13:return si("Suspense");case 19:return si("SuspenseList");case 0:case 2:case 15:return e=wl(e.type,!1),e;case 11:return e=wl(e.type.render,!1),e;case 1:return e=wl(e.type,!0),e;default:return""}}function lu(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 es:return"Fragment";case Zn:return"Portal";case iu:return"Profiler";case Oc:return"StrictMode";case ou:return"Suspense";case au:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Up:return(e.displayName||"Context")+".Consumer";case Mp:return(e._context.displayName||"Context")+".Provider";case Ac:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nc:return t=e.displayName||null,t!==null?t:lu(e.type)||"Memo";case Tr:t=e._payload,e=e._init;try{return lu(e(t))}catch{}}return null}function yy(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 lu(t);case 8:return t===Oc?"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 Qr(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 wy(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,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fo(e){e._valueTracker||(e._valueTracker=wy(e))}function Bp(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 Xo(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 uu(e,t){var r=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function th(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Qr(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 Vp(e,t){t=t.checked,t!=null&&Rc(e,"checked",t,!1)}function cu(e,t){Vp(e,t);var r=Qr(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")?du(e,t.type,r):t.hasOwnProperty("defaultValue")&&du(e,t.type,Qr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rh(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 du(e,t,r){(t!=="number"||Xo(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ii=Array.isArray;function hs(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=""+Qr(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 hu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function nh(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(ii(r)){if(1<r.length)throw Error(O(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Qr(r)}}function Wp(e,t){var r=Qr(t.value),n=Qr(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 sh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Hp(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 fu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Hp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var po,Kp=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(po=po||document.createElement("div"),po.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=po.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xi(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ui={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},_y=["Webkit","ms","Moz","O"];Object.keys(ui).forEach(function(e){_y.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ui[t]=ui[e]})});function qp(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ui.hasOwnProperty(e)&&ui[e]?(""+t).trim():t+"px"}function Gp(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=qp(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var by=me({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 pu(e,t){if(t){if(by[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 mu(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 gu=null;function jc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vu=null,fs=null,ps=null;function ih(e){if(e=Zi(e)){if(typeof vu!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Ma(t),vu(e.stateNode,e.type,t))}}function Qp(e){fs?ps?ps.push(e):ps=[e]:fs=e}function Jp(){if(fs){var e=fs,t=ps;if(ps=fs=null,ih(e),t)for(e=0;e<t.length;e++)ih(t[e])}}function Yp(e,t){return e(t)}function Xp(){}var _l=!1;function Zp(e,t,r){if(_l)return e(t,r);_l=!0;try{return Yp(e,t,r)}finally{_l=!1,(fs!==null||ps!==null)&&(Xp(),Jp())}}function Ei(e,t){var r=e.stateNode;if(r===null)return null;var n=Ma(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 yu=!1;if(lr)try{var Qs={};Object.defineProperty(Qs,"passive",{get:function(){yu=!0}}),window.addEventListener("test",Qs,Qs),window.removeEventListener("test",Qs,Qs)}catch{yu=!1}function xy(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var ci=!1,Zo=null,ea=!1,wu=null,Ey={onError:function(e){ci=!0,Zo=e}};function Sy(e,t,r,n,s,i,o,a,l){ci=!1,Zo=null,xy.apply(Ey,arguments)}function ky(e,t,r,n,s,i,o,a,l){if(Sy.apply(this,arguments),ci){if(ci){var u=Zo;ci=!1,Zo=null}else throw Error(O(198));ea||(ea=!0,wu=u)}}function $n(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 em(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 oh(e){if($n(e)!==e)throw Error(O(188))}function Cy(e){var t=e.alternate;if(!t){if(t=$n(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 i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return oh(s),e;if(i===n)return oh(s),t;i=i.sibling}throw Error(O(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(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 tm(e){return e=Cy(e),e!==null?rm(e):null}function rm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=rm(e);if(t!==null)return t;e=e.sibling}return null}var nm=ct.unstable_scheduleCallback,ah=ct.unstable_cancelCallback,Ty=ct.unstable_shouldYield,Py=ct.unstable_requestPaint,we=ct.unstable_now,Ry=ct.unstable_getCurrentPriorityLevel,Ic=ct.unstable_ImmediatePriority,sm=ct.unstable_UserBlockingPriority,ta=ct.unstable_NormalPriority,Oy=ct.unstable_LowPriority,im=ct.unstable_IdlePriority,Ia=null,Gt=null;function Ay(e){if(Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(Ia,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:Iy,Ny=Math.log,jy=Math.LN2;function Iy(e){return e>>>=0,e===0?32:31-(Ny(e)/jy|0)|0}var mo=64,go=4194304;function oi(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 ra(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=oi(a):(i&=o,i!==0&&(n=oi(i)))}else o=r&~s,o!==0?n=oi(o):i!==0&&(n=oi(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-$t(t),s=1<<r,n|=e[r],t&=~s;return n}function $y(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 Ly(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-$t(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=$y(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function _u(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function om(){var e=mo;return mo<<=1,!(mo&4194240)&&(mo=64),e}function bl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Yi(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 Dy(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),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function $c(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 ne=0;function am(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var lm,Lc,um,cm,dm,bu=!1,vo=[],zr=null,Br=null,Vr=null,Si=new Map,ki=new Map,Or=[],My="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 lh(e,t){switch(e){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Br=null;break;case"mouseover":case"mouseout":Vr=null;break;case"pointerover":case"pointerout":Si.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ki.delete(t.pointerId)}}function Js(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Zi(t),t!==null&&Lc(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Uy(e,t,r,n,s){switch(t){case"focusin":return zr=Js(zr,e,t,r,n,s),!0;case"dragenter":return Br=Js(Br,e,t,r,n,s),!0;case"mouseover":return Vr=Js(Vr,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Si.set(i,Js(Si.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,ki.set(i,Js(ki.get(i)||null,e,t,r,n,s)),!0}return!1}function hm(e){var t=gn(e.target);if(t!==null){var r=$n(t);if(r!==null){if(t=r.tag,t===13){if(t=em(r),t!==null){e.blockedOn=t,dm(e.priority,function(){um(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 Uo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=xu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);gu=n,r.target.dispatchEvent(n),gu=null}else return t=Zi(r),t!==null&&Lc(t),e.blockedOn=r,!1;t.shift()}return!0}function uh(e,t,r){Uo(e)&&r.delete(t)}function Fy(){bu=!1,zr!==null&&Uo(zr)&&(zr=null),Br!==null&&Uo(Br)&&(Br=null),Vr!==null&&Uo(Vr)&&(Vr=null),Si.forEach(uh),ki.forEach(uh)}function Ys(e,t){e.blockedOn===t&&(e.blockedOn=null,bu||(bu=!0,ct.unstable_scheduleCallback(ct.unstable_NormalPriority,Fy)))}function Ci(e){function t(s){return Ys(s,e)}if(0<vo.length){Ys(vo[0],e);for(var r=1;r<vo.length;r++){var n=vo[r];n.blockedOn===e&&(n.blockedOn=null)}}for(zr!==null&&Ys(zr,e),Br!==null&&Ys(Br,e),Vr!==null&&Ys(Vr,e),Si.forEach(t),ki.forEach(t),r=0;r<Or.length;r++)n=Or[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Or.length&&(r=Or[0],r.blockedOn===null);)hm(r),r.blockedOn===null&&Or.shift()}var ms=pr.ReactCurrentBatchConfig,na=!0;function zy(e,t,r,n){var s=ne,i=ms.transition;ms.transition=null;try{ne=1,Dc(e,t,r,n)}finally{ne=s,ms.transition=i}}function By(e,t,r,n){var s=ne,i=ms.transition;ms.transition=null;try{ne=4,Dc(e,t,r,n)}finally{ne=s,ms.transition=i}}function Dc(e,t,r,n){if(na){var s=xu(e,t,r,n);if(s===null)Al(e,t,n,sa,r),lh(e,n);else if(Uy(s,e,t,r,n))n.stopPropagation();else if(lh(e,n),t&4&&-1<My.indexOf(e)){for(;s!==null;){var i=Zi(s);if(i!==null&&lm(i),i=xu(e,t,r,n),i===null&&Al(e,t,n,sa,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Al(e,t,n,null,r)}}var sa=null;function xu(e,t,r,n){if(sa=null,e=jc(n),e=gn(e),e!==null)if(t=$n(e),t===null)e=null;else if(r=t.tag,r===13){if(e=em(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 sa=e,null}
vendor: 8,975 bytes, line 37
37function fm(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(Ry()){case Ic:return 1;case sm:return 4;case ta:case Oy:return 16;case im:return 536870912;default:return 16}default:return 16}}var Mr=null,Mc=null,Fo=null;function pm(){if(Fo)return Fo;var e,t=Mc,r=t.length,n,s="value"in Mr?Mr.value:Mr.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return Fo=s.slice(e,1<n?1-n:void 0)}function zo(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 yo(){return!0}function ch(){return!1}function ht(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?yo:ch,this.isPropagationStopped=ch,this}return me(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=yo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uc=ht(zs),Xi=me({},zs,{view:0,detail:0}),Vy=ht(Xi),xl,El,Xs,$a=me({},Xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fc,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!==Xs&&(Xs&&e.type==="mousemove"?(xl=e.screenX-Xs.screenX,El=e.screenY-Xs.screenY):El=xl=0,Xs=e),xl)},movementY:function(e){return"movementY"in e?e.movementY:El}}),dh=ht($a),Wy=me({},$a,{dataTransfer:0}),Hy=ht(Wy),Ky=me({},Xi,{relatedTarget:0}),Sl=ht(Ky),qy=me({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),Gy=ht(qy),Qy=me({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jy=ht(Qy),Yy=me({},zs,{data:0}),hh=ht(Yy),Xy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zy={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"},ew={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ew[e])?!!t[e]:!1}function Fc(){return tw}var rw=me({},Xi,{key:function(e){if(e.key){var t=Xy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fc,charCode:function(e){return e.type==="keypress"?zo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nw=ht(rw),sw=me({},$a,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fh=ht(sw),iw=me({},Xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fc}),ow=ht(iw),aw=me({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),lw=ht(aw),uw=me({},$a,{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}),cw=ht(uw),dw=[9,13,27,32],zc=lr&&"CompositionEvent"in window,di=null;lr&&"documentMode"in document&&(di=document.documentMode);var hw=lr&&"TextEvent"in window&&!di,mm=lr&&(!zc||di&&8<di&&11>=di),ph=" ",mh=!1;function gm(e,t){switch(e){case"keyup":return dw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function fw(e,t){switch(e){case"compositionend":return vm(t);case"keypress":return t.which!==32?null:(mh=!0,ph);case"textInput":return e=t.data,e===ph&&mh?null:e;default:return null}}function pw(e,t){if(ts)return e==="compositionend"||!zc&&gm(e,t)?(e=pm(),Fo=Mc=Mr=null,ts=!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 mm&&t.locale!=="ko"?null:t.data;default:return null}}var mw={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 gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mw[e.type]:t==="textarea"}function ym(e,t,r,n){Qp(n),t=ia(t,"onChange"),0<t.length&&(r=new Uc("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var hi=null,Ti=null;function gw(e){Rm(e,0)}function La(e){var t=ss(e);if(Bp(t))return e}function vw(e,t){if(e==="change")return t}var wm=!1;if(lr){var kl;if(lr){var Cl="oninput"in document;if(!Cl){var vh=document.createElement("div");vh.setAttribute("oninput","return;"),Cl=typeof vh.oninput=="function"}kl=Cl}else kl=!1;wm=kl&&(!document.documentMode||9<document.documentMode)}function yh(){hi&&(hi.detachEvent("onpropertychange",_m),Ti=hi=null)}function _m(e){if(e.propertyName==="value"&&La(Ti)){var t=[];ym(t,Ti,e,jc(e)),Zp(gw,t)}}function yw(e,t,r){e==="focusin"?(yh(),hi=t,Ti=r,hi.attachEvent("onpropertychange",_m)):e==="focusout"&&yh()}function ww(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return La(Ti)}function _w(e,t){if(e==="click")return La(t)}function bw(e,t){if(e==="input"||e==="change")return La(t)}function xw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:xw;function Pi(e,t){if(Dt(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(!su.call(t,s)||!Dt(e[s],t[s]))return!1}return!0}function wh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,t){var r=wh(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=wh(r)}}function bm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xm(){for(var e=window,t=Xo();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Xo(e.document)}return t}function Bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}
vendor: 5,226 bytes, line 37
37function Ew(e){var t=xm(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bm(r.ownerDocument.documentElement,r)){if(n!==null&&Bc(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=_h(r,i);var o=_h(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sw=lr&&"documentMode"in document&&11>=document.documentMode,rs=null,Eu=null,fi=null,Su=!1;function bh(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Su||rs==null||rs!==Xo(n)||(n=rs,"selectionStart"in n&&Bc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),fi&&Pi(fi,n)||(fi=n,n=ia(Eu,"onSelect"),0<n.length&&(t=new Uc("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=rs)))}function wo(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ns={animationend:wo("Animation","AnimationEnd"),animationiteration:wo("Animation","AnimationIteration"),animationstart:wo("Animation","AnimationStart"),transitionend:wo("Transition","TransitionEnd")},Tl={},Em={};lr&&(Em=document.createElement("div").style,"AnimationEvent"in window||(delete ns.animationend.animation,delete ns.animationiteration.animation,delete ns.animationstart.animation),"TransitionEvent"in window||delete ns.transitionend.transition);function Da(e){if(Tl[e])return Tl[e];if(!ns[e])return e;var t=ns[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Em)return Tl[e]=t[r];return e}var Sm=Da("animationend"),km=Da("animationiteration"),Cm=Da("animationstart"),Tm=Da("transitionend"),Pm=new Map,xh="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 tn(e,t){Pm.set(e,t),In(t,[e])}for(var Pl=0;Pl<xh.length;Pl++){var Rl=xh[Pl],kw=Rl.toLowerCase(),Cw=Rl[0].toUpperCase()+Rl.slice(1);tn(kw,"on"+Cw)}tn(Sm,"onAnimationEnd");tn(km,"onAnimationIteration");tn(Cm,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(Tm,"onTransitionEnd");Os("onMouseEnter",["mouseout","mouseover"]);Os("onMouseLeave",["mouseout","mouseover"]);Os("onPointerEnter",["pointerout","pointerover"]);Os("onPointerLeave",["pointerout","pointerover"]);In("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));In("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));In("onBeforeInput",["compositionend","keypress","textInput","paste"]);In("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));In("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));In("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),Tw=new Set("cancel close invalid load scroll toggle".split(" ").concat(ai));function Eh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,ky(n,t,void 0,e),e.currentTarget=null}function Rm(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Eh(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Eh(s,a,u),i=l}}}if(ea)throw e=wu,ea=!1,wu=null,e}function le(e,t){var r=t[Ru];r===void 0&&(r=t[Ru]=new Set);var n=e+"__bubble";r.has(n)||(Om(t,e,2,!1),r.add(n))}function Ol(e,t,r){var n=0;t&&(n|=4),Om(r,e,n,t)}var _o="_reactListening"+Math.random().toString(36).slice(2);
vendor: 23,318 bytes, lines 37-38
37function Ri(e){if(!e[_o]){e[_o]=!0,Dp.forEach(function(r){r!=="selectionchange"&&(Tw.has(r)||Ol(r,!1,e),Ol(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_o]||(t[_o]=!0,Ol("selectionchange",!1,t))}}function Om(e,t,r,n){switch(fm(t)){case 1:var s=zy;break;case 4:s=By;break;default:s=Dc}r=s.bind(null,t,r,e),s=void 0,!yu||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 Al(e,t,r,n,s){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=gn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Zp(function(){var u=i,c=jc(r),f=[];e:{var h=Pm.get(e);if(h!==void 0){var d=Uc,y=e;switch(e){case"keypress":if(zo(r)===0)break e;case"keydown":case"keyup":d=nw;break;case"focusin":y="focus",d=Sl;break;case"focusout":y="blur",d=Sl;break;case"beforeblur":case"afterblur":d=Sl;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=dh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Hy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=ow;break;case Sm:case km:case Cm:d=Gy;break;case Tm:d=lw;break;case"scroll":d=Vy;break;case"wheel":d=cw;break;case"copy":case"cut":case"paste":d=Jy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=fh}var m=(t&4)!==0,w=!m&&e==="scroll",g=m?h!==null?h+"Capture":null:h;m=[];for(var p=u,v;p!==null;){v=p;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=Ei(p,g),b!=null&&m.push(Oi(p,b,v)))),w)break;p=p.return}0<m.length&&(h=new d(h,y,null,r,c),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",h&&r!==gu&&(y=r.relatedTarget||r.fromElement)&&(gn(y)||y[ur]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(y=r.relatedTarget||r.toElement,d=u,y=y?gn(y):null,y!==null&&(w=$n(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(d=null,y=u),d!==y)){if(m=dh,b="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(m=fh,b="onPointerLeave",g="onPointerEnter",p="pointer"),w=d==null?h:ss(d),v=y==null?h:ss(y),h=new m(b,p+"leave",d,r,c),h.target=w,h.relatedTarget=v,b=null,gn(c)===u&&(m=new m(g,p+"enter",y,r,c),m.target=v,m.relatedTarget=w,b=m),w=b,d&&y)t:{for(m=d,g=y,p=0,v=m;v;v=Bn(v))p++;for(v=0,b=g;b;b=Bn(b))v++;for(;0<p-v;)m=Bn(m),p--;for(;0<v-p;)g=Bn(g),v--;for(;p--;){if(m===g||g!==null&&m===g.alternate)break t;m=Bn(m),g=Bn(g)}m=null}else m=null;d!==null&&Sh(f,h,d,m,!1),y!==null&&w!==null&&Sh(f,w,y,m,!0)}}e:{if(h=u?ss(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var E=vw;else if(gh(h))if(wm)E=bw;else{E=ww;var S=yw}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(E=_w);if(E&&(E=E(e,u))){ym(f,E,r,c);break e}S&&S(e,h,u),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&du(h,"number",h.value)}switch(S=u?ss(u):window,e){case"focusin":(gh(S)||S.contentEditable==="true")&&(rs=S,Eu=u,fi=null);break;case"focusout":fi=Eu=rs=null;break;case"mousedown":Su=!0;break;case"contextmenu":case"mouseup":case"dragend":Su=!1,bh(f,r,c);break;case"selectionchange":if(Sw)break;case"keydown":case"keyup":bh(f,r,c)}var k;if(zc)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 ts?gm(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(mm&&r.locale!=="ko"&&(ts||P!=="onCompositionStart"?P==="onCompositionEnd"&&ts&&(k=pm()):(Mr=c,Mc="value"in Mr?Mr.value:Mr.textContent,ts=!0)),S=ia(u,P),0<S.length&&(P=new hh(P,e,null,r,c),f.push({event:P,listeners:S}),k?P.data=k:(k=vm(r),k!==null&&(P.data=k)))),(k=hw?fw(e,r):pw(e,r))&&(u=ia(u,"onBeforeInput"),0<u.length&&(c=new hh("onBeforeInput","beforeinput",null,r,c),f.push({event:c,listeners:u}),c.data=k))}Rm(f,t)})}function Oi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ia(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ei(e,r),i!=null&&n.unshift(Oi(e,i,s)),i=Ei(e,t),i!=null&&n.push(Oi(e,i,s))),e=e.return}return n}function Bn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sh(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=Ei(r,i),l!=null&&o.unshift(Oi(r,l,a))):s||(l=Ei(r,i),l!=null&&o.push(Oi(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Pw=/\r\n?/g,Rw=/\u0000|\uFFFD/g;function kh(e){return(typeof e=="string"?e:""+e).replace(Pw,` 38`).replace(Rw,"")}function bo(e,t,r){if(t=kh(t),kh(e)!==t&&r)throw Error(O(425))}function oa(){}var ku=null,Cu=null;function Tu(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 Pu=typeof setTimeout=="function"?setTimeout:void 0,Ow=typeof clearTimeout=="function"?clearTimeout:void 0,Ch=typeof Promise=="function"?Promise:void 0,Aw=typeof queueMicrotask=="function"?queueMicrotask:typeof Ch<"u"?function(e){return Ch.resolve(null).then(e).catch(Nw)}:Pu;function Nw(e){setTimeout(function(){throw e})}function Nl(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),Ci(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ci(t)}function Wr(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 Th(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 Bs=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Bs,Ai="__reactProps$"+Bs,ur="__reactContainer$"+Bs,Ru="__reactEvents$"+Bs,jw="__reactListeners$"+Bs,Iw="__reactHandles$"+Bs;function gn(e){var t=e[Kt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ur]||r[Kt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Th(e);e!==null;){if(r=e[Kt])return r;e=Th(e)}return t}e=r,r=e.parentNode}return null}function Zi(e){return e=e[Kt]||e[ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function Ma(e){return e[Ai]||null}var Ou=[],is=-1;function rn(e){return{current:e}}function ue(e){0>is||(e.current=Ou[is],Ou[is]=null,is--)}function oe(e,t){is++,Ou[is]=e.current,e.current=t}var Jr={},Fe=rn(Jr),Ye=rn(!1),Pn=Jr;function As(e,t){var r=e.type.contextTypes;if(!r)return Jr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Xe(e){return e=e.childContextTypes,e!=null}function aa(){ue(Ye),ue(Fe)}function Ph(e,t,r){if(Fe.current!==Jr)throw Error(O(168));oe(Fe,t),oe(Ye,r)}function Am(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,yy(e)||"Unknown",s));return me({},r,n)}function la(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jr,Pn=Fe.current,oe(Fe,e),oe(Ye,Ye.current),!0}function Rh(e,t,r){var n=e.stateNode;if(!n)throw Error(O(169));r?(e=Am(e,t,Pn),n.__reactInternalMemoizedMergedChildContext=e,ue(Ye),ue(Fe),oe(Fe,e)):ue(Ye),oe(Ye,r)}var nr=null,Ua=!1,jl=!1;function Nm(e){nr===null?nr=[e]:nr.push(e)}function $w(e){Ua=!0,Nm(e)}function nn(){if(!jl&&nr!==null){jl=!0;var e=0,t=ne;try{var r=nr;for(ne=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}nr=null,Ua=!1}catch(s){throw nr!==null&&(nr=nr.slice(e+1)),nm(Ic,nn),s}finally{ne=t,jl=!1}}return null}var os=[],as=0,ua=null,ca=0,mt=[],gt=0,Rn=null,ir=1,or="";function cn(e,t){os[as++]=ca,os[as++]=ua,ua=e,ca=t}function jm(e,t,r){mt[gt++]=ir,mt[gt++]=or,mt[gt++]=Rn,Rn=e;var n=ir;e=or;var s=32-$t(n)-1;n&=~(1<<s),r+=1;var i=32-$t(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,ir=1<<32-$t(t)+s|r<<s|n,or=i+e}else ir=1<<i|r<<s|n,or=e}function Vc(e){e.return!==null&&(cn(e,1),jm(e,1,0))}function Wc(e){for(;e===ua;)ua=os[--as],os[as]=null,ca=os[--as],os[as]=null;for(;e===Rn;)Rn=mt[--gt],mt[gt]=null,or=mt[--gt],mt[gt]=null,ir=mt[--gt],mt[gt]=null}var lt=null,at=null,de=!1,It=null;function Im(e,t){var r=vt(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 Oh(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,lt=e,at=Wr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Rn!==null?{id:ir,overflow:or}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=vt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,lt=e,at=null,!0):!1;default:return!1}}function Au(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Nu(e){if(de){var t=at;if(t){var r=t;if(!Oh(e,t)){if(Au(e))throw Error(O(418));t=Wr(r.nextSibling);var n=lt;t&&Oh(e,t)?Im(n,r):(e.flags=e.flags&-4097|2,de=!1,lt=e)}}else{if(Au(e))throw Error(O(418));e.flags=e.flags&-4097|2,de=!1,lt=e}}}function Ah(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function xo(e){if(e!==lt)return!1;if(!de)return Ah(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Tu(e.type,e.memoizedProps)),t&&(t=at)){if(Au(e))throw $m(),Error(O(418));for(;t;)Im(e,t),t=Wr(t.nextSibling)}if(Ah(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){at=Wr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}at=null}}else at=lt?Wr(e.stateNode.nextSibling):null;return!0}function $m(){for(var e=at;e;)e=Wr(e.nextSibling)}function Ns(){at=lt=null,de=!1}function Hc(e){It===null?It=[e]:It.push(e)}var Lw=pr.ReactCurrentBatchConfig;function Zs(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,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(O(284));if(!r._owner)throw Error(O(290,e))}return e}function Eo(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Nh(e){var t=e._init;return t(e._payload)}function Lm(e){function t(g,p){if(e){var v=g.deletions;v===null?(g.deletions=[p],g.flags|=16):v.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=Gr(g,p),g.index=0,g.sibling=null,g}function i(g,p,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<p?(g.flags|=2,p):v):(g.flags|=2,p)):(g.flags|=1048576,p)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,p,v,b){return p===null||p.tag!==6?(p=Fl(v,g.mode,b),p.return=g,p):(p=s(p,v),p.return=g,p)}function l(g,p,v,b){var E=v.type;return E===es?c(g,p,v.props.children,b,v.key):p!==null&&(p.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Tr&&Nh(E)===p.type)?(b=s(p,v.props),b.ref=Zs(g,p,v),b.return=g,b):(b=Go(v.type,v.key,v.props,null,g.mode,b),b.ref=Zs(g,p,v),b.return=g,b)}function u(g,p,v,b){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=zl(v,g.mode,b),p.return=g,p):(p=s(p,v.children||[]),p.return=g,p)}function c(g,p,v,b,E){return p===null||p.tag!==7?(p=Tn(v,g.mode,b,E),p.return=g,p):(p=s(p,v),p.return=g,p)}function f(g,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Fl(""+p,g.mode,v),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ho:return v=Go(p.type,p.key,p.props,null,g.mode,v),v.ref=Zs(g,null,p),v.return=g,v;case Zn:return p=zl(p,g.mode,v),p.return=g,p;case Tr:var b=p._init;return f(g,b(p._payload),v)}if(ii(p)||Gs(p))return p=Tn(p,g.mode,v,null),p.return=g,p;Eo(g,p)}return null}function h(g,p,v,b){var E=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return E!==null?null:a(g,p,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ho:return v.key===E?l(g,p,v,b):null;case Zn:return v.key===E?u(g,p,v,b):null;case Tr:return E=v._init,h(g,p,E(v._payload),b)}if(ii(v)||Gs(v))return E!==null?null:c(g,p,v,b,null);Eo(g,v)}return null}function d(g,p,v,b,E){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,a(p,g,""+b,E);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ho:return g=g.get(b.key===null?v:b.key)||null,l(p,g,b,E);case Zn:return g=g.get(b.key===null?v:b.key)||null,u(p,g,b,E);case Tr:var S=b._init;return d(g,p,v,S(b._payload),E)}if(ii(b)||Gs(b))return g=g.get(v)||null,c(p,g,b,E,null);Eo(p,b)}return null}function y(g,p,v,b){for(var E=null,S=null,k=p,P=p=0,A=null;k!==null&&P<v.length;P++){k.index>P?(A=k,k=null):A=k.sibling;var j=h(g,k,v[P],b);if(j===null){k===null&&(k=A);break}e&&k&&j.alternate===null&&t(g,k),p=i(j,p,P),S===null?E=j:S.sibling=j,S=j,k=A}if(P===v.length)return r(g,k),de&&cn(g,P),E;if(k===null){for(;P<v.length;P++)k=f(g,v[P],b),k!==null&&(p=i(k,p,P),S===null?E=k:S.sibling=k,S=k);return de&&cn(g,P),E}for(k=n(g,k);P<v.length;P++)A=d(k,g,P,v[P],b),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?P:A.key),p=i(A,p,P),S===null?E=A:S.sibling=A,S=A);return e&&k.forEach(function(B){return t(g,B)}),de&&cn(g,P),E}function m(g,p,v,b){var E=Gs(v);if(typeof E!="function")throw Error(O(150));if(v=E.call(v),v==null)throw Error(O(151));for(var S=E=null,k=p,P=p=0,A=null,j=v.next();k!==null&&!j.done;P++,j=v.next()){k.index>P?(A=k,k=null):A=k.sibling;var B=h(g,k,j.value,b);if(B===null){k===null&&(k=A);break}e&&k&&B.alternate===null&&t(g,k),p=i(B,p,P),S===null?E=B:S.sibling=B,S=B,k=A}if(j.done)return r(g,k),de&&cn(g,P),E;if(k===null){for(;!j.done;P++,j=v.next())j=f(g,j.value,b),j!==null&&(p=i(j,p,P),S===null?E=j:S.sibling=j,S=j);return de&&cn(g,P),E}for(k=n(g,k);!j.done;P++,j=v.next())j=d(k,g,P,j.value,b),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),p=i(j,p,P),S===null?E=j:S.sibling=j,S=j);return e&&k.forEach(function(D){return t(g,D)}),de&&cn(g,P),E}function w(g,p,v,b){if(typeof v=="object"&&v!==null&&v.type===es&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ho:e:{for(var E=v.key,S=p;S!==null;){if(S.key===E){if(E=v.type,E===es){if(S.tag===7){r(g,S.sibling),p=s(S,v.props.children),p.return=g,g=p;break e}}else if(S.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Tr&&Nh(E)===S.type){r(g,S.sibling),p=s(S,v.props),p.ref=Zs(g,S,v),p.return=g,g=p;break e}r(g,S);break}else t(g,S);S=S.sibling}v.type===es?(p=Tn(v.props.children,g.mode,b,v.key),p.return=g,g=p):(b=Go(v.type,v.key,v.props,null,g.mode,b),b.ref=Zs(g,p,v),b.return=g,g=b)}return o(g);case Zn:e:{for(S=v.key;p!==null;){if(p.key===S)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){r(g,p.sibling),p=s(p,v.children||[]),p.return=g,g=p;break e}else{r(g,p);break}else t(g,p);p=p.sibling}p=zl(v,g.mode,b),p.return=g,g=p}return o(g);case Tr:return S=v._init,w(g,p,S(v._payload),b)}if(ii(v))return y(g,p,v,b);if(Gs(v))return m(g,p,v,b);Eo(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(r(g,p.sibling),p=s(p,v),p.return=g,g=p):(r(g,p),p=Fl(v,g.mode,b),p.return=g,g=p),o(g)):r(g,p)}return w}var js=Lm(!0),Dm=Lm(!1),da=rn(null),ha=null,ls=null,Kc=null;function qc(){Kc=ls=ha=null}function Gc(e){var t=da.current;ue(da),e._currentValue=t}function ju(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 gs(e,t){ha=e,Kc=ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Je=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if(Kc!==e)if(e={context:e,memoizedValue:t,next:null},ls===null){if(ha===null)throw Error(O(308));ls=e,ha.dependencies={lanes:0,firstContext:e}}else ls=ls.next=e;return t}var vn=null;function Qc(e){vn===null?vn=[e]:vn.push(e)}function Mm(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Qc(t)):(r.next=s.next,s.next=r),t.interleaved=r,cr(e,n)}function cr(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 Pr=!1;function Jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Um(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 ar(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ee&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,cr(e,r)}return s=n.interleaved,s===null?(t.next=t,Qc(n)):(t.next=s.next,s.next=t),n.interleaved=t,cr(e,r)}function Bo(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,$c(e,r)}}function jh(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function fa(e,t,r,n){var s=e.updateQueue;Pr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,c=u=l=null,a=i;do{var h=a.lane,d=a.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,m=a;switch(h=t,d=r,m.tag){case 1:if(y=m.payload,typeof y=="function"){f=y.call(d,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,h=typeof y=="function"?y.call(d,f,h):y,h==null)break e;f=me({},f,h);break e;case 2:Pr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else d={eventTime:d,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);An|=o,e.lanes=o,e.memoizedState=f}}function Ih(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 eo={},Qt=rn(eo),Ni=rn(eo),ji=rn(eo);function yn(e){if(e===eo)throw Error(O(174));return e}function Yc(e,t){switch(oe(ji,t),oe(Ni,e),oe(Qt,eo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fu(t,e)}ue(Qt),oe(Qt,t)}function Is(){ue(Qt),ue(Ni),ue(ji)}function Fm(e){yn(ji.current);var t=yn(Qt.current),r=fu(t,e.type);t!==r&&(oe(Ni,e),oe(Qt,r))}function Xc(e){Ni.current===e&&(ue(Qt),ue(Ni))}var fe=rn(0);function pa(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 Il=[];function Zc(){for(var e=0;e<Il.length;e++)Il[e]._workInProgressVersionPrimary=null;Il.length=0}var Vo=pr.ReactCurrentDispatcher,$l=pr.ReactCurrentBatchConfig,On=0,pe=null,Se=null,Te=null,ma=!1,pi=!1,Ii=0,Dw=0;function Le(){throw Error(O(321))}function ed(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Dt(e[r],t[r]))return!1;return!0}function td(e,t,r,n,s,i){if(On=i,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Vo.current=e===null||e.memoizedState===null?zw:Bw,e=r(n,s),pi){i=0;do{if(pi=!1,Ii=0,25<=i)throw Error(O(301));i+=1,Te=Se=null,t.updateQueue=null,Vo.current=Vw,e=r(n,s)}while(pi)}if(Vo.current=ga,t=Se!==null&&Se.next!==null,On=0,Te=Se=pe=null,ma=!1,t)throw Error(O(300));return e}function rd(){var e=Ii!==0;return Ii=0,e}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Te===null?pe.memoizedState=Te=e:Te=Te.next=e,Te}function _t(){if(Se===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Te===null?pe.memoizedState:Te.next;if(t!==null)Te=t,Se=e;else{if(e===null)throw Error(O(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Te===null?pe.memoizedState=Te=e:Te=Te.next=e}return Te}function $i(e,t){return typeof t=="function"?t(e):t}function Ll(e){var t=_t(),r=t.queue;if(r===null)throw Error(O(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 38
38var n=Se,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((On&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 f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=n):l=l.next=f,pe.lanes|=c,An|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Dt(n,t.memoizedState)||(Je=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,pe.lanes|=i,An|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Dl(e){var t=_t(),r=t.queue;if(r===null)throw Error(O(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Dt(i,t.memoizedState)||(Je=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function zm(){}function Bm(e,t){var r=pe,n=_t(),s=t(),i=!Dt(n.memoizedState,s);if(i&&(n.memoizedState=s,Je=!0),n=n.queue,nd(Hm.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Te!==null&&Te.memoizedState.tag&1){if(r.flags|=2048,Li(9,Wm.bind(null,r,n,s,t),void 0,null),Pe===null)throw Error(O(349));On&30||Vm(r,t,s)}return s}function Vm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Wm(e,t,r,n){t.value=r,t.getSnapshot=n,Km(t)&&qm(e)}function Hm(e,t,r){return r(function(){Km(t)&&qm(e)})}function Km(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Dt(e,r)}catch{return!0}}function qm(e){var t=cr(e,1);t!==null&&Lt(t,e,1,-1)}function $h(e){var t=Bt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$i,lastRenderedState:e},t.queue=e,e=e.dispatch=Fw.bind(null,pe,e),[t.memoizedState,e]}function Li(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.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 Gm(){return _t().memoizedState}function Wo(e,t,r,n){var s=Bt();pe.flags|=e,s.memoizedState=Li(1|t,r,void 0,n===void 0?null:n)}function Fa(e,t,r,n){var s=_t();n=n===void 0?null:n;var i=void 0;if(Se!==null){var o=Se.memoizedState;if(i=o.destroy,n!==null&&ed(n,o.deps)){s.memoizedState=Li(t,r,i,n);return}}pe.flags|=e,s.memoizedState=Li(1|t,r,i,n)}function Lh(e,t){return Wo(8390656,8,e,t)}function nd(e,t){return Fa(2048,8,e,t)}function Qm(e,t){return Fa(4,2,e,t)}function Jm(e,t){return Fa(4,4,e,t)}function Ym(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 Xm(e,t,r){return r=r!=null?r.concat([e]):null,Fa(4,4,Ym.bind(null,t,e),r)}function sd(){}function Zm(e,t){var r=_t();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&ed(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function e0(e,t){var r=_t();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&ed(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function t0(e,t,r){return On&21?(Dt(r,t)||(r=om(),pe.lanes|=r,An|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Je=!0),e.memoizedState=r)}function Mw(e,t){var r=ne;ne=r!==0&&4>r?r:4,e(!0);var n=$l.transition;$l.transition={};try{e(!1),t()}finally{ne=r,$l.transition=n}}function r0(){return _t().memoizedState}function Uw(e,t,r){var n=qr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},n0(e))s0(t,r);else if(r=Mm(e,t,r,n),r!==null){var s=We();Lt(r,e,n,s),i0(r,t,n)}}function Fw(e,t,r){var n=qr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(n0(e))s0(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Dt(a,o)){var l=t.interleaved;l===null?(s.next=s,Qc(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Mm(e,t,s,n),r!==null&&(s=We(),Lt(r,e,n,s),i0(r,t,n))}}function n0(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function s0(e,t){pi=ma=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function i0(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,$c(e,r)}}var ga={readContext:wt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},zw={readContext:wt,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Lh,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wo(4194308,4,Ym.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wo(4,2,e,t)},useMemo:function(e,t){var r=Bt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Bt();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=Uw.bind(null,pe,e),[n.memoizedState,e]}
vendor: 5,922 bytes, lines 38-40
38,useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:$h,useDebugValue:sd,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=$h(!1),t=e[0];return e=Mw.bind(null,e[1]),Bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pe,s=Bt();if(de){if(r===void 0)throw Error(O(407));r=r()}else{if(r=t(),Pe===null)throw Error(O(349));On&30||Vm(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,Lh(Hm.bind(null,n,i,e),[e]),n.flags|=2048,Li(9,Wm.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Bt(),t=Pe.identifierPrefix;if(de){var r=or,n=ir;r=(n&~(1<<32-$t(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ii++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Dw++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Bw={readContext:wt,useCallback:Zm,useContext:wt,useEffect:nd,useImperativeHandle:Xm,useInsertionEffect:Qm,useLayoutEffect:Jm,useMemo:e0,useReducer:Ll,useRef:Gm,useState:function(){return Ll($i)},useDebugValue:sd,useDeferredValue:function(e){var t=_t();return t0(t,Se.memoizedState,e)},useTransition:function(){var e=Ll($i)[0],t=_t().memoizedState;return[e,t]},useMutableSource:zm,useSyncExternalStore:Bm,useId:r0,unstable_isNewReconciler:!1},Vw={readContext:wt,useCallback:Zm,useContext:wt,useEffect:nd,useImperativeHandle:Xm,useInsertionEffect:Qm,useLayoutEffect:Jm,useMemo:e0,useReducer:Dl,useRef:Gm,useState:function(){return Dl($i)},useDebugValue:sd,useDeferredValue:function(e){var t=_t();return Se===null?t.memoizedState=e:t0(t,Se.memoizedState,e)},useTransition:function(){var e=Dl($i)[0],t=_t().memoizedState;return[e,t]},useMutableSource:zm,useSyncExternalStore:Bm,useId:r0,unstable_isNewReconciler:!1};function Tt(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Iu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:me({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var za={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=We(),s=qr(e),i=ar(n,s);i.payload=t,r!=null&&(i.callback=r),t=Hr(e,i,s),t!==null&&(Lt(t,e,s,n),Bo(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=We(),s=qr(e),i=ar(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Hr(e,i,s),t!==null&&(Lt(t,e,s,n),Bo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=We(),n=qr(e),s=ar(r,n);s.tag=2,t!=null&&(s.callback=t),t=Hr(e,s,n),t!==null&&(Lt(t,e,n,r),Bo(t,e,n))}};function Dh(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!Pi(r,n)||!Pi(s,i):!0}function o0(e,t,r){var n=!1,s=Jr,i=t.contextType;return typeof i=="object"&&i!==null?i=wt(i):(s=Xe(t)?Pn:Fe.current,n=t.contextTypes,i=(n=n!=null)?As(e,s):Jr),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=za,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Mh(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&&za.enqueueReplaceState(t,t.state,null)}function $u(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Jc(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=wt(i):(i=Xe(t)?Pn:Fe.current,s.context=As(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Iu(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&za.enqueueReplaceState(s,s.state,null),fa(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var r="",n=t;do r+=vy(n),n=n.return;while(n);var s=r}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Ml(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Lu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Ww=typeof WeakMap=="function"?WeakMap:Map;function a0(e,t,r){r=ar(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ya||(ya=!0,Ku=n),Lu(e,t)},r}function l0(e,t,r){r=ar(-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(){Lu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Lu(e,t),typeof n!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Uh(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Ww;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=s1.bind(null,e,t,r),t.then(e,e))}function Fh(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=ar(-1,1),t.tag=2,Hr(r,t,1))),r.lanes|=1),e)}var Hw=pr.ReactCurrentOwner,Je=!1;function Be(e,t,r,n){t.child=e===null?Dm(t,null,r,n):js(t,e.child,r,n)}function Bh(e,t,r,n,s){r=r.render;var i=t.ref;
vendor: 6,220 bytes, line 40
40return gs(t,s),n=td(e,t,r,n,i,s),r=rd(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,dr(e,t,s)):(de&&r&&Vc(t),t.flags|=1,Be(e,t,n,s),t.child)}function Vh(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!hd(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,u0(e,t,i,n,s)):(e=Go(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Pi,r(o,n)&&e.ref===t.ref)return dr(e,t,s)}return t.flags|=1,e=Gr(i,n),e.ref=t.ref,e.return=t,t.child=e}function u0(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Pi(i,n)&&e.ref===t.ref)if(Je=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Je=!0);else return t.lanes=e.lanes,dr(e,t,s)}return Du(e,t,r,n,s)}function c0(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(cs,nt),nt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(cs,nt),nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,oe(cs,nt),nt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,oe(cs,nt),nt|=n;return Be(e,t,s,r),t.child}function d0(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Du(e,t,r,n,s){var i=Xe(r)?Pn:Fe.current;return i=As(t,i),gs(t,s),r=td(e,t,r,n,i,s),n=rd(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,dr(e,t,s)):(de&&n&&Vc(t),t.flags|=1,Be(e,t,r,s),t.child)}function Wh(e,t,r,n,s){if(Xe(r)){var i=!0;la(t)}else i=!1;if(gs(t,s),t.stateNode===null)Ho(e,t),o0(t,r,n),$u(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=wt(u):(u=Xe(r)?Pn:Fe.current,u=As(t,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Mh(t,o,n,u),Pr=!1;var h=t.memoizedState;o.state=h,fa(t,n,o,s),l=t.memoizedState,a!==n||h!==l||Ye.current||Pr?(typeof c=="function"&&(Iu(t,r,c,n),l=t.memoizedState),(a=Pr||Dh(t,r,a,n,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Um(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Tt(t.type,a),o.props=u,f=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=wt(l):(l=Xe(r)?Pn:Fe.current,l=As(t,l));var d=r.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&Mh(t,o,n,l),Pr=!1,h=t.memoizedState,o.state=h,fa(t,n,o,s);var y=t.memoizedState;a!==f||h!==y||Ye.current||Pr?(typeof d=="function"&&(Iu(t,r,d,n),y=t.memoizedState),(u=Pr||Dh(t,r,u,n,h,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),o.props=n,o.state=y,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Mu(e,t,r,n,i,s)}function Mu(e,t,r,n,s,i){d0(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&Rh(t,r,!1),dr(e,t,i);n=t.stateNode,Hw.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=js(t,e.child,null,i),t.child=js(t,null,a,i)):Be(e,t,a,i),t.memoizedState=n.state,s&&Rh(t,r,!0),t.child}function h0(e){var t=e.stateNode;t.pendingContext?Ph(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ph(e,t.context,!1),Yc(e,t.containerInfo)}function Hh(e,t,r,n,s){return Ns(),Hc(s),t.flags|=256,Be(e,t,r,n),t.child}var Uu={dehydrated:null,treeContext:null,retryLane:0};function Fu(e){return{baseLanes:e,cachePool:null,transitions:null}}function f0(e,t,r){var n=t.pendingProps,s=fe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),oe(fe,s&1),e===null)return Nu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Wa(o,n,0,null),e=Tn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Fu(r),t.memoizedState=Uu,e):id(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Kw(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Gr(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Gr(a,i):(i=Tn(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Fu(r):{base
vendor: 8,213 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Uu,n}return i=e.child,e=i.sibling,n=Gr(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function id(e,t){return t=Wa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function So(e,t,r,n){return n!==null&&Hc(n),js(t,e.child,null,r),e=id(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kw(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=Ml(Error(O(422))),So(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=Wa({mode:"visible",children:n.children},s,0,null),i=Tn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&js(t,e.child,null,o),t.child.memoizedState=Fu(o),t.memoizedState=Uu,i);if(!(t.mode&1))return So(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(O(419)),n=Ml(i,n,void 0),So(e,t,o,n)}if(a=(o&e.childLanes)!==0,Je||a){if(n=Pe,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,cr(e,s),Lt(n,e,s,-1))}return dd(),n=Ml(Error(O(421))),So(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=i1.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,at=Wr(s.nextSibling),lt=t,de=!0,It=null,e!==null&&(mt[gt++]=ir,mt[gt++]=or,mt[gt++]=Rn,ir=e.id,or=e.overflow,Rn=t),t=id(t,n.children),t.flags|=4096,t)}function Kh(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ju(e.return,t,r)}function Ul(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function p0(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Be(e,t,n.children,r),n=fe.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&&Kh(e,r,t);else if(e.tag===19)Kh(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(oe(fe,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&&pa(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Ul(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&pa(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Ul(t,!0,r,null,i);break;case"together":Ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ho(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),An|=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=Gr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Gr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function qw(e,t,r){switch(t.tag){case 3:h0(t),Ns();break;case 5:Fm(t);break;case 1:Xe(t.type)&&la(t);break;case 4:Yc(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;oe(da,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(oe(fe,fe.current&1),t.flags|=128,null):r&t.child.childLanes?f0(e,t,r):(oe(fe,fe.current&1),e=dr(e,t,r),e!==null?e.sibling:null);oe(fe,fe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return p0(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(fe,fe.current),n)break;return null;case 22:case 23:return t.lanes=0,c0(e,t,r)}return dr(e,t,r)}var m0,zu,g0,v0;m0=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}};zu=function(){};g0=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,yn(Qt.current);var i=null;switch(r){case"input":s=uu(e,s),n=uu(e,n),i=[];break;case"select":s=me({},s,{value:void 0}),n=me({},n,{value:void 0}),i=[];break;case"textarea":s=hu(e,s),n=hu(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=oa)}pu(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(bi.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(bi.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&le("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};v0=function(e,t,r,n){r!==n&&(t.flags|=4)};function ei(e,t){if(!de)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 De(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 Gw(e,t,r){var n=t.pendingProps;switch(Wc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return Xe(t.type)&&aa(),De(t),null;case 3:return n=t.stateNode,Is(),ue(Ye),ue(Fe),Zc(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,It!==null&&(Qu(It),It=null))),zu(e,t),De(t),null;case 5:Xc(t);var s=yn(ji.current);if(r=t.type,e!==null&&t.stateNode!=null)g0(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 De(t),null}if(e=yn(Qt.current),xo(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Kt]=t,n[Ai]=i,e=(t.mode&1)!==0,r){case"dialog":le("cancel",n),le("close",n);break;case"iframe":case"object":case"embed":le("load",n);break;case"video":case"audio":for(s=0;s<ai.length;s++)le(ai[s],n);break;case"source":le("error",n);break;case"img":case"image":case"link":le("error",n),le("load",n);break;case"details":le("toggle",n);break;case"input":th(n,i),le("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},le("invalid",n);break;case"textarea":nh(n,i),le("invalid",n)}pu(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 31,695 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&bo(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&bo(n.textContent,a,e),s=["children",""+a]):bi.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&le("scroll",n)}switch(r){case"input":fo(n),rh(n,i,!0);break;case"textarea":fo(n),sh(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=oa)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Hp(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Kt]=t,e[Ai]=n,m0(e,t,!1,!1),t.stateNode=e;e:{switch(o=mu(r,n),r){case"dialog":le("cancel",e),le("close",e),s=n;break;case"iframe":case"object":case"embed":le("load",e),s=n;break;case"video":case"audio":for(s=0;s<ai.length;s++)le(ai[s],e);s=n;break;case"source":le("error",e),s=n;break;case"img":case"image":case"link":le("error",e),le("load",e),s=n;break;case"details":le("toggle",e),s=n;break;case"input":th(e,n),s=uu(e,n),le("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=me({},n,{value:void 0}),le("invalid",e);break;case"textarea":nh(e,n),s=hu(e,n),le("invalid",e);break;default:s=n}pu(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Gp(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Kp(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&xi(e,l):typeof l=="number"&&xi(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(bi.hasOwnProperty(i)?l!=null&&i==="onScroll"&&le("scroll",e):l!=null&&Rc(e,i,l,o))}switch(r){case"input":fo(e),rh(e,n,!1);break;case"textarea":fo(e),sh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Qr(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?hs(e,!!n.multiple,i,!1):n.defaultValue!=null&&hs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=oa)}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 De(t),null;case 6:if(e&&t.stateNode!=null)v0(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(O(166));if(r=yn(ji.current),yn(Qt.current),xo(t)){if(n=t.stateNode,r=t.memoizedProps,n[Kt]=t,(i=n.nodeValue!==r)&&(e=lt,e!==null))switch(e.tag){case 3:bo(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bo(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Kt]=t,t.stateNode=n}return De(t),null;case 13:if(ue(fe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&at!==null&&t.mode&1&&!(t.flags&128))$m(),Ns(),t.flags|=98560,i=!1;else if(i=xo(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(O(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[Kt]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;De(t),i=!1}else It!==null&&(Qu(It),It=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||fe.current&1?Ce===0&&(Ce=3):dd())),t.updateQueue!==null&&(t.flags|=4),De(t),null);case 4:return Is(),zu(e,t),e===null&&Ri(t.stateNode.containerInfo),De(t),null;case 10:return Gc(t.type._context),De(t),null;case 17:return Xe(t.type)&&aa(),De(t),null;case 19:if(ue(fe),i=t.memoizedState,i===null)return De(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)ei(i,!1);else{if(Ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=pa(e),o!==null){for(t.flags|=128,ei(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return oe(fe,fe.current&1|2),t.child}e=e.sibling}i.tail!==null&&we()>Ls&&(t.flags|=128,n=!0,ei(i,!1),t.lanes=4194304)}else{if(!n)if(e=pa(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ei(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!de)return De(t),null}else 2*we()-i.renderingStartTime>Ls&&r!==1073741824&&(t.flags|=128,n=!0,ei(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=we(),t.sibling=null,r=fe.current,oe(fe,n?r&1|2:r&1),t):(De(t),null);case 22:case 23:return cd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?nt&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function Qw(e,t){switch(Wc(t),t.tag){case 1:return Xe(t.type)&&aa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Is(),ue(Ye),ue(Fe),Zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xc(t),null;case 13:if(ue(fe),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 ue(fe),null;case 4:return Is(),null;case 10:return Gc(t.type._context),null;case 22:case 23:return cd(),null;case 24:return null;default:return null}}var ko=!1,Ue=!1,Jw=typeof WeakSet=="function"?WeakSet:Set,L=null;function us(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ye(e,t,n)}else r.current=null}function Bu(e,t,r){try{r()}catch(n){ye(e,t,n)}}var qh=!1;function Yw(e,t){if(ku=na,e=xm(),Bc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var d;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===e)break t;if(h===r&&++u===s&&(a=o),h===i&&++c===n&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Cu={focusedElem:e,selectionRange:r},na=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;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 m=y.memoizedProps,w=y.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Tt(t.type,m),w);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(b){ye(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return y=qh,qh=!1,y}function mi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Bu(t,r,i)}s=s.next}while(s!==n)}}function Ba(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 Vu(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 y0(e){var t=e.alternate;t!==null&&(e.alternate=null,y0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kt],delete t[Ai],delete t[Ru],delete t[jw],delete t[Iw])),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 w0(e){return e.tag===5||e.tag===3||e.tag===4}function Gh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||w0(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 Wu(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=oa));else if(n!==4&&(e=e.child,e!==null))for(Wu(e,t,r),e=e.sibling;e!==null;)Wu(e,t,r),e=e.sibling}function Hu(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(Hu(e,t,r),e=e.sibling;e!==null;)Hu(e,t,r),e=e.sibling}var Ae=null,Nt=!1;function Er(e,t,r){for(r=r.child;r!==null;)_0(e,t,r),r=r.sibling}function _0(e,t,r){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(Ia,r)}catch{}switch(r.tag){case 5:Ue||us(r,t);case 6:var n=Ae,s=Nt;Ae=null,Er(e,t,r),Ae=n,Nt=s,Ae!==null&&(Nt?(e=Ae,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ae.removeChild(r.stateNode));break;case 18:Ae!==null&&(Nt?(e=Ae,r=r.stateNode,e.nodeType===8?Nl(e.parentNode,r):e.nodeType===1&&Nl(e,r),Ci(e)):Nl(Ae,r.stateNode));break;case 4:n=Ae,s=Nt,Ae=r.stateNode.containerInfo,Nt=!0,Er(e,t,r),Ae=n,Nt=s;break;case 0:case 11:case 14:case 15:if(!Ue&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Bu(r,t,o),s=s.next}while(s!==n)}Er(e,t,r);break;case 1:if(!Ue&&(us(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ye(r,t,a)}Er(e,t,r);break;case 21:Er(e,t,r);break;case 22:r.mode&1?(Ue=(n=Ue)||r.memoizedState!==null,Er(e,t,r),Ue=n):Er(e,t,r);break;default:Er(e,t,r)}}function Qh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Jw),t.forEach(function(n){var s=o1.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function St(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ae=a.stateNode,Nt=!1;break e;case 3:Ae=a.stateNode.containerInfo,Nt=!0;break e;case 4:Ae=a.stateNode.containerInfo,Nt=!0;break e}a=a.return}if(Ae===null)throw Error(O(160));_0(i,o,s),Ae=null,Nt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ye(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)b0(t,e),t=t.sibling}function b0(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(St(t,e),zt(e),n&4){try{mi(3,e,e.return),Ba(3,e)}catch(m){ye(e,e.return,m)}try{mi(5,e,e.return)}catch(m){ye(e,e.return,m)}}break;case 1:St(t,e),zt(e),n&512&&r!==null&&us(r,r.return);break;case 5:if(St(t,e),zt(e),n&512&&r!==null&&us(r,r.return),e.flags&32){var s=e.stateNode;try{xi(s,"")}catch(m){ye(e,e.return,m)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Vp(s,i),mu(a,o);var u=mu(a,i);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?Gp(s,f):c==="dangerouslySetInnerHTML"?Kp(s,f):c==="children"?xi(s,f):Rc(s,c,f,u)}switch(a){case"input":cu(s,i);break;case"textarea":Wp(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var d=i.value;d!=null?hs(s,!!i.multiple,d,!1):h!==!!i.multiple&&(i.defaultValue!=null?hs(s,!!i.multiple,i.defaultValue,!0):hs(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ai]=i}catch(m){ye(e,e.return,m)}}break;case 6:if(St(t,e),zt(e),n&4){if(e.stateNode===null)throw Error(O(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){ye(e,e.return,m)}}break;case 3:if(St(t,e),zt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ci(t.containerInfo)}catch(m){ye(e,e.return,m)}break;case 4:St(t,e),zt(e);break;case 13:St(t,e),zt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(ld=we())),n&4&&Qh(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Ue=(u=Ue)||c,St(t,e),Ue=u):St(t,e),zt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(L=e,c=e.child;c!==null;){for(f=L=c;L!==null;){switch(h=L,d=h.child,h.tag){case 0:case 11:case 14:case 15:mi(4,h,h.return);break;case 1:us(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(m){ye(n,r,m)}}break;case 5:us(h,h.return);break;case 22:if(h.memoizedState!==null){Yh(f);continue}}d!==null?(d.return=h,L=d):Yh(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=qp("display",o))}catch(m){ye(e,e.return,m)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(m){ye(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:St(t,e),zt(e),n&4&&Qh(e);break;case 21:break;default:St(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(w0(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&&(xi(s,""),n.flags&=-33);var i=Gh(e);Hu(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Gh(e);Wu(e,a,o);break;default:throw Error(O(161))}}catch(l){ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xw(e,t,r){L=e,x0(e)}function x0(e,t,r){for(var n=(e.mode&1)!==0;L!==null;){var s=L,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||ko;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ue;a=ko;var u=Ue;if(ko=o,(Ue=l)&&!u)for(L=s;L!==null;)o=L,l=o.child,o.tag===22&&o.memoizedState!==null?Xh(s):l!==null?(l.return=o,L=l):Xh(s);for(;i!==null;)L=i,x0(i),i=i.sibling;L=s,ko=a,Ue=u}Jh(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,L=i):Jh(e)}}function Jh(e){for(;L!==null;){var t=L;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ue||Ba(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Ue)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Tt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Ih(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ih(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Ci(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ue||t.flags&512&&Vu(t)}catch(h){ye(t,t.return,h)}}if(t===e){L=null;break}if(r=t.sibling,r!==null){r.return=t.return,L=r;break}L=t.return}}function Yh(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var r=t.sibling;if(r!==null){r.return=t.return,L=r;break}L=t.return}}function Xh(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ba(4,t)}catch(l){ye(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){ye(t,s,l)}}var i=t.return;try{Vu(t)}catch(l){ye(t,i,l)}break;case 5:var o=t.return;try{Vu(t)}catch(l){ye(t,o,l)}}}catch(l){ye(t,t.return,l)}if(t===e){L=null;break}var a=t.sibling;if(a!==null){a.return=t.return,L=a;break}L=t.return}}var Zw=Math.ceil,va=pr.ReactCurrentDispatcher,od=pr.ReactCurrentOwner,yt=pr.ReactCurrentBatchConfig,ee=0,Pe=null,xe=null,Ne=0,nt=0,cs=rn(0),Ce=0,Di=null,An=0,Va=0,ad=0,gi=null,Qe=null,ld=0,Ls=1/0,tr=null,ya=!1,Ku=null,Kr=null,Co=!1,Ur=null,wa=0,vi=0,qu=null,Ko=-1,qo=0;function We(){return ee&6?we():Ko!==-1?Ko:Ko=we()}function qr(e){return e.mode&1?ee&2&&Ne!==0?Ne&-Ne:Lw.transition!==null?(qo===0&&(qo=om()),qo):(e=ne,e!==0||(e=window.event,e=e===void 0?16:fm(e.type)),e):1}function Lt(e,t,r,n){if(50<vi)throw vi=0,qu=null,Error(O(185));Yi(e,r,n),(!(ee&2)||e!==Pe)&&(e===Pe&&(!(ee&2)&&(Va|=r),Ce===4&&Ar(e,Ne)),Ze(e,n),r===1&&ee===0&&!(t.mode&1)&&(Ls=we()+500,Ua&&nn()))}function Ze(e,t){var r=e.callbackNode;Ly(e,t);var n=ra(e,e===Pe?Ne:0);if(n===0)r!==null&&ah(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&ah(r),t===1)e.tag===0?$w(Zh.bind(null,e)):Nm(Zh.bind(null,e)),Aw(function(){!(ee&6)&&nn()}),r=null;else{switch(am(n)){case 1:r=Ic;break;case 4:r=sm;break;case 16:r=ta;break;case 536870912:r=im;break;default:r=ta}r=O0(r,E0.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function E0(e,t){if(Ko=-1,qo=0,ee&6)throw Error(O(327));var r=e.callbackNode;if(vs()&&e.callbackNode!==r)return null;var n=ra(e,e===Pe?Ne:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=_a(e,n);else{t=n;var s=ee;ee|=2;var i=k0();(Pe!==e||Ne!==t)&&(tr=null,Ls=we()+500,Cn(e,t));do try{r1();break}catch(a){S0(e,a)}while(!0);qc(),va.current=i,ee=s,xe!==null?t=0:(Pe=null,Ne=0,t=Ce)}if(t!==0){if(t===2&&(s=_u(e),s!==0&&(n=s,t=Gu(e,s))),t===1)throw r=Di,Cn(e,0),Ar(e,n),Ze(e,we()),r;if(t===6)Ar(e,n);else{if(s=e.current.alternate,!(n&30)&&!e1(s)&&(t=_a(e,n),t===2&&(i=_u(e),i!==0&&(n=i,t=Gu(e,i))),t===1))throw r=Di,Cn(e,0),Ar(e,n),Ze(e,we()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(O(345));case 2:dn(e,Qe,tr);break;case 3:if(Ar(e,n),(n&130023424)===n&&(t=ld+500-we(),10<t)){if(ra(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){We(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Pu(dn.bind(null,e,Qe,tr),t);break}dn(e,Qe,tr);break;case 4:if(Ar(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-$t(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=we()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Zw(n/1960))-n,10<n){e.timeoutHandle=Pu(dn.bind(null,e,Qe,tr),n);break}dn(e,Qe,tr);break;case 5:dn(e,Qe,tr);break;default:throw Error(O(329))}}}return Ze(e,we()),e.callbackNode===r?E0.bind(null,e):null}function Gu(e,t){var r=gi;return e.current.memoizedState.isDehydrated&&(Cn(e,t).flags|=256),e=_a(e,t),e!==2&&(t=Qe,Qe=r,t!==null&&Qu(t)),e}function Qu(e){Qe===null?Qe=e:Qe.push.apply(Qe,e)}function e1(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Dt(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ar(e,t){for(t&=~ad,t&=~Va,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 Zh(e){if(ee&6)throw Error(O(327));vs();var t=ra(e,0);if(!(t&1))return Ze(e,we()),null;var r=_a(e,t);if(e.tag!==0&&r===2){var n=_u(e);n!==0&&(t=n,r=Gu(e,n))}if(r===1)throw r=Di,Cn(e,0),Ar(e,t),Ze(e,we()),r;if(r===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,dn(e,Qe,tr),Ze(e,we()),null}function ud(e,t){var r=ee;ee|=1;try{return e(t)}finally{ee=r,ee===0&&(Ls=we()+500,Ua&&nn())}}function Nn(e){Ur!==null&&Ur.tag===0&&!(ee&6)&&vs();var t=ee;ee|=1;var r=yt.transition,n=ne;try{if(yt.transition=null,ne=1,e)return e()}finally{ne=n,yt.transition=r,ee=t,!(ee&6)&&nn()}}function cd(){nt=cs.current,ue(cs)}function Cn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ow(r)),xe!==null)for(r=xe.return;r!==null;){var n=r;switch(Wc(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&aa();break;case 3:Is(),ue(Ye),ue(Fe),Zc();break;case 5:Xc(n);break;case 4:Is();break;case 13:ue(fe);break;case 19:ue(fe);break;case 10:Gc(n.type._context);break;case 22:case 23:cd()}r=r.return}if(Pe=e,xe=e=Gr(e.current,null),Ne=nt=t,Ce=0,Di=null,ad=Va=An=0,Qe=gi=null,vn!==null){for(t=0;t<vn.length;t++)if(r=vn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}vn=null}return e}function S0(e,t){do{var r=xe;try{if(qc(),Vo.current=ga,ma){for(var n=pe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}ma=!1}if(On=0,Te=Se=pe=null,pi=!1,Ii=0,od.current=null,r===null||r.return===null){Ce=1,Di=t,xe=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Ne,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=Fh(o);if(d!==null){d.flags&=-257,zh(d,o,a,i,t),d.mode&1&&Uh(i,u,t),t=d,l=u;var y=t.updateQueue;if(y===null){var m=new Set;m.add(l),t.updateQueue=m}else y.add(l);break e}else{if(!(t&1)){Uh(i,u,t),dd();break e}l=Error(O(426))}}else if(de&&a.mode&1){var w=Fh(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),zh(w,o,a,i,t),Hc($s(l,a));break e}}i=l=$s(l,a),Ce!==4&&(Ce=2),gi===null?gi=[i]:gi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=a0(i,l,t);jh(i,g);break e;case 1:a=l;var p=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Kr===null||!Kr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=l0(i,a,t);jh(i,b);break e}}i=i.return}while(i!==null)}T0(r)}catch(E){t=E,xe===r&&r!==null&&(xe=r=r.return);continue}break}while(!0)}function k0(){var e=va.current;return va.current=ga,e===null?ga:e}function dd(){(Ce===0||Ce===3||Ce===2)&&(Ce=4),Pe===null||!(An&268435455)&&!(Va&268435455)||Ar(Pe,Ne)}function _a(e,t){var r=ee;ee|=2;var n=k0();(Pe!==e||Ne!==t)&&(tr=null,Cn(e,t));do try{t1();break}catch(s){S0(e,s)}while(!0);if(qc(),ee=r,va.current=n,xe!==null)throw Error(O(261));return Pe=null,Ne=0,Ce}function t1(){for(;xe!==null;)C0(xe)}function r1(){for(;xe!==null&&!Ty();)C0(xe)}function C0(e){var t=R0(e.alternate,e,nt);e.memoizedProps=e.pendingProps,t===null?T0(e):xe=t,od.current=null}function T0(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Qw(r,t),r!==null){r.flags&=32767,xe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ce=6,xe=null;return}}else if(r=Gw(r,t,nt),r!==null){xe=r;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Ce===0&&(Ce=5)}function dn(e,t,r){var n=ne,s=yt.transition;try{yt.transition=null,ne=1,n1(e,t,r,n)}finally{yt.transition=s,ne=n}return null}function n1(e,t,r,n){do vs();while(Ur!==null);if(ee&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 i=r.lanes|r.childLanes;if(Dy(e,i),e===Pe&&(xe=Pe=null,Ne=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Co||(Co=!0,O0(ta,function(){return vs(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=yt.transition,yt.transition=null;var o=ne;ne=1;var a=ee;ee|=4,od.current=null,Yw(e,r),b0(r,e),Ew(Cu),na=!!ku,Cu=ku=null,e.current=r,Xw(r),Py(),ee=a,ne=o,yt.transition=i}else e.current=r;if(Co&&(Co=!1,Ur=e,wa=s),i=e.pendingLanes,i===0&&(Kr=null),Ay(r.stateNode),Ze(e,we()),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(ya)throw ya=!1,e=Ku,Ku=null,e;return wa&1&&e.tag!==0&&vs(),i=e.pendingLanes,i&1?e===qu?vi++:(vi=0,qu=e):vi=0,nn(),null}function vs(){if(Ur!==null){var e=am(wa),t=yt.transition,r=ne;try{if(yt.transition=null,ne=16>e?16:e,Ur===null)var n=!1;else{if(e=Ur,Ur=null,wa=0,ee&6)throw Error(O(331));var s=ee;for(ee|=4,L=e.current;L!==null;){var i=L,o=i.child;if(L.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(L=u;L!==null;){var c=L;switch(c.tag){case 0:case 11:case 15:mi(8,c,i)}var f=c.child;if(f!==null)f.return=c,L=f;else for(;L!==null;){c=L;var h=c.sibling,d=c.return;if(y0(c),c===u){L=null;break}if(h!==null){h.return=d,L=h;break}L=d}}}var y=i.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}L=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,L=o;else e:for(;L!==null;){if(i=L,i.flags&2048)switch(i.tag){case 0:case 11:case 15:mi(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,L=g;break e}L=i.return}}var p=e.current;for(L=p;L!==null;){o=L;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,L=v;else e:for(o=p;L!==null;){if(a=L,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ba(9,a)}}catch(E){ye(a,a.return,E)}if(a===o){L=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,L=b;break e}L=a.return}}if(ee=s,nn(),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(Ia,e)}catch{}n=!0}return n}finally{ne=r,yt.transition=t}}return!1}function ef(e,t,r){t=$s(r,t),t=a0(e,t,1),e=Hr(e,t,1),t=We(),e!==null&&(Yi(e,1,t),Ze(e,t))}function ye(e,t,r){if(e.tag===3)ef(e,e,r);else for(;t!==null;){if(t.tag===3){ef(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=$s(r,e),e=l0(t,e,1),t=Hr(t,e,1),e=We(),t!==null&&(Yi(t,1,e),Ze(t,e));break}}t=t.return}}function s1(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=We(),e.pingedLanes|=e.suspendedLanes&r,Pe===e&&(Ne&r)===r&&(Ce===4||Ce===3&&(Ne&130023424)===Ne&&500>we()-ld?Cn(e,0):ad|=r),Ze(e,t)}function P0(e,t){t===0&&(e.mode&1?(t=go,go<<=1,!(go&130023424)&&(go=4194304)):t=1);var r=We();e=cr(e,t),e!==null&&(Yi(e,t,r),Ze(e,r))}function i1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),P0(e,r)}function o1(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),P0(e,r)}var R0;R0=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Je=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Je=!1,qw(e,t,r);Je=!!(e.flags&131072)}else Je=!1,de&&t.flags&1048576&&jm(t,ca,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ho(e,t),e=t.pendingProps;var s=As(t,Fe.current);gs(t,r),s=td(null,t,n,e,s,r);var i=rd();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,Xe(n)?(i=!0,la(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Jc(t),s.updater=za,t.stateNode=s,s._reactInternals=t,$u(t,n,e,r),t=Mu(null,t,n,!0,i,r)):(t.tag=0,de&&i&&Vc(t),Be(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ho(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=l1(n),e=Tt(n,e),s){case 0:t=Du(null,t,n,e,r);break e;case 1:t=Wh(null,t,n,e,r);break e;case 11:t=Bh(null,t,n,e,r);break e;case 14:t=Vh(null,t,n,Tt(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:Tt(n,s),Du(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Tt(n,s),Wh(e,t,n,s,r);case 3:e:{if(h0(t),e===null)throw Error(O(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Um(e,t),fa(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=$s(Error(O(423)),t),t=Hh(e,t,n,r,s);break e}else if(n!==s){s=$s(Error(O(424)),t),t=Hh(e,t,n,r,s);break e}else for(at=Wr(t.stateNode.containerInfo.firstChild),lt=t,de=!0,It=null,r=Dm(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ns(),n===s){t=dr(e,t,r);break e}Be(e,t,n,r)}t=t.child}return t;case 5:return Fm(t),e===null&&Nu(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Tu(n,s)?o=null:i!==null&&Tu(n,i)&&(t.flags|=32),d0(e,t),Be(e,t,o,r),t.child;case 6:return e===null&&Nu(t),null;case 13:return f0(e,t,r);case 4:return Yc(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=js(t,null,n,r):Be(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Tt(n,s),Bh(e,t,n,s,r);case 7:return Be(e,t,t.pendingProps,r),t.child;case 8:return Be(e,t,t.pendingProps.children,r),t.child;case 12:return Be(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,oe(da,n._currentValue),n._currentValue=o,i!==null)if(Dt(i.value,o)){if(i.children===s.children&&!Ye.current){t=dr(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ar(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),ju(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(O(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ju(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Be(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,gs(t,r),s=wt(s),n=n(s),t.flags|=1,Be(e,t,n,r),t.child;case 14:return n=t.type,s=Tt(n,t.pendingProps),s=Tt(n.type,s),Vh(e,t,n,s,r);case 15:return u0(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Tt(n,s),Ho(e,t),t.tag=1,Xe(n)?(e=!0,la(t)):e=!1,gs(t,r),o0(t,n,s),$u(t,n,s,r),Mu(null,t,n,!0,e,r);case 19:return p0(e,t,r);case 22:return c0(e,t,r)}throw Error(O(156,t.tag))};function O0(e,t){return nm(e,t)}function a1(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,566 bytes, line 40
40ype=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 vt(e,t,r,n){return new a1(e,t,r,n)}function hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l1(e){if(typeof e=="function")return hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ac)return 11;if(e===Nc)return 14}return 2}function Gr(e,t){var r=e.alternate;return r===null?(r=vt(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 Go(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")hd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case es:return Tn(r.children,s,i,t);case Oc:o=8,s|=8;break;case iu:return e=vt(12,r,t,s|2),e.elementType=iu,e.lanes=i,e;case ou:return e=vt(13,r,t,s),e.elementType=ou,e.lanes=i,e;case au:return e=vt(19,r,t,s),e.elementType=au,e.lanes=i,e;case Fp:return Wa(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Mp:o=10;break e;case Up:o=9;break e;case Ac:o=11;break e;case Nc:o=14;break e;case Tr:o=16,n=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=vt(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Tn(e,t,r,n){return e=vt(7,e,n,t),e.lanes=r,e}function Wa(e,t,r,n){return e=vt(22,e,n,t),e.elementType=Fp,e.lanes=r,e.stateNode={isHidden:!1},e}function Fl(e,t,r){return e=vt(6,e,null,t),e.lanes=r,e}function zl(e,t,r){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function u1(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=bl(0),this.expirationTimes=bl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bl(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function fd(e,t,r,n,s,i,o,a,l){return e=new u1(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jc(i),e}function c1(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zn,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function A0(e){if(!e)return Jr;e=e._reactInternals;e:{if($n(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(Xe(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(Xe(r))return Am(e,r,t)}return t}function N0(e,t,r,n,s,i,o,a,l){return e=fd(r,n,!0,e,s,i,o,a,l),e.context=A0(null),r=e.current,n=We(),s=qr(r),i=ar(n,s),i.callback=t??null,Hr(r,i,s),e.current.lanes=s,Yi(e,s,n),Ze(e,n),e}function Ha(e,t,r,n){var s=t.current,i=We(),o=qr(s);return r=A0(r),t.context===null?t.context=r:t.pendingContext=r,t=ar(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Hr(s,t,o),e!==null&&(Lt(e,s,o,i),Bo(e,s,o)),o}function ba(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 tf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function pd(e,t){tf(e,t),(e=e.alternate)&&tf(e,t)}function d1(){return null}var j0=typeof reportError=="function"?reportError:function(e){console.error(e)};function md(e){this._internalRoot=e}Ka.prototype.render=md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));Ha(e,t,null,null)};Ka.prototype.unmount=md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nn(function(){Ha(null,e,null,null)}),t[ur]=null}};function Ka(e){this._internalRoot=e}Ka.prototype.unstable_scheduleHydration=function(e){if(e){var t=cm();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Or.length&&t!==0&&t<Or[r].priority;r++);Or.splice(r,0,e),r===0&&hm(e)}};function gd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rf(){}function h1(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=ba(o);i.call(u)}}var o=N0(t,n,e,0,null,!1,!1,"",rf);return e._reactRootContainer=o,e[ur]=o.current,Ri(e.nodeType===8?e.parentNode:e),Nn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=ba(l);a.call(u)}}var l=fd(e,0,!1,null,null,!1,!1,"",rf);return e._reactRootContainer=l,e[ur]=l.current,Ri(e.nodeType===8?e.parentNode:e),Nn(function(){Ha(t,l,r,n)}),l}function Ga(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ba(o);a.call(l)}}Ha(t,o,e,s)}else o=h1(r,t,e,s,n);return ba(o)}lm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=oi(t.pendingLanes);r!==0&&($c(t,r|1),Ze(t,we()),!(ee&6)&&(Ls=we()+500,nn()))}break;case 13:Nn(function(){var n=cr(e,1);if(n!==null){var s=We();Lt(n,e,1,s)}}),pd(e,1)}};Lc=function(e){if(e.tag===13){var t=cr(e,134217728);if(t!==null){var r=We();Lt(t,e,134217728,r)}pd(e,134217728)}};um=function(e){if(e.tag===13){var t=qr(e),r=cr(e,t);if(r!==null){var n=We();Lt(r,e,t,n)}pd(e,t)}};cm=function(){return ne};dm=function(e,t){var r=ne;try{return ne=e,t()}finally{ne=r}};vu=function(e,t,r){switch(t){case"input":if(cu(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=Ma(n);if(!s)throw Error(O(90));Bp(n),cu(n,s)}}}break;case"textarea":Wp(e,r);break;case"select":t=r.value,t!=null&&hs(e,!!r.multiple,t,!1)}};Yp=ud;Xp=Nn;var f1={usingClientEntryPoint:!1,Events:[Zi,ss,Ma,Qp,Jp,ud]},ti={findFiberByHostInstance:gn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p1={bundleType:ti.bundleType,version:ti.version,rendererPackageName:ti.rendererPackageName,rendererConfig:ti.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tm(e),e===null?null:e.stateNode},findFiberByHostInstance:ti.findFiberByHostInstance||d1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{Ia=To.inject(p1),Gt=To}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f1;dt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gd(t))throw Error(O(200));return c1(e,t,null,r)};dt.createRoot=function(e,t){if(!gd(e))throw Error(O(299));var r=!1,n="",s=j0;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=fd(e,1,!1,null,null,r,!1,n,s),e[ur]=t.current,Ri(e.nodeType===8?e.parentNode:e),new md(t)};dt.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=tm(t),e=e===null?null:e.stateNode,e};dt.flushSync=function(e){return Nn(e)};dt.hydrate=function(e,t,r){if(!qa(t))throw Error(O(200));return Ga(null,e,t,!0,r)};dt.hydrateRoot=function(e,t,r){if(!gd(e))throw Error(O(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=j0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=N0(t,null,e,1,r??null,s,!1,i,o),e[ur]=t.current,Ri(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 Ka(t)};dt.render=function(e,t,r){if(!qa(t))throw Error(O(200));return Ga(null,e,t,!1,r)};dt.unmountComponentAtNode=function(e){if(!qa(e))throw Error(O(40));return e._reactRootContainer?(Nn(function(){Ga(null,null,e,!1,function(){e._reactRootContainer=null,e[ur]=null})}),!0):!1};dt.unstable_batchedUpdates=ud;dt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!qa(r))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return Ga(e,t,r,!1,n)};dt.version="18.3.1-next-f1338f8080-20240426";function I0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I0)}catch(e){console.error(e)}}I0(),Ip.exports=dt;var to=Ip.exports;const $0=bp(to);var L0,nf=to;L0=nf.createRoot,nf.hydrateRoot;const m1=1,g1=1e6;let Bl=0;function v1(){return Bl=(Bl+1)%Number.MAX_SAFE_INTEGER,Bl.toString()}const Vl=new Map,sf=e=>{if(Vl.has(e))return;const t=setTimeout(()=>{Vl.delete(e),yi({type:"REMOVE_TOAST",toastId:e})},g1);Vl.set(e,t)},y1=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,m1)};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?sf(r):e.toasts.forEach(n=>{sf(n.id)}),{...e,toasts:e.toasts.map(n=>
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Qo=[];let Jo={toasts:[]};function yi(e){Jo=y1(Jo,e),Qo.forEach(t=>{t(Jo)})}function w1({...e}){const t=v1(),r=s=>yi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>yi({type:"DISMISS_TOAST",toastId:t});return yi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function _1(){const[e,t]=_.useState(Jo);return _.useEffect(()=>(Qo.push(t),()=>{const r=Qo.indexOf(t);r>-1&&Qo.splice(r,1)}),[e]),{...e,toast:w1,dismiss:r=>yi({type:"DISMISS_TOAST",toastId:r})}}function ke(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 of(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function D0(...e){return t=>{let r=!1;const n=e.map(s=>{const i=of(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():of(e[s],null)}}}}function Mt(...e){return _.useCallback(D0(...e),e)}function Qa(e,t=[]){let r=[];function n(i,o){const a=_.createContext(o),l=r.length;r=[...r,o];const u=f=>{var g;const{scope:h,children:d,...y}=f,m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,w=_.useMemo(()=>y,Object.values(y));return x.jsx(m.Provider,{value:w,children:d})};u.displayName=i+"Provider";function c(f,h){var m;const d=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,y=_.useContext(d);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=r.map(o=>_.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,b1(s,...t)]}function b1(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function xa(e){const t=E1(e),r=_.forwardRef((n,s)=>{const{children:i,...o}=n,a=_.Children.toArray(i),l=a.find(k1);if(l){const u=l.props.children,c=a.map(f=>f===l?_.Children.count(u)>1?_.Children.only(null):_.isValidElement(u)?u.props.children:null:f);return x.jsx(t,{...o,ref:s,children:_.isValidElement(u)?_.cloneElement(u,void 0,c):null})}return x.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var x1=xa("Slot");function E1(e){const t=_.forwardRef((r,n)=>{const{children:s,...i}=r;if(_.isValidElement(s)){const o=T1(s),a=C1(i,s.props);return s.type!==_.Fragment&&(a.ref=n?D0(n,o):o),_.cloneElement(s,a)}return _.Children.count(s)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var M0=Symbol("radix.slottable");function S1(e){const t=({children:r})=>x.jsx(x.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=M0,t}function k1(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===M0}function C1(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function T1(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 P1(e){const t=e+"CollectionProvider",[r,n]=Qa(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:w,children:g}=m,p=N.useRef(null),v=N.useRef(new Map).current;return x.jsx(s,{scope:w,itemMap:v,collectionRef:p,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=xa(a),u=N.forwardRef((m,w)=>{const{scope:g,children:p}=m,v=i(a,g),b=Mt(w,v.collectionRef);return x.jsx(l,{ref:b,children:p})});u.displayName=a;const c=e+"CollectionItemSlot",f="data-radix-collection-item",h=xa(c),d=N.forwardRef((m,w)=>{const{scope:g,children:p,...v}=m,b=N.useRef(null),E=Mt(w,b),S=i(c,g);return N.useEffect(()=>(S.itemMap.set(b,{ref:b,...v}),()=>void S.itemMap.delete(b))),x.jsx(h,{[f]:"",ref:E,children:p})});d.displayName=c;function y(m){const w=i(e+"CollectionConsumer",m);return N.useCallback(()=>{const p=w.collectionRef.current;
vendor: 8,980 bytes, line 40
40if(!p)return[];const v=Array.from(p.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((S,k)=>v.indexOf(S.ref.current)-v.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:u,ItemSlot:d},y,n]}var R1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=R1.reduce((e,t)=>{const r=xa(`Primitive.${t}`),n=_.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function U0(e,t){e&&to.flushSync(()=>e.dispatchEvent(t))}function Yr(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 O1(e,t=globalThis==null?void 0:globalThis.document){const r=Yr(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 A1="DismissableLayer",Ju="dismissableLayer.update",N1="dismissableLayer.pointerDownOutside",j1="dismissableLayer.focusOutside",af,F0=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vd=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=_.useContext(F0),[c,f]=_.useState(null),h=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=_.useState({}),y=Mt(t,k=>f(k)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(w),p=c?m.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,b=p>=g,E=$1(k=>{const P=k.target,A=[...u.branches].some(j=>j.contains(P));!b||A||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},h),S=L1(k=>{const P=k.target;[...u.branches].some(j=>j.contains(P))||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},h);return O1(k=>{p===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},h),_.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(af=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),lf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=af)}},[c,h,r,u]),_.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),lf())},[c,u]),_.useEffect(()=>{const k=()=>d({});return document.addEventListener(Ju,k),()=>document.removeEventListener(Ju,k)},[]),x.jsx(qe.div,{...l,ref:y,style:{pointerEvents:v?b?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,E.onPointerDownCapture)})});vd.displayName=A1;var I1="DismissableLayerBranch",z0=_.forwardRef((e,t)=>{const r=_.useContext(F0),n=_.useRef(null),s=Mt(t,n);return _.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),x.jsx(qe.div,{...e,ref:s})});z0.displayName=I1;function $1(e,t=globalThis==null?void 0:globalThis.document){const r=Yr(e),n=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){B0(N1,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function L1(e,t=globalThis==null?void 0:globalThis.document){const r=Yr(e),n=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!n.current&&B0(j1,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function lf(){const e=new CustomEvent(Ju);document.dispatchEvent(e)}function B0(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?U0(s,i):s.dispatchEvent(i)}var D1=vd,M1=z0,Xr=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},U1="Portal",V0=_.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=_.useState(!1);Xr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?$0.createPortal(x.jsx(qe.div,{...n,ref:t}),o):null});V0.displayName=U1;function F1(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var yd=e=>{const{present:t,children:r}=e,n=z1(t),s=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),i=Mt(n.ref,B1(s));return typeof r=="function"||n.isPresent?_.cloneElement(s,{ref:i}):null};yd.displayName="Presence";function z1(e){const[t,r]=_.useState(),n=_.useRef(null),s=_.useRef(e),i=_.useRef("none"),o=e?"mounted":"unmounted",[a,l]=F1(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Po(n.current);i.current=a==="mounted"?u:"none"},[a]),Xr(()=>{const u=n.current,c=s.current;if(c!==e){const h=i.current,d=Po(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==d?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Xr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=d=>{const m=Po(n.current).includes(d.animationName);if(d.target===t&&m&&(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)})}},h=d=>{d.target===t&&(i.current=Po(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Po(e){return(e==null?void 0:e.animationName)||"none"}function B1(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 V1=Np[" useInsertionEffect ".trim().toString()]||Xr;function W1({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=H1({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=_.useRef(e!==void 0);_.useEffect(()=>{const f=c.current;f!==a&&console.warn(`${n} is changing from ${f?"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 f;if(a){const h=K1(c)?c(e):c;h!==e&&((f=o.current)==null||f.call(o,h))}else i(c)},[a,e,i,o]);return[l,u]}function H1({defaultProp:e,onChange:t}){const[r,n]=_.useState(e),s=_.useRef(r),i=_.useRef(t);return V1(()=>{i.current=t},[t]),_.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function K1(e){return typeof e=="function"}var q1=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"}),G1="VisuallyHidden",Ja=_.forwardRef((e,t)=>x.jsx(qe.span,{...e,ref:t,style:{...q1,...e.style}}));Ja.displayName=G1;var Q1=Ja,wd="ToastProvider",[_d,J1,Y1]=P1("Toast"),[W0,LC]=Qa("Toast",[Y1]),[X1,Ya]=W0(wd),H0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=_.useState(null),[u,c]=_.useState(0),f=_.useRef(!1),h=_.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${wd}\`. Expected non-empty \`string\`.`),x.jsx(_d.Provider,{scope:t,children:x.jsx(X1,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:_.useCallback(()=>c(d=>d+1),[]),onToastRemove:_.useCallback(()=>c(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};H0.displayName=wd;var K0="ToastViewport",Z1=["F8"],Yu="toast.viewportPause",Xu="toast.viewportResume",q0=_.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=Z1,label:s="Notifications ({hotkey})",...i}=e,o=Ya(K0,r),a=J1(r),l=_.useRef(null),u=_.useRef(null),c=_.useRef(null),f=_.useRef(null),h=Mt(t,f,o.onViewportChange),d=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;_.useEffect(()=>{const w=g=>{var v;n.length!==0&&n.every(b=>g[b]||g.code===b)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),_.useEffect(()=>{const w=l.current,g=f.current;if(y&&w&&g){const p=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(Yu);g.dispatchEvent(S),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(Xu);g.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!w.contains(S.relatedTarget)&&v()},E=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",p),w.addEventListener("focusout",b),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",E),window.addEventListener("blur",p),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",b),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",p),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const m=_.useCallback(({tabbingDirection:w})=>{const p=a().map(v=>{const b=v.ref.current,E=[b,...h2(b)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?p.reverse():p).flat()},[a]);return _.useEffect(()=>{const w=f.current;if(w){const g=p=>{var E,S,k;const v=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!v){const P=document.activeElement,A=p.shiftKey;if(p.target===w&&A){(E=u.current)==null||E.focus();return}const D=m({tabbingDirection:A?"backwards":"forwards"}),Q=D.findIndex(I=>I===P);Wl(D.slice(Q+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,m]),x.jsxs(M1,{ref:l,role:"region","aria-label":s.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&x.jsx(Zu,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});Wl(w)}}),x.jsx(_d.Slot,{scope:r,children:x.jsx(qe.ol,{tabIndex:-1,...i,ref:h})}),y&&x.jsx(Zu,{ref:c,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});Wl(w)}})]})});q0.displayName=K0;var G0="ToastFocusProxy",Zu=_.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Ya(G0,r);return x.jsx(Ja,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});Zu.displayName=G0;var ro="Toast",e2="toast.swipeStart",t2="toast.swipeMove",r2="toast.swipeCancel",n2="toast.swipeEnd",Q0=_.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=W1({prop:n,defaultProp:s??!0,onChange:i,caller:ro});return x.jsx(yd,{present:r||a,children:x.jsx(o2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Yr(e.onPause),onResume:Yr(e.onResume),onSwipeStart:ke(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ke(e.onSwipeMove,u=>{const{x:c,y:f}=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",`${f}px`)}),onSwipeCancel:ke(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:ke(e.onSwipeEnd,u=>{const{x:c,y:f}=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",`${f}px`),l(!1)})})})});Q0.displayName=ro;var[s2,i2]=W0(ro,{onClose(){}}),o2=_.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...y}=e,m=Ya(ro,r),[w,g]=_.useState(null),p=Mt(t,I=>g(I)),v=_.useRef(null),b=_.useRef(null),E=s||m.duration,S=_.useRef(0),k=_.useRef(E),P=_.useRef(0),{onToastAdd:A,onToastRemove:j}=m,B=Yr(()=>{var X;(w==null?void 0:w.contains(document.activeElement))&&((X=m.viewport)==null||X.focus()),o()}),D=_.useCallback(I=>{!I||I===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(B,I))},[B]);_.useEffect(()=>{const I=m.viewport;if(I){const X=()=>{D(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 I.addEventListener(Yu,V),I.addEventListener(Xu,X),()=>{I.removeEventListener(Yu,V),I.removeEventListener(Xu,X)}}},[m.viewport,E,l,u,D]),_.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(E)},[i,E,m.isClosePausedRef,D]),_.useEffect(()=>(A(),()=>j()),[A,j]);const Q=_.useMemo(()=>w?rg(w):null,[w]);return m.viewport?x.jsxs(x.Fragment,{children:[Q&&x.jsx(a2,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),x.jsx(s2,{scope:r,onClose:B,children:to.createPortal(x.jsx(_d.ItemSlot,{scope:r,children:x.jsx(D1,{asChild:!0,onEscapeKeyDown:ke(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||B(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(qe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ke(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:ke(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:ke(e.onPointerMove,I=>{if(!v.current)return;const X=I.clientX-v.current.x,V=I.clientY-v.current.y,K=!!b.current,T=["left","right"].includes(m.swipeDirection),R=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=T?R(0,X):0,q=T?0:R(0,V),U=I.pointerType==="touch"?10:2,J={x:$,y:q},Z={originalEvent:I,delta:J};K?(b.current=J,Ro(t2,f,Z,{discrete:!1})):uf(J,m.swipeDirection,U)?(b.current=J,Ro(e2,c,Z,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(X)>U||Math.abs(V)>U)&&(v.current=null)}),onPointerUp:ke(e.onPointerUp,I=>{const X=b.current,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),b.current=null,v.current=null,X){const K=I.currentTarget,T={originalEvent:I,delta:X};uf(X,m.swipeDirection,m.swipeThreshold)?Ro(n2,d,T,{discrete:!0}):Ro(r2,h,T,{discrete:!0}),K.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),a2=e=>{const{__scopeToast:t,children:r,...n}=e,s=Ya(ro,t),[i,o]=_.useState(!1),[a,l]=_.useState(!1);return c2(()=>o(!0)),_.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(V0,{asChild:!0,children:x.jsx(Ja,{...n,children:i&&x.jsxs(x.Fragment,{children:[s.label," ",r]})})})},l2="ToastTitle",J0=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(qe.div,{...n,ref:t})});J0.displayName=l2;var u2="ToastDescription",Y0=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(qe.div,{...n,ref:t})});Y0.displayName=u2;var X0="ToastAction",Z0=_.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?x.jsx(tg,{altText:r,asChild:!0,children:x.jsx(bd,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${X0}\`. Expected non-empty \`string\`.`),null)});Z0.displayName=X0;var eg="ToastClose",bd=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=i2(eg,r);return x.jsx(tg,{asChild:!0,children:x.jsx(qe.button,{type:"button",...n,ref:t,onClick:ke(e.onClick,s.onClose)})})});bd.displayName=eg;var tg=_.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return x.jsx(qe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function rg(e){const t=[];
vendor: 4,733 bytes, lines 40-70
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),d2(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...rg(n))}}),t}function Ro(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?U0(s,i):s.dispatchEvent(i)}var uf=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function c2(e=()=>{}){const t=Yr(e);Xr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function d2(e){return e.nodeType===e.ELEMENT_NODE}function h2(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 Wl(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var f2=H0,ng=q0,sg=Q0,ig=J0,og=Y0,ag=Z0,lg=bd;function ug(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=ug(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function cg(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ug(e))&&(n&&(n+=" "),n+=t);return n}const cf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,df=cg,xd=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return df(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],f=i==null?void 0:i[u];if(c===null)return null;const h=cf(c)||cf(f);return s[u][h]}),a=r&&Object.entries(r).reduce((u,c)=>{let[f,h]=c;return h===void 0||(u[f]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:f,className:h,...d}=c;return Object.entries(d).every(y=>{let[m,w]=y;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...u,f,h]:u},[]);return df(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const p2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dg=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var m2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const g2=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>_.createElement("svg",{ref:l,...m2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:dg("lucide",s),...a},[...o.map(([u,c])=>_.createElement(u,c)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const mr=(e,t)=>{const r=_.forwardRef(({className:n,...s},i)=>_.createElement(g2,{ref:i,iconNode:t,className:dg(`lucide-${p2(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Ed=mr("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const v2=mr("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
vendor: 9,892 bytes, lines 70-105
70],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const y2=mr("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const w2=mr("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const _2=mr("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const b2=mr("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const x2=mr("ScanLine",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const E2=mr("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const S2=mr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Sd="-",k2=e=>{const t=T2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Sd);return a[0]===""&&a.length!==1&&a.shift(),hg(a,t)||C2(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},hg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?hg(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Sd);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},hf=/^\[(.+)\]$/,C2=e=>{if(hf.test(e)){const t=hf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},T2=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return R2(Object.entries(e.classGroups),r).forEach(([i,o])=>{ec(o,n,i,t)}),n},ec=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:ff(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(P2(s)){ec(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{ec(o,ff(t,i),r,n)})})},ff=(e,t)=>{let r=e;return t.split(Sd).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},P2=e=>e.isThemeGetter,R2=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,O2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},fg="!",A2=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,f;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(n||a.slice(w,w+i)===t)){l.push(a.slice(c,w)),c=w+i;continue}if(g==="/"){f=w;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(c),d=h.startsWith(fg),y=d?h.substring(1):h,m=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:y,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},N2=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},j2=e=>({cache:O2(e.cacheSize),parseClassName:A2(e),...k2(e)}),I2=/\s+/,$2=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(I2);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:d}=r(u);let y=!!d,m=n(y?h.substring(0,d):h);if(!m){if(!y){a=u+(a.length>0?" "+a:a);continue}if(m=n(h),!m){a=u+(a.length>0?" "+a:a);continue}y=!1}const w=N2(c).join(":"),g=f?w+fg:w,p=g+m;if(i.includes(p))continue;i.push(p);const v=s(m,y);for(let b=0;b<v.length;++b){const E=v[b];i.push(g+E)}a=u+(a.length>0?" "+a:a)}return a};function L2(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=pg(t))&&(n&&(n+=" "),n+=r);return n}const pg=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=pg(e[n]))&&(r&&(r+=" "),r+=t);return r};function D2(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=j2(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=$2(l,r);return s(l,c),c}return function(){return i(L2.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},mg=/^\[(?:([a-z-]+):)?(.+)\]$/i,M2=/^\d+\/\d+$/,U2=new Set(["px","full","screen"]),F2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,z2=/\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$/,B2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,V2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>ys(e)||U2.has(e)||M2.test(e),Sr=e=>Vs(e,"length",X2),ys=e=>!!e&&!Number.isNaN(Number(e)),Hl=e=>Vs(e,"number",ys),ri=e=>!!e&&Number.isInteger(Number(e)),H2=e=>e.endsWith("%")&&ys(e.slice(0,-1)),G=e=>mg.test(e),kr=e=>F2.test(e),K2=new Set(["length","size","percentage"]),q2=e=>Vs(e,K2,gg),G2=e=>Vs(e,"position",gg),Q2=new Set(["image","url"]),J2=e=>Vs(e,Q2,e_),Y2=e=>Vs(e,"",Z2),ni=()=>!0,Vs=(e,t,r)=>{const n=mg.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},X2=e=>z2.test(e)&&!B2.test(e),gg=()=>!1,Z2=e=>V2.test(e),e_=e=>W2.test(e),t_=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),s=ae("borderColor"),i=ae("borderRadius"),o=ae("borderSpacing"),a=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),c=ae("hueRotate"),f=ae("invert"),h=ae("gap"),d=ae("gradientColorStops"),y=ae("gradientColorStopPositions"),m=ae("inset"),w=ae("margin"),g=ae("opacity"),p=ae("padding"),v=ae("saturate"),b=ae("scale"),E=ae("sepia"),S=ae("skew"),k=ae("space"),P=ae("translate"),A=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",G,t],D=()=>[G,t],Q=()=>["",Zt,Sr],I=()=>["auto",ys,G],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"],T=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",G],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[ys,G];return{cacheSize:500,separator:":",theme:{colors:[ni],spacing:[Zt,Sr],blur:["none","",kr,G],brightness:q(),borderColor:[e],borderRadius:["none","","full",kr,G],borderSpacing:D(),borderWidth:Q(),contrast:q(),grayscale:R(),hueRotate:q(),invert:R(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[H2,Sr],inset:B(),margin:B(),opacity:q(),padding:D(),saturate:q(),scale:q(),sepia:R(),skew:q(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[kr]}],"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(),G]}],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:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}
vendor: 9,916 bytes, line 105
105],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ri,G]}],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",G]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",ri,G]}],"grid-cols":[{"grid-cols":[ni]}],"col-start-end":[{col:["auto",{span:["full",ri,G]},G]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ni]}],"row-start-end":[{row:["auto",{span:[ri,G]},G]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[kr]},kr]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",kr,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hl]}],"font-family":[{font:[ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",G]}],"line-clamp":[{"line-clamp":["none",ys,Hl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zt,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"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",Zt,Sr]}],"underline-offset":[{"underline-offset":["auto",Zt,G]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],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",G]}],"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(),G2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",q2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},J2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[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":[Zt,G]}],"outline-w":[{outline:[Zt,Sr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Zt,Sr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kr,Y2]}],"shadow-color":[{shadow:[ni]}],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",kr,G]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],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":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[ri,G]}],"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",G]}],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",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,487 bytes, line 105
105],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",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zt,Sr,Hl]}],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"]}}},r_=D2(t_);function et(...e){return r_(cg(e))}const n_=f2,vg=_.forwardRef(({className:e,...t},r)=>x.jsx(ng,{ref:r,className:et("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}));vg.displayName=ng.displayName;const s_=xd("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"}}),yg=_.forwardRef(({className:e,variant:t,...r},n)=>x.jsx(sg,{ref:n,className:et(s_({variant:t}),e),...r}));yg.displayName=sg.displayName;const i_=_.forwardRef(({className:e,...t},r)=>x.jsx(ag,{ref:r,className:et("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}));
105i_.displayName=ag.displayName;const wg=_.forwardRef(({className:e,...t},r)=>x.jsx(lg,{ref:r,className:et("absolute right-2 top-2 rounded-md p-1 text-foreground/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(S2,{className:"h-4 w-4"})}));wg.displayName=lg.displayName;const _g=_.forwardRef(({className:e,...t},r)=>x.jsx(ig,{ref:r,className:et("text-sm font-semibold",e),...t}));_g.displayName=ig.displayName;const bg=_.forwardRef(({className:e,...t},r)=>x.jsx(og,{ref:r,className:et("text-sm opacity-90",e),...t}));bg.displayName=og.displayName;function o_(){const{toasts:e}=_1();return x.jsxs(n_,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return x.jsxs(yg,{...i,children:[x.jsxs("div",{className:"grid gap-1",children:[r&&x.jsx(_g,{children:r}),n&&x.jsx(bg,{children:n})]}),s,x.jsx(wg,{})]},t)}),x.jsx(vg,{})]})}var pf=["light","dark"],a_="(prefers-color-scheme: dark)",l_=_.createContext(void 0),u_={setTheme:e=>{},themes:[]},c_=()=>{var e;return(e=_.useContext(l_))!=null?e:u_};_.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="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';`,f=s?pf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(y,m=!1,w=!0)=>{let g=o?o[y]:y,p=m?y+"|| ''":`'${g}'`,v="";return s&&w&&!m&&pf.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),r==="class"?m||g?v+=`c.add(${p})`:v+="null":g&&(v+=`d[s](n,${p})`),v},d=e?`!function(){${c}${h(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${a_}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${f}}catch(t){}}();`;return _.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:d}})});var d_=e=>{switch(e){case"success":return p_;case"info":return g_;case"warning":return m_;case"error":return v_;default:return null}},h_=Array(12).fill(0),f_=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},h_.map((r,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),p_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),m_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),g_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),v_=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),y_=N.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"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),w_=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},tc=1,__=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 105
105{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:tc++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
105this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],N.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(x_(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(i=["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)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[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)||tc++;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}},Ge=new __,b_=(e,t)=>{let r=(t==null?void 0:t.id)||tc++;return Ge.addToast({title:e,...t,id:r}),r},x_=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",E_=b_,S_=()=>Ge.toasts,k_=()=>Ge.getActiveToasts(),mf=Object.assign(E_,{success:Ge.success,info:Ge.info,warning:Ge.warning,error:Ge.error,custom:Ge.custom,message:Ge.message,promise:Ge.promise,dismiss:Ge.dismiss,loading:Ge.loading},{getHistory:S_,getToasts:k_});function C_(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))}C_(`: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;
105left: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}
105: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%);
105--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%)} 106`);function Oo(e){return e.label!==void 0}var T_=3,P_="32px",R_="16px",gf=4e3,O_=356,A_=14,N_=20,j_=200;function kt(...e){return e.filter(Boolean).join(" ")}function I_(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var $_=e=>{var t,r,n,s,i,o,a,l,u,c,f;let{invert:h,toast:d,unstyled:y,interacting:m,setHeights:w,visibleToasts:g,heights:p,index:v,toasts:b,expanded:E,removeToast:S,defaultRichColors:k,closeButton:P,style:A,cancelButtonStyle:j,actionButtonStyle:B,className:D="",descriptionClassName:Q="",duration:I,position:X,gap:V,loadingIcon:K,expandByDefault:T,classNames:R,icons:$,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:U}=e,[J,Z]=N.useState(null),[_e,Ie]=N.useState(null),[re,Ln]=N.useState(!1),[vr,sn]=N.useState(!1),[yr,Dn]=N.useState(!1),[wr,oo]=N.useState(!1),[dl,ao]=N.useState(!1),[hl,Ks]=N.useState(0),[Mn,Bd]=N.useState(0),qs=N.useRef(d.duration||I||gf),Vd=N.useRef(null),on=N.useRef(null),Iv=v===0,$v=v+1<=g,ft=d.type,Un=d.dismissible!==!1,Lv=d.className||"",Dv=d.descriptionClassName||"",lo=N.useMemo(()=>p.findIndex(W=>W.toastId===d.id)||0,[p,d.id]),Mv=N.useMemo(()=>{var W;return(W=d.closeButton)!=null?W:P},[d.closeButton,P]),Wd=N.useMemo(()=>d.duration||I||gf,[d.duration,I]),fl=N.useRef(0),Fn=N.useRef(0),Hd=N.useRef(0),zn=N.useRef(null),[Uv,Fv]=X.split("-"),Kd=N.useMemo(()=>p.reduce((W,se,ce)=>ce>=lo?W:W+se.height,0),[p,lo]),qd=w_(),zv=d.invert||h,pl=ft==="loading";Fn.current=N.useMemo(()=>lo*V+Kd,[lo,Kd]),N.useEffect(()=>{qs.current=Wd},[Wd]),N.useEffect(()=>{Ln(!0)},[]),N.useEffect(()=>{let W=on.current;if(W){let se=W.getBoundingClientRect().height;return Bd(se),w(ce=>[{toastId:d.id,height:se,position:d.position},...ce]),()=>w(ce=>ce.filter(bt=>bt.toastId!==d.id))}},[w,d.id]),N.useLayoutEffect(()=>{if(!re)return;let W=on.current,se=W.style.height;W.style.height="auto";let ce=W.getBoundingClientRect().height;W.style.height=se,Bd(ce),w(bt=>bt.find(xt=>xt.toastId===d.id)?bt.map(xt=>xt.toastId===d.id?{...xt,height:ce}:xt):[{toastId:d.id,height:ce,position:d.position},...bt])},[re,d.title,d.description,w,d.id]);let _r=N.useCallback(()=>{sn(!0),Ks(Fn.current),w(W=>W.filter(se=>se.toastId!==d.id)),setTimeout(()=>{S(d)},j_)},[d,S,w,Fn]);N.useEffect(()=>{if(d.promise&&ft==="loading"||d.duration===1/0||d.type==="loading")return;let W;return E||m||U&&qd?(()=>{if(Hd.current<fl.current){let se=new Date().getTime()-fl.current;qs.current=qs.current-se}
106Hd.current=new Date().getTime()})():qs.current!==1/0&&(fl.current=new Date().getTime(),W=setTimeout(()=>{var se;(se=d.onAutoClose)==null||se.call(d,d),_r()},qs.current)),()=>clearTimeout(W)},[E,m,d,ft,U,qd,_r]),N.useEffect(()=>{d.delete&&_r()},[_r,d.delete]);function Bv(){var W,se,ce;return $!=null&&$.loading?N.createElement("div",{className:kt(R==null?void 0:R.loader,(W=d==null?void 0:d.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":ft==="loading"},$.loading):K?N.createElement("div",{className:kt(R==null?void 0:R.loader,(se=d==null?void 0:d.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":ft==="loading"},K):N.createElement(f_,{className:kt(R==null?void 0:R.loader,(ce=d==null?void 0:d.classNames)==null?void 0:ce.loader),visible:ft==="loading"})}return N.createElement("li",{tabIndex:0,ref:on,className:kt(D,Lv,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[ft],(r=d==null?void 0:d.classNames)==null?void 0:r[ft]),"data-sonner-toast":"","data-rich-colors":(n=d.richColors)!=null?n:k,"data-styled":!(d.jsx||d.unstyled||y),"data-mounted":re,"data-
106promise":!!d.promise,"data-swiped":dl,"data-removed":vr,"data-visible":$v,"data-y-position":Uv,"data-x-position":Fv,"data-index":v,"data-front":Iv,"data-swiping":yr,"data-dismissible":Un,"data-type":ft,"data-invert":zv,"data-swipe-out":wr,"data-swipe-direction":_e,"data-expanded":!!(E||T&&re),style:{"--index":v,"--toasts-before":v,"--z-index":b.length-v,"--offset":`${vr?hl:Fn.current}px`,"--initial-height":T?"auto":`${Mn}px`,...A,...d.style},onDragEnd:()=>{Dn(!1),Z(null),zn.current=null},onPointerDown:W=>{pl||!Un||(Vd.current=new Date,Ks(Fn.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(Dn(!0),zn.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,se,ce,bt;if(wr||!Un)return;zn.current=null;let xt=Number(((W=on.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),br=Number(((se=on.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),an=new Date().getTime()-((ce=Vd.current)==null?void 0:ce.getTime()),Et=J==="x"?xt:br,xr=Math.abs(Et)/an;if(Math.abs(Et)>=N_||xr>.11){Ks(Fn.current),(bt=d.onDismiss)==null||bt.call(d,d),Ie(J==="x"?xt>0?"right":"left":br>0?"down":"up"),_r(),oo(!0),ao(!1);return}Dn(!1),Z(null)},onPointerMove:W=>{var se,ce,bt,xt;if(!zn.current||!Un||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;let br=W.clientY-zn.current.y,an=W.clientX-zn.current.x,Et=(ce=e.swipeDirections)!=null?ce:I_(X);!J&&(Math.abs(an)>1||Math.abs(br)>1)&&Z(Math.abs(an)>Math.abs(br)?"x":"y");let xr={x:0,y:0};J==="y"?(Et.includes("top")||Et.includes("bottom"))&&(Et.includes("top")&&br<0||Et.includes("bottom")&&br>0)&&(xr.y=br):J==="x"&&(Et.includes("left")||Et.includes("right"))&&(Et.includes("left")&&an<0||Et.includes("right")&&an>0)&&(xr.x=an),(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&ao(!0),(bt=on.current)==null||bt.style.setProperty("--swipe-amount-x",`${xr.x}px`),(xt=on.current)==null||xt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}},Mv&&!d.jsx?N.createElement("button",{"aria-label":q,"data-disabled":pl,"data-close-button":!0,onClick:pl||!Un?()=>{}:()=>{var W;_r(),(W=d.onDismiss)==null||W.call(d,d)},className:kt(R==null?void 0:R.closeButton,(s=d==null?void 0:d.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:y_):null,d.jsx||_.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:N.createElement(N.Fragment,null,ft||d.icon||d.promise?N.createElement("div",{"data-icon":"",className:kt(R==null?void 0:R.icon,(o=d==null?void 0:d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Bv():null,d.type!=="loading"?d.icon||($==null?void 0:$[ft])||d_(ft):null):null,N.createElement("div",{"data-content":"",className:kt(R==null?void 0:R.content,(a=d==null?void 0:d.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:kt(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?N.createElement("div",{"data-description":"",className:kt(Q,Dv,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&&Oo(d.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||j,onClick:W=>{var se,ce;Oo(d.cancel)&&Un&&((ce=(se=d.cancel).onClick)==null||ce.call(se,W),_r())},className:kt(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&&Oo(d.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||B,onClick:W=>{var se,ce;Oo(d.action)&&((ce=(se=d.action).onClick)==null||ce.call(se,W),!W.defaultPrevented&&_r())},className:kt(R==null?void 0:R.actionButton,(f=d==null?void 0:d.classNames)==null?void 0:f.actionButton)},d.action.label):null))};function vf(){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 L_(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?R_:P_;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${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[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var D_=_.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:f,duration:h,style:d,visibleToasts:y=T_,toastOptions:m,dir:w=vf(),gap:g=A_,loadingIcon:p,icons:v,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=e,[S,k]=N.useState([]),P=N.useMemo(()=>Array.from(new Set([n].concat(S.filter(U=>U.position).map(U=>U.position)))),[S,n]),[A,j]=N.useState([]),[B,D]=N.useState(!1),[Q,I]=N.useState(!1),[X,V]=N.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
106k":"light"),K=N.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=N.useRef(null),$=N.useRef(!1),q=N.useCallback(U=>{k(J=>{var Z;return(Z=J.find(_e=>_e.id===U.id))!=null&&Z.delete||Ge.dismiss(U.id),J.filter(({id:_e})=>_e!==U.id)})},[]);return N.useEffect(()=>Ge.subscribe(U=>{if(U.dismiss){k(J=>J.map(Z=>Z.id===U.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{$0.flushSync(()=>{k(J=>{let Z=J.findIndex(_e=>_e.id===U.id);return Z!==-1?[...J.slice(0,Z),{...J[Z],...U},...J.slice(Z+1)]:[U,...J]})})})}),[]),N.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 U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:J})=>{V(J?"dark":"light")})}catch{U.addListener(({matches:Z})=>{try{V(Z?"dark":"light")}catch(_e){console.error(_e)}})}},[c]),N.useEffect(()=>{S.length<=1&&D(!1)},[S]),N.useEffect(()=>{let U=J=>{var Z,_e;s.every(Ie=>J[Ie]||J.code===Ie)&&(D(!0),(Z=K.current)==null||Z.focus()),J.code==="Escape"&&(document.activeElement===K.current||(_e=K.current)!=null&&_e.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),N.useEffect(()=>{if(K.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,$.current=!1)}},[K.current]),N.createElement("section",{ref:t,"aria-label":`${b} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((U,J)=>{var Z;let[_e,Ie]=U.split("-");return S.length?N.createElement("ol",{key:U,dir:w==="auto"?vf():w,tabIndex:-1,ref:K,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":_e,"data-lifted":B&&S.length>1&&!i,"data-x-position":Ie,style:{"--front-toast-height":`${((Z=A[0])==null?void 0:Z.height)||0}px`,"--width":`${O_}px`,"--gap":`${g}px`,...d,...L_(l,u)},onBlur:re=>{$.current&&!re.currentTarget.contains(re.relatedTarget)&&($.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||$.current||($.current=!0,R.current=re.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Q||D(!1)},onDragEnd:()=>D(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},S.filter(re=>!re.position&&J===0||re.position===U).map((re,Ln)=>{var vr,sn;return N.createElement($_,{key:re.id,icons:v,index:Ln,toast:re,defaultRichColors:f,duration:(vr=m==null?void 0:m.duration)!=null?vr:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:y,closeButton:(sn=m==null?void 0:m.closeButton)!=null?sn:o,interacting:Q,position:U,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:q,toasts:S.filter(yr=>yr.position==re.position),heights:A.filter(yr=>yr.position==re.position),setHeights:j,expandByDefault:i,gap:g,loadingIcon:p,expanded:B,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const M_=({...e})=>{const{theme:t="system"}=c_();return x.jsx(D_,{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})},U_=["top","right","bottom","left"],Zr=Math.min,st=Math.max,Ea=Math.round,Ao=Math.floor,Jt=e=>({x:e,y:e}),F_={left:"right",right:"left",bottom:"top",top:"bottom"},z_={start:"end",end:"start"};function rc(e,t,r){return st(e,Zr(t,r))}function hr(e,t){return typeof e=="function"?e(t):e}function fr(e){return e.split("-")[0]}function Ws(e){return e.split("-")[1]}function kd(e){return e==="x"?"y":"x"}function Cd(e){return e==="y"?"height":"width"}const B_=new Set(["top","bottom"]);function qt(e){return B_.has(fr(e))?"y":"x"}function Td(e){return kd(qt(e))}function V_(e,t,r){r===void 0&&(r=!1);const n=Ws(e),s=Td(e),i=Cd(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Sa(o)),[o,Sa(o)]}function W_(e){const t=Sa(e);return[nc(e),t,nc(t)]}function nc(e){return e.replace(/start|end/g,t=>z_[t])}const yf=["left","right"],wf=["right","left"],H_=["top","bottom"],K_=["bottom","top"];function q_(e,t,r){switch(e){case"top":case"bottom":return r?t?wf:yf:t?yf:wf;case"left":case"right":return t?H_:K_;default:return[]}}function G_(e,t,r,n){const s=Ws(e);let i=q_(fr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(nc)))),i}function Sa(e){return e.replace(/left|right|bottom|top/g,t=>F_[t])}function Q_(e){return{top:0,right:0,bottom:0,left:0,...e}}function xg(e){return typeof e!="number"?Q_(e):{top:e,right:e,bottom:e,left:e}}function ka(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 _f(e,t,r){let{reference:n,floating:s}=e;const i=qt(t),o=Td(t),a=Cd(o),l=fr(t),u=i==="y",c=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,h=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:f};break;case"left":d={x:n.x-s.width,y:f};break;default:d={x:n.x,y:n.y}}switch(Ws(t)){case"start":d[o]-=h*(r&&u?-1:1);break;case"end":d[o]+=h*(r&&u?-1:1);break}return d}const J_=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,778 bytes, line 106
106=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:f}=_f(u,n,l),h=n,d={},y=0;for(let m=0;m<a.length;m++){const{name:w,fn:g}=a[m],{x:p,y:v,data:b,reset:E}=await g({x:c,y:f,initialPlacement:n,placement:h,strategy:s,middlewareData:d,rects:u,platform:o,elements:{reference:e,floating:t}});c=p??c,f=v??f,d={...d,[w]:{...d[w],...b}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:c,y:f}=_f(u,h,l)),m=-1)}return{x:c,y:f,placement:h,strategy:s,middlewareData:d}};async function Mi(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=hr(t,e),y=xg(d),w=a[h?f==="floating"?"reference":"floating":f],g=ka(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),p=f==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},E=ka(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:v,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 Y_=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=hr(e,t)||{};if(u==null)return{};const f=xg(c),h={x:r,y:n},d=Td(s),y=Cd(d),m=await o.getDimensions(u),w=d==="y",g=w?"top":"left",p=w?"bottom":"right",v=w?"clientHeight":"clientWidth",b=i.reference[y]+i.reference[d]-h[d]-i.floating[y],E=h[d]-i.reference[d],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=S?S[v]:0;(!k||!await(o.isElement==null?void 0:o.isElement(S)))&&(k=a.floating[v]||i.floating[y]);const P=b/2-E/2,A=k/2-m[y]/2-1,j=Zr(f[g],A),B=Zr(f[p],A),D=j,Q=k-m[y]-B,I=k/2-m[y]/2+P,X=rc(D,I,Q),V=!l.arrow&&Ws(s)!=null&&I!==X&&i.reference[y]/2-(I<D?j:B)-m[y]/2<0,K=V?I<D?I-D:I-Q:0;return{[d]:h[d]+K,data:{[d]:X,centerOffset:I-X-K,...V&&{alignmentOffset:K}},reset:V}}}),X_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...w}=hr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=fr(s),p=qt(a),v=fr(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=h||(v||!m?[Sa(a)]:W_(a)),S=y!=="none";!h&&S&&E.push(...G_(a,m,y,b));const k=[a,...E],P=await Mi(t,w),A=[];let j=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&A.push(P[g]),f){const I=V_(s,o,b);A.push(P[I[0]],P[I[1]])}if(j=[...j,{placement:s,overflows:A}],!A.every(I=>I<=0)){var B,D;const I=(((B=i.flip)==null?void 0:B.index)||0)+1,X=k[I];if(X&&(!(f==="alignment"?p!==qt(X):!1)||j.every(T=>T.overflows[0]>0&&qt(T.placement)===p)))return{data:{index:I,overflows:j},reset:{placement:X}};let V=(D=j.filter(K=>K.overflows[0]<=0).sort((K,T)=>K.overflows[1]-T.overflows[1])[0])==null?void 0:D.placement;if(!V)switch(d){case"bestFit":{var Q;const K=(Q=j.filter(T=>{if(S){const R=qt(T.placement);return R===p||R==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,$)=>R+$,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:Q[0];K&&(V=K);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function bf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xf(e){return U_.some(t=>e[t]>=0)}const Z_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=hr(e,t);switch(n){case"referenceHidden":{const i=await Mi(t,{...s,elementContext:"reference"}),o=bf(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:xf(o)}}}case"escaped":{const i=await Mi(t,{...s,altBoundary:!0}),o=bf(i,r.floating);return{data:{escapedOffsets:o,escaped:xf(o)}}}default:return{}}}}},Eg=new Set(["left","top"]);async function eb(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=fr(r),a=Ws(r),l=qt(r)==="y",u=Eg.has(o)?-1:1,c=i&&l?-1:1,f=hr(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(d=a==="end"?y*-1:y),l?{x:d*c,y:h*u}:{x:h*u,y:d*c}}const tb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await eb(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},rb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:g,y:p}=w;return{x:g,y:p}}},...l}=hr(e,t),u={x:r,y:n},c=await Mi(t,l),f=qt(fr(s)),h=kd(f);let d=u[h],y=u[f];if(i){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",p=d+c[w],v=d-c[g];d=rc(p,d,v)}if(o){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",p=y+c[w],v=y-c[g];y=rc(p,y,v)}const m=a.fn({...t,[h]:d,[f]:y});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:i,[f]:o}}}}}},nb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=hr(e,t),c={x:r,y:n},f=qt(s),h=kd(f);let d=c[h],y=c[f];const m=hr(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const v=h==="y"?"height":"width",b=i.reference[h]-i.floating[v]+w.mainAxis,E=i.reference[h]+i.reference[v]-w.mainAxis;d<b?d=b:d>E&&(d=E)}if(u){var g,p;const v=h==="y"?"width":"height",b=Eg.has(fr(s)),E=i.reference[f]-i.floating[v]+(b&&((g=o.offset)==null?void 0:g[f])||0)+(b?0:w.crossAxis),S=i.reference[f]+i.reference[v]+(b?0:((p=o.offset)==null?void 0:p[f])||0)-(b?w.crossAxis:0);y<E?y=E:y>S&&(y=S)}return{[h]:d,[f]:y}}}},sb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=hr(e,t),c=await Mi(t,u),f=fr(s),h=Ws(s),d=qt(s)==="y",{width:y,height:m}=i.floating;let w,g;f==="top"||f==="bottom"?(w=f,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,w=h==="end"?"top":"bottom");const p=m-c.top-c.bottom,v=y-c.left-c.right,b=Zr(m-c[w],p),E=Zr(y-c[g],v),S=!t.middlewareData.shift;let k=b,P=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=p),S&&!h){const j=st(c.left,0),B=st(c.right,0),D=st(c.top,0),Q=st(c.bottom,0);d?P=y-2*(j!==0||B!==0?j+B:st(c.left,c.right)):k=m-2*(D!==0||Q!==0?D+Q:st(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:k});const A=await o.getDimensions(a.floating);return y!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Xa(){return typeof window<"u"}function Hs(e){return Sg(e)?(e.nodeName||"").toLowerCase():"#document"}function ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xt(e){var t;return(t=(Sg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sg(e){return Xa()?e instanceof Node||e instanceof ut(e).Node:!1}function Ut(e){return Xa()?e instanceof Element||e instanceof ut(e).Element:!1}function Yt(e){return Xa()?e instanceof HTMLElement||e instanceof ut(e).HTMLElement:!1}function Ef(e){return!Xa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ut(e).ShadowRoot}const ib=new Set(["inline","contents"]);function no(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ib.has(s)}const ob=new Set(["table","td","th"]);function ab(e){return ob.has(Hs(e))}const lb=[":popover-open",":modal"];function Za(e){return lb.some(t=>{try{return e.matches(t)}catch{return!1}})}const ub=["transform","translate","scale","rotate","perspective"],cb=["transform","translate","scale","rotate","perspective","filter"],db=["paint","layout","strict","content"];function Pd(e){const t=Rd(),r=Ut(e)?Ft(e):e;return ub.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)||cb.some(n=>(r.willChange||"").includes(n))||db.some(n=>(r.contain||"").includes(n))}function hb(e){let t=en(e);for(;Yt(t)&&!Ds(t);){if(Pd(t))return t;if(Za(t))return null;t=en(t)}return null}function Rd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fb=new Set(["html","body","#document"]);function Ds(e){return fb.has(Hs(e))}function Ft(e){return ut(e).getComputedStyle(e)}function el(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function en(e){if(Hs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ef(e)&&e.host||Xt(e);return Ef(t)?t.host:t}function kg(e){const t=en(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yt(t)&&no(t)?t:kg(t)}
vendor: 6,657 bytes, line 106
106function Ui(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=kg(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=ut(s);if(i){const a=sc(o);return t.concat(o,o.visualViewport||[],no(s)?s:[],a&&r?Ui(a):[])}return t.concat(s,Ui(s,[],r))}function sc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cg(e){const t=Ft(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Yt(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Ea(r)!==i||Ea(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Od(e){return Ut(e)?e:e.contextElement}function ws(e){const t=Od(e);if(!Yt(t))return Jt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Cg(t);let o=(i?Ea(r.width):r.width)/n,a=(i?Ea(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const pb=Jt(0);function Tg(e){const t=ut(e);return!Rd()||!t.visualViewport?pb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mb(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ut(e)?!1:t}function jn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Od(e);let o=Jt(1);t&&(n?Ut(n)&&(o=ws(n)):o=ws(e));const a=mb(i,r,n)?Tg(i):Jt(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,f=s.height/o.y;if(i){const h=ut(i),d=n&&Ut(n)?ut(n):n;let y=h,m=sc(y);for(;m&&n&&d!==y;){const w=ws(m),g=m.getBoundingClientRect(),p=Ft(m),v=g.left+(m.clientLeft+parseFloat(p.paddingLeft))*w.x,b=g.top+(m.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,f*=w.y,l+=v,u+=b,y=ut(m),m=sc(y)}}return ka({width:c,height:f,x:l,y:u})}function Ad(e,t){const r=el(e).scrollLeft;return t?t.left+r:jn(Xt(e)).left+r}function Pg(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Ad(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function gb(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Xt(n),a=t?Za(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Jt(1);const c=Jt(0),f=Yt(n);if((f||!f&&!i)&&((Hs(n)!=="body"||no(o))&&(l=el(n)),Yt(n))){const d=jn(n);u=ws(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}const h=o&&!f&&!i?Pg(o,l,!0):Jt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function vb(e){return Array.from(e.getClientRects())}function yb(e){const t=Xt(e),r=el(e),n=e.ownerDocument.body,s=st(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=st(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Ad(e);const a=-r.scrollTop;return Ft(n).direction==="rtl"&&(o+=st(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function wb(e,t){const r=ut(e),n=Xt(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Rd();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const _b=new Set(["absolute","fixed"]);function bb(e,t){const r=jn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Yt(e)?ws(e):Jt(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function Sf(e,t,r){let n;if(t==="viewport")n=wb(e,r);else if(t==="document")n=yb(Xt(e));else if(Ut(t))n=bb(t,r);else{const s=Tg(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ka(n)}function Rg(e,t){const r=en(e);return r===t||!Ut(r)||Ds(r)?!1:Ft(r).position==="fixed"||Rg(r,t)}function xb(e,t){const r=t.get(e);if(r)return r;let n=Ui(e,[],!1).filter(a=>Ut(a)&&Hs(a)!=="body"),s=null;const i=Ft(e).position==="fixed";let o=i?en(e):e;for(;Ut(o)&&!Ds(o);){const a=Ft(o),l=Pd(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&_b.has(s.position)||no(o)&&!l&&Rg(e,o))?n=n.filter(c=>c!==o):s=a,o=en(o)}return t.set(e,n),n}function Eb(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Za(t)?[]:xb(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const f=Sf(t,c,s);return u.top=st(f.top,u.top),u.right=Zr(f.right,u.right),u.bottom=Zr(f.bottom,u.bottom),u.left=st(f.left,u.left),u},Sf(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sb(e){const{width:t,height:r}=Cg(e);return{width:t,height:r}}function kb(e,t,r){const n=Yt(t),s=Xt(t),i=r==="fixed",o=jn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Jt(0);function u(){l.x=Ad(s)}if(n||!n&&!i)if((Hs(t)!=="body"||no(s))&&(a=el(t)),n){const d=jn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?Pg(s,a):Jt(0),f=o.left+a.scrollLeft-l.x-c.x,h=o.top+a.scrollTop-l.y-c.y;return{x:f,y:h,width:o.width,height:o.height}}function Kl(e){return Ft(e).position==="static"}function kf(e,t){if(!Yt(e)||Ft(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Xt(e)===r&&(r=r.ownerDocument.body),r}function Og(e,t){const r=ut(e);if(Za(e))return r;if(!Yt(e)){let s=en(e);for(;s&&!Ds(s);){if(Ut(s)&&!Kl(s))return s;s=en(s)}return r}let n=kf(e,t);for(;n&&ab(n)&&Kl(n);)n=kf(n,t);return n&&Ds(n)&&Kl(n)&&!Pd(n)?r:n||hb(e)||r}const Cb=async function(e){const t=this.getOffsetParent||Og,r=this.getDimensions,n=await r(e.floating);return{reference:kb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Tb(e){return Ft(e).direction==="rtl"}const Pb={convertOffsetParentRelativeRectToViewportRelativeRect:gb,getDocumentElement:Xt,getClippingRect:Eb,getOffsetParent:Og,getElementRects:Cb,getClientRects:vb,getDimensions:Sb,getScale:ws,isElement:Ut,isRTL:Tb};function Ag(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rb(e,t){let r=null,n;const s=Xt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:f,width:h,height:d}=u;if(a||t(),!h||!d)return;const y=Ao(f),m=Ao(s.clientWidth-(c+h)),w=Ao(s.clientHeight-(f+d)),g=Ao(c),v={rootMargin:-y+"px "+-m+"px "+-w+"px "+-g+"px",threshold:st(0,Zr(1,l))||1};let b=!0;function E(S){const k=S[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Ag(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(E,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,v)}r.observe(e)}return o(!0),i}function Ob(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Od(e),c=s||i?[...u?Ui(u):[],...Ui(t)]:[];
vendor: 9,090 bytes, line 106
106c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const f=u&&a?Rb(u,r):null;let h=-1,d=null;o&&(d=new ResizeObserver(g=>{let[p]=g;p&&p.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),r()}),u&&!l&&d.observe(u),d.observe(t));let y,m=l?jn(e):null;l&&w();function w(){const g=jn(e);m&&!Ag(m,g)&&r(),m=g,y=requestAnimationFrame(w)}return r(),()=>{var g;c.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(y)}}const Ab=tb,Nb=rb,jb=X_,Ib=sb,$b=Z_,Cf=Y_,Lb=nb,Db=(e,t,r)=>{const n=new Map,s={platform:Pb,...r},i={...s.platform,_c:n};return J_(e,t,{...s,platform:i})};var Mb=typeof document<"u",Ub=function(){},Yo=Mb?_.useLayoutEffect:Ub;function Ca(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(!Ca(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!Ca(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ng(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tf(e,t){const r=Ng(e);return Math.round(t*r)/r}function ql(e){const t=_.useRef(e);return Yo(()=>{t.current=e}),t}function Fb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=_.useState(n);Ca(h,n)||d(n);const[y,m]=_.useState(null),[w,g]=_.useState(null),p=_.useCallback(T=>{T!==S.current&&(S.current=T,m(T))},[]),v=_.useCallback(T=>{T!==k.current&&(k.current=T,g(T))},[]),b=i||y,E=o||w,S=_.useRef(null),k=_.useRef(null),P=_.useRef(c),A=l!=null,j=ql(l),B=ql(s),D=ql(u),Q=_.useCallback(()=>{if(!S.current||!k.current)return;const T={placement:t,strategy:r,middleware:h};B.current&&(T.platform=B.current),Db(S.current,k.current,T).then(R=>{const $={...R,isPositioned:D.current!==!1};I.current&&!Ca(P.current,$)&&(P.current=$,to.flushSync(()=>{f($)}))})},[h,t,r,B,D]);Yo(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const I=_.useRef(!1);Yo(()=>(I.current=!0,()=>{I.current=!1}),[]),Yo(()=>{if(b&&(S.current=b),E&&(k.current=E),b&&E){if(j.current)return j.current(b,E,Q);Q()}},[b,E,Q,j,A]);const X=_.useMemo(()=>({reference:S,floating:k,setReference:p,setFloating:v}),[p,v]),V=_.useMemo(()=>({reference:b,floating:E}),[b,E]),K=_.useMemo(()=>{const T={position:r,left:0,top:0};if(!V.floating)return T;const R=Tf(V.floating,c.x),$=Tf(V.floating,c.y);return a?{...T,transform:"translate("+R+"px, "+$+"px)",...Ng(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:$}},[r,a,V.floating,c.x,c.y]);return _.useMemo(()=>({...c,update:Q,refs:X,elements:V,floatingStyles:K}),[c,Q,X,V,K])}const zb=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?Cf({element:n.current,padding:s}).fn(r):{}:n?Cf({element:n,padding:s}).fn(r):{}}}},Bb=(e,t)=>({...Ab(e),options:[e,t]}),Vb=(e,t)=>({...Nb(e),options:[e,t]}),Wb=(e,t)=>({...Lb(e),options:[e,t]}),Hb=(e,t)=>({...jb(e),options:[e,t]}),Kb=(e,t)=>({...Ib(e),options:[e,t]}),qb=(e,t)=>({...$b(e),options:[e,t]}),Gb=(e,t)=>({...zb(e),options:[e,t]});var Qb="Arrow",jg=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return x.jsx(qe.svg,{...i,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"})})});jg.displayName=Qb;var Jb=jg;function Yb(e){const[t,r]=_.useState(void 0);return Xr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ig="Popper",[$g,Lg]=Qa(Ig),[DC,Dg]=$g(Ig),Mg="PopperAnchor",Ug=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=Dg(Mg,r),o=_.useRef(null),a=Mt(t,o);return _.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:x.jsx(qe.div,{...s,ref:a})});Ug.displayName=Mg;var Nd="PopperContent",[Xb,Zb]=$g(Nd),Fg=_.forwardRef((e,t)=>{var re,Ln,vr,sn,yr,Dn;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:y,...m}=e,w=Dg(Nd,r),[g,p]=_.useState(null),v=Mt(t,wr=>p(wr)),[b,E]=_.useState(null),S=Yb(b),k=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,A=n+(i!=="center"?"-"+i:""),j=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},B=Array.isArray(u)?u:[u],D=B.length>0,Q={padding:j,boundary:B.filter(tx),altBoundary:D},{refs:I,floatingStyles:X,placement:V,isPositioned:K,middlewareData:T}=Fb({strategy:"fixed",placement:A,whileElementsMounted:(...wr)=>Ob(...wr,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Bb({mainAxis:s+P,alignmentAxis:o}),l&&Vb({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Wb():void 0,...Q}),l&&Hb({...Q}),Kb({...Q,apply:({elements:wr,rects:oo,availableWidth:dl,availableHeight:ao})=>{const{width:hl,height:Ks}=oo.reference,Mn=wr.floating.style;Mn.setProperty("--radix-popper-available-width",`${dl}px`),Mn.setProperty("--radix-popper-available-height",`${ao}px`),Mn.setProperty("--radix-popper-anchor-width",`${hl}px`),Mn.setProperty("--radix-popper-anchor-height",`${Ks}px`)}}),b&&Gb({element:b,padding:a}),rx({arrowWidth:k,arrowHeight:P}),h&&qb({strategy:"referenceHidden",...Q})]}),[R,$]=Vg(V),q=Yr(y);Xr(()=>{K&&(q==null||q())},[K,q]);const U=(re=T.arrow)==null?void 0:re.x,J=(Ln=T.arrow)==null?void 0:Ln.y,Z=((vr=T.arrow)==null?void 0:vr.centerOffset)!==0,[_e,Ie]=_.useState();return Xr(()=>{g&&Ie(window.getComputedStyle(g).zIndex)},[g]),x.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(sn=T.transformOrigin)==null?void 0:sn.x,(yr=T.transformOrigin)==null?void 0:yr.y].join(" "),...((Dn=T.hide)==null?void 0:Dn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Xb,{scope:r,placedSide:R,onArrowChange:E,arrowX:U,arrowY:J,shouldHideArrow:Z,children:x.jsx(qe.div,{"data-side":R,"data-align":$,...m,ref:v,style:{...m.style,animation:K?void 0:"none"}})})})});Fg.displayName=Nd;var zg="PopperArrow",ex={top:"bottom",right:"left",bottom:"top",left:"right"},Bg=_.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=Zb(zg,n),o=ex[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(Jb,{...s,ref:r,style:{...s.style,display:"block"}})})});Bg.displayName=zg;function tx(e){return e!==null}var rx=e=>({name:"transformOrigin",options:e,fn(t){var w,g,p;const{placement:r,rects:n,middlewareData:s}=t,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=Vg(r),f={start:"0%",center:"50%",end:"100%"}[c],h=(((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="",m="";return u==="bottom"?(y=o?f:`${h}px`,m=`${-l}px`):u==="top"?(y=o?f:`${h}px`,m=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,m=o?f:`${d}px`):u==="left"&&(y=`${n.floating.width+l}px`,m=o?f:`${d}px`),{data:{x:y,y:m}}}});function Vg(e){const[t,r="center"]=e.split("-");return[t,r]}var nx=Ug,sx=Fg,ix=Bg,[tl,MC]=Qa("Tooltip",[Lg]),jd=Lg(),Wg="TooltipProvider",ox=700,Pf="tooltip.open",[ax,Hg]=tl(Wg),Kg=e=>{const{__scopeTooltip:t,delayDuration:r=ox,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=_.useRef(!0),a=_.useRef(!1),l=_.useRef(0);return _.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(ax,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:_.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 4,219 bytes, line 106
106o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:_.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};Kg.displayName=Wg;var qg="Tooltip",[UC,rl]=tl(qg),ic="TooltipTrigger",lx=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=rl(ic,r),i=Hg(ic,r),o=jd(r),a=_.useRef(null),l=Mt(t,a,s.onTriggerChange),u=_.useRef(!1),c=_.useRef(!1),f=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),x.jsx(nx,{asChild:!0,...o,children:x.jsx(qe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ke(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ke(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ke(e.onBlur,s.onClose),onClick:ke(e.onClick,s.onClose)})})});lx.displayName=ic;var ux="TooltipPortal",[FC,cx]=tl(ux,{forceMount:void 0}),Ms="TooltipContent",Gg=_.forwardRef((e,t)=>{const r=cx(Ms,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=rl(Ms,e.__scopeTooltip);return x.jsx(yd,{present:n||o.open,children:o.disableHoverableContent?x.jsx(Qg,{side:s,...i,ref:t}):x.jsx(dx,{side:s,...i,ref:t})})}),dx=_.forwardRef((e,t)=>{const r=rl(Ms,e.__scopeTooltip),n=Hg(Ms,e.__scopeTooltip),s=_.useRef(null),i=Mt(t,s),[o,a]=_.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:f}=n,h=_.useCallback(()=>{a(null),f(!1)},[f]),d=_.useCallback((y,m)=>{const w=y.currentTarget,g={x:y.clientX,y:y.clientY},p=gx(g,w.getBoundingClientRect()),v=vx(g,p),b=yx(m.getBoundingClientRect()),E=_x([...v,...b]);a(E),f(!0)},[f]);return _.useEffect(()=>()=>h(),[h]),_.useEffect(()=>{if(l&&c){const y=w=>d(w,c),m=w=>d(w,l);return l.addEventListener("pointerleave",y),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",y),c.removeEventListener("pointerleave",m)}}},[l,c,d,h]),_.useEffect(()=>{if(o){const y=m=>{const w=m.target,g={x:m.clientX,y:m.clientY},p=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),v=!wx(g,o);p?h():v&&(h(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,c,o,u,h]),x.jsx(Qg,{...e,ref:i})}),[hx,fx]=tl(qg,{isInside:!1}),px=S1("TooltipContent"),Qg=_.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=rl(Ms,r),u=jd(r),{onClose:c}=l;return _.useEffect(()=>(document.addEventListener(Pf,c),()=>document.removeEventListener(Pf,c)),[c]),_.useEffect(()=>{if(l.trigger){const f=h=>{const d=h.target;d!=null&&d.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),x.jsx(vd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:x.jsxs(sx,{"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(px,{children:n}),x.jsx(hx,{scope:r,isInside:!0,children:x.jsx(Q1,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Gg.displayName=Ms;var Jg="TooltipArrow",mx=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=jd(r);return fx(Jg,r).isInside?null:x.jsx(ix,{...s,...n,ref:t})});mx.displayName=Jg;function gx(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function vx(e,t,r=5){const n=[];
106switch(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 yx(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 wx(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],u=a.x,c=a.y,f=l.x,h=l.y;c>n!=h>n&&r<(f-u)*(n-c)/(h-c)+u&&(s=!s)}return s}function _x(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),bx(t)}function bx(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var xx=Kg,Yg=Gg;const Ex=xx,Sx=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>x.jsx(Yg,{ref:n,sideOffset:t,className:et("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}));Sx.displayName=Yg.displayName;var nl=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(){}},sl=typeof window>"u"||"Deno"in globalThis;function Pt(){}function kx(e,t){return typeof e=="function"?e(t):e}function Cx(e){return typeof e=="number"&&e>=0&&e!==1/0}function Tx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oc(e,t){return typeof e=="function"?e(t):e}function Px(e,t){return typeof e=="function"?e(t):e}function Rf(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Id(o,t.options))return!1}else if(!zi(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Of(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Fi(t.options.mutationKey)!==Fi(i))return!1}else if(!zi(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Id(e,t){return((t==null?void 0:t.queryKeyHashFn)||Fi)(e)}function Fi(e){return JSON.stringify(e,(t,r)=>ac(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function zi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>zi(e[r],t[r])):!1}function Xg(e,t){if(e===t)return e;const r=Af(e)&&Af(t);if(r||ac(e)&&ac(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<o;c++){const f=r?c:i[c];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,u++):(a[f]=Xg(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function Af(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ac(e){if(!Nf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Nf(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Nf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Rx(e){return new Promise(t=>{setTimeout(t,e)})}function Ox(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Xg(e,t):t}function Ax(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Nx(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var $d=Symbol();function Zg(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===$d?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var _n,jr,xs,fp,jx=(fp=class extends nl{constructor(){super();te(this,_n);te(this,jr);te(this,xs);H(this,xs,t=>{if(!sl&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,jr)||this.setEventListener(C(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,jr))==null||t.call(this),H(this,jr,void 0))}setEventListener(t){var r;H(this,xs,t),(r=C(this,jr))==null||r.call(this),H(this,jr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,_n)!==t&&(H(this,_n,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,912 bytes, line 106
106this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,_n)=="boolean"?C(this,_n):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},_n=new WeakMap,jr=new WeakMap,xs=new WeakMap,fp),ev=new jx,Es,Ir,Ss,pp,Ix=(pp=class extends nl{constructor(){super();te(this,Es,!0);te(this,Ir);te(this,Ss);H(this,Ss,t=>{if(!sl&&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(){C(this,Ir)||this.setEventListener(C(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Ir))==null||t.call(this),H(this,Ir,void 0))}setEventListener(t){var r;H(this,Ss,t),(r=C(this,Ir))==null||r.call(this),H(this,Ir,t(this.setOnline.bind(this)))}setOnline(t){C(this,Es)!==t&&(H(this,Es,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,Es)}},Es=new WeakMap,Ir=new WeakMap,Ss=new WeakMap,pp),Ta=new Ix;function $x(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function Lx(e){return Math.min(1e3*2**e,3e4)}function tv(e){return(e??"online")==="online"?Ta.isOnline():!0}var rv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Gl(e){return e instanceof rv}function nv(e){let t=!1,r=0,n=!1,s;const i=$x(),o=m=>{var w;n||(h(new rv(m)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>ev.isFocused()&&(e.networkMode==="always"||Ta.isOnline())&&e.canRun(),c=()=>tv(e.networkMode)&&e.canRun(),f=m=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,m),s==null||s(),i.resolve(m))},h=m=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,m),s==null||s(),i.reject(m))},d=()=>new Promise(m=>{var w;s=g=>{(n||u())&&m(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var m;s=void 0,n||(m=e.onContinue)==null||m.call(e)}),y=()=>{if(n)return;let m;const w=r===0?e.initialPromise:void 0;try{m=w??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(f).catch(g=>{var S;if(n)return;const p=e.retry??(sl?0:3),v=e.retryDelay??Lx,b=typeof v=="function"?v(r,g):v,E=p===!0||typeof p=="number"&&r<p||typeof p=="function"&&p(r,g);if(t||!E){h(g);return}r++,(S=e.onFail)==null||S.call(e,r,g),Rx(b).then(()=>u()?void 0:d()).then(()=>{t?h(g):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():d().then(y),i)}}var Dx=e=>setTimeout(e,0);function Mx(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=Dx;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ve=Mx(),bn,mp,sv=(mp=class{constructor(){te(this,bn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cx(this.gcTime)&&H(this,bn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(sl?1/0:5*60*1e3))}clearGcTimeout(){C(this,bn)&&(clearTimeout(C(this,bn)),H(this,bn,void 0))}},bn=new WeakMap,mp),ks,xn,pt,En,Me,Gi,Sn,Ot,er,gp,Ux=(gp=class extends sv{constructor(t){super();te(this,Ot);te(this,ks);te(this,xn);te(this,pt);te(this,En);te(this,Me);te(this,Gi);te(this,Sn);H(this,Sn,!1),H(this,Gi,t.defaultOptions),this.setOptions(t.options),this.observers=[],H(this,En,t.client),H(this,pt,C(this,En).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,H(this,ks,zx(this.options)),this.state=t.state??C(this,ks),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,Me))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Gi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,pt).remove(this)}setData(t,r){const n=Ox(this.state.data,t,this.options);return $e(this,Ot,er).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){$e(this,Ot,er).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=C(this,Me))==null?void 0:n.promise;return(s=C(this,Me))==null||s.cancel(t),r?r.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,ks))}isActive(){return this.observers.some(t=>Px(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$d||this.state.dataUpdateCount+this.state.errorUpdate
106Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>oc(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:!Tx(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,Me))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,Me))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,pt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,Me)&&(C(this,Sn)?C(this,Me).cancel({revert:!0}):C(this,Me).cancelRetry()),this.scheduleGc()),C(this,pt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Ot,er).call(this,{type:"invalidate"})}fetch(t,r){var u,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,Me))return C(this,Me).continueRetry(),C(this,Me).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(d=>d.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(H(this,Sn,!0),n.signal)})},i=()=>{const h=Zg(this.options,r),y=(()=>{const m={client:C(this,En),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return H(this,Sn,!1),this.options.persister?this.options.persister(h,y,this):h(y)},a=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,En),state:this.state,fetchFn:i};return s(h),h})();(u=this.options.behavior)==null||u.onFetch(a,this),H(this,xn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&$e(this,Ot,er).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=h=>{var d,y,m,w;Gl(h)&&h.silent||$e(this,Ot,er).call(this,{type:"error",error:h}),Gl(h)||((y=(d=C(this,pt).config).onError)==null||y.call(d,h,this),(w=(m=C(this,pt).config).onSettled)==null||w.call(m,this.state.data,h,this)),this.scheduleGc()};return H(this,Me,nv({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var d,y,m,w;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(g){l(g);return}(y=(d=C(this,pt).config).onSuccess)==null||y.call(d,h,this),(w=(m=C(this,pt).config).onSettled)==null||w.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,d)=>{$e(this,Ot,er).call(this,{type:"failed",failureCount:h,error:d})},onPause:()=>{$e(this,Ot,er).call(this,{type:"pause"})},onContinue:()=>{$e(this,Ot,er).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,Me).start()}},ks=new WeakMap,xn=new WeakMap,pt=new WeakMap,En=new WeakMap,Me=new WeakMap,Gi=new WeakMap,Sn=new WeakMap,Ot=new WeakSet,er=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,...Fx(n.data,this.options),fetchMeta:t.meta??null};case"success":return H(this,xn,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 Gl(s)&&s.revert&&C(this,xn)?{...C(this,xn),fetchStatus:"idle"}
vendor: 5,100 bytes, line 106
106:{...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),Ve.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,pt).notify({query:this,type:"updated",action:t})})},gp);function Fx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zx(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 Vt,vp,Bx=(vp=class extends nl{constructor(t={}){super();te(this,Vt);this.config=t,H(this,Vt,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??Id(s,r);let o=this.get(i);return o||(o=new Ux({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){C(this,Vt).has(t.queryHash)||(C(this,Vt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,Vt).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,Vt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ve.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Vt).get(t)}getAll(){return[...C(this,Vt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Rf(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Rf(t,n)):r}notify(t){Ve.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ve.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ve.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Vt=new WeakMap,vp),Wt,ze,kn,Ht,Cr,yp,Vx=(yp=class extends sv{constructor(t){super();te(this,Ht);te(this,Wt);te(this,ze);te(this,kn);this.mutationId=t.mutationId,H(this,ze,t.mutationCache),H(this,Wt,[]),this.state=t.state||Wx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Wt).includes(t)||(C(this,Wt).push(t),this.clearGcTimeout(),C(this,ze).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){H(this,Wt,C(this,Wt).filter(r=>r!==t)),this.scheduleGc(),C(this,ze).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Wt).length||(this.state.status==="pending"?this.scheduleGc():C(this,ze).remove(this))}continue(){var t;return((t=C(this,kn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,c,f,h,d,y,m,w,g,p,v,b,E,S,k,P;const r=()=>{$e(this,Ht,Cr).call(this,{type:"continue"})};H(this,kn,nv({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,j)=>{$e(this,Ht,Cr).call(this,{type:"failed",failureCount:A,error:j})},onPause:()=>{$e(this,Ht,Cr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,ze).canRun(this)}));const n=this.state.status==="pending",s=!C(this,kn).canStart();try{if(n)r();else{$e(this,Ht,Cr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=C(this,ze).config).onMutate)==null?void 0:o.call(i,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&$e(this,Ht,Cr).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const A=await C(this,kn).start();return await((c=(u=C(this,ze).config).onSuccess)==null?void 0:c.call(u,A,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,A,t,this.state.context)),await((y=(d=C(this,ze).config).onSettled)==null?void 0:y.call(d,A,null,this.state.variables,this.state.context,this)),await((w=(m=this.options).onSettled)==null?void 0:w.call(m,A,null,t,this.state.context)),$e(this,Ht,Cr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((p=(g=C(this,ze).config).onError)==null?void 0:p.call(g,A,t,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,A,t,this.state.context)),await((S=(E=C(this,ze).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{$e(this,Ht,Cr).call(this,{type:"error",error:A})}}finally{C(this,ze).runNext(this)}}},Wt=new WeakMap,ze=new WeakMap,kn=new WeakMap,Ht=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};
106case"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),Ve.batch(()=>{C(this,Wt).forEach(n=>{n.onMutationUpdate(t)}),C(this,ze).notify({mutation:this,type:"updated",action:t})})},yp);function Wx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var sr,At,Qi,wp,Hx=(wp=class extends nl{constructor(t={}){super();te(this,sr);te(this,At);te(this,Qi);this.config=t,H(this,sr,new Set),H(this,At,new Map),H(this,Qi,0)}build(t,r,n){const s=new Vx({mutationCache:this,mutationId:++uo(this,Qi)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){C(this,sr).add(t);const r=No(t);if(typeof r=="string"){const n=C(this,At).get(r);n?n.push(t):C(this,At).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,sr).delete(t)){const r=No(t);if(typeof r=="string"){const n=C(this,At).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&C(this,At).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=No(t);if(typeof r=="string"){const n=C(this,At).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=No(t);if(typeof r=="string"){const s=(n=C(this,At).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ve.batch(()=>{C(this,sr).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,sr).clear(),C(this,At).clear()})}getAll(){return Array.from(C(this,sr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Of(r,n))}findAll(t={}){return this.getAll().filter(r=>Of(t,r))}notify(t){Ve.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,428 bytes, line 106
106r.state.isPaused);return Ve.batch(()=>Promise.all(t.map(r=>r.continue().catch(Pt))))}},sr=new WeakMap,At=new WeakMap,Qi=new WeakMap,wp);function No(e){var t;return(t=e.options.scope)==null?void 0:t.id}function jf(e){return{onFetch:(t,r)=>{var c,f,h,d,y;const n=t.options,s=(h=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((d=t.state.data)==null?void 0:d.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=Zg(t.options,t.fetchOptions),p=async(v,b,E)=>{if(m)return Promise.reject();if(b==null&&v.pages.length)return Promise.resolve(v);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?Nx:Ax;return{pages:j(v.pages,P,A),pageParams:j(v.pageParams,b,A)}};if(s&&i.length){const v=s==="backward",b=v?Kx:If,E={pages:i,pageParams:o},S=b(n,E);a=await p(E,S,v)}else{const v=e??i.length;do{const b=l===0?o[0]??n.initialPageParam:If(n,a);if(l>0&&b==null)break;a=await p(a,b),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var m,w;return(w=(m=t.options).persister)==null?void 0:w.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function If(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 Kx(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 ge,$r,Lr,Cs,Ts,Dr,Ps,Rs,_p,qx=(_p=class{constructor(e={}){te(this,ge);te(this,$r);te(this,Lr);te(this,Cs);te(this,Ts);te(this,Dr);te(this,Ps);te(this,Rs);H(this,ge,e.queryCache||new Bx),H(this,$r,e.mutationCache||new Hx),H(this,Lr,e.defaultOptions||{}),H(this,Cs,new Map),H(this,Ts,new Map),H(this,Dr,0)}mount(){uo(this,Dr)._++,C(this,Dr)===1&&(H(this,Ps,ev.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ge).onFocus())})),H(this,Rs,Ta.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ge).onOnline())})))}unmount(){var e,t;uo(this,Dr)._--,C(this,Dr)===0&&((e=C(this,Ps))==null||e.call(this),H(this,Ps,void 0),(t=C(this,Rs))==null||t.call(this),H(this,Rs,void 0))}isFetching(e){return C(this,ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,$r).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,ge).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,ge).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(oc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(this,ge).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=C(this,ge).get(n.queryHash),i=s==null?void 0:s.state.data,o=kx(t,i);if(o!==void 0)return C(this,ge).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Ve.batch(()=>C(this,ge).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,ge).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,ge);Ve.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,ge);return Ve.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ve.batch(()=>C(this,ge).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Pt).catch(Pt)}invalidateQueries(e,t={}){return Ve.batch(()=>(C(this,ge).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=Ve.batch(()=>C(this,ge).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Pt)),s.state.fetchStatus==="paused"?Promise.resolve():i}
106));return Promise.all(n).then(Pt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,ge).build(this,t);return r.isStaleByTime(oc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pt).catch(Pt)}fetchInfiniteQuery(e){return e.behavior=jf(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pt).catch(Pt)}ensureInfiniteQueryData(e){return e.behavior=jf(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ta.isOnline()?C(this,$r).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,ge)}getMutationCache(){return C(this,$r)}getDefaultOptions(){return C(this,Lr)}setDefaultOptions(e){H(this,Lr,e)}setQueryDefaults(e,t){C(this,Cs).set(Fi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Cs).values()],r={};return t.forEach(n=>{zi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,Ts).set(Fi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Ts).values()],r={};return t.forEach(n=>{zi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Lr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Id(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===$d&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Lr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,ge).clear(),C(this,$r).clear()}},ge=new WeakMap,$r=new WeakMap,Lr=new WeakMap,Cs=new WeakMap,Ts=new WeakMap,Dr=new WeakMap,Ps=new WeakMap,Rs=new WeakMap,_p),Gx=_.createContext(void 0),Qx=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(Gx.Provider,{value:e,children:t}));/** 107 * @remix-run/router v1.23.0 108 * 109 * Copyright (c) Remix Software Inc. 110 * 111 * This source code is licensed under the MIT license found in the 112 * LICENSE.md file in the root directory of this source tree. 113 * 114 * @license MIT 115 */function Pa(){return Pa=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},Pa.apply(this,arguments)}var Fr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Fr||(Fr={}));const $f="popstate";function Jx(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return lc("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:ov(s)}return Xx(t,r,null,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function iv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yx(){return Math.random().toString(36).substr(2,8)}function Lf(e,t){return{usr:e.state,key:e.key,idx:t}}function lc(e,t,r,n){return r===void 0&&(r=null),Pa({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?il(t):t,{state:r,key:t&&t.key||n||Yx()})}function ov(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 il(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 Xx(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=Fr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Pa({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Fr.Pop;let w=c(),g=w==null?null:w-u;u=w,l&&l({action:a,location:m.location,delta:g})}function h(w,g){a=Fr.Push;let p=lc(m.location,w,g);u=c()+1;let v=Lf(p,u),b=m.createHref(p);try{o.pushState(v,"",b)}
vendor: 3,324 bytes, line 115
115catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(b)}i&&l&&l({action:a,location:m.location,delta:1})}function d(w,g){a=Fr.Replace;let p=lc(m.location,w,g);u=c();let v=Lf(p,u),b=m.createHref(p);o.replaceState(v,"",b),i&&l&&l({action:a,location:m.location,delta:0})}function y(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof w=="string"?w:ov(w);return p=p.replace(/ $/,"%20"),tt(g,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,g)}let m={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener($f,f),l=w,()=>{s.removeEventListener($f,f),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:h,replace:d,go(w){return o.go(w)}};return m}var Df;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Df||(Df={}));function Zx(e,t,r){return r===void 0&&(r="/"),eE(e,t,r,!1)}function eE(e,t,r,n){let s=typeof t=="string"?il(t):t,i=uv(s.pathname||"/",r);if(i==null)return null;let o=av(e);tE(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=hE(i);a=cE(o[l],u,n)}return a}function av(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(tt(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=_s([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(tt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),av(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:lE(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of lv(i.path))s(i,o,l)}),t}function lv(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=lv(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function tE(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:uE(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const rE=/^:[\w-]+$/,nE=3,sE=2,iE=1,oE=10,aE=-2,Mf=e=>e==="*";function lE(e,t){let r=e.split("/"),n=r.length;return r.some(Mf)&&(n+=aE),t&&(n+=sE),r.filter(s=>!Mf(s)).reduce((s,i)=>s+(rE.test(i)?nE:i===""?iE:oE),n)}function uE(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 cE(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Uf({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Uf({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;
vendor: 4,131 bytes, lines 115-124
115Object.assign(s,f.params),o.push({params:s,pathname:_s([i,f.pathname]),pathnameBase:fE(_s([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=_s([i,f.pathnameBase]))}return o}function Uf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=dE(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,f)=>{let{paramName:h,isOptional:d}=c;if(h==="*"){let m=a[f]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const y=a[f];return d&&!y?u[h]=void 0:u[h]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function dE(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),iv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function hE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return iv(!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 uv(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)||"/"}const _s=e=>e.join("/").replace(/\/\/+/g,"/"),fE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function pE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const cv=["post","put","patch","delete"];new Set(cv);const mE=["get",...cv];new Set(mE);/** 116 * React Router v6.30.1 117 * 118 * Copyright (c) Remix Software Inc. 119 * 120 * This source code is licensed under the MIT license found in the 121 * LICENSE.md file in the root directory of this source tree. 122 * 123 * @license MIT 124 */function Ra(){return Ra=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},Ra.apply(this,arguments)}const gE=_.createContext(null),vE=_.createContext(null),dv=_.createContext(null),ol=_.createContext(null),al=_.createContext({outlet:null,matches:[],isDataRoute:!1}),hv=_.createContext(null);function Ld(){return _.useContext(ol)!=null}function fv(){return Ld()||tt(!1),_.useContext(ol).location}function yE(e,t){return wE(e,t)}function wE(e,t,r,n){Ld()||tt(!1);let{navigator:s}=_.useContext(dv),{matches:i}=_.useContext(al),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=fv(),c;if(t){var f;let w=typeof t=="string"?il(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||tt(!1),c=w}else c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let w=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=Zx(e,{pathname:d}),m=SE(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:_s([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:_s([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,r,n);return t&&m?_.createElement(ol.Provider,{value:{location:Ra({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Fr.Pop}},m):m}function _E(){let e=PE(),t=pE(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
124Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),r?_.createElement("pre",{style:s},r):null,null)}const bE=_.createElement(_E,null);class xE 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(al.Provider,{value:this.props.routeContext},_.createElement(hv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function EE(e){let{routeContext:t,match:r,children:n}=e,s=_.useContext(gE);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),_.createElement(al.Provider,{value:t},n)}function SE(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||tt(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:h,errors:d}=r,y=f.route.loader&&h[f.route.id]===void 0&&(!d||d[f.route.id]===void 0);if(f.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let d,y=!1,m=null,w=null;r&&(d=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||bE,l&&(u<0&&h===0?(y=!0,w=null):u===h&&(y=!0,w=f.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,h+1)),p=()=>{let v;return d?v=m:y?v=w:f.route.Component?v=_.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=c,_.createElement(EE,{match:f,routeContext:{outlet:c,matches:g,isDataRoute:r!=null},children:v})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?_.createElement(xE,{location:r.location,revalidation:r.revalidation,component:m,error:d,children:p(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):p()},null)}var uc=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}(uc||{});function kE(e){let t=_.useContext(vE);return t||tt(!1),t}function CE(e){let t=_.useContext(al);return t||tt(!1),t}function TE(e){let t=CE(),r=t.matches[t.matches.length-1];return r.route.id||tt(!1),r.route.id}function PE(){var e;let t=_.useContext(hv),r=kE(uc.UseRouteError),n=TE(uc.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function RE(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function cc(e){tt(!1)}function OE(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Fr.Pop,navigator:i,static:o=!1,future:a}=e;Ld()&&tt(!1);let l=t.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:l,navigator:i,static:o,future:Ra({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=il(n));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:y="default"}=n,m=_.useMemo(()=>{let w=uv(c,l);return w==null?null:{location:{pathname:w,search:f,hash:h,state:d,key:y},navigationType:s}},[l,c,f,h,d,y,s]);return m==null?null:_.createElement(dv.Provider,{value:u},_.createElement(ol.Provider,{children:r,value:m}))}function AE(e){let{children:t,location:r}=e;return yE(dc(t),r)}new Promise(()=>{});function dc(e,t){t===void 0&&(t=[]);let r=[];
124return _.Children.forEach(e,(n,s)=>{if(!_.isValidElement(n))return;let i=[...t,s];if(n.type===_.Fragment){r.push.apply(r,dc(n.props.children,i));return}n.type!==cc&&tt(!1),!n.props.index||!n.props.children||tt(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=dc(n.props.children,i)),r.push(o)}),r}/** 125 * React Router DOM v6.30.1 126 * 127 * Copyright (c) Remix Software Inc. 128 * 129 * This source code is licensed under the MIT license found in the 130 * LICENSE.md file in the root directory of this source tree. 131 * 132 * @license MIT 133 */const NE="6";try{window.__reactRouterVersion=NE}catch{}const jE="startTransition",Ff=Np[jE];function IE(e){let{basename:t,children:r,future:n,window:s}=e,i=_.useRef();i.current==null&&(i.current=Jx({window:s,v5Compat:!0}));let o=i.current,[a,l]=_.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=_.useCallback(f=>{u&&Ff?Ff(()=>l(f)):l(f)},[l,u]);return _.useLayoutEffect(()=>o.listen(c),[o,c]),_.useEffect(()=>RE(n),[n]),_.createElement(OE,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}var zf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(zf||(zf={}));var Bf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bf||(Bf={}));const $E=({currentStep:e,totalSteps:t})=>{const r=e/t*100;return x.jsx("div",{className:"w-full max-w-md mx-auto",children:x.jsx("div",{className:"w-full bg-border h-1 rounded-full overflow-hidden",children:x.jsx("div",{className:"h-full bg-accent transition-all duration-500 ease-out",style:{width:`${r}%`}})})})},LE=xd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),so=_.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?x1:"button";return x.jsx(o,{className:et(LE({variant:t,size:r,className:e})),ref:i,...s})});so.displayName="Button";const DE=({onNext:e})=>x.jsxs("div",{className:"max-w-3xl mx-auto text-center space-y-10 animate-fade-in",children:[x.jsxs("div",{className:"space-y-4",children:[x.jsx("h1",{className:"font-bold leading-tight",style:{fontSize:"38px"},children:"Wil je maximale beveiliging?"}),x.jsx("p",{className:"text-foreground/70 max-w-2xl mx-auto",style:{fontSize:"20px"},children:"Beantwoord enkele korte vragen en ontvang persoonlijk advies."})]}),x.jsxs(so,{onClick:e,size:"lg",className:"bg-accent hover:bg-accent/90 text-accent-foreground font-semibold px-10 h-14 text-lg group rounded-full",children:["Start",x.jsx(Ed,{className:"ml-2 w-5 h-5 group-hover:translate-x-1 transition-transform"})]})]}),Us=({label:e,icon:t,selected:r=!1,onClick:n,className:s})=>x.jsxs("button",{onClick:n,className:et("w-full p-3 md:p-6 rounded-xl border-2 transition-all duration-300","hover:border-accent hover:shadow-lg","flex flex-col items-center justify-center gap-2 md:gap-3 text-center",r?"border-accent bg-accent/5 shadow-md":"border-border bg-card",s),children:[t&&x.jsx("div",{className:et("w-10 h-10 md:w-12 md:h-12 rounded-full flex items-center justify-center transition-colors",r?"bg-accent text-accent-foreground":"bg-secondary text-foreground"),children:t}),x.jsx("span",{className:et("font-medium text-sm md:text-base",r?"text-foreground":"text-foreground
133/80"),children:e})]}),ME=({data:e,onUpdate:t,onNext:r})=>{const n=s=>{t({customerType:s}),setTimeout(r,300)};return x.jsxs("div",{className:"max-w-3xl mx-auto space-y-4 md:space-y-8 animate-fade-in",children:[x.jsx("div",{className:"text-center space-y-2 md:space-y-3",children:x.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground",children:"Ik ben:"})}),x.jsxs("div",{className:"grid grid-cols-2 gap-3 md:gap-6 max-w-2xl mx-auto",children:[x.jsx(Us,{label:"Particulier",icon:x.jsx(b2,{className:"w-5 h-5 md:w-6 md:h-6"}),selected:e.customerType==="particulier",onClick:()=>n("particulier")}),x.jsx(Us,{label:"Bedrijf / organisatie",icon:x.jsx(v2,{className:"w-5 h-5 md:w-6 md:h-6"}),selected:e.customerType==="professioneel",onClick:()=>n("professioneel")})]})]})},Vf="data:image/svg+xml,%3csvg%20width='39'%20height='37'%20viewBox='0%200%2039%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M30.2609%2026.2927C29.905%2025.8354%2029.727%2025.2598%2029.727%2024.6767L29.6967%2016.4933C29.6967%2016.2799%2029.6891%2016.0703%2029.6778%2015.8644C29.674%2015.7882%2029.6664%2015.712%2029.6626%2015.6358C29.6512%2015.4909%2029.6399%2015.3461%2029.6285%2015.2089C29.6247%2015.1707%2029.621%2015.1326%2029.6134%2015.0983C29.4695%2013.852%2029.14%2012.7847%2028.6477%2011.9157C26.6748%208.20331%2022.3503%207.07129%2019.4874%207.07129C16.6246%207.07129%2012.2925%208.20712%2010.3233%2011.9272C9.83484%2012.7962%209.50539%2013.8596%209.36149%2015.0983C9.3577%2015.1364%209.35013%2015.1746%209.34634%2015.2165C9.33119%2015.3575%209.31983%2015.4985%209.31226%2015.6434C9.30847%2015.7196%209.3009%2015.7958%209.29711%2015.8721C9.28575%2016.0779%209.28196%2016.2875%209.27818%2016.501L9.24788%2024.6423C9.24788%2025.2255%209.0699%2025.801%208.71016%2026.2622C6.72965%2028.8083%207.54003%2031.9147%2011.1451%2034.0072C15.7839%2036.702%2023.2743%2036.702%2027.879%2034.0072C31.4424%2031.9223%2032.2339%2028.8388%2030.2609%2026.3004V26.2927Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M33.6674%2016.6739C33.6674%2016.3766%2033.6598%2016.0869%2033.6447%2015.8011C33.6409%2015.6944%2033.6295%2015.5914%2033.622%2015.4847C33.6068%2015.2827%2033.5917%2015.0845%2033.5727%2014.8901C33.5652%2014.8368%2033.5614%2014.7872%2033.5538%2014.7339C33.3531%2013.0034%2032.8949%2011.5207%2032.2133%2010.3125C30.691%207.45006%2028.1652%205.69295%2025.5371%204.69434'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M38.2928%2016.6724C38.2928%2016.276%2038.2814%2015.8911%2038.2625%2015.5137C38.2549%2015.3727%2038.2436%2015.2355%2038.2322%2015.0944C38.2133%2014.8276%2038.1943%2014.5646%2038.1678%2014.3055C38.1602%2014.2369%2038.1527%2014.1682%2038.1413%2014.0996C37.8762%2011.8051%2037.2666%209.83837%2036.3615%208.23373C34.3469%204.43746%2030.9956%202.10863%2027.5117%200.782227'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.4312%204.68945C10.7994%205.68807%208.26977%207.4528%206.75125%2010.3191C6.07341%2011.5235%205.61521%2013.0024%205.41829%2014.7252C5.41072%2014.7785%205.40314%2014.8319%205.39936%2014.8891C5.38042%2015.0834%205.36528%2015.2816%205.35013%2015.4798C5.34256%2015.5866%205.3312%2015.6895%205.32741%2015.8C5.31226%2016.0859%205.30469%2016.3755%205.30469%2016.6728'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.4551%200.782227C7.96747%202.10863%204.61614%204.44509%202.60156%208.24897C1.70408%209.846%201.0944%2011.8089%200.833113%2014.092C0.82554%2014.1644%200.814179%2014.2369%200.806606%2014.3093C0.780098%2014.5646%200.757377%2014.8276%200.74223%2015.0906C0.730869%2015.2317%200.719509%2015.3689%200.711935%2015.5137C0.693001%2015.8911%200.681641%2016.2798%200.681641%2016.6724'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.4827%2011.0622C20.6748%2011.0622%2021.6412%2010.5622%2021.6412%209.94539C21.6412%209.32861%2020.6748%208.82861%2019.4827%208.82861C18.2906%208.82861%2017.3242%209.32861%2017.3242%209.94539C17.3242%2010.5622%2018.2906%2011.0622%2019.4827%2011.0622Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M19.4824%2017.7217V24.5252'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M19.4824%2026.6426V28.251'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3c/svg%3e",UE="data:image/svg+xml,%3csvg%20width='40'%20height='37'%20viewBox='0%200%2040%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M31.0226%2026.6565C30.6667%2026.1991%2030.4887%2025.6236%2030.4887%2025.0404L30.4584%2016.8571C30.4584%2016.6437%2030.4508%2016.434%2030.4395%2016.2282C30.4357%2016.152%2030.428
1331%2016.0758%2030.4243%2015.9995C30.413%2015.8547%2030.4016%2015.7098%2030.3902%2015.5726C30.3865%2015.5345%2030.3827%2015.4964%2030.3751%2015.4621C30.2312%2014.2157%2029.9017%2013.1485%2029.4095%2012.2795C27.4365%208.56708%2023.112%207.43506%2020.2492%207.43506C17.3863%207.43506%2013.0542%208.57089%2011.0851%2012.2909C10.5966%2013.1599%2010.2671%2014.2234%2010.1232%2015.4621C10.1194%2015.5002%2010.1118%2015.5383%2010.1081%2015.5803C10.0929%2015.7213%2010.0816%2015.8623%2010.074%2016.0071C10.0702%2016.0834%2010.0626%2016.1596%2010.0588%2016.2358C10.0475%2016.4417%2010.0437%2016.6513%2010.0399%2016.8647L10.0096%2025.0061C10.0096%2025.5893%209.83162%2026.1648%209.47187%2026.626C7.49137%2029.1721%208.30175%2032.2785%2011.9068%2034.371C16.5456%2037.0657%2024.036%2037.0657%2028.6407%2034.371C32.2041%2032.2861%2032.9956%2029.2026%2031.0226%2026.6641V26.6565Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M19.8903%2030.0362C24.3288%2030.0362%2025.9298%2026.7836%2026.1834%2023.1834C25.153%2023.1586%2023.7026%2024.1435%2023.7026%2024.1435C23.7026%2024.1435%2024.4873%2019.5997%2021.1584%2016.9844C20.7384%2020.0466%2019.9141%2020.3198%2019.9141%2020.3198C19.9141%2020.3198%2019.0977%2019.7983%2018.7569%2018.9376C17.5046%2020.6756%2015.8798%2023.0923%2016.3792%2024.6566C15.3805%2023.7876%2015.2141%2022.5709%2015.2141%2022.5709C13.2088%2025.3104%2014.4452%2030.0445%2019.8903%2030.0445V30.0362Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M34.4291%2017.0377C34.4291%2016.7404%2034.4215%2016.4507%2034.4064%2016.1648C34.4026%2016.0581%2034.3913%2015.9552%2034.3837%2015.8485C34.3685%2015.6465%2034.3534%2015.4483%2034.3345%2015.2539C34.3269%2015.2005%2034.3231%2015.151%2034.3155%2015.0976C34.1148%2013.3672%2033.6566%2011.8845%2032.975%2010.6763C31.4527%207.81383%2028.9269%206.05672%2026.2988%205.05811'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M39.0545%2017.0367C39.0545%2016.6403%2039.0431%2016.2553%2039.0242%2015.878C39.0166%2015.7369%2039.0053%2015.5997%2038.9939%2015.4587C38.975%2015.1919%2038.956%2014.9289%2038.9295%2014.6697C38.922%2014.6011%2038.9144%2014.5325%2038.903%2014.4639C38.638%2012.1694%2038.0283%2010.2026%2037.1232%208.59799C35.1086%204.80172%2031.7573%202.47289%2028.2734%201.14648'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.1929%205.05371C11.5611%206.05233%209.03148%207.81706%207.51297%2010.6833C6.83513%2011.8877%206.37693%2013.3666%206.18001%2015.0894C6.17244%2015.1428%206.16486%2015.1961%206.16108%2015.2533C6.14214%2015.4477%206.127%2015.6459%206.11185%2015.8441C6.10427%2015.9508%206.09291%2016.0537%206.08913%2016.1643C6.07398%2016.4501%206.06641%2016.7398%206.06641%2017.0371'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.2169%201.14648C8.72919%202.47289%205.37786%204.80935%203.36327%208.61323C2.4658%2010.2103%201.85612%2012.1732%201.59483%2014.4563C1.58726%2014.5287%201.5759%2014.6011%201.56832%2014.6735C1.54182%2014.9289%201.5191%2015.1919%201.50395%2015.4549C1.49259%2015.5959%201.48123%2015.7331%201.47365%2015.878C1.45472%2016.2553%201.44336%2016.6441%201.44336%2017.0367'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.2444%2011.4264C21.4365%2011.4264%2022.4029%2010.9264%2022.4029%2010.3096C22.4029%209.69287%2021.4365%209.19287%2020.2444%209.19287C19.0523%209.19287%2018.0859%209.69287%2018.0859%2010.3096C18.0859%2010.9264%2019.0523%2011.4264%2020.2444%2011.4264Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3c/svg%3e",FE="data:image/svg+xml,%3csvg%20width='31'%20height='37'%20viewBox='0%200%2031%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.29097%2012.8322C2.73399%2013.3925%202.94972%2014.09%202.95357%2014.7989L2.9921%2024.7584C2.9921%2025.0176%202.9998%2025.273%203.01136%2025.5245C3.01521%2025.6198%203.02292%2025.7075%203.03062%2025.799C3.04218%2025.9743%203.05759%2026.1496%203.07685%2026.3211C3.0807%2026.3669%203.0884%2026.4126%203.09226%2026.4583C3.26946%2027.9753%203.68166%2029.2751%204.28648%2030.3347C6.72885%2034.8513%2012.0836%2036.2311%2015.6316%2036.2311C19.1795%2036.2311%2024.542%2034.8475%2026.9805%2030.3232C27.5853%2029.2674%2027.9937%2027.9715%2028.1709%2026.4622C28.1786%2026.4164%2028.1824%2026.3669%2028.1901%2026.3211C28.2094%2026.1534%2028.2209%2025.9781%2028.2325%2025.8028C28.2402%2025.7113%2028.2479%2025.6198%2028.2518%2025.5245C28.2633%2025.273%2028.271%2025.0176%2028.271%2024.7584L28.3095%2014.8523C28.3095%2014.1434%2028.533%2013.442%2028.9721%2012.8818C31.4261%209.78299%2030.4206%206.00198%2025.9558%203.45208C20.2158%200.174178%2010.9394%200.174178%205.238%203.45208C0.830945%205.99054%20-0.147544%209.74488%202.29097%2012.8322Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M8.48633%2016.5024L8.50944%2023.3327C8.50944%2023.4813%208.51329%2023.6223%208.521%2023.7634C8.521%2023.8167%208.5287%2023.8663%208.53256%2023.9196C8.54026%2024.0187%208.54797%2024.1178%208.55952%2024.2131C8.55952%2024.2398%208.56723%2024.2627%208.56723%2024.2894C8.66739%2025.1431%208.89853%2025.8788%209.24138%2026.4734C10.6167%2029.0194%2013.6369%2029.797%2015.6362%2029.797C17.6356%2029.797%2020.6597%2029.0194%2022.0349%2026.4657C22.3739%2025.8711%2022.6051%2025.1393%2022.7052%2024.2894C22.7052%2024.2627%2022.7129%2024.236%2022.7168%2024.2093C22.7284%2024.114%2022.7361%2024.0149%2022.7399%2023.9158C22.7399%2023.8625%2022.7476%2023.8
133129%2022.7515%2023.7596C22.7592%2023.6185%2022.763%2023.4737%2022.763%2023.3289L22.7861%2016.5253'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M15.6367%2017.6338V19.9741L19.2155%2022.1428'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M15.6367%2017.6347C23.7279%2017.6347%2030.2871%2013.9095%2030.2871%209.31418C30.2871%204.71888%2023.7279%200.993652%2015.6367%200.993652C7.54552%200.993652%200.986328%204.71888%200.986328%209.31418C0.986328%2013.9095%207.54552%2017.6347%2015.6367%2017.6347Z'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M22.0195%2016.8037C22.5088%2017.7604%2022.7861%2018.8429%2022.7861%2019.9901C22.7861%2023.8969%2019.5849%2027.0643%2015.6362%2027.0643C11.6876%2027.0643%208.48633%2023.8969%208.48633%2019.9901C8.48633%2018.8429%208.7637%2017.7604%209.25294%2016.8037'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M18.8687%2017.3535C19.4658%2018.0701%2019.828%2018.9887%2019.828%2019.9911C19.828%2022.2818%2017.9519%2024.138%2015.6366%2024.138C13.3214%2024.138%2011.4453%2022.2818%2011.4453%2019.9911C11.4453%2019.0191%2011.7805%2018.1273%2012.3468%2017.4221'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3c/svg%3e",zE="data:image/svg+xml,%3csvg%20width='37'%20height='37'%20viewBox='0%200%2037%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.3115%2032.4776C12.4136%2032.4776%207.63281%2027.6968%207.63281%2021.799V14.8735C7.63281%208.97565%2012.4136%204.19482%2018.3115%204.19482C24.2093%204.19482%2028.9901%208.97565%2028.9901%2014.8735V19.699C28.9901%2025.0566%2024.6439%2029.4028%2019.2863%2029.4028H18.8923C14.3715%2029.4028%2010.7117%2025.739%2010.7117%2021.2222V14.8775C10.7117%2010.6776%2014.1156%207.27372%2018.3155%207.27372C22.5155%207.27372%2025.9194%2010.6776%2025.9194%2014.8775V19.9711C25.9194%2023.4847%2023.072%2026.332%2019.5585%2026.332H19.2457C16.2277%2026.332%2013.7865%2023.8868%2013.7865%2020.8729V14.8816C13.7865%2012.3795%2015.8134%2010.3526%2018.3155%2010.3526C20.8176%2010.3526%2022.8445%2012.3795%2022.8445%2014.8816V20.158C22.8445%2021.8721%2021.4554%2023.2613%2019.7413%2023.2613H19.6397C18.1043%2023.2613%2016.8614%2022.0183%2016.8614%2020.4829V14.8816C16.8614%2014.0774%2017.5113%2013.4275%2018.3155%2013.4275C19.1198%2013.4275%2019.7697%2014.0774%2019.7697%2014.8816V20.2961'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M8.82687%2035.9411H0.703125V27.8174'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M35.9148%2027.8174V35.9411H27.791'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M27.791%200.72998H35.9148V8.85372'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3cpath%20d='M0.703125%208.85372V0.72998H8.82687'%20stroke='%231E1E1E'%20stroke-width='1.18729'%20stroke-miterlimit='10'/%3e%3c/svg%3e",BE=({type:e,className:t="w-6 h-6"})=>{const r={alarm:x.jsx("img",{src:Vf,alt:"Alarmsysteem",className:t}),camera:x.jsx("img",{src:FE,alt:"Camerabewaking",className:t}),brand:x.jsx("img",{src:UE,alt:"Brandbeveiliging",className:t}),buiten:x.jsx(x2,{className:t}),toegang:x.jsx("img",{src:zE,alt:"Toegangscontrole",className:t}),mist:x.jsx(_2,{className:t}),compleet:x.jsx(E2,{className:t})};return x.jsx(x.Fragment,{children:r[e]||x.jsx("img",{src:Vf,alt:"Beveiliging",className:t})})},VE=({data:e,onUpdate:t,onNext:r})=>{const n=[{value:"alarm",label:"Alarmsysteem",icon:"alarm"},{value:"camera",label:"Camerabewaking",icon:"camera"},{value:"brand",label:"Brandbeveiliging",icon:"brand"},{value:"buiten",label:"Buitendetectie",icon:"buiten"},{value:"toegang",label:"Toegangscontrole",icon:"toegang"}],s=i=>{const o=e.securityTypes||[],a=o.includes(i)?o.filter(l=>l!==i):[...o,i];t({securityTypes:a})};return x.jsxs("div",{className:"max-w-4xl mx-auto space-y-4 md:space-y-8 animate-fade-in",children:[x.jsxs("div",{className:"text-center space-y-2 md:space-y-3",children:[x.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground",children:"Welke oplossing(en) zoek je?"}),x.jsx("p",{className:"text-muted-foreground text-sm md:text-base",children:"Je kunt meerdere opties selecteren"})]}),x.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-6",children:n.map(i=>{var o;return x.jsx(Us,{label:i.label,icon:x.jsx(BE,{type:i.icon}),selected:(o=e.securityTypes)==null?void 0:o.includes(i.value),onClick:()=>s(i.value)},i.value)})}),e.securityTypes&&e.securityTypes.length>0&&x.jsx("div",{className:"flex justify-center pt-2 md:pt-4",children:x.jsxs(so,{onClick:r,size:"lg",className:"bg-accent hover:bg-accent/90 text-accent-foreground font-semibold px-8 group",children:["Volgende",x.jsx(Ed,{className:"ml-2 w-5 h-5 group-hover:translate-x-1 transition-transform"})]})})]})},WE=({data:e,onUpdate:t,onNext:r})=>{const n=[{value:"uitbreiden",label:"Ja, maar ik wil uitbreiden"},{value:"vernieuwen",label:"Ja, maar ik wil deze vernieuwen"},{value:"nieuw",label:"Nee"}],s=i=>{t({currentSituation:i}),setTimeout(r,300)};
133return x.jsxs("div",{className:"max-w-3xl mx-auto space-y-4 md:space-y-8 animate-fade-in",children:[x.jsx("div",{className:"text-center space-y-2 md:space-y-3",children:x.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground",children:"Heb je momenteel al een beveiligingssysteem?"})}),x.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 md:gap-6",children:n.map(i=>x.jsx(Us,{label:i.label,selected:e.currentSituation===i.value,onClick:()=>s(i.value)},i.value))})]})},HE=({data:e,onUpdate:t,onNext:r})=>{const n=s=>{t({hasPets:s}),setTimeout(r,300)};return x.jsxs("div",{className:"max-w-3xl mx-auto space-y-4 md:space-y-8 animate-fade-in",children:[x.jsx("div",{className:"text-center space-y-2 md:space-y-3",children:x.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground",children:"Bewegen er huisdieren vrij rond in je woning?"})}),x.jsxs("div",{className:"grid grid-cols-2 gap-3 md:gap-6 max-w-2xl mx-auto",children:[x.jsx(Us,{label:"Ja",selected:e.hasPets==="ja",onClick:()=>n("ja")}),x.jsx(Us,{label:"Nee",selected:e.hasPets==="nee",onClick:()=>n("nee")})]})]})},Qn=_.forwardRef(({className:e,type:t,...r},n)=>x.jsx("input",{type:t,className:et("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));Qn.displayName="Input";var KE="Label",pv=_.forwardRef((e,t)=>x.jsx(qe.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));pv.displayName=KE;var mv=pv;const qE=xd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),hn=_.forwardRef(({className:e,...t},r)=>x.jsx(mv,{ref:r,className:et(qE(),e),...t}));hn.displayName=mv.displayName;const gv=_.forwardRef(({className:e,...t},r)=>x.jsx("textarea",{className:et("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
133ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));gv.displayName="Textarea";function ll(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 GE(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const QE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Dd extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class JE extends Dd{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Wf extends Dd{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Hf extends Dd{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var hc;(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"})(hc||(hc={}));class YE{constructor(t,{headers:r={},customFetch:n,region:s=hc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=QE(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return GE(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,timeout:f}=n;let h={},{region:d}=n;d||(d=this.region);const y=new URL(`${this.url}/${r}`);d&&d!=="any"&&(h["x-region"]=d,y.searchParams.set("forceFunctionRegion",d));let m;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(h["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(h["Content-Type"]="application/json",m=JSON.stringify(u)):m=u;let w=c;f&&(o=new AbortController,i=setTimeout(()=>o.abort(),f),c?(w=o.signal,c.addEventListener("abort",()=>o.abort())):w=o.signal);const g=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:m,signal:w}).catch(E=>{throw new JE(E)}),p=g.headers.get("x-relay-error");if(p&&p==="true")throw new Wf(g);if(!g.ok)throw new Hf(g);let v=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),b;return v==="application/json"?b=yield g.json():v==="application/octet-stream"||v==="application/pdf"?b=yield g.blob():v==="text/event-stream"?b=g:v==="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 Hf||a instanceof Wf?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var XE=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
133de=e.code}},ZE=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,u=i.status,c=i.statusText;if(i.ok){var f,h;if(r.method!=="HEAD"){var d;const g=await i.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 m=(f=r.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),w=(h=i.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");m&&w&&w.length>1&&(l=parseInt(w[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var y;const m=await i.text();try{o=JSON.parse(m),Array.isArray(o)&&i.status===404&&(a=[],o=null,u=200,c="OK")}catch{i.status===404&&m===""?(u=204,c="No Content"):o={message:m}}if(o&&r.isMaybeSingle&&(!(o==null||(y=o.details)===null||y===void 0)&&y.includes("0 rows"))&&(o=null,u=200,c="OK"),o&&r.shouldThrowOnError)throw new XE(o)}return{error:o,data:a,count:l,status:u,statusText:c}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="";const l=i==null?void 0:i.cause;if(l){var u,c,f,h;const y=(u=l==null?void 0:l.message)!==null&&u!==void 0?u:"",m=(c=l==null?void 0:l.code)!==null&&c!==void 0?c:"";a=`${(f=i==null?void 0:i.name)!==null&&f!==void 0?f:"FetchError"}: ${i==null?void 0:i.message}`,a+=` 134 135Caused by: ${(h=l==null?void 0:l.name)!==null&&h!==void 0?h:"Error"}: ${y}`,m&&(a+=` (${m})`),l!=null&&l.stack&&(a+=` 136${l.stack}`)}else{var d;a=(d=i==null?void 0:i.stack)!==null&&d!==void 0?d:""}return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},eS=class extends ZE{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
136explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Kf=new RegExp("[,()]");var Jn=class extends eS{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"&&Kf.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"&&Kf.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},tS=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),n&&this.headers.append("Prefer",`count=${n}`),new Jn({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST";if(t&&this.headers.append("Prefer",`count=${t}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const i=e.reduce((o,a)=>o.concat(Object.keys(a)),[]);if(i.length>0){const o=[...new Set(i)].map(a=>`"${a}"`);this.url.searchParams.set("columns",o.join(","))}}return new Jn({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&this.url.searchParams.set("on_conflict",t),n&&this.headers.append("Prefer",`count=${n}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1360){const l=[...new Set(a)].map(u=>`"${u}"`);this.url.searchParams.set("columns",l.join(","))}}return new Jn({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}update(e,{count:t}={}){var r;const n="PATCH";return t&&this.headers.append("Prefer",`count=${t}`),new Jn({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE";return e&&this.headers.append("Prefer",`count=${e}`),new Jn({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},rS=class vv{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 tS(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new vv(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,h])=>h!==void 0).map(([f,h])=>[f,Array.isArray(h)?`{${h.join(",")}}`:`${h}`]).forEach(([f,h])=>{l.searchParams.append(f,h)})):(a="POST",u=r);const c=new Headers(this.headers);return i&&c.set("Prefer",`count=${i}`),new Jn({method:a,url:l,headers:c,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};class nS{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."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,s=parseInt(n.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 137import ws from "ws" 138new 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+=` 139 140Suggested 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 sS="2.89.0",iS=`realtime-js/${sS}`,yv="1.0.0",oS="2.0.0",qf=yv,fc=1e4,aS=1e3,lS=100;var Rr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Rr||(Rr={}));var Ee;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ee||(Ee={}));var jt;(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"})(jt||(jt={}));var pc;(function(e){e.websocket="websocket"})(pc||(pc={}));var pn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(pn||(pn={}));class uS{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=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(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+f.length,d=new ArrayBuffer(this.HEADER_LENGTH+h);let y=new DataView(d),m=0;y.setUint8(m++,this.KINDS.userBroadcastPush),y.setUint8(m++,l.length),y.setUint8(m++,a.length),y.setUint8(m++,o.length),y.setUint8(m++,u.length),y.setUint8(m++,f.length),y.setUint8(m++,r),Array.from(l,g=>y.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>y.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>y.setUint8(m++,g.charCodeAt(0))),Array.from(u,g=>y.setUint8(m++,g.charCodeAt(0))),Array.from(f,g=>y.setUint8(m++,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,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const c=n.decode(t.slice(l,l+i));l=l+i;
140const f=n.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),d=a===this.JSON_ENCODING?JSON.parse(n.decode(h)):h,y={type:this.BROADCAST_EVENT,event:c,payload:d};return o>0&&(y.meta=JSON.parse(f)),{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 wv{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 ie;(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"})(ie||(ie={}));const Gf=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=cS(o,e,t,s),i),{}):{}},cS=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?_v(i,o):mc(o)},_v=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return pS(t,r)}switch(e){case ie.bool:return dS(t);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return hS(t);case ie.json:case ie.jsonb:return fS(t);case ie.timestamp:return mS(t);case ie.abstime:case ie.date:case ie.daterange:case ie.int4range:case ie.int8range:case ie.money:case ie.reltime:case ie.text:case ie.time:case ie.timestamptz:case ie.timetz:case ie.tsrange:case ie.tstzrange:return mc(t);default:return mc(t)}},mc=e=>e,dS=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},hS=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},fS=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},pS=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>_v(t,a))}return e},mS=e=>typeof e=="string"?e.replace(" ","T"):e,bv=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 Ql{constructor(t,r,n={},s=fc){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}
140_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 Qf;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Qf||(Qf={}));class wi{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=wi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=wi.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=wi.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const i=this.cloneDeep(t),o=this.transformState(r),a={},l={};return this.map(i,(u,c)=>{o[u]||(l[u]=c)}),this.map(o,(u,c)=>{const f=i[u];if(f){const h=c.map(w=>w.presence_ref),d=f.map(w=>w.presence_ref),y=c.filter(w=>d.indexOf(w.presence_ref)<0),m=f.filter(w=>h.indexOf(w.presence_ref)<0);y.length>0&&(a[u]=y),m.length>0&&(l[u]=m)}else a[u]=c}),this.syncDiff(i,{joins:a,leaves:l},n,s)}static syncDiff(t,r,n,s){const{joins:i,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var u;const c=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),c.length>0){const f=t[a].map(d=>d.presence_ref),h=c.filter(d=>f.indexOf(d.presence_ref)<0);t[a].unshift(...h)}n(a,c,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;const c=l.map(f=>f.presence_ref);u=u.filter(f=>c.indexOf(f.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(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Jf;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Jf||(Jf={}));var _i;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(_i||(_i={}));var rr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(rr||(rr={}));class ds{constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Ee.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 Ql(this,jt.join,this.params,this.timeout),this.rejoinTimer=new wv(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ee.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ee.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ee.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ee.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ee.errored,this.rejoinTimer.scheduleTimeout())}),this._on(jt.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new wi(this),this.broadcastEndpointURL=bv(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Ee.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(d=>d.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[_i.PRESENCE]&&this.bindings[_i.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,f={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(d=>t==null?void 0:t(rr.CHANNEL_ERROR,d)),this._onClose(()=>t==null?void 0:t(rr.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),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(rr.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,w=(y=m==null?void 0:m.length)!==null&&y!==void 0?y:0,g=[];for(let p=0;p<w;p++){const v=m[p],{filter:{event:b,schema:E,table:S,filter:k}}=v,P=d&&d[p];
140if(P&&P.event===b&&ds.isFilterValueEqual(P.schema,E)&&ds.isFilterValueEqual(P.table,S)&&ds.isFilterValueEqual(P.filter,k))g.push(Object.assign(Object.assign({},v),{id:P.id}));else{this.unsubscribe(),this.state=Ee.errored,t==null||t(rr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g,t&&t(rr.SUBSCRIBED);return}}).receive("error",d=>{this.state=Ee.errored,t==null||t(rr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(rr.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===Ee.joined&&t===_i.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;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
140in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ee.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(jt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Ql(this,jt.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=Ee.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Ql(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>lS){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=jt;if(n&&[a,l,u,c].indexOf(o)>=0&&n!==this._joinRef())return;let h=this._onMessage(o,r,n);if(r&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(d=>{var y,m,w;return((y=d.filter)===null||y===void 0?void 0:y.event)==="*"||((w=(m=d.filter)===null||m===void 0?void 0:m.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===o}).map(d=>d.callback(h,n)):(i=this.bindings[o])===null||i===void 0||i.filter(d=>{var y,m,w,g,p,v;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in d){const b=d.id,E=(y=d.filter)===null||y===void 0?void 0:y.event;return b&&((m=r.ids)===null||m===void 0?void 0:m.includes(b))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const b=(p=(g=d==null?void 0:d.filter)===null||g===void 0?void 0:g.event)===null||p===void 0?void 0:p.toLocaleLowerCase();return b==="*"||b===((v=r==null?void 0:r.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return d.type.toLocaleLowerCase()===o}).map(d=>{if(typeof h=="object"&&"ids"in h){const y=h.data,{schema:m,table:w,commit_timestamp:g,type:p,errors:v}=y;h=Object.assign(Object.assign({},{schema:m,table:w,commit_timestamp:g,eventType:p,new:{},old:{},errors:v}),this._getPayloadRecords(y))}d.callback(h,n)})}_isClosed(){return this.state===Ee.closed}_isJoined(){return this.state===Ee.joined}_isJoining(){return this.state===Ee.joining}_isLeaving(){return this.state===Ee.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&ds.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(jt.close,{},t)}_onError(t){this._on(jt.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ee.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Gf(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Gf(t.columns,t.old_record)),r}}const Jl=()=>{},jo={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},gS=[1e3,2e3,5e3,1e4],vS=1e4,yS=` 141 addEventListener("message", (e) => { 142 if (e.data.event === "start") { 143 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 144 } 145 });`;class wS{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=fc,this.transport=null,this.heartbeatIntervalMs=jo.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Jl,this.ref=0,this.reconnectTimer=null,this.vsn=qf,this.logger=Jl,this.conn=null,this.sendBuffer=[],this.serializer
145=new uS,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${pc.websocket}`,this.httpEndpoint=bv(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=nS.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 146 147To use Realtime in Node.js, you need to provide a WebSocket implementation: 148 149Option 1: Use Node.js 22+ which has native WebSocket support 150Option 2: Install and provide the "ws" package: 151 152 npm install ws 153 154 import ws from "ws" 155 const client = new RealtimeClient(url, { 156 ...options, 157 transport: ws 158 })`):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 Rr.connecting:return pn.Connecting;case Rr.open:return pn.Open;case Rr.closing:return pn.Closing;default:return pn.Closed}}isConnected(){return this.connectionState()===pn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new ds(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){const{topic:r,event:n,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.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(aS,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
158heduleTimeout()},jo.HEARTBEAT_TIMEOUT_FALLBACK);return}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")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:s,payload:i,ref:o}=r,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),i),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Rr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Rr.open||this.conn.readyState===Rr.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
158heduleTimeout(),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(jt.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([yS],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:iS};r&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(jt.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 wv(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},jo.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,i,o,a,l,u,c,f,h,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:fc,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:jo.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Jl,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:qf,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=>gS[y-1]||vS,this.vsn){case yv:this.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:(y,m)=>m(JSON.stringify(y)),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:(y,m)=>m(JSON.parse(y));break;case oS:this.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h: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 Bi=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 _S(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function bS(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 xS(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=_S(e.baseUrl,n,s),l=await bS(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),f=(u.headers.get("content-type")||"").includes("application/json"),h=f&&c?JSON.parse(c):c;if(!u.ok){const d=f?h:void 0,y=d==null?void 0:d.error;throw new Bi((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:h}}}}function Io(e){return e.join("�")}var ES=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Io(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/${Io(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Io(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Io(e.namespace)}`}),!0}catch(t){if(t instanceof Bi&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Bi&&r.status===409)return;throw r}}};function Vn(e){return e.join("�")}var SS=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/${Vn(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/${Vn(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/${Vn(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/${Vn(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/${Vn(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/${Vn(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Bi&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Bi&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},kS=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=xS({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new ES(this.client,t),this.tableOps=new SS(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)}
158async 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)}},ul=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function he(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var CS=class extends ul{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}}},gc=class extends ul{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const Md=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),TS=()=>Response,vc=e=>{if(Array.isArray(e))return e.map(r=>vc(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=vc(n)}),t},PS=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)},RS=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Vi(e){"@babel/helpers - typeof";return Vi=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},Vi(e)}function OS(e,t){if(Vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AS(e){var t=OS(e,"string");return Vi(t)=="symbol"?t:t+""}function NS(e,t,r){return(t=AS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yf(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 z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yf(Object(r),!0).forEach(function(n){NS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Yl=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)},jS=async(e,t,r)=>{e instanceof await TS()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,i=(n==null?void 0:n.statusCode)||s+"";t(new CS(Yl(n),s,i))}).catch(n=>{t(new gc(Yl(n),n))}):t(new gc(Yl(e),e))},IS=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(PS(n)?(s.headers=z({"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),z(z({},s),r))};async function io(e,t,r,n,s,i){return new Promise((o,a)=>{e(r,IS(t,n,s,i)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>jS(l,a,n))})}async function Wi(e,t,r,n){return io(e,"GET",t,r,n)}async function Rt(e,t,r,n,s){return io(e,"POST",t,n,s,r)}async function yc(e,t,r,n,s){return io(e,"PUT",t,n,s,r)}async function $S(e,t,r,n){return io(e,"HEAD",t,z(z({},r),{},{noResolveJson:!0}),n)}async function Ud(e,t,r,n,s){return io(e,"DELETE",t,n,s,r)}var LS=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(he(t))return{data:null,error:t};throw t}}};let xv;xv=Symbol.toStringTag;var DS=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[xv]="BlobDownloadBuilder",this.promise=null}asStream(){return new LS(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(he(t))return{data:null,error:t};throw t}}};const MS={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Xf={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var US=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=Md(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let i;const o=z(z({},Xf),n);let a=z(z({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(a=z(z({},a),n.headers));const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),f=await(e=="PUT"?yc:Rt)(s.fetch,`${s.url}/object/${c}`,i,z({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:f.Id,fullPath:f.Key},error:null}}catch(i){if(s.shouldThrowOnError)throw i;if(he(i))return{data:null,error:i};throw i}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let l;const u=z({upsert:Xf.upsert},n),c=z(z({},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
158he-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{data:{path:i,fullPath:(await yc(s.fetch,a.toString(),l,{headers:c})).Key},error:null}}catch(l){if(s.shouldThrowOnError)throw l;if(he(l))return{data:null,error:l};throw l}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=z({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Rt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new ul("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(he(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 Rt(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(he(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await Rt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
158stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(he(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),i=await Rt(n.fetch,`${n.url}/object/sign/${s}`,z({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${n.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(he(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await Rt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>z(z({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(he(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",i=this._getFinalPath(e),o=()=>Wi(this.fetch,`${this.url}/${r}/${i}${s}`,{headers:this.headers,noResolveJson:!0});return new DS(o,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:vc(await Wi(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(he(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await $S(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(he(n)&&n instanceof gc){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}async remove(e){var t=this;try{return{data:await Ud(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=z(z(z({},MS),t),{},{prefix:e||""});return{data:await Rt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(he(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=z({},e);return{data:await Rt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(he(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 Ev="2.89.0",Sv={"X-Client-Info":`storage-js/${Ev}`};var FS=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=z(z({},Sv),t),this.fetch=Md(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await Wi(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Wi(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Rt(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(he(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await yc(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(he(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Rt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Ud(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(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():""}},zS=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=z(z({},Sv),t),this.fetch=Md(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Rt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;
158try{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 Wi(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Ud(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(he(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!RS(e))throw new ul("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 kS({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}};const Fd={"X-Client-Info":`storage-js/${Ev}`,"Content-Type":"application/json"};var kv=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 Xl=class extends kv{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}}},BS=class extends kv{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const zd=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),VS=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)},Zf=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),WS=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(i=>{const o=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||n+"";t(new Xl(Zf(i),n,o))}).catch(()=>{const i=n+"";t(new Xl(s.statusText||`HTTP ${n} error`,n,i))});else{const i=n+"";t(new Xl(s.statusText||`HTTP ${n} error`,n,i))}}else t(new BS(Zf(e),e))},HS=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(VS(n)?(s.headers=z({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,z(z({},s),r)):s};async function KS(e,t,r,n,s,i){return new Promise((o,a)=>{e(r,HS(t,n,s,i)).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=>o(l)).catch(l=>WS(l,a,n))})}async function ot(e,t,r,n,s){return KS(e,"POST",t,n,s,r)}var qS=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=z(z({},Fd),t),this.fetch=zd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await ot(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 ot(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 ot(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 ot(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}}},GS=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=z(z({},Fd),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 ot(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 ot(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");
158if(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 ot(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 ot(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 ot(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}}},QS=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=z(z({},Fd),t),this.fetch=zd(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await ot(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 ot(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 ot(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 ot(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}}},JS=class extends QS{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new YS(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)}},YS=class extends qS{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,z(z({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,z(z({},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 XS(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},XS=class extends GS{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,z(z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,z(z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,z(z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,z(z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,z(z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},ZS=class extends FS{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new US(this.url,this.headers,e,this.fetch)}get vectors(){return new JS(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zS(this.url+"/iceberg",this.headers,this.fetch)}};const Cv="2.89.0",Yn=30*1e3,wc=3,Zl=wc*Yn,ek="http://localhost:9999",tk="supabase.auth.token",rk={"X-Client-Info":`gotrue-js/${Cv}`},_c="X-Supabase-Api-Version",Tv={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},nk=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,sk=10*60*1e3;
158class Hi extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function M(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class ik extends Hi{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function ok(e){return M(e)&&e.name==="AuthApiError"}class mn extends Hi{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class gr extends Hi{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class rt extends gr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ak(e){return M(e)&&e.name==="AuthSessionMissingError"}class Wn extends gr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class $o extends gr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Lo extends gr{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 lk(e){return M(e)&&e.name==="AuthImplicitGrantRedirectError"}class ep extends gr{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 uk extends gr{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 bc extends gr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function eu(e){return M(e)&&e.name==="AuthRetryableFetchError"}class tp extends gr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class xc extends gr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Oa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),rp=` 159\r=`.split(""),ck=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<rp.length;t+=1)e[rp[t].charCodeAt(0)]=-2;for(let t=0;t<Oa.length;t+=1)e[Oa[t].charCodeAt(0)]=t;return e})();function np(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(Oa[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(Oa[n]),t.queuedBits-=6}}function Pv(e,t,r){const n=ck[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 sp(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{fk(o,n,r)};for(let o=0;o<e.length;o+=1)Pv(e.charCodeAt(o),s,i);return t.join("")}function dk(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 hk(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}dk(n,t)}}function fk(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 bs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
159s+=1)Pv(e.charCodeAt(s),r,n);return new Uint8Array(t)}function pk(e){const t=[];return hk(e,r=>t.push(r)),new Uint8Array(t)}function wn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>np(s,r,n)),np(null,r,n),t.join("")}function mk(e){return Math.round(Date.now()/1e3)+e}function gk(){return Symbol("auth-callback")}const Oe=()=>typeof window<"u"&&typeof document<"u",ln={tested:!1,writable:!1},Rv=()=>{if(!Oe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ln.tested)return ln.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ln.tested=!0,ln.writable=!0}catch{ln.tested=!0,ln.writable=!1}return ln.writable};function vk(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Ov=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),yk=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Xn=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},un=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Re=async(e,t)=>{await e.removeItem(t)};class cl{constructor(){this.promise=new cl.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}cl.promiseConstructor=Promise;function tu(e){const t=e.split(".");if(t.length!==3)throw new xc("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!nk.test(t[n]))throw new xc("JWT not in base64url format");return{header:JSON.parse(sp(t[0])),payload:JSON.parse(sp(t[1])),signature:bs(t[2]),raw:{header:t[0],payload:t[1]}}}async function wk(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function _k(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function bk(e){return("0"+e.toString(16)).substr(-2)}function xk(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,bk).join("")}async function Ek(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function Sk(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 Ek(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Hn(e,t,r=!1){const n=xk();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Xn(e,`${t}-code-verifier`,s);const i=await Sk(n);return[i,n===i?"plain":"s256"]}const kk=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Ck(e){const t=e.headers.get(_c);if(!t||!t.match(kk))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Tk(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 Pk(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 Rk=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Kn(e){if(!Rk.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ru(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Ok(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
159if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function ip(e){return JSON.parse(JSON.stringify(e))}const fn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Ak=[502,503,504];async function op(e){var t;if(!yk(e))throw new bc(fn(e),0);if(Ak.includes(e.status))throw new bc(fn(e),e.status);let r;try{r=await e.json()}catch(i){throw new mn(fn(i),i)}let n;const s=Ck(e);if(s&&s.getTime()>=Tv["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 tp(fn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new rt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new tp(fn(r),e.status,r.weak_password.reasons);throw new ik(fn(r),e.status||500,n)}const Nk=(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 F(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[_c]||(i[_c]=Tv["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await jk(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function jk(e,t,r,n,s,i){const o=Nk(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new bc(fn(l),0)}if(a.ok||await op(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await op(l)}}function Ct(e){var t;let r=null;Lk(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=mk(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function ap(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 Nr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Ik(e){return{data:e,error:null}}function $k(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=ll(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function lp(e){return e}function Lk(e){return e.access_token&&e.refresh_token&&e.expires_in}const nu=["global","local","others"];class Dk{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Ov(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=nu[0]){if(nu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${nu.join(", ")}`);try{return await F(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(M(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await F(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Nr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=ll(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 F(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:$k,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(M(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await F(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Nr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await F(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:lp});if(c.error)throw c.error;const f=await c.json(),h=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,d=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return d.length>
1590&&(d.forEach(y=>{const m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(M(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Kn(t);try{return await F(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Nr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Kn(t);try{return await F(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Nr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Kn(t);try{return await F(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Nr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Kn(t.userId);try{const{data:r,error:n}=await F(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(M(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Kn(t.userId),Kn(t.id);try{return{data:await F(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await F(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:lp});if(c.error)throw c.error;const f=await c.json(),h=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o: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 m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(M(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await F(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await F(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await F(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}}function up(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const qn={debug:!!(globalThis&&Rv()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Av extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Mk extends Av{}async function Uk(e,t,r){qn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),qn.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){qn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{qn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw qn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Mk(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(qn.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function Fk(){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 Nv(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
159" is invalid.`);return e.toLowerCase()}function zk(e){return parseInt(e,16)}function Bk(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function Vk(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:f,version:h}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 160`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const d=Nv(e.address),y=c?`${c}://${n}`:n,m=e.statement?`${e.statement} 161`:"",w=`${y} wants you to sign in with your Ethereum account: 162${d} 163 164${m}`;let g=`URI: ${f} 165Version: ${h} 166Chain ID: ${r}${o?` 167Nonce: ${o}`:""} 168Issued At: ${i.toISOString()}`;if(s&&(g+=` 169Expiration Time: ${s.toISOString()}`),a&&(g+=` 170Not Before: ${a.toISOString()}`),l&&(g+=` 171Request ID: ${l}`),u){let p=` 172Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);p+=` 173- ${v}`}g+=p}return`${w} 174${g}`}class be extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class Aa extends be{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function Wk({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new be({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new be({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new be({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new be({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 be({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new be({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new be({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new be({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(jv(o)){if(i.rp.id!==o)return new be({message:`The RP ID "${i.rp.id}
174" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new be({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new be({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 be({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 be({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Hk({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 be({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new be({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(jv(n)){if(r.rpId!==n)return new be({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new be({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new be({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 be({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Kk{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 qk=new Kk;function Gk(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=ll(e,["challenge","user","excludeCredentials"]),i=bs(t).buffer,o=Object.assign(Object.assign({},r),{id:bs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:bs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Qk(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=ll(e,["challenge","allowCredentials"]),s=bs(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:bs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Jk(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:wn(new Uint8Array(e.response.attestationObject)),clientDataJSON:wn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Yk(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:wn(new Uint8Array(s.authenticatorData)),clientDataJSON:wn(new Uint8Array(s.clientDataJSON)),signature:wn(new Uint8Array(s.signature)),userHandle:s.userHandle?wn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function jv(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function cp(){var e,t;return!!(Oe()&&"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 Xk(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Aa("Browser returned unexpected credential type",t)}:{data:null,error:new Aa("Empty credential response",t)}}
174catch(t){return{data:null,error:Wk({error:t,options:e})}}}async function Zk(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Aa("Browser returned unexpected credential type",t)}:{data:null,error:new Aa("Empty credential response",t)}}catch(t){return{data:null,error:Hk({error:t,options:e})}}}const eC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},tC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Na(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=Na(a,o):n[i]=Na(o)}else n[i]=o}return n}function rC(e,t){return Na(eC,e,t||{})}function nC(e,t){return Na(tC,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},i){try{const{data:o,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!o)return{data:null,error:a};const l=s??qk.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=rC(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:c,error:f}=await Xk({publicKey:u,signal:l});return c?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}case"request":{const u=nC(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:c,error:f}=await Zk(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:l}));return c?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}}}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new mn("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Hi("rpId is required for WebAuthn authentication")};try{if(!cp())return{data:null,error:new mn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new mn("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Hi("rpId is required for WebAuthn registration")};try{if(!cp())return{data:null,error:new mn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(c=>{var f;return(f=c.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.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:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new mn("Unexpected error in register",o)}}}}Fk();const iC={url:ek,storageKey:tk,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:rk,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function dp(e,t,r){return await r()}const Gn={};class Ki{get jwks(){var t,r;return(r=(t=Gn[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Gn[this.storageKey]=Object.assign(Object.assign({},Gn[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Gn[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Gn[this.storageKey]=Object.assign(Object.assign({},Gn[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},iC),t);
174if(this.storageKey=i.storageKey,this.instanceID=(r=Ki.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ki.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Oe()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new Dk({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Ov(i.fetch),this.lock=i.lock||dp,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,i.lock?this.lock=i.lock:this.persistSession&&Oe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=Uk:this.lock=dp,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?(i.storage?this.storage=i.storage:Rv()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=up(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=up(this.memoryStorage)),Oe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Cv}) ${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(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Oe()&&(r=vk(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Oe()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),lk(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return M(r)?this._returnResult({error:r}):this._returnResult({error:new mn("Unexpected error during initialization",r)}
174)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await F(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:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:c,password:f,options:h}=t;let d=null,y=null;this.flowType==="pkce"&&([d,y]=await Hn(this.storage,this.storageKey)),i=await F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:c,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:d,code_challenge_method:y},xform:Ct})}else if("phone"in t){const{phone:c,password:f,options:h}=t;i=await F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Ct})}else throw new $o("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Re(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await F(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ap})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await F(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ap})}else throw new $o("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Wn;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,u,c,f,h;let d,y;if("message"in t)d=t.message,y=t.signature;else{const{chain:m,wallet:w,statement:g,options:p}=t;let v;if(Oe())if(typeof w=="object")v=w;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")v=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.");v=w}const b=new URL((r=p==null?void 0:p.url)!==null&&r!==void 0?r:window.location.href),E=await v.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=Nv(E[0]);
174let k=(n=p==null?void 0:p.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const A=await v.request({method:"eth_chainId"});k=zk(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:(o=(i=p==null?void 0:p.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o: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=Vk(P),y=await v.request({method:"personal_sign",params:[Bk(d),S]})}try{const{data:m,error:w}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:d,signature:y},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Ct});if(w)throw w;if(!m||!m.session||!m.user){const g=new Wn;return this._returnResult({data:{user:null,session:null},error:g})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:w})}catch(m){if(M(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,c,f,h,d;let y,m;if("message"in t)y=t.message,m=t.signature;else{const{chain:w,wallet:g,statement:p,options:v}=t;let b;if(Oe())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"||!(v!=null&&v.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=v==null?void 0:v.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()},v==null?void 0:v.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),m=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=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((f=(c=v==null?void 0:v.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||f===void 0)&&f.length?["Resources",...v.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(` 175`);
175const 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");m=S}}try{const{data:w,error:g}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:wn(m)},!((h=t.options)===null||h===void 0)&&h.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 Wn;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(M(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await un(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new uk;const{data:i,error:o}=await F(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Ct});if(await Re(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Wn;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await F(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform: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 Wn;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(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Hn(this.storage,this.storageKey));const{error:f}=await F(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:f})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await F(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new $o("You must provide either an email or phone number.")}catch(a){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await F(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Ct});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Hn(this.storage,this.storageKey));const u=await F(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:Ik});return!((i=u.data)===null||i===void 0)&&i.url&&Oe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,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 rt;const{error:s}=await F(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(M(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t,{error:o}=await F(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await F(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new $o("You must provide either an email or phone number and a type")}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,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 un(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
175id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Zl:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await un(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=ru()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=Ok(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(-1,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await F(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Nr}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new rt}:await F(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Nr})})}catch(r){if(M(r))return ak(r)&&(await this._removeSession(),await Re(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(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new rt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Hn(this.storage,this.storageKey));const{data:u,error:c}=await F(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Nr});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new rt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=tu(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(M(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new rt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Oe())throw new Lo("No browser detected.");
175if(t.error||t.error_description||t.error_code)throw new Lo(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 ep("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Lo("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 ep("No code detected.");const{data:p,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;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:i,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=t;if(!i||!a||!o||!u)throw new Lo("No session defined in URL");const c=Math.round(Date.now()/1e3),f=parseInt(a);let h=c+f;l&&(h=parseInt(l));const d=h-c;d*1e3<=Yn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${d}s, should have been closer to ${f}s`);const y=h-f;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,h,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,h,c);const{data:m,error:w}=await this._getUser(i);if(w)throw w;const g={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:f,expires_at:h,refresh_token:o,token_type:u,user:m.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(M(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 un(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(ok(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Re(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=gk(),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(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Hn(this.storage,this.storageKey,!0));try{return await F(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:f,error:h}=i;if(h)throw h;const d=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await F(this.fetch,"GET",d,{headers:this.headers,jwt:(c=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Oe()&&!(!((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(M(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=t,f=await F(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Ct}),{data:h,error:d}=f;return d?this._returnResult({data:{user:null,session:null},error:d}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new Wn}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:d}))}catch(s){if(await Re(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
175return await F(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(M(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 _k(async s=>(s>0&&await wk(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await F(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ct})),(s,i)=>{const o=200*Math.pow(2,s);return i&&eu(i)&&Date.now()+o-n<Yn})}catch(n){if(this._debug(r,"error",n),M(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),Oe()&&!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 un(this.storage,this.storageKey);if(s&&this.userStorage){let o=await un(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Xn(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:ru()}else if(s&&!s.user&&!s.user){const o=await un(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Re(this.storage,this.storageKey+"-user"),await Xn(this.storage,this.storageKey,s)):s.user=ru()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Zl;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Zl}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),eu(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new rt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new cl;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new rt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),M(i)){const o={data:null,error:i};return eu(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Re(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 Xn(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=ip(s);await Xn(this.storage,this.storageKey,i)}else{const s=ip(r);await Xn(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Re(this.storage,this.storageKey),await Re(this.storage,this.storageKey+"-code-verifier"),await Re(this.storage,this.storageKey+"-user"),this.userStorage&&await Re(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
175try{t&&Oe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Yn);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}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)/Yn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Yn}ms, refresh threshold is ${wc} ticks`),s<=wc&&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 Av)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Oe()||!(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(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Hn(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await F(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(M(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await F(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Jk(t.webauthn.credential_response):Yk(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await F(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await F(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Gk(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:Qk(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}
175=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=tu(n.access_token);let o=null;i.aal&&(o=i.aal);let a=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(c=>c.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const u=i.amr||[];return{data:{currentLevel:o,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 F(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new rt})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new rt});const o=await F(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Oe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new rt});const o=await F(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Oe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(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 F(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 rt})})}catch(t){if(M(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 F(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 rt})})}catch(r){if(M(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+sk>s)return n;const{data:i,error:o}=await F(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:d,error:y}
175=await this.getSession();if(y||!d.session)return this._returnResult({data:null,error:y});n=d.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=tu(n);r!=null&&r.allowExpired||Tk(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:d}=await this.getUser(n);if(d)throw d;return{data:{claims:i,header:s,signature:o},error:null}}const c=Pk(s.alg),f=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,f,o,pk(`${a}.${l}`)))throw new xc("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}}Ki.nextInstanceID={};const oC=Ki,aC="2.89.0";let li="";typeof Deno<"u"?li="deno":typeof document<"u"?li="web":typeof navigator<"u"&&navigator.product==="ReactNative"?li="react-native":li="node";const lC={"X-Client-Info":`supabase-js-${li}/${aC}`},uC={headers:lC},cC={schema:"public"},dC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},hC={};function qi(e){"@babel/helpers - typeof";return qi=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},qi(e)}function fC(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pC(e){var t=fC(e,"string");return qi(t)=="symbol"?t:t+""}function mC(e,t,r){return(t=pC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hp(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 ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hp(Object(r),!0).forEach(function(n){mC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const gC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),vC=()=>Headers,yC=(e,t,r)=>{const n=gC(r),s=vC();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,ve(ve({},o),{},{headers:u}))}};function wC(e){return e.endsWith("/")?e:e+"/"}function _C(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:c,global:f}=t,h={db:ve(ve({},l),s),auth:ve(ve({},u),i),realtime:ve(ve({},c),o),storage:{},global:ve(ve(ve({},f),a),{},{headers:ve(ve({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function bC(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(wC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var xC=class extends oC{constructor(e){super(e)}},EC=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=bC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:cC,realtime:hC,auth:ve(ve({},dC),{},{storageKey:o}),global:uC},l=_C(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,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} 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=yC(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ve({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 rS(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new ZS(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new YE(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)}
175channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u},c,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new xC({url:this.authUrl.href,headers:ve(ve({},h),c),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(d=>d.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new wS(this.realtimeUrl.href,ve(ve({},e),{},{params:ve(ve({},{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 SC=(e,t,r)=>new EC(e,t,r);function kC(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}kC()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const CC="https://bwokvutjkshshmpydnuu.supabase.co",TC="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ3b2t2dXRqa3Noc2htcHlkbnV1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjcwMTAwMDUsImV4cCI6MjA4MjU4NjAwNX0.8n3Cz0GZD6UcPqThH3vxQR-no3CBo0FPUi3i0rxezAk",PC=SC(CC,TC,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),RC=({data:e,onUpdate:t,onNext:r})=>{const[n,s]=_.useState({}),i=()=>{var c,f,h,d,y;const u={};if((c=e.firstName)!=null&&c.trim()||(u.firstName="Voornaam is verplicht"),(f=e.lastName)!=null&&f.trim()||(u.lastName="Naam is verplicht"),(h=e.email)!=null&&h.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.email)||(u.email="Ongeldig e-mailadres"):u.email="E-mail is verplicht",!((d=e.phone)!=null&&d.trim()))u.phone="Telefoon is verplicht";else{const m=e.phone.replace(/[\s.\-\/]/g,"");/^(\+32|0032|0)\d{8,9}$|^(\+31|0031|0)\d{9}$/.test(m)||(u.phone="Vul een geldig Belgisch of Nederlands telefoonnummer in")}return(y=e.postalCode)!=null&&y.trim()||(u.postalCode="Postcode is verplicht"),s(u),Object.keys(u).length===0},[o,a]=_.useState(!1),l=async u=>{var c;if(u.preventDefault(),!!i()){a(!0);try{const f={particulier:"Particulier",bedrijf:"Bedrijf"},h={camera:"Camerabewaking",alarm:"Alarmsysteem",toegang:"Toegangscontrole",brand:"Branddetectie"},d={nieuw:"Nee, ik wil een nieuw systeem",uitbreiden:"Ja, ik wil het uitbreiden",vernieuwen:"Ja, maar ik wil vernieuwen"},y={ja:"Ja",nee:"Nee"},m={firstName:e.firstName,lastName:e.lastName,email:e.email,phone:e.phone,postalCode:e.postalCode,comments:e.comments||"",customerType:f[e.customerType||""]||e.customerType,securityTypes:((c=e.securityTypes)==null?void 0:c.map(g=>h[g]||g).join(", "))||"",currentSituation:d[e.currentSituation||""]||e.currentSituation,hasPets:y[e.hasPets||""]||e.hasPets,submittedAt:new Date().toISOString()};console.log("Saving submission to database:",m);const{error:w}=await PC.from("submissions").insert({first_name:e.firstName,last_name:e.lastName,email:e.email,phone:e.phone,postal_code:e.postalCode,comments:e.comments||null,customer_type:m.customerType,security_types:e.securityTypes||[],current_situation:m.currentSituation,has_pets:m.hasPets});if(w)throw console.error("Error saving to database:",w),new Error("Database save failed");await fetch("https://hook.eu1.make.com/ktxsur9akvj9p158ccve1yityf268omt",{method:"POST",headers:{"Content-Type":"application/json"},mode:"no-cors",body:JSON.stringify(m)}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"lovable_verstuurd",form_name:"lead_form",customer_type:m.customerType,security_types:m.securityTypes,current_situation:m.currentSituation,has_pets:m.hasPets}),mf.success("Bedankt voor je aanvraag!"),setTimeout(r,500)}catch(f){console.error("Error sending to Make.com:",f),mf.error("Er ging iets mis. Probeer het opnieuw.")}finally{a(!1)}}};
175return x.jsxs("div",{className:"max-w-2xl mx-auto space-y-4 md:space-y-8 animate-fade-in",children:[x.jsxs("div",{className:"text-center space-y-2 md:space-y-3",children:[x.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground",children:"Bijna klaar!"}),x.jsx("p",{className:"text-muted-foreground text-sm md:text-lg",children:"Vul de laatste details in zodat onze experten jou persoonlijk kunnen adviseren."})]}),x.jsxs("form",{onSubmit:l,className:"space-y-4 md:space-y-6 bg-card p-4 md:p-8 rounded-2xl border border-border",children:[x.jsxs("div",{className:"grid md:grid-cols-2 gap-4 md:gap-6",children:[x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(hn,{htmlFor:"firstName",className:"text-sm",children:"Voornaam *"}),x.jsx(Qn,{id:"firstName",value:e.firstName||"",onChange:u=>t({firstName:u.target.value}),className:n.firstName?"border-destructive":""}),n.firstName&&x.jsx("p",{className:"text-xs text-destructive",children:n.firstName})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(hn,{htmlFor:"lastName",className:"text-sm",children:"Naam *"}),x.jsx(Qn,{id:"lastName",value:e.lastName||"",onChange:u=>t({lastName:u.target.value}),className:n.lastName?"border-destructive":""}),n.lastName&&x.jsx("p",{className:"text-xs text-destructive",children:n.lastName})]})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(hn,{htmlFor:"email",className:"text-sm",children:"E-mail *"}),x.jsx(Qn,{id:"email",type:"email",value:e.email||"",onChange:u=>t({email:u.target.value}),className:n.email?"border-destructive":""}),n.email&&x.jsx("p",{className:"text-xs text-destructive",children:n.email})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(hn,{htmlFor:"phone",className:"text-sm",children:"Telefoon *"}),x.jsx(Qn,{id:"phone",type:"tel",maxLength:20,placeholder:"+32 4XX XX XX XX",value:e.phone||"",onChange:u=>t({phone:u.target.value}),className:n.phone?"border-destructive":""}),n.phone&&x.jsx("p",{className:"text-xs text-destructive",children:n.phone})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(hn,{htmlFor:"postalCode",className:"text-sm",children:"Postcode *"}),x.jsx(Qn,{id:"postalCode",value:e.postalCode||"",onChange:u=>t({postalCode:u.target.value}),className:n.postalCode?"border-destructive":""}),n.postalCode&&x.jsx("p",{className:"text-xs text-destructive",children:n.postalCode})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(hn,{htmlFor:"comments",className:"text-sm",children:"Vragen of toevoegingen"}),x.jsx(gv,{id:"comments",value:e.comments||"",onChange:u=>t({comments:u.target.value}),placeholder:"Optioneel: vertel ons meer over je wensen...",className:"min-h-[80px] md:min-h-[100px]"})]}),x.jsx(so,{type:"submit",size:"lg",disabled:o,className:"w-full bg-accent hover:bg-accent/90 text-accent-foreground font-semibold h-auto py-3 md:py-4 text-sm md:text-lg group",children:o?x.jsx("span",{children:"Verzenden..."}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"hidden md:inline",children:"Ontvang mijn beveiligingsadvies"}),x.jsx("span",{className:"md:hidden",children:"Ontvang advies"}),x.jsx(Ed,{className:"ml-2 w-5 h-5 flex-shrink-0 group-hover:translate-x-1 transition-transform"})]})})]})]})},OC=()=>x.jsxs("div",{className:"max-w-2xl mx-auto text-center space-y-8 animate-fade-in",children:[x.jsx("div",{className:"flex justify-center",children:x.jsx("div",{className:"w-20 h-20 rounded-full bg-accent/10 flex items-center justify-center",children:x.jsx(w2,{className:"w-12 h-12 text-accent"})})}),x.jsxs("div",{className:"space-y-4",children:[x.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground",children:"Bedankt!"}),x.jsx("p",{className:"text-xl text-muted-foreground max-w-xl mx-auto",children:"Onze beveiligingsexperts nemen snel contact op."}),x.jsx("p",{className:"text-lg text-muted-foreground max-w-xl mx-auto pt-4",children:"Op basis van jouw antwoorden bekijken we welke oplossing het best past bij jouw woning of bedrijf."})]})]}),AC=()=>{const[e,t]=_.useState("intro"),[r,n]=_.useState({});_.useEffect(()=>{const h=document.querySelector("[data-iframe-resize-root]");
175if(!h){console.warn("Iframe resize root niet gevonden");return}const d=()=>{const m=h.getBoundingClientRect(),w=Math.ceil(m.height);window.parent.postMessage({type:"setHeight",height:w+40},"*")};d(),window.addEventListener("load",d);const y=new ResizeObserver(d);return y.observe(h),()=>{window.removeEventListener("load",d),y.disconnect()}},[]);const s=h=>{n(d=>({...d,...h}))},i=h=>({intro:"customerType",customerType:"securityTypes",securityTypes:"currentSituation",currentSituation:r.customerType==="particulier"?"hasPets":"leadForm",hasPets:"leadForm",leadForm:"thankYou",thankYou:"thankYou"})[h],o=h=>({intro:null,customerType:"intro",securityTypes:"customerType",currentSituation:"securityTypes",hasPets:"currentSituation",leadForm:r.customerType==="particulier"?"hasPets":"currentSituation",thankYou:null})[h],a=()=>{const h=i(e);t(h)},l=()=>{const h=o(e);h&&t(h)},u=()=>({intro:0,customerType:1,securityTypes:2,currentSituation:3,hasPets:4,leadForm:5,thankYou:6})[e],c=e!=="intro"&&e!=="thankYou",f=e!=="intro"&&e!=="thankYou";return x.jsx("div",{"data-iframe-resize-root":!0,className:"bg-background p-4",children:e==="intro"?x.jsx("div",{className:"w-full max-w-2xl mx-auto bg-card rounded-2xl shadow-xl p-6 md:p-10",children:x.jsx(DE,{onNext:a})}):x.jsxs("div",{className:"w-full max-w-2xl mx-auto bg-card rounded-2xl shadow-xl p-4 md:p-8",children:[c&&x.jsx("div",{className:"mb-6 md:mb-12",children:x.jsx($E,{currentStep:u(),totalSteps:6})}),f&&x.jsxs(so,{variant:"ghost",onClick:l,className:"mb-6 group",children:[x.jsx(y2,{className:"w-5 h-5 mr-1 group-hover:-translate-x-1 transition-transform"}),"Vorige"]}),e==="customerType"&&x.jsx(ME,{data:r,onUpdate:s,onNext:a}),e==="securityTypes"&&x.jsx(VE,{data:r,onUpdate:s,onNext:a}),e==="currentSituation"&&x.jsx(WE,{data:r,onUpdate:s,onNext:a}),e==="hasPets"&&x.jsx(HE,{data:r,onUpdate:s,onNext:a}),e==="leadForm"&&x.jsx(RC,{data:r,onUpdate:s,onNext:a}),e==="thankYou"&&x.jsx(OC,{})]})})},NC=()=>{const e=fv();return _.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),x.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:x.jsxs("div",{className:"text-center",children:[x.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),x.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),x.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},jC=new qx,IC=()=>x.jsx(Qx,{client:jC,children:x.jsxs(Ex,{children:[x.jsx(o_,{}),x.jsx(M_,{}),x.jsx(IE,{children:x.jsxs(AE,{children:[x.jsx(cc,{path:"/",element:x.jsx(AC,{})}),x.jsx(cc,{path:"*",element:x.jsx(NC,{})})]})})]})});L0(document.getElementById("root")).render(x.jsx(IC,{}));
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.