File Manager

Current Directory: /home/casageo/public_html/assets
Viewing File: /home/casageo/public_html/assets/index-B9lIh4qx.js
var Ip=t=>{throw TypeError(t)};var xu=(t,e,r)=>e.has(t)||Ip("Cannot "+r);var O=(t,e,r)=>(xu(t,e,"read from private field"),r?r.call(t):e.get(t)),ke=(t,e,r)=>e.has(t)?Ip("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ce=(t,e,r,n)=>(xu(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),ft=(t,e,r)=>(xu(t,e,"access private method"),r);var Fa=(t,e,r,n)=>({set _(s){ce(t,e,s,r)},get _(){return O(t,e,n)}});function Qb(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))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)}})();var Jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Zb(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Uv={exports:{}},kc={},zv={exports:{}},me={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ka=Symbol.for("react.element"),Yb=Symbol.for("react.portal"),Jb=Symbol.for("react.fragment"),Xb=Symbol.for("react.strict_mode"),e1=Symbol.for("react.profiler"),t1=Symbol.for("react.provider"),r1=Symbol.for("react.context"),n1=Symbol.for("react.forward_ref"),s1=Symbol.for("react.suspense"),i1=Symbol.for("react.memo"),o1=Symbol.for("react.lazy"),Lp=Symbol.iterator;function a1(t){return t===null||typeof t!="object"?null:(t=Lp&&t[Lp]||t["@@iterator"],typeof t=="function"?t:null)}var Vv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bv=Object.assign,Wv={};function ro(t,e,r){this.props=t,this.context=e,this.refs=Wv,this.updater=r||Vv}ro.prototype.isReactComponent={};ro.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ro.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Hv(){}Hv.prototype=ro.prototype;function Qf(t,e,r){this.props=t,this.context=e,this.refs=Wv,this.updater=r||Vv}var Zf=Qf.prototype=new Hv;Zf.constructor=Qf;Bv(Zf,ro.prototype);Zf.isPureReactComponent=!0;var Mp=Array.isArray,qv=Object.prototype.hasOwnProperty,Yf={current:null},Kv={key:!0,ref:!0,__self:!0,__source:!0};function Gv(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)qv.call(e,n)&&!Kv.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:ka,type:t,key:i,ref:o,props:s,_owner:Yf.current}}function l1(t,e){return{$$typeof:ka,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Jf(t){return typeof t=="object"&&t!==null&&t.$$typeof===ka}function c1(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var Dp=/\/+/g;function _u(t,e){return typeof t=="object"&&t!==null&&t.key!=null?c1(""+t.key):e.toString(36)}function gl(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case ka:case Yb:o=!0}}if(o)return o=t,s=s(o),t=n===""?"."+_u(o,0):n,Mp(s)?(r="",t!=null&&(r=t.replace(Dp,"$&/")+"/"),gl(s,e,r,"",function(c){return c})):s!=null&&(Jf(s)&&(s=l1(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Dp,"$&/")+"/")+t)),e.push(s)),1;if(o=0,n=n===""?".":n+":",Mp(t))for(var a=0;a<t.length;a++){i=t[a];var l=n+_u(i,a);o+=gl(i,e,r,l,s)}else if(l=a1(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=n+_u(i,a++),o+=gl(i,e,r,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Ua(t,e,r){if(t==null)return t;var n=[],s=0;return gl(t,n,"","",function(i){return e.call(r,i,s++)}),n}function u1(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var kt={current:null},vl={transition:null},d1={ReactCurrentDispatcher:kt,ReactCurrentBatchConfig:vl,ReactCurrentOwner:Yf};function Qv(){throw Error("act(...) is not supported in production builds of React.")}me.Children={map:Ua,forEach:function(t,e,r){Ua(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ua(t,function(){e++}),e},toArray:function(t){return Ua(t,function(e){return e})||[]},only:function(t){if(!Jf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};me.Component=ro;me.Fragment=Jb;me.Profiler=e1;me.PureComponent=Qf;me.StrictMode=Xb;me.Suspense=s1;me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d1;me.act=Qv;me.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=Bv({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Yf.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)qv.call(e,l)&&!Kv.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:ka,type:t.type,key:s,ref:i,props:n,_owner:o}};me.createContext=function(t){return t={$$typeof:r1,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:t1,_context:t},t.Consumer=t};me.createElement=Gv;me.createFactory=function(t){var e=Gv.bind(null,t);return e.type=t,e};me.createRef=function(){return{current:null}};me.forwardRef=function(t){return{$$typeof:n1,render:t}};me.isValidElement=Jf;me.lazy=function(t){return{$$typeof:o1,_payload:{_status:-1,_result:t},_init:u1}};me.memo=function(t,e){return{$$typeof:i1,type:t,compare:e===void 0?null:e}};me.startTransition=function(t){var e=vl.transition;vl.transition={};try{t()}finally{vl.transition=e}};me.unstable_act=Qv;me.useCallback=function(t,e){return kt.current.useCallback(t,e)};me.useContext=function(t){return kt.current.useContext(t)};me.useDebugValue=function(){};me.useDeferredValue=function(t){return kt.current.useDeferredValue(t)};me.useEffect=function(t,e){return kt.current.useEffect(t,e)};me.useId=function(){return kt.current.useId()};me.useImperativeHandle=function(t,e,r){return kt.current.useImperativeHandle(t,e,r)};me.useInsertionEffect=function(t,e){return kt.current.useInsertionEffect(t,e)};me.useLayoutEffect=function(t,e){return kt.current.useLayoutEffect(t,e)};me.useMemo=function(t,e){return kt.current.useMemo(t,e)};me.useReducer=function(t,e,r){return kt.current.useReducer(t,e,r)};me.useRef=function(t){return kt.current.useRef(t)};me.useState=function(t){return kt.current.useState(t)};me.useSyncExternalStore=function(t,e,r){return kt.current.useSyncExternalStore(t,e,r)};me.useTransition=function(){return kt.current.useTransition()};me.version="18.3.1";zv.exports=me;var w=zv.exports;const P=Fv(w),Xf=Qb({__proto__:null,default:P},[w]);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var f1=w,h1=Symbol.for("react.element"),p1=Symbol.for("react.fragment"),m1=Object.prototype.hasOwnProperty,g1=f1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v1={key:!0,ref:!0,__self:!0,__source:!0};function Zv(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)m1.call(e,n)&&!v1.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:h1,type:t,key:i,ref:o,props:s,_owner:g1.current}}kc.Fragment=p1;kc.jsx=Zv;kc.jsxs=Zv;Uv.exports=kc;var g=Uv.exports,Yv={exports:{}},Ht={},Jv={exports:{}},Xv={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(t){function e(A,N){var V=A.length;A.push(N);e:for(;0<V;){var ne=V-1>>>1,re=A[ne];if(0<s(re,N))A[ne]=N,A[V]=re,V=ne;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var N=A[0],V=A.pop();if(V!==N){A[0]=V;e:for(var ne=0,re=A.length,ie=re>>>1;ne<ie;){var se=2*(ne+1)-1,Ae=A[se],$e=se+1,H=A[$e];if(0>s(Ae,V))$e<re&&0>s(H,Ae)?(A[ne]=H,A[$e]=V,ne=$e):(A[ne]=Ae,A[se]=V,ne=se);else if($e<re&&0>s(H,V))A[ne]=H,A[$e]=V,ne=$e;else break e}}return N}function s(A,N){var V=A.sortIndex-N.sortIndex;return V!==0?V:A.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,_=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(A){for(var N=r(c);N!==null;){if(N.callback===null)n(c);else if(N.startTime<=A)n(c),N.sortIndex=N.expirationTime,e(l,N);else break;N=r(c)}}function b(A){if(m=!1,v(A),!_)if(r(l)!==null)_=!0,K(S);else{var N=r(c);N!==null&&J(b,N.startTime-A)}}function S(A,N){_=!1,m&&(m=!1,y(j),j=-1),p=!0;var V=f;try{for(v(N),d=r(l);d!==null&&(!(d.expirationTime>N)||A&&!Q());){var ne=d.callback;if(typeof ne=="function"){d.callback=null,f=d.priorityLevel;var re=ne(d.expirationTime<=N);N=t.unstable_now(),typeof re=="function"?d.callback=re:d===r(l)&&n(l),v(N)}else n(l);d=r(l)}if(d!==null)var ie=!0;else{var se=r(c);se!==null&&J(b,se.startTime-N),ie=!1}return ie}finally{d=null,f=V,p=!1}}var C=!1,E=null,j=-1,M=5,D=-1;function Q(){return!(t.unstable_now()-D<M)}function I(){if(E!==null){var A=t.unstable_now();D=A;var N=!0;try{N=E(!0,A)}finally{N?W():(C=!1,E=null)}}else C=!1}var W;if(typeof h=="function")W=function(){h(I)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,X=L.port2;L.port1.onmessage=I,W=function(){X.postMessage(null)}}else W=function(){x(I,0)};function K(A){E=A,C||(C=!0,W())}function J(A,N){j=x(function(){A(t.unstable_now())},N)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_continueExecution=function(){_||p||(_=!0,K(S))},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(A){switch(f){case 1:case 2:case 3:var N=3;break;default:N=f}var V=f;f=N;try{return A()}finally{f=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,N){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var V=f;f=A;try{return N()}finally{f=V}},t.unstable_scheduleCallback=function(A,N,V){var ne=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ne+V:ne):V=ne,A){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=V+re,A={id:u++,callback:N,priorityLevel:A,startTime:V,expirationTime:re,sortIndex:-1},V>ne?(A.sortIndex=V,e(c,A),r(l)===null&&A===r(c)&&(m?(y(j),j=-1):m=!0,J(b,V-ne))):(A.sortIndex=re,e(l,A),_||p||(_=!0,K(S))),A},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(A){var N=f;return function(){var V=f;f=N;try{return A.apply(this,arguments)}finally{f=V}}}})(Xv);Jv.exports=Xv;var y1=Jv.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var w1=w,Bt=y1;function $(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ey=new Set,Zo={};function Hs(t,e){zi(t,e),zi(t+"Capture",e)}function zi(t,e){for(Zo[t]=e,t=0;t<e.length;t++)ey.add(e[t])}var ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gd=Object.prototype.hasOwnProperty,x1=/^[: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]*$/,$p={},Fp={};function _1(t){return gd.call(Fp,t)?!0:gd.call($p,t)?!1:x1.test(t)?Fp[t]=!0:($p[t]=!0,!1)}function b1(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function S1(t,e,r,n){if(e===null||typeof e>"u"||b1(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Et(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){dt[t]=new Et(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];dt[e]=new Et(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){dt[t]=new Et(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){dt[t]=new Et(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){dt[t]=new Et(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){dt[t]=new Et(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){dt[t]=new Et(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){dt[t]=new Et(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){dt[t]=new Et(t,5,!1,t.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eh,th);dt[e]=new Et(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eh,th);dt[e]=new Et(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eh,th);dt[e]=new Et(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){dt[t]=new Et(t,1,!1,t.toLowerCase(),null,!1,!1)});dt.xlinkHref=new Et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){dt[t]=new Et(t,1,!1,t.toLowerCase(),null,!0,!0)});function rh(t,e,r,n){var s=dt.hasOwnProperty(e)?dt[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(S1(e,r,s,n)&&(r=null),n||s===null?_1(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var mn=w1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,za=Symbol.for("react.element"),di=Symbol.for("react.portal"),fi=Symbol.for("react.fragment"),nh=Symbol.for("react.strict_mode"),vd=Symbol.for("react.profiler"),ty=Symbol.for("react.provider"),ry=Symbol.for("react.context"),sh=Symbol.for("react.forward_ref"),yd=Symbol.for("react.suspense"),wd=Symbol.for("react.suspense_list"),ih=Symbol.for("react.memo"),Rn=Symbol.for("react.lazy"),ny=Symbol.for("react.offscreen"),Up=Symbol.iterator;function fo(t){return t===null||typeof t!="object"?null:(t=Up&&t[Up]||t["@@iterator"],typeof t=="function"?t:null)}var We=Object.assign,bu;function Eo(t){if(bu===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);bu=e&&e[1]||""}return` `+bu+t}var Su=!1;function ku(t,e){if(!t||Su)return"";Su=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` `),i=n.stack.split(` `),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=` `+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Su=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Eo(t):""}function k1(t){switch(t.tag){case 5:return Eo(t.type);case 16:return Eo("Lazy");case 13:return Eo("Suspense");case 19:return Eo("SuspenseList");case 0:case 2:case 15:return t=ku(t.type,!1),t;case 11:return t=ku(t.type.render,!1),t;case 1:return t=ku(t.type,!0),t;default:return""}}function xd(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case fi:return"Fragment";case di:return"Portal";case vd:return"Profiler";case nh:return"StrictMode";case yd:return"Suspense";case wd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ry:return(t.displayName||"Context")+".Consumer";case ty:return(t._context.displayName||"Context")+".Provider";case sh:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ih:return e=t.displayName||null,e!==null?e:xd(t.type)||"Memo";case Rn:e=t._payload,t=t._init;try{return xd(t(e))}catch{}}return null}function E1(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xd(e);case 8:return e===nh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function es(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function sy(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function C1(t){var e=sy(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Va(t){t._valueTracker||(t._valueTracker=C1(t))}function iy(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=sy(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Il(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function _d(t,e){var r=e.checked;return We({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function zp(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=es(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function oy(t,e){e=e.checked,e!=null&&rh(t,"checked",e,!1)}function bd(t,e){oy(t,e);var r=es(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Sd(t,e.type,r):e.hasOwnProperty("defaultValue")&&Sd(t,e.type,es(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Vp(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Sd(t,e,r){(e!=="number"||Il(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Co=Array.isArray;function Si(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+es(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function kd(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error($(91));return We({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Bp(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error($(92));if(Co(r)){if(1<r.length)throw Error($(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:es(r)}}function ay(t,e){var r=es(e.value),n=es(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function Wp(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function ly(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ed(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?ly(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ba,cy=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ba=Ba||document.createElement("div"),Ba.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ba.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Yo(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Oo={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},T1=["Webkit","ms","Moz","O"];Object.keys(Oo).forEach(function(t){T1.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Oo[e]=Oo[t]})});function uy(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Oo.hasOwnProperty(t)&&Oo[t]?(""+e).trim():e+"px"}function dy(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=uy(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var P1=We({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 Cd(t,e){if(e){if(P1[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error($(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error($(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error($(61))}if(e.style!=null&&typeof e.style!="object")throw Error($(62))}}function Td(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pd=null;function oh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ad=null,ki=null,Ei=null;function Hp(t){if(t=Ta(t)){if(typeof Ad!="function")throw Error($(280));var e=t.stateNode;e&&(e=Ac(e),Ad(t.stateNode,t.type,e))}}function fy(t){ki?Ei?Ei.push(t):Ei=[t]:ki=t}function hy(){if(ki){var t=ki,e=Ei;if(Ei=ki=null,Hp(t),e)for(t=0;t<e.length;t++)Hp(e[t])}}function py(t,e){return t(e)}function my(){}var Eu=!1;function gy(t,e,r){if(Eu)return t(e,r);Eu=!0;try{return py(t,e,r)}finally{Eu=!1,(ki!==null||Ei!==null)&&(my(),hy())}}function Jo(t,e){var r=t.stateNode;if(r===null)return null;var n=Ac(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error($(231,e,typeof r));return r}var Rd=!1;if(ln)try{var ho={};Object.defineProperty(ho,"passive",{get:function(){Rd=!0}}),window.addEventListener("test",ho,ho),window.removeEventListener("test",ho,ho)}catch{Rd=!1}function A1(t,e,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(u){this.onError(u)}}var Io=!1,Ll=null,Ml=!1,Nd=null,R1={onError:function(t){Io=!0,Ll=t}};function N1(t,e,r,n,s,i,o,a,l){Io=!1,Ll=null,A1.apply(R1,arguments)}function j1(t,e,r,n,s,i,o,a,l){if(N1.apply(this,arguments),Io){if(Io){var c=Ll;Io=!1,Ll=null}else throw Error($(198));Ml||(Ml=!0,Nd=c)}}function qs(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function vy(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function qp(t){if(qs(t)!==t)throw Error($(188))}function O1(t){var e=t.alternate;if(!e){if(e=qs(t),e===null)throw Error($(188));return e!==t?null:t}for(var r=t,n=e;;){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 qp(s),t;if(i===n)return qp(s),e;i=i.sibling}throw Error($(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($(189))}}if(r.alternate!==n)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?t:e}function yy(t){return t=O1(t),t!==null?wy(t):null}function wy(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=wy(t);if(e!==null)return e;t=t.sibling}return null}var xy=Bt.unstable_scheduleCallback,Kp=Bt.unstable_cancelCallback,I1=Bt.unstable_shouldYield,L1=Bt.unstable_requestPaint,Qe=Bt.unstable_now,M1=Bt.unstable_getCurrentPriorityLevel,ah=Bt.unstable_ImmediatePriority,_y=Bt.unstable_UserBlockingPriority,Dl=Bt.unstable_NormalPriority,D1=Bt.unstable_LowPriority,by=Bt.unstable_IdlePriority,Ec=null,$r=null;function $1(t){if($r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(Ec,t,void 0,(t.current.flags&128)===128)}catch{}}var yr=Math.clz32?Math.clz32:z1,F1=Math.log,U1=Math.LN2;function z1(t){return t>>>=0,t===0?32:31-(F1(t)/U1|0)|0}var Wa=64,Ha=4194304;function To(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $l(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=To(a):(i&=o,i!==0&&(n=To(i)))}else o=r&~s,o!==0?n=To(o):i!==0&&(n=To(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-yr(e),s=1<<r,n|=t[r],e&=~s;return n}function V1(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B1(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-yr(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=V1(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function jd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Sy(){var t=Wa;return Wa<<=1,!(Wa&4194240)&&(Wa=64),t}function Cu(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Ea(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-yr(e),t[e]=r}function W1(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-yr(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function lh(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-yr(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var Pe=0;function ky(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Ey,ch,Cy,Ty,Py,Od=!1,qa=[],Hn=null,qn=null,Kn=null,Xo=new Map,ea=new Map,On=[],H1="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 Gp(t,e){switch(t){case"focusin":case"focusout":Hn=null;break;case"dragenter":case"dragleave":qn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":Xo.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ea.delete(e.pointerId)}}function po(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=Ta(e),e!==null&&ch(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function q1(t,e,r,n,s){switch(e){case"focusin":return Hn=po(Hn,t,e,r,n,s),!0;case"dragenter":return qn=po(qn,t,e,r,n,s),!0;case"mouseover":return Kn=po(Kn,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return Xo.set(i,po(Xo.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,ea.set(i,po(ea.get(i)||null,t,e,r,n,s)),!0}return!1}function Ay(t){var e=Ss(t.target);if(e!==null){var r=qs(e);if(r!==null){if(e=r.tag,e===13){if(e=vy(r),e!==null){t.blockedOn=e,Py(t.priority,function(){Cy(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function yl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Id(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);Pd=n,r.target.dispatchEvent(n),Pd=null}else return e=Ta(r),e!==null&&ch(e),t.blockedOn=r,!1;e.shift()}return!0}function Qp(t,e,r){yl(t)&&r.delete(e)}function K1(){Od=!1,Hn!==null&&yl(Hn)&&(Hn=null),qn!==null&&yl(qn)&&(qn=null),Kn!==null&&yl(Kn)&&(Kn=null),Xo.forEach(Qp),ea.forEach(Qp)}function mo(t,e){t.blockedOn===e&&(t.blockedOn=null,Od||(Od=!0,Bt.unstable_scheduleCallback(Bt.unstable_NormalPriority,K1)))}function ta(t){function e(s){return mo(s,t)}if(0<qa.length){mo(qa[0],t);for(var r=1;r<qa.length;r++){var n=qa[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Hn!==null&&mo(Hn,t),qn!==null&&mo(qn,t),Kn!==null&&mo(Kn,t),Xo.forEach(e),ea.forEach(e),r=0;r<On.length;r++)n=On[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<On.length&&(r=On[0],r.blockedOn===null);)Ay(r),r.blockedOn===null&&On.shift()}var Ci=mn.ReactCurrentBatchConfig,Fl=!0;function G1(t,e,r,n){var s=Pe,i=Ci.transition;Ci.transition=null;try{Pe=1,uh(t,e,r,n)}finally{Pe=s,Ci.transition=i}}function Q1(t,e,r,n){var s=Pe,i=Ci.transition;Ci.transition=null;try{Pe=4,uh(t,e,r,n)}finally{Pe=s,Ci.transition=i}}function uh(t,e,r,n){if(Fl){var s=Id(t,e,r,n);if(s===null)Mu(t,e,n,Ul,r),Gp(t,n);else if(q1(s,t,e,r,n))n.stopPropagation();else if(Gp(t,n),e&4&&-1<H1.indexOf(t)){for(;s!==null;){var i=Ta(s);if(i!==null&&Ey(i),i=Id(t,e,r,n),i===null&&Mu(t,e,n,Ul,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Mu(t,e,n,null,r)}}var Ul=null;function Id(t,e,r,n){if(Ul=null,t=oh(n),t=Ss(t),t!==null)if(e=qs(t),e===null)t=null;else if(r=e.tag,r===13){if(t=vy(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ul=t,null}function Ry(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(M1()){case ah:return 1;case _y:return 4;case Dl:case D1:return 16;case by:return 536870912;default:return 16}default:return 16}}var zn=null,dh=null,wl=null;function Ny(){if(wl)return wl;var t,e=dh,r=e.length,n,s="value"in zn?zn.value:zn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===s[i-n];n++);return wl=s.slice(t,1<n?1-n:void 0)}function xl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ka(){return!0}function Zp(){return!1}function qt(t){function e(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 t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ka:Zp,this.isPropagationStopped=Zp,this}return We(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ka)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ka)},persist:function(){},isPersistent:Ka}),e}var no={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fh=qt(no),Ca=We({},no,{view:0,detail:0}),Z1=qt(Ca),Tu,Pu,go,Cc=We({},Ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hh,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==go&&(go&&t.type==="mousemove"?(Tu=t.screenX-go.screenX,Pu=t.screenY-go.screenY):Pu=Tu=0,go=t),Tu)},movementY:function(t){return"movementY"in t?t.movementY:Pu}}),Yp=qt(Cc),Y1=We({},Cc,{dataTransfer:0}),J1=qt(Y1),X1=We({},Ca,{relatedTarget:0}),Au=qt(X1),eS=We({},no,{animationName:0,elapsedTime:0,pseudoElement:0}),tS=qt(eS),rS=We({},no,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),nS=qt(rS),sS=We({},no,{data:0}),Jp=qt(sS),iS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oS={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"},aS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lS(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=aS[t])?!!e[t]:!1}function hh(){return lS}var cS=We({},Ca,{key:function(t){if(t.key){var e=iS[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=xl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?oS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hh,charCode:function(t){return t.type==="keypress"?xl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?xl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),uS=qt(cS),dS=We({},Cc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xp=qt(dS),fS=We({},Ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hh}),hS=qt(fS),pS=We({},no,{propertyName:0,elapsedTime:0,pseudoElement:0}),mS=qt(pS),gS=We({},Cc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),vS=qt(gS),yS=[9,13,27,32],ph=ln&&"CompositionEvent"in window,Lo=null;ln&&"documentMode"in document&&(Lo=document.documentMode);var wS=ln&&"TextEvent"in window&&!Lo,jy=ln&&(!ph||Lo&&8<Lo&&11>=Lo),em=" ",tm=!1;function Oy(t,e){switch(t){case"keyup":return yS.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hi=!1;function xS(t,e){switch(t){case"compositionend":return Iy(e);case"keypress":return e.which!==32?null:(tm=!0,em);case"textInput":return t=e.data,t===em&&tm?null:t;default:return null}}function _S(t,e){if(hi)return t==="compositionend"||!ph&&Oy(t,e)?(t=Ny(),wl=dh=zn=null,hi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return jy&&e.locale!=="ko"?null:e.data;default:return null}}var bS={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 rm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!bS[t.type]:e==="textarea"}function Ly(t,e,r,n){fy(n),e=zl(e,"onChange"),0<e.length&&(r=new fh("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var Mo=null,ra=null;function SS(t){qy(t,0)}function Tc(t){var e=gi(t);if(iy(e))return t}function kS(t,e){if(t==="change")return e}var My=!1;if(ln){var Ru;if(ln){var Nu="oninput"in document;if(!Nu){var nm=document.createElement("div");nm.setAttribute("oninput","return;"),Nu=typeof nm.oninput=="function"}Ru=Nu}else Ru=!1;My=Ru&&(!document.documentMode||9<document.documentMode)}function sm(){Mo&&(Mo.detachEvent("onpropertychange",Dy),ra=Mo=null)}function Dy(t){if(t.propertyName==="value"&&Tc(ra)){var e=[];Ly(e,ra,t,oh(t)),gy(SS,e)}}function ES(t,e,r){t==="focusin"?(sm(),Mo=e,ra=r,Mo.attachEvent("onpropertychange",Dy)):t==="focusout"&&sm()}function CS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Tc(ra)}function TS(t,e){if(t==="click")return Tc(e)}function PS(t,e){if(t==="input"||t==="change")return Tc(e)}function AS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var xr=typeof Object.is=="function"?Object.is:AS;function na(t,e){if(xr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!gd.call(e,s)||!xr(t[s],e[s]))return!1}return!0}function im(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function om(t,e){var r=im(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=im(r)}}function $y(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?$y(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Fy(){for(var t=window,e=Il();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Il(t.document)}return e}function mh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function RS(t){var e=Fy(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&$y(r.ownerDocument.documentElement,r)){if(n!==null&&mh(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=om(r,i);var o=om(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var NS=ln&&"documentMode"in document&&11>=document.documentMode,pi=null,Ld=null,Do=null,Md=!1;function am(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Md||pi==null||pi!==Il(n)||(n=pi,"selectionStart"in n&&mh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Do&&na(Do,n)||(Do=n,n=zl(Ld,"onSelect"),0<n.length&&(e=new fh("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=pi)))}function Ga(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var mi={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionend:Ga("Transition","TransitionEnd")},ju={},Uy={};ln&&(Uy=document.createElement("div").style,"AnimationEvent"in window||(delete mi.animationend.animation,delete mi.animationiteration.animation,delete mi.animationstart.animation),"TransitionEvent"in window||delete mi.transitionend.transition);function Pc(t){if(ju[t])return ju[t];if(!mi[t])return t;var e=mi[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in Uy)return ju[t]=e[r];return t}var zy=Pc("animationend"),Vy=Pc("animationiteration"),By=Pc("animationstart"),Wy=Pc("transitionend"),Hy=new Map,lm="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 os(t,e){Hy.set(t,e),Hs(e,[t])}for(var Ou=0;Ou<lm.length;Ou++){var Iu=lm[Ou],jS=Iu.toLowerCase(),OS=Iu[0].toUpperCase()+Iu.slice(1);os(jS,"on"+OS)}os(zy,"onAnimationEnd");os(Vy,"onAnimationIteration");os(By,"onAnimationStart");os("dblclick","onDoubleClick");os("focusin","onFocus");os("focusout","onBlur");os(Wy,"onTransitionEnd");zi("onMouseEnter",["mouseout","mouseover"]);zi("onMouseLeave",["mouseout","mouseover"]);zi("onPointerEnter",["pointerout","pointerover"]);zi("onPointerLeave",["pointerout","pointerover"]);Hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Po="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(" "),IS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Po));function cm(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,j1(n,e,void 0,t),t.currentTarget=null}function qy(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;cm(s,a,c),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;cm(s,a,c),i=l}}}if(Ml)throw t=Nd,Ml=!1,Nd=null,t}function Me(t,e){var r=e[zd];r===void 0&&(r=e[zd]=new Set);var n=t+"__bubble";r.has(n)||(Ky(e,t,2,!1),r.add(n))}function Lu(t,e,r){var n=0;e&&(n|=4),Ky(r,t,n,e)}var Qa="_reactListening"+Math.random().toString(36).slice(2);function sa(t){if(!t[Qa]){t[Qa]=!0,ey.forEach(function(r){r!=="selectionchange"&&(IS.has(r)||Lu(r,!1,t),Lu(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Qa]||(e[Qa]=!0,Lu("selectionchange",!1,e))}}function Ky(t,e,r,n){switch(Ry(e)){case 1:var s=G1;break;case 4:s=Q1;break;default:s=uh}r=s.bind(null,e,r,t),s=void 0,!Rd||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function Mu(t,e,r,n,s){var i=n;if(!(e&1)&&!(e&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=Ss(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}gy(function(){var c=i,u=oh(r),d=[];e:{var f=Hy.get(t);if(f!==void 0){var p=fh,_=t;switch(t){case"keypress":if(xl(r)===0)break e;case"keydown":case"keyup":p=uS;break;case"focusin":_="focus",p=Au;break;case"focusout":_="blur",p=Au;break;case"beforeblur":case"afterblur":p=Au;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":p=Yp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=J1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=hS;break;case zy:case Vy:case By:p=tS;break;case Wy:p=mS;break;case"scroll":p=Z1;break;case"wheel":p=vS;break;case"copy":case"cut":case"paste":p=nS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xp}var m=(e&4)!==0,x=!m&&t==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var h=c,v;h!==null;){v=h;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,y!==null&&(b=Jo(h,y),b!=null&&m.push(ia(h,b,v)))),x)break;h=h.return}0<m.length&&(f=new p(f,_,null,r,u),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",f&&r!==Pd&&(_=r.relatedTarget||r.fromElement)&&(Ss(_)||_[cn]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(_=r.relatedTarget||r.toElement,p=c,_=_?Ss(_):null,_!==null&&(x=qs(_),_!==x||_.tag!==5&&_.tag!==6)&&(_=null)):(p=null,_=c),p!==_)){if(m=Yp,b="onMouseLeave",y="onMouseEnter",h="mouse",(t==="pointerout"||t==="pointerover")&&(m=Xp,b="onPointerLeave",y="onPointerEnter",h="pointer"),x=p==null?f:gi(p),v=_==null?f:gi(_),f=new m(b,h+"leave",p,r,u),f.target=x,f.relatedTarget=v,b=null,Ss(u)===c&&(m=new m(y,h+"enter",_,r,u),m.target=v,m.relatedTarget=x,b=m),x=b,p&&_)t:{for(m=p,y=_,h=0,v=m;v;v=Ys(v))h++;for(v=0,b=y;b;b=Ys(b))v++;for(;0<h-v;)m=Ys(m),h--;for(;0<v-h;)y=Ys(y),v--;for(;h--;){if(m===y||y!==null&&m===y.alternate)break t;m=Ys(m),y=Ys(y)}m=null}else m=null;p!==null&&um(d,f,p,m,!1),_!==null&&x!==null&&um(d,x,_,m,!0)}}e:{if(f=c?gi(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=kS;else if(rm(f))if(My)S=PS;else{S=CS;var C=ES}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=TS);if(S&&(S=S(t,c))){Ly(d,S,r,u);break e}C&&C(t,f,c),t==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&Sd(f,"number",f.value)}switch(C=c?gi(c):window,t){case"focusin":(rm(C)||C.contentEditable==="true")&&(pi=C,Ld=c,Do=null);break;case"focusout":Do=Ld=pi=null;break;case"mousedown":Md=!0;break;case"contextmenu":case"mouseup":case"dragend":Md=!1,am(d,r,u);break;case"selectionchange":if(NS)break;case"keydown":case"keyup":am(d,r,u)}var E;if(ph)e:{switch(t){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else hi?Oy(t,r)&&(j="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(j="onCompositionStart");j&&(jy&&r.locale!=="ko"&&(hi||j!=="onCompositionStart"?j==="onCompositionEnd"&&hi&&(E=Ny()):(zn=u,dh="value"in zn?zn.value:zn.textContent,hi=!0)),C=zl(c,j),0<C.length&&(j=new Jp(j,t,null,r,u),d.push({event:j,listeners:C}),E?j.data=E:(E=Iy(r),E!==null&&(j.data=E)))),(E=wS?xS(t,r):_S(t,r))&&(c=zl(c,"onBeforeInput"),0<c.length&&(u=new Jp("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=E))}qy(d,e)})}function ia(t,e,r){return{instance:t,listener:e,currentTarget:r}}function zl(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Jo(t,r),i!=null&&n.unshift(ia(t,i,s)),i=Jo(t,e),i!=null&&n.push(ia(t,i,s))),t=t.return}return n}function Ys(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function um(t,e,r,n,s){for(var i=e._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=Jo(r,i),l!=null&&o.unshift(ia(r,l,a))):s||(l=Jo(r,i),l!=null&&o.push(ia(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var LS=/\r\n?/g,MS=/\u0000|\uFFFD/g;function dm(t){return(typeof t=="string"?t:""+t).replace(LS,` `).replace(MS,"")}function Za(t,e,r){if(e=dm(e),dm(t)!==e&&r)throw Error($(425))}function Vl(){}var Dd=null,$d=null;function Fd(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ud=typeof setTimeout=="function"?setTimeout:void 0,DS=typeof clearTimeout=="function"?clearTimeout:void 0,fm=typeof Promise=="function"?Promise:void 0,$S=typeof queueMicrotask=="function"?queueMicrotask:typeof fm<"u"?function(t){return fm.resolve(null).then(t).catch(FS)}:Ud;function FS(t){setTimeout(function(){throw t})}function Du(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),ta(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);ta(e)}function Gn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function hm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var so=Math.random().toString(36).slice(2),Ir="__reactFiber$"+so,oa="__reactProps$"+so,cn="__reactContainer$"+so,zd="__reactEvents$"+so,US="__reactListeners$"+so,zS="__reactHandles$"+so;function Ss(t){var e=t[Ir];if(e)return e;for(var r=t.parentNode;r;){if(e=r[cn]||r[Ir]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=hm(t);t!==null;){if(r=t[Ir])return r;t=hm(t)}return e}t=r,r=t.parentNode}return null}function Ta(t){return t=t[Ir]||t[cn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function gi(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error($(33))}function Ac(t){return t[oa]||null}var Vd=[],vi=-1;function as(t){return{current:t}}function De(t){0>vi||(t.current=Vd[vi],Vd[vi]=null,vi--)}function Ie(t,e){vi++,Vd[vi]=t.current,t.current=e}var ts={},vt=as(ts),Ot=as(!1),Ls=ts;function Vi(t,e){var r=t.type.contextTypes;if(!r)return ts;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function It(t){return t=t.childContextTypes,t!=null}function Bl(){De(Ot),De(vt)}function pm(t,e,r){if(vt.current!==ts)throw Error($(168));Ie(vt,e),Ie(Ot,r)}function Gy(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error($(108,E1(t)||"Unknown",s));return We({},r,n)}function Wl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ts,Ls=vt.current,Ie(vt,t),Ie(Ot,Ot.current),!0}function mm(t,e,r){var n=t.stateNode;if(!n)throw Error($(169));r?(t=Gy(t,e,Ls),n.__reactInternalMemoizedMergedChildContext=t,De(Ot),De(vt),Ie(vt,t)):De(Ot),Ie(Ot,r)}var tn=null,Rc=!1,$u=!1;function Qy(t){tn===null?tn=[t]:tn.push(t)}function VS(t){Rc=!0,Qy(t)}function ls(){if(!$u&&tn!==null){$u=!0;var t=0,e=Pe;try{var r=tn;for(Pe=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}tn=null,Rc=!1}catch(s){throw tn!==null&&(tn=tn.slice(t+1)),xy(ah,ls),s}finally{Pe=e,$u=!1}}return null}var yi=[],wi=0,Hl=null,ql=0,Gt=[],Qt=0,Ms=null,sn=1,on="";function ws(t,e){yi[wi++]=ql,yi[wi++]=Hl,Hl=t,ql=e}function Zy(t,e,r){Gt[Qt++]=sn,Gt[Qt++]=on,Gt[Qt++]=Ms,Ms=t;var n=sn;t=on;var s=32-yr(n)-1;n&=~(1<<s),r+=1;var i=32-yr(e)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,sn=1<<32-yr(e)+s|r<<s|n,on=i+t}else sn=1<<i|r<<s|n,on=t}function gh(t){t.return!==null&&(ws(t,1),Zy(t,1,0))}function vh(t){for(;t===Hl;)Hl=yi[--wi],yi[wi]=null,ql=yi[--wi],yi[wi]=null;for(;t===Ms;)Ms=Gt[--Qt],Gt[Qt]=null,on=Gt[--Qt],Gt[Qt]=null,sn=Gt[--Qt],Gt[Qt]=null}var zt=null,Ut=null,Ue=!1,mr=null;function Yy(t,e){var r=Zt(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function gm(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,zt=t,Ut=Gn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,zt=t,Ut=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Ms!==null?{id:sn,overflow:on}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Zt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,zt=t,Ut=null,!0):!1;default:return!1}}function Bd(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Wd(t){if(Ue){var e=Ut;if(e){var r=e;if(!gm(t,e)){if(Bd(t))throw Error($(418));e=Gn(r.nextSibling);var n=zt;e&&gm(t,e)?Yy(n,r):(t.flags=t.flags&-4097|2,Ue=!1,zt=t)}}else{if(Bd(t))throw Error($(418));t.flags=t.flags&-4097|2,Ue=!1,zt=t}}}function vm(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;zt=t}function Ya(t){if(t!==zt)return!1;if(!Ue)return vm(t),Ue=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Fd(t.type,t.memoizedProps)),e&&(e=Ut)){if(Bd(t))throw Jy(),Error($(418));for(;e;)Yy(t,e),e=Gn(e.nextSibling)}if(vm(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error($(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Ut=Gn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Ut=null}}else Ut=zt?Gn(t.stateNode.nextSibling):null;return!0}function Jy(){for(var t=Ut;t;)t=Gn(t.nextSibling)}function Bi(){Ut=zt=null,Ue=!1}function yh(t){mr===null?mr=[t]:mr.push(t)}var BS=mn.ReactCurrentBatchConfig;function vo(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error($(309));var n=r.stateNode}if(!n)throw Error($(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error($(284));if(!r._owner)throw Error($(290,t))}return t}function Ja(t,e){throw t=Object.prototype.toString.call(e),Error($(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function ym(t){var e=t._init;return e(t._payload)}function Xy(t){function e(y,h){if(t){var v=y.deletions;v===null?(y.deletions=[h],y.flags|=16):v.push(h)}}function r(y,h){if(!t)return null;for(;h!==null;)e(y,h),h=h.sibling;return null}function n(y,h){for(y=new Map;h!==null;)h.key!==null?y.set(h.key,h):y.set(h.index,h),h=h.sibling;return y}function s(y,h){return y=Jn(y,h),y.index=0,y.sibling=null,y}function i(y,h,v){return y.index=v,t?(v=y.alternate,v!==null?(v=v.index,v<h?(y.flags|=2,h):v):(y.flags|=2,h)):(y.flags|=1048576,h)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,h,v,b){return h===null||h.tag!==6?(h=Hu(v,y.mode,b),h.return=y,h):(h=s(h,v),h.return=y,h)}function l(y,h,v,b){var S=v.type;return S===fi?u(y,h,v.props.children,b,v.key):h!==null&&(h.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rn&&ym(S)===h.type)?(b=s(h,v.props),b.ref=vo(y,h,v),b.return=y,b):(b=Tl(v.type,v.key,v.props,null,y.mode,b),b.ref=vo(y,h,v),b.return=y,b)}function c(y,h,v,b){return h===null||h.tag!==4||h.stateNode.containerInfo!==v.containerInfo||h.stateNode.implementation!==v.implementation?(h=qu(v,y.mode,b),h.return=y,h):(h=s(h,v.children||[]),h.return=y,h)}function u(y,h,v,b,S){return h===null||h.tag!==7?(h=Is(v,y.mode,b,S),h.return=y,h):(h=s(h,v),h.return=y,h)}function d(y,h,v){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Hu(""+h,y.mode,v),h.return=y,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case za:return v=Tl(h.type,h.key,h.props,null,y.mode,v),v.ref=vo(y,null,h),v.return=y,v;case di:return h=qu(h,y.mode,v),h.return=y,h;case Rn:var b=h._init;return d(y,b(h._payload),v)}if(Co(h)||fo(h))return h=Is(h,y.mode,v,null),h.return=y,h;Ja(y,h)}return null}function f(y,h,v,b){var S=h!==null?h.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(y,h,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case za:return v.key===S?l(y,h,v,b):null;case di:return v.key===S?c(y,h,v,b):null;case Rn:return S=v._init,f(y,h,S(v._payload),b)}if(Co(v)||fo(v))return S!==null?null:u(y,h,v,b,null);Ja(y,v)}return null}function p(y,h,v,b,S){if(typeof b=="string"&&b!==""||typeof b=="number")return y=y.get(v)||null,a(h,y,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case za:return y=y.get(b.key===null?v:b.key)||null,l(h,y,b,S);case di:return y=y.get(b.key===null?v:b.key)||null,c(h,y,b,S);case Rn:var C=b._init;return p(y,h,v,C(b._payload),S)}if(Co(b)||fo(b))return y=y.get(v)||null,u(h,y,b,S,null);Ja(h,b)}return null}function _(y,h,v,b){for(var S=null,C=null,E=h,j=h=0,M=null;E!==null&&j<v.length;j++){E.index>j?(M=E,E=null):M=E.sibling;var D=f(y,E,v[j],b);if(D===null){E===null&&(E=M);break}t&&E&&D.alternate===null&&e(y,E),h=i(D,h,j),C===null?S=D:C.sibling=D,C=D,E=M}if(j===v.length)return r(y,E),Ue&&ws(y,j),S;if(E===null){for(;j<v.length;j++)E=d(y,v[j],b),E!==null&&(h=i(E,h,j),C===null?S=E:C.sibling=E,C=E);return Ue&&ws(y,j),S}for(E=n(y,E);j<v.length;j++)M=p(E,y,j,v[j],b),M!==null&&(t&&M.alternate!==null&&E.delete(M.key===null?j:M.key),h=i(M,h,j),C===null?S=M:C.sibling=M,C=M);return t&&E.forEach(function(Q){return e(y,Q)}),Ue&&ws(y,j),S}function m(y,h,v,b){var S=fo(v);if(typeof S!="function")throw Error($(150));if(v=S.call(v),v==null)throw Error($(151));for(var C=S=null,E=h,j=h=0,M=null,D=v.next();E!==null&&!D.done;j++,D=v.next()){E.index>j?(M=E,E=null):M=E.sibling;var Q=f(y,E,D.value,b);if(Q===null){E===null&&(E=M);break}t&&E&&Q.alternate===null&&e(y,E),h=i(Q,h,j),C===null?S=Q:C.sibling=Q,C=Q,E=M}if(D.done)return r(y,E),Ue&&ws(y,j),S;if(E===null){for(;!D.done;j++,D=v.next())D=d(y,D.value,b),D!==null&&(h=i(D,h,j),C===null?S=D:C.sibling=D,C=D);return Ue&&ws(y,j),S}for(E=n(y,E);!D.done;j++,D=v.next())D=p(E,y,j,D.value,b),D!==null&&(t&&D.alternate!==null&&E.delete(D.key===null?j:D.key),h=i(D,h,j),C===null?S=D:C.sibling=D,C=D);return t&&E.forEach(function(I){return e(y,I)}),Ue&&ws(y,j),S}function x(y,h,v,b){if(typeof v=="object"&&v!==null&&v.type===fi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case za:e:{for(var S=v.key,C=h;C!==null;){if(C.key===S){if(S=v.type,S===fi){if(C.tag===7){r(y,C.sibling),h=s(C,v.props.children),h.return=y,y=h;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rn&&ym(S)===C.type){r(y,C.sibling),h=s(C,v.props),h.ref=vo(y,C,v),h.return=y,y=h;break e}r(y,C);break}else e(y,C);C=C.sibling}v.type===fi?(h=Is(v.props.children,y.mode,b,v.key),h.return=y,y=h):(b=Tl(v.type,v.key,v.props,null,y.mode,b),b.ref=vo(y,h,v),b.return=y,y=b)}return o(y);case di:e:{for(C=v.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){r(y,h.sibling),h=s(h,v.children||[]),h.return=y,y=h;break e}else{r(y,h);break}else e(y,h);h=h.sibling}h=qu(v,y.mode,b),h.return=y,y=h}return o(y);case Rn:return C=v._init,x(y,h,C(v._payload),b)}if(Co(v))return _(y,h,v,b);if(fo(v))return m(y,h,v,b);Ja(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(r(y,h.sibling),h=s(h,v),h.return=y,y=h):(r(y,h),h=Hu(v,y.mode,b),h.return=y,y=h),o(y)):r(y,h)}return x}var Wi=Xy(!0),e0=Xy(!1),Kl=as(null),Gl=null,xi=null,wh=null;function xh(){wh=xi=Gl=null}function _h(t){var e=Kl.current;De(Kl),t._currentValue=e}function Hd(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ti(t,e){Gl=t,wh=xi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(jt=!0),t.firstContext=null)}function Xt(t){var e=t._currentValue;if(wh!==t)if(t={context:t,memoizedValue:e,next:null},xi===null){if(Gl===null)throw Error($(308));xi=t,Gl.dependencies={lanes:0,firstContext:t}}else xi=xi.next=t;return e}var ks=null;function bh(t){ks===null?ks=[t]:ks.push(t)}function t0(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,bh(e)):(r.next=s.next,s.next=r),e.interleaved=r,un(t,n)}function un(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Nn=!1;function Sh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r0(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function an(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Qn(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,_e&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,un(t,r)}return s=n.interleaved,s===null?(e.next=e,bh(n)):(e.next=s.next,s.next=e),n.interleaved=e,un(t,r)}function _l(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,lh(t,r)}}function wm(t,e){var r=t.updateQueue,n=t.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=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Ql(t,e,r,n){var s=t.updateQueue;Nn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((n&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var _=t,m=a;switch(f=e,p=r,m.tag){case 1:if(_=m.payload,typeof _=="function"){d=_.call(p,d,f);break e}d=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=m.payload,f=typeof _=="function"?_.call(p,d,f):_,f==null)break e;d=We({},d,f);break e;case 2:Nn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);$s|=o,t.lanes=o,t.memoizedState=d}}function xm(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error($(191,s));s.call(n)}}}var Pa={},Fr=as(Pa),aa=as(Pa),la=as(Pa);function Es(t){if(t===Pa)throw Error($(174));return t}function kh(t,e){switch(Ie(la,e),Ie(aa,t),Ie(Fr,Pa),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ed(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ed(e,t)}De(Fr),Ie(Fr,e)}function Hi(){De(Fr),De(aa),De(la)}function n0(t){Es(la.current);var e=Es(Fr.current),r=Ed(e,t.type);e!==r&&(Ie(aa,t),Ie(Fr,r))}function Eh(t){aa.current===t&&(De(Fr),De(aa))}var Ve=as(0);function Zl(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Fu=[];function Ch(){for(var t=0;t<Fu.length;t++)Fu[t]._workInProgressVersionPrimary=null;Fu.length=0}var bl=mn.ReactCurrentDispatcher,Uu=mn.ReactCurrentBatchConfig,Ds=0,Be=null,tt=null,it=null,Yl=!1,$o=!1,ca=0,WS=0;function ht(){throw Error($(321))}function Th(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!xr(t[r],e[r]))return!1;return!0}function Ph(t,e,r,n,s,i){if(Ds=i,Be=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,bl.current=t===null||t.memoizedState===null?GS:QS,t=r(n,s),$o){i=0;do{if($o=!1,ca=0,25<=i)throw Error($(301));i+=1,it=tt=null,e.updateQueue=null,bl.current=ZS,t=r(n,s)}while($o)}if(bl.current=Jl,e=tt!==null&&tt.next!==null,Ds=0,it=tt=Be=null,Yl=!1,e)throw Error($(300));return t}function Ah(){var t=ca!==0;return ca=0,t}function Rr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?Be.memoizedState=it=t:it=it.next=t,it}function er(){if(tt===null){var t=Be.alternate;t=t!==null?t.memoizedState:null}else t=tt.next;var e=it===null?Be.memoizedState:it.next;if(e!==null)it=e,tt=t;else{if(t===null)throw Error($(310));tt=t,t={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},it===null?Be.memoizedState=it=t:it=it.next=t}return it}function ua(t,e){return typeof e=="function"?e(t):e}function zu(t){var e=er(),r=e.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=t;var n=tt,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Ds&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,Be.lanes|=u,$s|=u}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,xr(n,e.memoizedState)||(jt=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,Be.lanes|=i,$s|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Vu(t){var e=er(),r=e.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);xr(i,e.memoizedState)||(jt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function s0(){}function i0(t,e){var r=Be,n=er(),s=e(),i=!xr(n.memoizedState,s);if(i&&(n.memoizedState=s,jt=!0),n=n.queue,Rh(l0.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||it!==null&&it.memoizedState.tag&1){if(r.flags|=2048,da(9,a0.bind(null,r,n,s,e),void 0,null),ot===null)throw Error($(349));Ds&30||o0(r,e,s)}return s}function o0(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Be.updateQueue,e===null?(e={lastEffect:null,stores:null},Be.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function a0(t,e,r,n){e.value=r,e.getSnapshot=n,c0(e)&&u0(t)}function l0(t,e,r){return r(function(){c0(e)&&u0(t)})}function c0(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!xr(t,r)}catch{return!0}}function u0(t){var e=un(t,1);e!==null&&wr(e,t,1,-1)}function _m(t){var e=Rr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:t},e.queue=t,t=t.dispatch=KS.bind(null,Be,t),[e.memoizedState,t]}function da(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Be.updateQueue,e===null?(e={lastEffect:null,stores:null},Be.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function d0(){return er().memoizedState}function Sl(t,e,r,n){var s=Rr();Be.flags|=t,s.memoizedState=da(1|e,r,void 0,n===void 0?null:n)}function Nc(t,e,r,n){var s=er();n=n===void 0?null:n;var i=void 0;if(tt!==null){var o=tt.memoizedState;if(i=o.destroy,n!==null&&Th(n,o.deps)){s.memoizedState=da(e,r,i,n);return}}Be.flags|=t,s.memoizedState=da(1|e,r,i,n)}function bm(t,e){return Sl(8390656,8,t,e)}function Rh(t,e){return Nc(2048,8,t,e)}function f0(t,e){return Nc(4,2,t,e)}function h0(t,e){return Nc(4,4,t,e)}function p0(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function m0(t,e,r){return r=r!=null?r.concat([t]):null,Nc(4,4,p0.bind(null,e,t),r)}function Nh(){}function g0(t,e){var r=er();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Th(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function v0(t,e){var r=er();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Th(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function y0(t,e,r){return Ds&21?(xr(r,e)||(r=Sy(),Be.lanes|=r,$s|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,jt=!0),t.memoizedState=r)}function HS(t,e){var r=Pe;Pe=r!==0&&4>r?r:4,t(!0);var n=Uu.transition;Uu.transition={};try{t(!1),e()}finally{Pe=r,Uu.transition=n}}function w0(){return er().memoizedState}function qS(t,e,r){var n=Yn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},x0(t))_0(e,r);else if(r=t0(t,e,r,n),r!==null){var s=St();wr(r,t,n,s),b0(r,e,n)}}function KS(t,e,r){var n=Yn(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(x0(t))_0(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,xr(a,o)){var l=e.interleaved;l===null?(s.next=s,bh(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=t0(t,e,s,n),r!==null&&(s=St(),wr(r,t,n,s),b0(r,e,n))}}function x0(t){var e=t.alternate;return t===Be||e!==null&&e===Be}function _0(t,e){$o=Yl=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function b0(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,lh(t,r)}}var Jl={readContext:Xt,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},GS={readContext:Xt,useCallback:function(t,e){return Rr().memoizedState=[t,e===void 0?null:e],t},useContext:Xt,useEffect:bm,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Sl(4194308,4,p0.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Sl(4194308,4,t,e)},useInsertionEffect:function(t,e){return Sl(4,2,t,e)},useMemo:function(t,e){var r=Rr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Rr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=qS.bind(null,Be,t),[n.memoizedState,t]},useRef:function(t){var e=Rr();return t={current:t},e.memoizedState=t},useState:_m,useDebugValue:Nh,useDeferredValue:function(t){return Rr().memoizedState=t},useTransition:function(){var t=_m(!1),e=t[0];return t=HS.bind(null,t[1]),Rr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Be,s=Rr();if(Ue){if(r===void 0)throw Error($(407));r=r()}else{if(r=e(),ot===null)throw Error($(349));Ds&30||o0(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,bm(l0.bind(null,n,i,t),[t]),n.flags|=2048,da(9,a0.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=Rr(),e=ot.identifierPrefix;if(Ue){var r=on,n=sn;r=(n&~(1<<32-yr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=ca++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=WS++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},QS={readContext:Xt,useCallback:g0,useContext:Xt,useEffect:Rh,useImperativeHandle:m0,useInsertionEffect:f0,useLayoutEffect:h0,useMemo:v0,useReducer:zu,useRef:d0,useState:function(){return zu(ua)},useDebugValue:Nh,useDeferredValue:function(t){var e=er();return y0(e,tt.memoizedState,t)},useTransition:function(){var t=zu(ua)[0],e=er().memoizedState;return[t,e]},useMutableSource:s0,useSyncExternalStore:i0,useId:w0,unstable_isNewReconciler:!1},ZS={readContext:Xt,useCallback:g0,useContext:Xt,useEffect:Rh,useImperativeHandle:m0,useInsertionEffect:f0,useLayoutEffect:h0,useMemo:v0,useReducer:Vu,useRef:d0,useState:function(){return Vu(ua)},useDebugValue:Nh,useDeferredValue:function(t){var e=er();return tt===null?e.memoizedState=t:y0(e,tt.memoizedState,t)},useTransition:function(){var t=Vu(ua)[0],e=er().memoizedState;return[t,e]},useMutableSource:s0,useSyncExternalStore:i0,useId:w0,unstable_isNewReconciler:!1};function cr(t,e){if(t&&t.defaultProps){e=We({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function qd(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:We({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var jc={isMounted:function(t){return(t=t._reactInternals)?qs(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=St(),s=Yn(t),i=an(n,s);i.payload=e,r!=null&&(i.callback=r),e=Qn(t,i,s),e!==null&&(wr(e,t,s,n),_l(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=St(),s=Yn(t),i=an(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=Qn(t,i,s),e!==null&&(wr(e,t,s,n),_l(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=St(),n=Yn(t),s=an(r,n);s.tag=2,e!=null&&(s.callback=e),e=Qn(t,s,n),e!==null&&(wr(e,t,n,r),_l(e,t,n))}};function Sm(t,e,r,n,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!na(r,n)||!na(s,i):!0}function S0(t,e,r){var n=!1,s=ts,i=e.contextType;return typeof i=="object"&&i!==null?i=Xt(i):(s=It(e)?Ls:vt.current,n=e.contextTypes,i=(n=n!=null)?Vi(t,s):ts),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=jc,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function km(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&jc.enqueueReplaceState(e,e.state,null)}function Kd(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},Sh(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Xt(i):(i=It(e)?Ls:vt.current,s.context=Vi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(qd(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&jc.enqueueReplaceState(s,s.state,null),Ql(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function qi(t,e){try{var r="",n=e;do r+=k1(n),n=n.return;while(n);var s=r}catch(i){s=` Error generating stack: `+i.message+` `+i.stack}return{value:t,source:e,stack:s,digest:null}}function Bu(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Gd(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var YS=typeof WeakMap=="function"?WeakMap:Map;function k0(t,e,r){r=an(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){ec||(ec=!0,sf=n),Gd(t,e)},r}function E0(t,e,r){r=an(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){Gd(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Gd(t,e),typeof n!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function Em(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new YS;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=dk.bind(null,t,e,r),e.then(t,t))}function Cm(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Tm(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=an(-1,1),e.tag=2,Qn(r,e,1))),r.lanes|=1),t)}var JS=mn.ReactCurrentOwner,jt=!1;function xt(t,e,r,n){e.child=t===null?e0(e,null,r,n):Wi(e,t.child,r,n)}function Pm(t,e,r,n,s){r=r.render;var i=e.ref;return Ti(e,s),n=Ph(t,e,r,n,i,s),r=Ah(),t!==null&&!jt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,dn(t,e,s)):(Ue&&r&&gh(e),e.flags|=1,xt(t,e,n,s),e.child)}function Am(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!Fh(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,C0(t,e,i,n,s)):(t=Tl(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:na,r(o,n)&&t.ref===e.ref)return dn(t,e,s)}return e.flags|=1,t=Jn(i,n),t.ref=e.ref,t.return=e,e.child=t}function C0(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(na(i,n)&&t.ref===e.ref)if(jt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(jt=!0);else return e.lanes=t.lanes,dn(t,e,s)}return Qd(t,e,r,n,s)}function T0(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(bi,Dt),Dt|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ie(bi,Dt),Dt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Ie(bi,Dt),Dt|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,Ie(bi,Dt),Dt|=n;return xt(t,e,s,r),e.child}function P0(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Qd(t,e,r,n,s){var i=It(r)?Ls:vt.current;return i=Vi(e,i),Ti(e,s),r=Ph(t,e,r,n,i,s),n=Ah(),t!==null&&!jt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,dn(t,e,s)):(Ue&&n&&gh(e),e.flags|=1,xt(t,e,r,s),e.child)}function Rm(t,e,r,n,s){if(It(r)){var i=!0;Wl(e)}else i=!1;if(Ti(e,s),e.stateNode===null)kl(t,e),S0(e,r,n),Kd(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Xt(c):(c=It(r)?Ls:vt.current,c=Vi(e,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&km(e,o,n,c),Nn=!1;var f=e.memoizedState;o.state=f,Ql(e,n,o,s),l=e.memoizedState,a!==n||f!==l||Ot.current||Nn?(typeof u=="function"&&(qd(e,r,u,n),l=e.memoizedState),(a=Nn||Sm(e,r,a,n,f,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,r0(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:cr(e.type,a),o.props=c,d=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Xt(l):(l=It(r)?Ls:vt.current,l=Vi(e,l));var p=r.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&km(e,o,n,l),Nn=!1,f=e.memoizedState,o.state=f,Ql(e,n,o,s);var _=e.memoizedState;a!==d||f!==_||Ot.current||Nn?(typeof p=="function"&&(qd(e,r,p,n),_=e.memoizedState),(c=Nn||Sm(e,r,c,n,f,_,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,_,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,_,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=_),o.props=n,o.state=_,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return Zd(t,e,r,n,i,s)}function Zd(t,e,r,n,s,i){P0(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&mm(e,r,!1),dn(t,e,i);n=e.stateNode,JS.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Wi(e,t.child,null,i),e.child=Wi(e,null,a,i)):xt(t,e,a,i),e.memoizedState=n.state,s&&mm(e,r,!0),e.child}function A0(t){var e=t.stateNode;e.pendingContext?pm(t,e.pendingContext,e.pendingContext!==e.context):e.context&&pm(t,e.context,!1),kh(t,e.containerInfo)}function Nm(t,e,r,n,s){return Bi(),yh(s),e.flags|=256,xt(t,e,r,n),e.child}var Yd={dehydrated:null,treeContext:null,retryLane:0};function Jd(t){return{baseLanes:t,cachePool:null,transitions:null}}function R0(t,e,r){var n=e.pendingProps,s=Ve.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),Ie(Ve,s&1),t===null)return Wd(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Lc(o,n,0,null),t=Is(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Jd(r),e.memoizedState=Yd,t):jh(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return XS(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Jn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Jn(a,i):(i=Is(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?Jd(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Yd,n}return i=t.child,t=i.sibling,n=Jn(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function jh(t,e){return e=Lc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Xa(t,e,r,n){return n!==null&&yh(n),Wi(e,t.child,null,r),t=jh(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function XS(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=Bu(Error($(422))),Xa(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=Lc({mode:"visible",children:n.children},s,0,null),i=Is(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&Wi(e,t.child,null,o),e.child.memoizedState=Jd(o),e.memoizedState=Yd,i);if(!(e.mode&1))return Xa(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error($(419)),n=Bu(i,n,void 0),Xa(t,e,o,n)}if(a=(o&t.childLanes)!==0,jt||a){if(n=ot,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,un(t,s),wr(n,t,s,-1))}return $h(),n=Bu(Error($(421))),Xa(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=fk.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Ut=Gn(s.nextSibling),zt=e,Ue=!0,mr=null,t!==null&&(Gt[Qt++]=sn,Gt[Qt++]=on,Gt[Qt++]=Ms,sn=t.id,on=t.overflow,Ms=e),e=jh(e,n.children),e.flags|=4096,e)}function jm(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Hd(t.return,e,r)}function Wu(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function N0(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(xt(t,e,n.children,r),n=Ve.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&jm(t,r,e);else if(t.tag===19)jm(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Ie(Ve,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Zl(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Wu(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Zl(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Wu(e,!0,r,null,i);break;case"together":Wu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function kl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function dn(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),$s|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error($(153));if(e.child!==null){for(t=e.child,r=Jn(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Jn(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function ek(t,e,r){switch(e.tag){case 3:A0(e),Bi();break;case 5:n0(e);break;case 1:It(e.type)&&Wl(e);break;case 4:kh(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;Ie(Kl,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Ie(Ve,Ve.current&1),e.flags|=128,null):r&e.child.childLanes?R0(t,e,r):(Ie(Ve,Ve.current&1),t=dn(t,e,r),t!==null?t.sibling:null);Ie(Ve,Ve.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return N0(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ie(Ve,Ve.current),n)break;return null;case 22:case 23:return e.lanes=0,T0(t,e,r)}return dn(t,e,r)}var j0,Xd,O0,I0;j0=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Xd=function(){};O0=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Es(Fr.current);var i=null;switch(r){case"input":s=_d(t,s),n=_d(t,n),i=[];break;case"select":s=We({},s,{value:void 0}),n=We({},n,{value:void 0}),i=[];break;case"textarea":s=kd(t,s),n=kd(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Vl)}Cd(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Zo.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Zo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Me("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};I0=function(t,e,r,n){r!==n&&(e.flags|=4)};function yo(t,e){if(!Ue)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function pt(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function tk(t,e,r){var n=e.pendingProps;switch(vh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(e),null;case 1:return It(e.type)&&Bl(),pt(e),null;case 3:return n=e.stateNode,Hi(),De(Ot),De(vt),Ch(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ya(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,mr!==null&&(lf(mr),mr=null))),Xd(t,e),pt(e),null;case 5:Eh(e);var s=Es(la.current);if(r=e.type,t!==null&&e.stateNode!=null)O0(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error($(166));return pt(e),null}if(t=Es(Fr.current),Ya(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[Ir]=e,n[oa]=i,t=(e.mode&1)!==0,r){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(s=0;s<Po.length;s++)Me(Po[s],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":zp(n,i),Me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Me("invalid",n);break;case"textarea":Bp(n,i),Me("invalid",n)}Cd(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Za(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Za(n.textContent,a,t),s=["children",""+a]):Zo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Me("scroll",n)}switch(r){case"input":Va(n),Vp(n,i,!0);break;case"textarea":Va(n),Wp(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Vl)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=ly(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Ir]=e,t[oa]=n,j0(t,e,!1,!1),e.stateNode=t;e:{switch(o=Td(r,n),r){case"dialog":Me("cancel",t),Me("close",t),s=n;break;case"iframe":case"object":case"embed":Me("load",t),s=n;break;case"video":case"audio":for(s=0;s<Po.length;s++)Me(Po[s],t);s=n;break;case"source":Me("error",t),s=n;break;case"img":case"image":case"link":Me("error",t),Me("load",t),s=n;break;case"details":Me("toggle",t),s=n;break;case"input":zp(t,n),s=_d(t,n),Me("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=We({},n,{value:void 0}),Me("invalid",t);break;case"textarea":Bp(t,n),s=kd(t,n),Me("invalid",t);break;default:s=n}Cd(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?dy(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&cy(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Yo(t,l):typeof l=="number"&&Yo(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Zo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Me("scroll",t):l!=null&&rh(t,i,l,o))}switch(r){case"input":Va(t),Vp(t,n,!1);break;case"textarea":Va(t),Wp(t);break;case"option":n.value!=null&&t.setAttribute("value",""+es(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?Si(t,!!n.multiple,i,!1):n.defaultValue!=null&&Si(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Vl)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return pt(e),null;case 6:if(t&&e.stateNode!=null)I0(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error($(166));if(r=Es(la.current),Es(Fr.current),Ya(e)){if(n=e.stateNode,r=e.memoizedProps,n[Ir]=e,(i=n.nodeValue!==r)&&(t=zt,t!==null))switch(t.tag){case 3:Za(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Za(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ir]=e,e.stateNode=n}return pt(e),null;case 13:if(De(Ve),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ue&&Ut!==null&&e.mode&1&&!(e.flags&128))Jy(),Bi(),e.flags|=98560,i=!1;else if(i=Ya(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error($(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error($(317));i[Ir]=e}else Bi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;pt(e),i=!1}else mr!==null&&(lf(mr),mr=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Ve.current&1?rt===0&&(rt=3):$h())),e.updateQueue!==null&&(e.flags|=4),pt(e),null);case 4:return Hi(),Xd(t,e),t===null&&sa(e.stateNode.containerInfo),pt(e),null;case 10:return _h(e.type._context),pt(e),null;case 17:return It(e.type)&&Bl(),pt(e),null;case 19:if(De(Ve),i=e.memoizedState,i===null)return pt(e),null;if(n=(e.flags&128)!==0,o=i.rendering,o===null)if(n)yo(i,!1);else{if(rt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Zl(t),o!==null){for(e.flags|=128,yo(i,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return Ie(Ve,Ve.current&1|2),e.child}t=t.sibling}i.tail!==null&&Qe()>Ki&&(e.flags|=128,n=!0,yo(i,!1),e.lanes=4194304)}else{if(!n)if(t=Zl(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),yo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ue)return pt(e),null}else 2*Qe()-i.renderingStartTime>Ki&&r!==1073741824&&(e.flags|=128,n=!0,yo(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Qe(),e.sibling=null,r=Ve.current,Ie(Ve,n?r&1|2:r&1),e):(pt(e),null);case 22:case 23:return Dh(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Dt&1073741824&&(pt(e),e.subtreeFlags&6&&(e.flags|=8192)):pt(e),null;case 24:return null;case 25:return null}throw Error($(156,e.tag))}function rk(t,e){switch(vh(e),e.tag){case 1:return It(e.type)&&Bl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hi(),De(Ot),De(vt),Ch(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Eh(e),null;case 13:if(De(Ve),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error($(340));Bi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return De(Ve),null;case 4:return Hi(),null;case 10:return _h(e.type._context),null;case 22:case 23:return Dh(),null;case 24:return null;default:return null}}var el=!1,gt=!1,nk=typeof WeakSet=="function"?WeakSet:Set,Y=null;function _i(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ke(t,e,n)}else r.current=null}function ef(t,e,r){try{r()}catch(n){Ke(t,e,n)}}var Om=!1;function sk(t,e){if(Dd=Fl,t=Fy(),mh(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var p;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===t)break t;if(f===r&&++c===s&&(a=o),f===i&&++u===n&&(l=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for($d={focusedElem:t,selectionRange:r},Fl=!1,Y=e;Y!==null;)if(e=Y,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Y=t;else for(;Y!==null;){e=Y;try{var _=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var m=_.memoizedProps,x=_.memoizedState,y=e.stateNode,h=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:cr(e.type,m),x);y.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=e.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($(163))}}catch(b){Ke(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Y=t;break}Y=e.return}return _=Om,Om=!1,_}function Fo(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&ef(e,r,i)}s=s.next}while(s!==n)}}function Oc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function tf(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function L0(t){var e=t.alternate;e!==null&&(t.alternate=null,L0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Ir],delete e[oa],delete e[zd],delete e[US],delete e[zS])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function M0(t){return t.tag===5||t.tag===3||t.tag===4}function Im(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||M0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Vl));else if(n!==4&&(t=t.child,t!==null))for(rf(t,e,r),t=t.sibling;t!==null;)rf(t,e,r),t=t.sibling}function nf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(nf(t,e,r),t=t.sibling;t!==null;)nf(t,e,r),t=t.sibling}var ct=null,hr=!1;function wn(t,e,r){for(r=r.child;r!==null;)D0(t,e,r),r=r.sibling}function D0(t,e,r){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(Ec,r)}catch{}switch(r.tag){case 5:gt||_i(r,e);case 6:var n=ct,s=hr;ct=null,wn(t,e,r),ct=n,hr=s,ct!==null&&(hr?(t=ct,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):ct.removeChild(r.stateNode));break;case 18:ct!==null&&(hr?(t=ct,r=r.stateNode,t.nodeType===8?Du(t.parentNode,r):t.nodeType===1&&Du(t,r),ta(t)):Du(ct,r.stateNode));break;case 4:n=ct,s=hr,ct=r.stateNode.containerInfo,hr=!0,wn(t,e,r),ct=n,hr=s;break;case 0:case 11:case 14:case 15:if(!gt&&(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)&&ef(r,e,o),s=s.next}while(s!==n)}wn(t,e,r);break;case 1:if(!gt&&(_i(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ke(r,e,a)}wn(t,e,r);break;case 21:wn(t,e,r);break;case 22:r.mode&1?(gt=(n=gt)||r.memoizedState!==null,wn(t,e,r),gt=n):wn(t,e,r);break;default:wn(t,e,r)}}function Lm(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new nk),e.forEach(function(n){var s=hk.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ir(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:ct=a.stateNode,hr=!1;break e;case 3:ct=a.stateNode.containerInfo,hr=!0;break e;case 4:ct=a.stateNode.containerInfo,hr=!0;break e}a=a.return}if(ct===null)throw Error($(160));D0(i,o,s),ct=null,hr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Ke(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)$0(e,t),e=e.sibling}function $0(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(ir(e,t),Ar(t),n&4){try{Fo(3,t,t.return),Oc(3,t)}catch(m){Ke(t,t.return,m)}try{Fo(5,t,t.return)}catch(m){Ke(t,t.return,m)}}break;case 1:ir(e,t),Ar(t),n&512&&r!==null&&_i(r,r.return);break;case 5:if(ir(e,t),Ar(t),n&512&&r!==null&&_i(r,r.return),t.flags&32){var s=t.stateNode;try{Yo(s,"")}catch(m){Ke(t,t.return,m)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=r!==null?r.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&oy(s,i),Td(a,o);var c=Td(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?dy(s,d):u==="dangerouslySetInnerHTML"?cy(s,d):u==="children"?Yo(s,d):rh(s,u,d,c)}switch(a){case"input":bd(s,i);break;case"textarea":ay(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Si(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Si(s,!!i.multiple,i.defaultValue,!0):Si(s,!!i.multiple,i.multiple?[]:"",!1))}s[oa]=i}catch(m){Ke(t,t.return,m)}}break;case 6:if(ir(e,t),Ar(t),n&4){if(t.stateNode===null)throw Error($(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){Ke(t,t.return,m)}}break;case 3:if(ir(e,t),Ar(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ta(e.containerInfo)}catch(m){Ke(t,t.return,m)}break;case 4:ir(e,t),Ar(t);break;case 13:ir(e,t),Ar(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Lh=Qe())),n&4&&Lm(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(gt=(c=gt)||u,ir(e,t),gt=c):ir(e,t),Ar(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Y=t,u=t.child;u!==null;){for(d=Y=u;Y!==null;){switch(f=Y,p=f.child,f.tag){case 0:case 11:case 14:case 15:Fo(4,f,f.return);break;case 1:_i(f,f.return);var _=f.stateNode;if(typeof _.componentWillUnmount=="function"){n=f,r=f.return;try{e=n,_.props=e.memoizedProps,_.state=e.memoizedState,_.componentWillUnmount()}catch(m){Ke(n,r,m)}}break;case 5:_i(f,f.return);break;case 22:if(f.memoizedState!==null){Dm(d);continue}}p!==null?(p.return=f,Y=p):Dm(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=uy("display",o))}catch(m){Ke(t,t.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){Ke(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ir(e,t),Ar(t),n&4&&Lm(t);break;case 21:break;default:ir(e,t),Ar(t)}}function Ar(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(M0(r)){var n=r;break e}r=r.return}throw Error($(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Yo(s,""),n.flags&=-33);var i=Im(t);nf(t,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Im(t);rf(t,a,o);break;default:throw Error($(161))}}catch(l){Ke(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function ik(t,e,r){Y=t,F0(t)}function F0(t,e,r){for(var n=(t.mode&1)!==0;Y!==null;){var s=Y,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||el;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||gt;a=el;var c=gt;if(el=o,(gt=l)&&!c)for(Y=s;Y!==null;)o=Y,l=o.child,o.tag===22&&o.memoizedState!==null?$m(s):l!==null?(l.return=o,Y=l):$m(s);for(;i!==null;)Y=i,F0(i),i=i.sibling;Y=s,el=a,gt=c}Mm(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,Y=i):Mm(t)}}function Mm(t){for(;Y!==null;){var e=Y;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:gt||Oc(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!gt)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:cr(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&xm(e,i,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}xm(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.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(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&ta(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}gt||e.flags&512&&tf(e)}catch(f){Ke(e,e.return,f)}}if(e===t){Y=null;break}if(r=e.sibling,r!==null){r.return=e.return,Y=r;break}Y=e.return}}function Dm(t){for(;Y!==null;){var e=Y;if(e===t){Y=null;break}var r=e.sibling;if(r!==null){r.return=e.return,Y=r;break}Y=e.return}}function $m(t){for(;Y!==null;){var e=Y;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Oc(4,e)}catch(l){Ke(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){Ke(e,s,l)}}var i=e.return;try{tf(e)}catch(l){Ke(e,i,l)}break;case 5:var o=e.return;try{tf(e)}catch(l){Ke(e,o,l)}}}catch(l){Ke(e,e.return,l)}if(e===t){Y=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Y=a;break}Y=e.return}}var ok=Math.ceil,Xl=mn.ReactCurrentDispatcher,Oh=mn.ReactCurrentOwner,Yt=mn.ReactCurrentBatchConfig,_e=0,ot=null,Je=null,ut=0,Dt=0,bi=as(0),rt=0,fa=null,$s=0,Ic=0,Ih=0,Uo=null,Rt=null,Lh=0,Ki=1/0,Jr=null,ec=!1,sf=null,Zn=null,tl=!1,Vn=null,tc=0,zo=0,of=null,El=-1,Cl=0;function St(){return _e&6?Qe():El!==-1?El:El=Qe()}function Yn(t){return t.mode&1?_e&2&&ut!==0?ut&-ut:BS.transition!==null?(Cl===0&&(Cl=Sy()),Cl):(t=Pe,t!==0||(t=window.event,t=t===void 0?16:Ry(t.type)),t):1}function wr(t,e,r,n){if(50<zo)throw zo=0,of=null,Error($(185));Ea(t,r,n),(!(_e&2)||t!==ot)&&(t===ot&&(!(_e&2)&&(Ic|=r),rt===4&&In(t,ut)),Lt(t,n),r===1&&_e===0&&!(e.mode&1)&&(Ki=Qe()+500,Rc&&ls()))}function Lt(t,e){var r=t.callbackNode;B1(t,e);var n=$l(t,t===ot?ut:0);if(n===0)r!==null&&Kp(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&Kp(r),e===1)t.tag===0?VS(Fm.bind(null,t)):Qy(Fm.bind(null,t)),$S(function(){!(_e&6)&&ls()}),r=null;else{switch(ky(n)){case 1:r=ah;break;case 4:r=_y;break;case 16:r=Dl;break;case 536870912:r=by;break;default:r=Dl}r=K0(r,U0.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function U0(t,e){if(El=-1,Cl=0,_e&6)throw Error($(327));var r=t.callbackNode;if(Pi()&&t.callbackNode!==r)return null;var n=$l(t,t===ot?ut:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=rc(t,n);else{e=n;var s=_e;_e|=2;var i=V0();(ot!==t||ut!==e)&&(Jr=null,Ki=Qe()+500,Os(t,e));do try{ck();break}catch(a){z0(t,a)}while(!0);xh(),Xl.current=i,_e=s,Je!==null?e=0:(ot=null,ut=0,e=rt)}if(e!==0){if(e===2&&(s=jd(t),s!==0&&(n=s,e=af(t,s))),e===1)throw r=fa,Os(t,0),In(t,n),Lt(t,Qe()),r;if(e===6)In(t,n);else{if(s=t.current.alternate,!(n&30)&&!ak(s)&&(e=rc(t,n),e===2&&(i=jd(t),i!==0&&(n=i,e=af(t,i))),e===1))throw r=fa,Os(t,0),In(t,n),Lt(t,Qe()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error($(345));case 2:xs(t,Rt,Jr);break;case 3:if(In(t,n),(n&130023424)===n&&(e=Lh+500-Qe(),10<e)){if($l(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){St(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Ud(xs.bind(null,t,Rt,Jr),e);break}xs(t,Rt,Jr);break;case 4:if(In(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var o=31-yr(n);i=1<<o,o=e[o],o>s&&(s=o),n&=~i}if(n=s,n=Qe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ok(n/1960))-n,10<n){t.timeoutHandle=Ud(xs.bind(null,t,Rt,Jr),n);break}xs(t,Rt,Jr);break;case 5:xs(t,Rt,Jr);break;default:throw Error($(329))}}}return Lt(t,Qe()),t.callbackNode===r?U0.bind(null,t):null}function af(t,e){var r=Uo;return t.current.memoizedState.isDehydrated&&(Os(t,e).flags|=256),t=rc(t,e),t!==2&&(e=Rt,Rt=r,e!==null&&lf(e)),t}function lf(t){Rt===null?Rt=t:Rt.push.apply(Rt,t)}function ak(t){for(var e=t;;){if(e.flags&16384){var r=e.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(!xr(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function In(t,e){for(e&=~Ih,e&=~Ic,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-yr(e),n=1<<r;t[r]=-1,e&=~n}}function Fm(t){if(_e&6)throw Error($(327));Pi();var e=$l(t,0);if(!(e&1))return Lt(t,Qe()),null;var r=rc(t,e);if(t.tag!==0&&r===2){var n=jd(t);n!==0&&(e=n,r=af(t,n))}if(r===1)throw r=fa,Os(t,0),In(t,e),Lt(t,Qe()),r;if(r===6)throw Error($(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,xs(t,Rt,Jr),Lt(t,Qe()),null}function Mh(t,e){var r=_e;_e|=1;try{return t(e)}finally{_e=r,_e===0&&(Ki=Qe()+500,Rc&&ls())}}function Fs(t){Vn!==null&&Vn.tag===0&&!(_e&6)&&Pi();var e=_e;_e|=1;var r=Yt.transition,n=Pe;try{if(Yt.transition=null,Pe=1,t)return t()}finally{Pe=n,Yt.transition=r,_e=e,!(_e&6)&&ls()}}function Dh(){Dt=bi.current,De(bi)}function Os(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,DS(r)),Je!==null)for(r=Je.return;r!==null;){var n=r;switch(vh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Bl();break;case 3:Hi(),De(Ot),De(vt),Ch();break;case 5:Eh(n);break;case 4:Hi();break;case 13:De(Ve);break;case 19:De(Ve);break;case 10:_h(n.type._context);break;case 22:case 23:Dh()}r=r.return}if(ot=t,Je=t=Jn(t.current,null),ut=Dt=e,rt=0,fa=null,Ih=Ic=$s=0,Rt=Uo=null,ks!==null){for(e=0;e<ks.length;e++)if(r=ks[e],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}ks=null}return t}function z0(t,e){do{var r=Je;try{if(xh(),bl.current=Jl,Yl){for(var n=Be.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Yl=!1}if(Ds=0,it=tt=Be=null,$o=!1,ca=0,Oh.current=null,r===null||r.return===null){rt=1,fa=e,Je=null;break}e:{var i=t,o=r.return,a=r,l=e;if(e=ut,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Cm(o);if(p!==null){p.flags&=-257,Tm(p,o,a,i,e),p.mode&1&&Em(i,c,e),e=p,l=c;var _=e.updateQueue;if(_===null){var m=new Set;m.add(l),e.updateQueue=m}else _.add(l);break e}else{if(!(e&1)){Em(i,c,e),$h();break e}l=Error($(426))}}else if(Ue&&a.mode&1){var x=Cm(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Tm(x,o,a,i,e),yh(qi(l,a));break e}}i=l=qi(l,a),rt!==4&&(rt=2),Uo===null?Uo=[i]:Uo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var y=k0(i,l,e);wm(i,y);break e;case 1:a=l;var h=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Zn===null||!Zn.has(v)))){i.flags|=65536,e&=-e,i.lanes|=e;var b=E0(i,a,e);wm(i,b);break e}}i=i.return}while(i!==null)}W0(r)}catch(S){e=S,Je===r&&r!==null&&(Je=r=r.return);continue}break}while(!0)}function V0(){var t=Xl.current;return Xl.current=Jl,t===null?Jl:t}function $h(){(rt===0||rt===3||rt===2)&&(rt=4),ot===null||!($s&268435455)&&!(Ic&268435455)||In(ot,ut)}function rc(t,e){var r=_e;_e|=2;var n=V0();(ot!==t||ut!==e)&&(Jr=null,Os(t,e));do try{lk();break}catch(s){z0(t,s)}while(!0);if(xh(),_e=r,Xl.current=n,Je!==null)throw Error($(261));return ot=null,ut=0,rt}function lk(){for(;Je!==null;)B0(Je)}function ck(){for(;Je!==null&&!I1();)B0(Je)}function B0(t){var e=q0(t.alternate,t,Dt);t.memoizedProps=t.pendingProps,e===null?W0(t):Je=e,Oh.current=null}function W0(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=rk(r,e),r!==null){r.flags&=32767,Je=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{rt=6,Je=null;return}}else if(r=tk(r,e,Dt),r!==null){Je=r;return}if(e=e.sibling,e!==null){Je=e;return}Je=e=t}while(e!==null);rt===0&&(rt=5)}function xs(t,e,r){var n=Pe,s=Yt.transition;try{Yt.transition=null,Pe=1,uk(t,e,r,n)}finally{Yt.transition=s,Pe=n}return null}function uk(t,e,r,n){do Pi();while(Vn!==null);if(_e&6)throw Error($(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error($(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(W1(t,i),t===ot&&(Je=ot=null,ut=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||tl||(tl=!0,K0(Dl,function(){return Pi(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Yt.transition,Yt.transition=null;var o=Pe;Pe=1;var a=_e;_e|=4,Oh.current=null,sk(t,r),$0(r,t),RS($d),Fl=!!Dd,$d=Dd=null,t.current=r,ik(r),L1(),_e=a,Pe=o,Yt.transition=i}else t.current=r;if(tl&&(tl=!1,Vn=t,tc=s),i=t.pendingLanes,i===0&&(Zn=null),$1(r.stateNode),Lt(t,Qe()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(ec)throw ec=!1,t=sf,sf=null,t;return tc&1&&t.tag!==0&&Pi(),i=t.pendingLanes,i&1?t===of?zo++:(zo=0,of=t):zo=0,ls(),null}function Pi(){if(Vn!==null){var t=ky(tc),e=Yt.transition,r=Pe;try{if(Yt.transition=null,Pe=16>t?16:t,Vn===null)var n=!1;else{if(t=Vn,Vn=null,tc=0,_e&6)throw Error($(331));var s=_e;for(_e|=4,Y=t.current;Y!==null;){var i=Y,o=i.child;if(Y.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Y=c;Y!==null;){var u=Y;switch(u.tag){case 0:case 11:case 15:Fo(8,u,i)}var d=u.child;if(d!==null)d.return=u,Y=d;else for(;Y!==null;){u=Y;var f=u.sibling,p=u.return;if(L0(u),u===c){Y=null;break}if(f!==null){f.return=p,Y=f;break}Y=p}}}var _=i.alternate;if(_!==null){var m=_.child;if(m!==null){_.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}Y=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Y=o;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Fo(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,Y=y;break e}Y=i.return}}var h=t.current;for(Y=h;Y!==null;){o=Y;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,Y=v;else e:for(o=h;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Oc(9,a)}}catch(S){Ke(a,a.return,S)}if(a===o){Y=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Y=b;break e}Y=a.return}}if(_e=s,ls(),$r&&typeof $r.onPostCommitFiberRoot=="function")try{$r.onPostCommitFiberRoot(Ec,t)}catch{}n=!0}return n}finally{Pe=r,Yt.transition=e}}return!1}function Um(t,e,r){e=qi(r,e),e=k0(t,e,1),t=Qn(t,e,1),e=St(),t!==null&&(Ea(t,1,e),Lt(t,e))}function Ke(t,e,r){if(t.tag===3)Um(t,t,r);else for(;e!==null;){if(e.tag===3){Um(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Zn===null||!Zn.has(n))){t=qi(r,t),t=E0(e,t,1),e=Qn(e,t,1),t=St(),e!==null&&(Ea(e,1,t),Lt(e,t));break}}e=e.return}}function dk(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=St(),t.pingedLanes|=t.suspendedLanes&r,ot===t&&(ut&r)===r&&(rt===4||rt===3&&(ut&130023424)===ut&&500>Qe()-Lh?Os(t,0):Ih|=r),Lt(t,e)}function H0(t,e){e===0&&(t.mode&1?(e=Ha,Ha<<=1,!(Ha&130023424)&&(Ha=4194304)):e=1);var r=St();t=un(t,e),t!==null&&(Ea(t,e,r),Lt(t,r))}function fk(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),H0(t,r)}function hk(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error($(314))}n!==null&&n.delete(e),H0(t,r)}var q0;q0=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ot.current)jt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return jt=!1,ek(t,e,r);jt=!!(t.flags&131072)}else jt=!1,Ue&&e.flags&1048576&&Zy(e,ql,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;kl(t,e),t=e.pendingProps;var s=Vi(e,vt.current);Ti(e,r),s=Ph(null,e,n,t,s,r);var i=Ah();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,It(n)?(i=!0,Wl(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Sh(e),s.updater=jc,e.stateNode=s,s._reactInternals=e,Kd(e,n,t,r),e=Zd(null,e,n,!0,i,r)):(e.tag=0,Ue&&i&&gh(e),xt(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(kl(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=mk(n),t=cr(n,t),s){case 0:e=Qd(null,e,n,t,r);break e;case 1:e=Rm(null,e,n,t,r);break e;case 11:e=Pm(null,e,n,t,r);break e;case 14:e=Am(null,e,n,cr(n.type,t),r);break e}throw Error($(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:cr(n,s),Qd(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:cr(n,s),Rm(t,e,n,s,r);case 3:e:{if(A0(e),t===null)throw Error($(387));n=e.pendingProps,i=e.memoizedState,s=i.element,r0(t,e),Ql(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=qi(Error($(423)),e),e=Nm(t,e,n,r,s);break e}else if(n!==s){s=qi(Error($(424)),e),e=Nm(t,e,n,r,s);break e}else for(Ut=Gn(e.stateNode.containerInfo.firstChild),zt=e,Ue=!0,mr=null,r=e0(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bi(),n===s){e=dn(t,e,r);break e}xt(t,e,n,r)}e=e.child}return e;case 5:return n0(e),t===null&&Wd(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Fd(n,s)?o=null:i!==null&&Fd(n,i)&&(e.flags|=32),P0(t,e),xt(t,e,o,r),e.child;case 6:return t===null&&Wd(e),null;case 13:return R0(t,e,r);case 4:return kh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Wi(e,null,n,r):xt(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:cr(n,s),Pm(t,e,n,s,r);case 7:return xt(t,e,e.pendingProps,r),e.child;case 8:return xt(t,e,e.pendingProps.children,r),e.child;case 12:return xt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,Ie(Kl,n._currentValue),n._currentValue=o,i!==null)if(xr(i.value,o)){if(i.children===s.children&&!Ot.current){e=dn(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=an(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Hd(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error($(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Hd(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}xt(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,Ti(e,r),s=Xt(s),n=n(s),e.flags|=1,xt(t,e,n,r),e.child;case 14:return n=e.type,s=cr(n,e.pendingProps),s=cr(n.type,s),Am(t,e,n,s,r);case 15:return C0(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:cr(n,s),kl(t,e),e.tag=1,It(n)?(t=!0,Wl(e)):t=!1,Ti(e,r),S0(e,n,s),Kd(e,n,s,r),Zd(null,e,n,!0,t,r);case 19:return N0(t,e,r);case 22:return T0(t,e,r)}throw Error($(156,e.tag))};function K0(t,e){return xy(t,e)}function pk(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(t,e,r,n){return new pk(t,e,r,n)}function Fh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function mk(t){if(typeof t=="function")return Fh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===sh)return 11;if(t===ih)return 14}return 2}function Jn(t,e){var r=t.alternate;return r===null?(r=Zt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Tl(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")Fh(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case fi:return Is(r.children,s,i,e);case nh:o=8,s|=8;break;case vd:return t=Zt(12,r,e,s|2),t.elementType=vd,t.lanes=i,t;case yd:return t=Zt(13,r,e,s),t.elementType=yd,t.lanes=i,t;case wd:return t=Zt(19,r,e,s),t.elementType=wd,t.lanes=i,t;case ny:return Lc(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ty:o=10;break e;case ry:o=9;break e;case sh:o=11;break e;case ih:o=14;break e;case Rn:o=16,n=null;break e}throw Error($(130,t==null?t:typeof t,""))}return e=Zt(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Is(t,e,r,n){return t=Zt(7,t,n,e),t.lanes=r,t}function Lc(t,e,r,n){return t=Zt(22,t,n,e),t.elementType=ny,t.lanes=r,t.stateNode={isHidden:!1},t}function Hu(t,e,r){return t=Zt(6,t,null,e),t.lanes=r,t}function qu(t,e,r){return e=Zt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function gk(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cu(0),this.expirationTimes=Cu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Uh(t,e,r,n,s,i,o,a,l){return t=new gk(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Zt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sh(i),t}function vk(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:di,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function G0(t){if(!t)return ts;t=t._reactInternals;e:{if(qs(t)!==t||t.tag!==1)throw Error($(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(It(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error($(171))}if(t.tag===1){var r=t.type;if(It(r))return Gy(t,r,e)}return e}function Q0(t,e,r,n,s,i,o,a,l){return t=Uh(r,n,!0,t,s,i,o,a,l),t.context=G0(null),r=t.current,n=St(),s=Yn(r),i=an(n,s),i.callback=e??null,Qn(r,i,s),t.current.lanes=s,Ea(t,s,n),Lt(t,n),t}function Mc(t,e,r,n){var s=e.current,i=St(),o=Yn(s);return r=G0(r),e.context===null?e.context=r:e.pendingContext=r,e=an(i,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Qn(s,e,o),t!==null&&(wr(t,s,o,i),_l(t,s,o)),o}function nc(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function zm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function zh(t,e){zm(t,e),(t=t.alternate)&&zm(t,e)}function yk(){return null}var Z0=typeof reportError=="function"?reportError:function(t){console.error(t)};function Vh(t){this._internalRoot=t}Dc.prototype.render=Vh.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error($(409));Mc(t,e,null,null)};Dc.prototype.unmount=Vh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Fs(function(){Mc(null,t,null,null)}),e[cn]=null}};function Dc(t){this._internalRoot=t}Dc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ty();t={blockedOn:null,target:t,priority:e};for(var r=0;r<On.length&&e!==0&&e<On[r].priority;r++);On.splice(r,0,t),r===0&&Ay(t)}};function Bh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function $c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Vm(){}function wk(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=nc(o);i.call(c)}}var o=Q0(e,n,t,0,null,!1,!1,"",Vm);return t._reactRootContainer=o,t[cn]=o.current,sa(t.nodeType===8?t.parentNode:t),Fs(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=nc(l);a.call(c)}}var l=Uh(t,0,!1,null,null,!1,!1,"",Vm);return t._reactRootContainer=l,t[cn]=l.current,sa(t.nodeType===8?t.parentNode:t),Fs(function(){Mc(e,l,r,n)}),l}function Fc(t,e,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=nc(o);a.call(l)}}Mc(e,o,t,s)}else o=wk(r,e,t,s,n);return nc(o)}Ey=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=To(e.pendingLanes);r!==0&&(lh(e,r|1),Lt(e,Qe()),!(_e&6)&&(Ki=Qe()+500,ls()))}break;case 13:Fs(function(){var n=un(t,1);if(n!==null){var s=St();wr(n,t,1,s)}}),zh(t,1)}};ch=function(t){if(t.tag===13){var e=un(t,134217728);if(e!==null){var r=St();wr(e,t,134217728,r)}zh(t,134217728)}};Cy=function(t){if(t.tag===13){var e=Yn(t),r=un(t,e);if(r!==null){var n=St();wr(r,t,e,n)}zh(t,e)}};Ty=function(){return Pe};Py=function(t,e){var r=Pe;try{return Pe=t,e()}finally{Pe=r}};Ad=function(t,e,r){switch(e){case"input":if(bd(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=Ac(n);if(!s)throw Error($(90));iy(n),bd(n,s)}}}break;case"textarea":ay(t,r);break;case"select":e=r.value,e!=null&&Si(t,!!r.multiple,e,!1)}};py=Mh;my=Fs;var xk={usingClientEntryPoint:!1,Events:[Ta,gi,Ac,fy,hy,Mh]},wo={findFiberByHostInstance:Ss,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_k={bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=yy(t),t===null?null:t.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||yk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rl.isDisabled&&rl.supportsFiber)try{Ec=rl.inject(_k),$r=rl}catch{}}Ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xk;Ht.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bh(e))throw Error($(200));return vk(t,e,null,r)};Ht.createRoot=function(t,e){if(!Bh(t))throw Error($(299));var r=!1,n="",s=Z0;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Uh(t,1,!1,null,null,r,!1,n,s),t[cn]=e.current,sa(t.nodeType===8?t.parentNode:t),new Vh(e)};Ht.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error($(188)):(t=Object.keys(t).join(","),Error($(268,t)));return t=yy(e),t=t===null?null:t.stateNode,t};Ht.flushSync=function(t){return Fs(t)};Ht.hydrate=function(t,e,r){if(!$c(e))throw Error($(200));return Fc(null,t,e,!0,r)};Ht.hydrateRoot=function(t,e,r){if(!Bh(t))throw Error($(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Z0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=Q0(e,null,t,1,r??null,s,!1,i,o),t[cn]=e.current,sa(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new Dc(e)};Ht.render=function(t,e,r){if(!$c(e))throw Error($(200));return Fc(null,t,e,!1,r)};Ht.unmountComponentAtNode=function(t){if(!$c(t))throw Error($(40));return t._reactRootContainer?(Fs(function(){Fc(null,null,t,!1,function(){t._reactRootContainer=null,t[cn]=null})}),!0):!1};Ht.unstable_batchedUpdates=Mh;Ht.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!$c(r))throw Error($(200));if(t==null||t._reactInternals===void 0)throw Error($(38));return Fc(t,e,r,!1,n)};Ht.version="18.3.1-next-f1338f8080-20240426";function Y0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Y0)}catch(t){console.error(t)}}Y0(),Yv.exports=Ht;var Ks=Yv.exports;const J0=Fv(Ks);var X0,Bm=Ks;X0=Bm.createRoot,Bm.hydrateRoot;const bk=1,Sk=1e6;let Ku=0;function kk(){return Ku=(Ku+1)%Number.MAX_SAFE_INTEGER,Ku.toString()}const Gu=new Map,Wm=t=>{if(Gu.has(t))return;const e=setTimeout(()=>{Gu.delete(t),Vo({type:"REMOVE_TOAST",toastId:t})},Sk);Gu.set(t,e)},Ek=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,bk)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?Wm(r):t.toasts.forEach(n=>{Wm(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},Pl=[];let Al={toasts:[]};function Vo(t){Al=Ek(Al,t),Pl.forEach(e=>{e(Al)})}function Ck({...t}){const e=kk(),r=s=>Vo({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Vo({type:"DISMISS_TOAST",toastId:e});return Vo({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function Tk(){const[t,e]=w.useState(Al);return w.useEffect(()=>(Pl.push(e),()=>{const r=Pl.indexOf(e);r>-1&&Pl.splice(r,1)}),[t]),{...t,toast:Ck,dismiss:r=>Vo({type:"DISMISS_TOAST",toastId:r})}}function fe(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Hm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ew(...t){return e=>{let r=!1;const n=t.map(s=>{const i=Hm(s,e);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():Hm(t[s],null)}}}}function ze(...t){return w.useCallback(ew(...t),t)}function Gs(t,e=[]){let r=[];function n(i,o){const a=w.createContext(o),l=r.length;r=[...r,o];const c=d=>{var y;const{scope:f,children:p,..._}=d,m=((y=f==null?void 0:f[t])==null?void 0:y[l])||a,x=w.useMemo(()=>_,Object.values(_));return g.jsx(m.Provider,{value:x,children:p})};c.displayName=i+"Provider";function u(d,f){var m;const p=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,_=w.useContext(p);if(_)return _;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=r.map(o=>w.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return w.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,Pk(s,...e)]}function Pk(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ha(t){const e=Ak(t),r=w.forwardRef((n,s)=>{const{children:i,...o}=n,a=w.Children.toArray(i),l=a.find(Nk);if(l){const c=l.props.children,u=a.map(d=>d===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:d);return g.jsx(e,{...o,ref:s,children:w.isValidElement(c)?w.cloneElement(c,void 0,u):null})}return g.jsx(e,{...o,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var tw=ha("Slot");function Ak(t){const e=w.forwardRef((r,n)=>{const{children:s,...i}=r;if(w.isValidElement(s)){const o=Ok(s),a=jk(i,s.props);return s.type!==w.Fragment&&(a.ref=n?ew(n,o):o),w.cloneElement(s,a)}return w.Children.count(s)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var rw=Symbol("radix.slottable");function Rk(t){const e=({children:r})=>g.jsx(g.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=rw,e}function Nk(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===rw}function jk(t,e){const r={...e};for(const n in e){const s=t[n],i=e[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{...t,...r}}function Ok(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Wh(t){const e=t+"CollectionProvider",[r,n]=Gs(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:x,children:y}=m,h=P.useRef(null),v=P.useRef(new Map).current;return g.jsx(s,{scope:x,itemMap:v,collectionRef:h,children:y})};o.displayName=e;const a=t+"CollectionSlot",l=ha(a),c=P.forwardRef((m,x)=>{const{scope:y,children:h}=m,v=i(a,y),b=ze(x,v.collectionRef);return g.jsx(l,{ref:b,children:h})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=ha(u),p=P.forwardRef((m,x)=>{const{scope:y,children:h,...v}=m,b=P.useRef(null),S=ze(x,b),C=i(u,y);return P.useEffect(()=>(C.itemMap.set(b,{ref:b,...v}),()=>void C.itemMap.delete(b))),g.jsx(f,{[d]:"",ref:S,children:h})});p.displayName=u;function _(m){const x=i(t+"CollectionConsumer",m);return P.useCallback(()=>{const h=x.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((C,E)=>v.indexOf(C.ref.current)-v.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},_,n]}var Ik=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xe=Ik.reduce((t,e)=>{const r=ha(`Primitive.${e}`),n=w.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function nw(t,e){t&&Ks.flushSync(()=>t.dispatchEvent(e))}function _r(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function Lk(t,e=globalThis==null?void 0:globalThis.document){const r=_r(t);w.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var Mk="DismissableLayer",cf="dismissableLayer.update",Dk="dismissableLayer.pointerDownOutside",$k="dismissableLayer.focusOutside",qm,sw=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Uc=w.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=w.useContext(sw),[u,d]=w.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),_=ze(e,E=>d(E)),m=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),h=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,b=h>=y,S=Uk(E=>{const j=E.target,M=[...c.branches].some(D=>D.contains(j));!b||M||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),C=zk(E=>{const j=E.target;[...c.branches].some(D=>D.contains(j))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return Lk(E=>{h===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),w.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(qm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Km(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=qm)}},[u,f,r,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Km())},[u,c]),w.useEffect(()=>{const E=()=>p({});return document.addEventListener(cf,E),()=>document.removeEventListener(cf,E)},[]),g.jsx(xe.div,{...l,ref:_,style:{pointerEvents:v?b?"auto":"none":void 0,...t.style},onFocusCapture:fe(t.onFocusCapture,C.onFocusCapture),onBlurCapture:fe(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:fe(t.onPointerDownCapture,S.onPointerDownCapture)})});Uc.displayName=Mk;var Fk="DismissableLayerBranch",iw=w.forwardRef((t,e)=>{const r=w.useContext(sw),n=w.useRef(null),s=ze(e,n);return w.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),g.jsx(xe.div,{...t,ref:s})});iw.displayName=Fk;function Uk(t,e=globalThis==null?void 0:globalThis.document){const r=_r(t),n=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){ow(Dk,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function zk(t,e=globalThis==null?void 0:globalThis.document){const r=_r(t),n=w.useRef(!1);return w.useEffect(()=>{const s=i=>{i.target&&!n.current&&ow($k,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Km(){const t=new CustomEvent(cf);document.dispatchEvent(t)}function ow(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?nw(s,i):s.dispatchEvent(i)}var Vk=Uc,Bk=iw,at=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Wk="Portal",Hh=w.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,i]=w.useState(!1);at(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?J0.createPortal(g.jsx(xe.div,{...n,ref:e}),o):null});Hh.displayName=Wk;function Hk(t,e){return w.useReducer((r,n)=>e[r][n]??r,t)}var zc=t=>{const{present:e,children:r}=t,n=qk(e),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),i=ze(n.ref,Kk(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:i}):null};zc.displayName="Presence";function qk(t){const[e,r]=w.useState(),n=w.useRef(null),s=w.useRef(t),i=w.useRef("none"),o=t?"mounted":"unmounted",[a,l]=Hk(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=nl(n.current);i.current=a==="mounted"?c:"none"},[a]),at(()=>{const c=n.current,u=s.current;if(u!==t){const f=i.current,p=nl(c);t?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),at(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=p=>{const m=nl(n.current).includes(p.animationName);if(p.target===e&&m&&(l("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},f=p=>{p.target===e&&(i.current=nl(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function nl(t){return(t==null?void 0:t.animationName)||"none"}function Kk(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Gk=Xf[" useInsertionEffect ".trim().toString()]||at;function Gi({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,o]=Qk({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const u=w.useRef(t!==void 0);w.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"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.`),u.current=a},[a,n])}const c=w.useCallback(u=>{var d;if(a){const f=Zk(u)?u(t):u;f!==t&&((d=o.current)==null||d.call(o,f))}else i(u)},[a,t,i,o]);return[l,c]}function Qk({defaultProp:t,onChange:e}){const[r,n]=w.useState(t),s=w.useRef(r),i=w.useRef(e);return Gk(()=>{i.current=e},[e]),w.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function Zk(t){return typeof t=="function"}var aw=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"}),Yk="VisuallyHidden",Vc=w.forwardRef((t,e)=>g.jsx(xe.span,{...t,ref:e,style:{...aw,...t.style}}));Vc.displayName=Yk;var Jk=Vc,qh="ToastProvider",[Kh,Xk,eE]=Wh("Toast"),[lw,AI]=Gs("Toast",[eE]),[tE,Bc]=lw(qh),cw=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=w.useState(null),[c,u]=w.useState(0),d=w.useRef(!1),f=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${qh}\`. Expected non-empty \`string\`.`),g.jsx(Kh.Provider,{scope:e,children:g.jsx(tE,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:w.useCallback(()=>u(p=>p+1),[]),onToastRemove:w.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};cw.displayName=qh;var uw="ToastViewport",rE=["F8"],uf="toast.viewportPause",df="toast.viewportResume",dw=w.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=rE,label:s="Notifications ({hotkey})",...i}=t,o=Bc(uw,r),a=Xk(r),l=w.useRef(null),c=w.useRef(null),u=w.useRef(null),d=w.useRef(null),f=ze(e,d,o.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;w.useEffect(()=>{const x=y=>{var v;n.length!==0&&n.every(b=>y[b]||y.code===b)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),w.useEffect(()=>{const x=l.current,y=d.current;if(_&&x&&y){const h=()=>{if(!o.isClosePausedRef.current){const C=new CustomEvent(uf);y.dispatchEvent(C),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const C=new CustomEvent(df);y.dispatchEvent(C),o.isClosePausedRef.current=!1}},b=C=>{!x.contains(C.relatedTarget)&&v()},S=()=>{x.contains(document.activeElement)||v()};return x.addEventListener("focusin",h),x.addEventListener("focusout",b),x.addEventListener("pointermove",h),x.addEventListener("pointerleave",S),window.addEventListener("blur",h),window.addEventListener("focus",v),()=>{x.removeEventListener("focusin",h),x.removeEventListener("focusout",b),x.removeEventListener("pointermove",h),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",h),window.removeEventListener("focus",v)}}},[_,o.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:x})=>{const h=a().map(v=>{const b=v.ref.current,S=[b,...mE(b)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?h.reverse():h).flat()},[a]);return w.useEffect(()=>{const x=d.current;if(x){const y=h=>{var S,C,E;const v=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!v){const j=document.activeElement,M=h.shiftKey;if(h.target===x&&M){(S=c.current)==null||S.focus();return}const I=m({tabbingDirection:M?"backwards":"forwards"}),W=I.findIndex(L=>L===j);Qu(I.slice(W+1))?h.preventDefault():M?(C=c.current)==null||C.focus():(E=u.current)==null||E.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,m]),g.jsxs(Bk,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&g.jsx(ff,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});Qu(x)}}),g.jsx(Kh.Slot,{scope:r,children:g.jsx(xe.ol,{tabIndex:-1,...i,ref:f})}),_&&g.jsx(ff,{ref:u,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});Qu(x)}})]})});dw.displayName=uw;var fw="ToastFocusProxy",ff=w.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Bc(fw,r);return g.jsx(Vc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});ff.displayName=fw;var Aa="Toast",nE="toast.swipeStart",sE="toast.swipeMove",iE="toast.swipeCancel",oE="toast.swipeEnd",hw=w.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Gi({prop:n,defaultProp:s??!0,onChange:i,caller:Aa});return g.jsx(zc,{present:r||a,children:g.jsx(cE,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:_r(t.onPause),onResume:_r(t.onResume),onSwipeStart:fe(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:fe(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:fe(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:fe(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});hw.displayName=Aa;var[aE,lE]=lw(Aa,{onClose(){}}),cE=w.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,..._}=t,m=Bc(Aa,r),[x,y]=w.useState(null),h=ze(e,L=>y(L)),v=w.useRef(null),b=w.useRef(null),S=s||m.duration,C=w.useRef(0),E=w.useRef(S),j=w.useRef(0),{onToastAdd:M,onToastRemove:D}=m,Q=_r(()=>{var X;(x==null?void 0:x.contains(document.activeElement))&&((X=m.viewport)==null||X.focus()),o()}),I=w.useCallback(L=>{!L||L===1/0||(window.clearTimeout(j.current),C.current=new Date().getTime(),j.current=window.setTimeout(Q,L))},[Q]);w.useEffect(()=>{const L=m.viewport;if(L){const X=()=>{I(E.current),c==null||c()},K=()=>{const J=new Date().getTime()-C.current;E.current=E.current-J,window.clearTimeout(j.current),l==null||l()};return L.addEventListener(uf,K),L.addEventListener(df,X),()=>{L.removeEventListener(uf,K),L.removeEventListener(df,X)}}},[m.viewport,S,l,c,I]),w.useEffect(()=>{i&&!m.isClosePausedRef.current&&I(S)},[i,S,m.isClosePausedRef,I]),w.useEffect(()=>(M(),()=>D()),[M,D]);const W=w.useMemo(()=>x?xw(x):null,[x]);return m.viewport?g.jsxs(g.Fragment,{children:[W&&g.jsx(uE,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),g.jsx(aE,{scope:r,onClose:Q,children:Ks.createPortal(g.jsx(Kh.ItemSlot,{scope:r,children:g.jsx(Vk,{asChild:!0,onEscapeKeyDown:fe(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||Q(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(xe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,..._,ref:h,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:fe(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,Q()))}),onPointerDown:fe(t.onPointerDown,L=>{L.button===0&&(v.current={x:L.clientX,y:L.clientY})}),onPointerMove:fe(t.onPointerMove,L=>{if(!v.current)return;const X=L.clientX-v.current.x,K=L.clientY-v.current.y,J=!!b.current,A=["left","right"].includes(m.swipeDirection),N=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,V=A?N(0,X):0,ne=A?0:N(0,K),re=L.pointerType==="touch"?10:2,ie={x:V,y:ne},se={originalEvent:L,delta:ie};J?(b.current=ie,sl(sE,d,se,{discrete:!1})):Gm(ie,m.swipeDirection,re)?(b.current=ie,sl(nE,u,se,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(X)>re||Math.abs(K)>re)&&(v.current=null)}),onPointerUp:fe(t.onPointerUp,L=>{const X=b.current,K=L.target;if(K.hasPointerCapture(L.pointerId)&&K.releasePointerCapture(L.pointerId),b.current=null,v.current=null,X){const J=L.currentTarget,A={originalEvent:L,delta:X};Gm(X,m.swipeDirection,m.swipeThreshold)?sl(oE,p,A,{discrete:!0}):sl(iE,f,A,{discrete:!0}),J.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),uE=t=>{const{__scopeToast:e,children:r,...n}=t,s=Bc(Aa,e),[i,o]=w.useState(!1),[a,l]=w.useState(!1);return hE(()=>o(!0)),w.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:g.jsx(Hh,{asChild:!0,children:g.jsx(Vc,{...n,children:i&&g.jsxs(g.Fragment,{children:[s.label," ",r]})})})},dE="ToastTitle",pw=w.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return g.jsx(xe.div,{...n,ref:e})});pw.displayName=dE;var fE="ToastDescription",mw=w.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return g.jsx(xe.div,{...n,ref:e})});mw.displayName=fE;var gw="ToastAction",vw=w.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?g.jsx(ww,{altText:r,asChild:!0,children:g.jsx(Gh,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${gw}\`. Expected non-empty \`string\`.`),null)});vw.displayName=gw;var yw="ToastClose",Gh=w.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=lE(yw,r);return g.jsx(ww,{asChild:!0,children:g.jsx(xe.button,{type:"button",...n,ref:e,onClick:fe(t.onClick,s.onClose)})})});Gh.displayName=yw;var ww=w.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return g.jsx(xe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function xw(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),pE(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&&e.push(o)}else e.push(...xw(n))}}),e}function sl(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?nw(s,i):s.dispatchEvent(i)}var Gm=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function hE(t=()=>{}){const e=_r(t);at(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function pE(t){return t.nodeType===t.ELEMENT_NODE}function mE(t){const e=[],r=document.createTreeWalker(t,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();)e.push(r.currentNode);return e}function Qu(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var gE=cw,_w=dw,bw=hw,Sw=pw,kw=mw,Ew=vw,Cw=Gh;function Tw(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Tw(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Pw(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Tw(t))&&(n&&(n+=" "),n+=e);return n}const Qm=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Zm=Pw,Qh=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Zm(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=r==null?void 0:r[c],d=i==null?void 0:i[c];if(u===null)return null;const f=Qm(u)||Qm(d);return s[c][f]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(_=>{let[m,x]=_;return Array.isArray(x)?x.includes({...i,...a}[m]):{...i,...a}[m]===x})?[...c,d,f]:c},[]);return Zm(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Aw=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var yE={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"};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wE=w.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>w.createElement("svg",{ref:l,...yE,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Aw("lucide",s),...a},[...o.map(([c,u])=>w.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lt=(t,e)=>{const r=w.forwardRef(({className:n,...s},i)=>w.createElement(wE,{ref:i,iconNode:e,className:Aw(`lucide-${vE(t)}`,n),...s}));return r.displayName=`${t}`,r};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xE=lt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zh=lt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _E=lt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bE=lt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SE=lt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kE=lt("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const EE=lt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rw=lt("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Yh=lt("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CE=lt("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TE=lt("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nw=lt("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PE=lt("Plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AE=lt("Shield",[["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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RE=lt("Ship",[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NE=lt("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jE=lt("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jw=lt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Jh="-",OE=t=>{const e=LE(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(Jh);return a[0]===""&&a.length!==1&&a.shift(),Ow(a,e)||IE(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Ow=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Ow(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Jh);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Ym=/^\[(.+)\]$/,IE=t=>{if(Ym.test(t)){const e=Ym.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},LE=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return DE(Object.entries(t.classGroups),r).forEach(([i,o])=>{hf(o,n,i,e)}),n},hf=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Jm(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(ME(s)){hf(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{hf(o,Jm(e,i),r,n)})})},Jm=(t,e)=>{let r=t;return e.split(Jh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},ME=t=>t.isThemeGetter,DE=(t,e)=>e?t.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[r,s]}):t,$E=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),e++,e>t&&(e=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)}}},Iw="!",FE=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let x=0;x<a.length;x++){let y=a[x];if(c===0){if(y===s&&(n||a.slice(x,x+i)===e)){l.push(a.slice(u,x)),u=x+i;continue}if(y==="/"){d=x;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?a:a.substring(u),p=f.startsWith(Iw),_=p?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:_,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},UE=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},zE=t=>({cache:$E(t.cacheSize),parseClassName:FE(t),...OE(t)}),VE=/\s+/,BE=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(VE);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c);let _=!!p,m=n(_?f.substring(0,p):f);if(!m){if(!_){a=c+(a.length>0?" "+a:a);continue}if(m=n(f),!m){a=c+(a.length>0?" "+a:a);continue}_=!1}const x=UE(u).join(":"),y=d?x+Iw:x,h=y+m;if(i.includes(h))continue;i.push(h);const v=s(m,_);for(let b=0;b<v.length;++b){const S=v[b];i.push(y+S)}a=c+(a.length>0?" "+a:a)}return a};function WE(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Lw(e))&&(n&&(n+=" "),n+=r);return n}const Lw=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Lw(t[n]))&&(r&&(r+=" "),r+=e);return r};function HE(t,...e){let r,n,s,i=o;function o(l){const c=e.reduce((u,d)=>d(u),t());return r=zE(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=BE(l,r);return s(l,u),u}return function(){return i(WE.apply(null,arguments))}}const Le=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Mw=/^\[(?:([a-z-]+):)?(.+)\]$/i,qE=/^\d+\/\d+$/,KE=new Set(["px","full","screen"]),GE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QE=/\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$/,ZE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,YE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gr=t=>Ai(t)||KE.has(t)||qE.test(t),xn=t=>io(t,"length",oC),Ai=t=>!!t&&!Number.isNaN(Number(t)),Zu=t=>io(t,"number",Ai),xo=t=>!!t&&Number.isInteger(Number(t)),XE=t=>t.endsWith("%")&&Ai(t.slice(0,-1)),de=t=>Mw.test(t),_n=t=>GE.test(t),eC=new Set(["length","size","percentage"]),tC=t=>io(t,eC,Dw),rC=t=>io(t,"position",Dw),nC=new Set(["image","url"]),sC=t=>io(t,nC,lC),iC=t=>io(t,"",aC),_o=()=>!0,io=(t,e,r)=>{const n=Mw.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},oC=t=>QE.test(t)&&!ZE.test(t),Dw=()=>!1,aC=t=>YE.test(t),lC=t=>JE.test(t),cC=()=>{const t=Le("colors"),e=Le("spacing"),r=Le("blur"),n=Le("brightness"),s=Le("borderColor"),i=Le("borderRadius"),o=Le("borderSpacing"),a=Le("borderWidth"),l=Le("contrast"),c=Le("grayscale"),u=Le("hueRotate"),d=Le("invert"),f=Le("gap"),p=Le("gradientColorStops"),_=Le("gradientColorStopPositions"),m=Le("inset"),x=Le("margin"),y=Le("opacity"),h=Le("padding"),v=Le("saturate"),b=Le("scale"),S=Le("sepia"),C=Le("skew"),E=Le("space"),j=Le("translate"),M=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",de,e],I=()=>[de,e],W=()=>["",Gr,xn],L=()=>["auto",Ai,de],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",de],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ne=()=>[Ai,de];return{cacheSize:500,separator:":",theme:{colors:[_o],spacing:[Gr,xn],blur:["none","",_n,de],brightness:ne(),borderColor:[t],borderRadius:["none","","full",_n,de],borderSpacing:I(),borderWidth:W(),contrast:ne(),grayscale:N(),hueRotate:ne(),invert:N(),gap:I(),gradientColorStops:[t],gradientColorStopPositions:[XE,xn],inset:Q(),margin:Q(),opacity:ne(),padding:I(),saturate:ne(),scale:ne(),sepia:N(),skew:ne(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",de]}],container:["container"],columns:[{columns:[_n]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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(),de]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xo,de]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",de]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",xo,de]}],"grid-cols":[{"grid-cols":[_o]}],"col-start-end":[{col:["auto",{span:["full",xo,de]},de]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[_o]}],"row-start-end":[{row:["auto",{span:[xo,de]},de]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",de]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",de]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",de,e]}],"min-w":[{"min-w":[de,e,"min","max","fit"]}],"max-w":[{"max-w":[de,e,"none","full","min","max","fit","prose",{screen:[_n]},_n]}],h:[{h:[de,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[de,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[de,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[de,e,"auto","min","max","fit"]}],"font-size":[{text:["base",_n,xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zu]}],"font-family":[{font:[_o]}],"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",de]}],"line-clamp":[{"line-clamp":["none",Ai,Zu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gr,de]}],"list-image":[{"list-image":["none",de]}],"list-style-type":[{list:["none","disc","decimal",de]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gr,xn]}],"underline-offset":[{"underline-offset":["auto",Gr,de]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de]}],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",de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),rC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sC]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:K()}],"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:["",...K()]}],"outline-offset":[{"outline-offset":[Gr,de]}],"outline-w":[{outline:[Gr,xn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Gr,xn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",_n,iC]}],"shadow-color":[{shadow:[_o]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",_n,de]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",de]}],duration:[{duration:ne()}],ease:[{ease:["linear","in","out","in-out",de]}],delay:[{delay:ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",de]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[xo,de]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",de]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",de]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Gr,xn,Zu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},uC=HE(cC);function Ce(...t){return uC(Pw(t))}const dC=gE,$w=w.forwardRef(({className:t,...e},r)=>g.jsx(_w,{ref:r,className:Ce("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));$w.displayName=_w.displayName;const fC=Qh("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"}}),Fw=w.forwardRef(({className:t,variant:e,...r},n)=>g.jsx(bw,{ref:n,className:Ce(fC({variant:e}),t),...r}));Fw.displayName=bw.displayName;const hC=w.forwardRef(({className:t,...e},r)=>g.jsx(Ew,{ref:r,className:Ce("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",t),...e}));hC.displayName=Ew.displayName;const Uw=w.forwardRef(({className:t,...e},r)=>g.jsx(Cw,{ref:r,className:Ce("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",t),"toast-close":"",...e,children:g.jsx(jw,{className:"h-4 w-4"})}));Uw.displayName=Cw.displayName;const zw=w.forwardRef(({className:t,...e},r)=>g.jsx(Sw,{ref:r,className:Ce("text-sm font-semibold",t),...e}));zw.displayName=Sw.displayName;const Vw=w.forwardRef(({className:t,...e},r)=>g.jsx(kw,{ref:r,className:Ce("text-sm opacity-90",t),...e}));Vw.displayName=kw.displayName;function pC(){const{toasts:t}=Tk();return g.jsxs(dC,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return g.jsxs(Fw,{...i,children:[g.jsxs("div",{className:"grid gap-1",children:[r&&g.jsx(zw,{children:r}),n&&g.jsx(Vw,{children:n})]}),s,g.jsx(Uw,{})]},e)}),g.jsx($w,{})]})}var Xm=["light","dark"],mC="(prefers-color-scheme: dark)",gC=w.createContext(void 0),vC={setTheme:t=>{},themes:[]},yC=()=>{var t;return(t=w.useContext(gC))!=null?t:vC};w.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(_=>`'${_}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?Xm.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(_,m=!1,x=!0)=>{let y=o?o[_]:_,h=m?_+"|| ''":`'${y}'`,v="";return s&&x&&!m&&Xm.includes(_)&&(v+=`d.style.colorScheme = '${_}';`),r==="class"?m||y?v+=`c.add(${h})`:v+="null":y&&(v+=`d[s](n,${h})`),v},p=t?`!function(){${u}${f(t)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${mC}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${c?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return w.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var wC=t=>{switch(t){case"success":return bC;case"info":return kC;case"warning":return SC;case"error":return EC;default:return null}},xC=Array(12).fill(0),_C=({visible:t,className:e})=>P.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},P.createElement("div",{className:"sonner-spinner"},xC.map((r,n)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),bC=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),SC=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.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"})),kC=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),EC=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),CC=P.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"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),TC=()=>{let[t,e]=P.useState(document.hidden);return P.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},pf=1,PC=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:pf++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:r}),{...a,...t,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],P.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(RC(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||pf++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},At=new PC,AC=(t,e)=>{let r=(e==null?void 0:e.id)||pf++;return At.addToast({title:t,...e,id:r}),r},RC=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",NC=AC,jC=()=>At.toasts,OC=()=>At.getActiveToasts(),eg=Object.assign(NC,{success:At.success,info:At.info,warning:At.warning,error:At.error,custom:At.custom,message:At.message,promise:At.promise,dismiss:At.dismiss,loading:At.loading},{getHistory:jC,getToasts:OC});function IC(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}IC(`: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;left: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}: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%);--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%)} `);function il(t){return t.label!==void 0}var LC=3,MC="32px",DC="16px",tg=4e3,$C=356,FC=14,UC=20,zC=200;function or(...t){return t.filter(Boolean).join(" ")}function VC(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var BC=t=>{var e,r,n,s,i,o,a,l,c,u,d;let{invert:f,toast:p,unstyled:_,interacting:m,setHeights:x,visibleToasts:y,heights:h,index:v,toasts:b,expanded:S,removeToast:C,defaultRichColors:E,closeButton:j,style:M,cancelButtonStyle:D,actionButtonStyle:Q,className:I="",descriptionClassName:W="",duration:L,position:X,gap:K,loadingIcon:J,expandByDefault:A,classNames:N,icons:V,closeButtonAriaLabel:ne="Close toast",pauseWhenPageIsHidden:re}=t,[ie,se]=P.useState(null),[Ae,$e]=P.useState(null),[H,Se]=P.useState(!1),[je,ye]=P.useState(!1),[ge,we]=P.useState(!1),[nt,yt]=P.useState(!1),[Er,Cr]=P.useState(!1),[Wr,Zs]=P.useState(0),[Hr,k]=P.useState(0),T=P.useRef(p.duration||L||tg),R=P.useRef(null),B=P.useRef(null),z=v===0,U=v+1<=y,Z=p.type,ve=p.dismissible!==!1,Re=p.className||"",Ct=p.descriptionClassName||"",qr=P.useMemo(()=>h.findIndex(le=>le.toastId===p.id)||0,[h,p.id]),Tr=P.useMemo(()=>{var le;return(le=p.closeButton)!=null?le:j},[p.closeButton,j]),Ma=P.useMemo(()=>p.duration||L||tg,[p.duration,L]),fs=P.useRef(0),Pr=P.useRef(0),Da=P.useRef(0),Kr=P.useRef(null),[yu,$a]=X.split("-"),jp=P.useMemo(()=>h.reduce((le,Ne,Fe)=>Fe>=qr?le:le+Ne.height,0),[h,qr]),Op=TC(),Kb=p.invert||f,wu=Z==="loading";Pr.current=P.useMemo(()=>qr*K+jp,[qr,jp]),P.useEffect(()=>{T.current=Ma},[Ma]),P.useEffect(()=>{Se(!0)},[]),P.useEffect(()=>{let le=B.current;if(le){let Ne=le.getBoundingClientRect().height;return k(Ne),x(Fe=>[{toastId:p.id,height:Ne,position:p.position},...Fe]),()=>x(Fe=>Fe.filter(rr=>rr.toastId!==p.id))}},[x,p.id]),P.useLayoutEffect(()=>{if(!H)return;let le=B.current,Ne=le.style.height;le.style.height="auto";let Fe=le.getBoundingClientRect().height;le.style.height=Ne,k(Fe),x(rr=>rr.find(nr=>nr.toastId===p.id)?rr.map(nr=>nr.toastId===p.id?{...nr,height:Fe}:nr):[{toastId:p.id,height:Fe,position:p.position},...rr])},[H,p.title,p.description,x,p.id]);let gn=P.useCallback(()=>{ye(!0),Zs(Pr.current),x(le=>le.filter(Ne=>Ne.toastId!==p.id)),setTimeout(()=>{C(p)},zC)},[p,C,x,Pr]);P.useEffect(()=>{if(p.promise&&Z==="loading"||p.duration===1/0||p.type==="loading")return;let le;return S||m||re&&Op?(()=>{if(Da.current<fs.current){let Ne=new Date().getTime()-fs.current;T.current=T.current-Ne}Da.current=new Date().getTime()})():T.current!==1/0&&(fs.current=new Date().getTime(),le=setTimeout(()=>{var Ne;(Ne=p.onAutoClose)==null||Ne.call(p,p),gn()},T.current)),()=>clearTimeout(le)},[S,m,p,Z,re,Op,gn]),P.useEffect(()=>{p.delete&&gn()},[gn,p.delete]);function Gb(){var le,Ne,Fe;return V!=null&&V.loading?P.createElement("div",{className:or(N==null?void 0:N.loader,(le=p==null?void 0:p.classNames)==null?void 0:le.loader,"sonner-loader"),"data-visible":Z==="loading"},V.loading):J?P.createElement("div",{className:or(N==null?void 0:N.loader,(Ne=p==null?void 0:p.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":Z==="loading"},J):P.createElement(_C,{className:or(N==null?void 0:N.loader,(Fe=p==null?void 0:p.classNames)==null?void 0:Fe.loader),visible:Z==="loading"})}return P.createElement("li",{tabIndex:0,ref:B,className:or(I,Re,N==null?void 0:N.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,N==null?void 0:N.default,N==null?void 0:N[Z],(r=p==null?void 0:p.classNames)==null?void 0:r[Z]),"data-sonner-toast":"","data-rich-colors":(n=p.richColors)!=null?n:E,"data-styled":!(p.jsx||p.unstyled||_),"data-mounted":H,"data-promise":!!p.promise,"data-swiped":Er,"data-removed":je,"data-visible":U,"data-y-position":yu,"data-x-position":$a,"data-index":v,"data-front":z,"data-swiping":ge,"data-dismissible":ve,"data-type":Z,"data-invert":Kb,"data-swipe-out":nt,"data-swipe-direction":Ae,"data-expanded":!!(S||A&&H),style:{"--index":v,"--toasts-before":v,"--z-index":b.length-v,"--offset":`${je?Wr:Pr.current}px`,"--initial-height":A?"auto":`${Hr}px`,...M,...p.style},onDragEnd:()=>{we(!1),se(null),Kr.current=null},onPointerDown:le=>{wu||!ve||(R.current=new Date,Zs(Pr.current),le.target.setPointerCapture(le.pointerId),le.target.tagName!=="BUTTON"&&(we(!0),Kr.current={x:le.clientX,y:le.clientY}))},onPointerUp:()=>{var le,Ne,Fe,rr;if(nt||!ve)return;Kr.current=null;let nr=Number(((le=B.current)==null?void 0:le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((Ne=B.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),hs=new Date().getTime()-((Fe=R.current)==null?void 0:Fe.getTime()),sr=ie==="x"?nr:vn,yn=Math.abs(sr)/hs;if(Math.abs(sr)>=UC||yn>.11){Zs(Pr.current),(rr=p.onDismiss)==null||rr.call(p,p),$e(ie==="x"?nr>0?"right":"left":vn>0?"down":"up"),gn(),yt(!0),Cr(!1);return}we(!1),se(null)},onPointerMove:le=>{var Ne,Fe,rr,nr;if(!Kr.current||!ve||((Ne=window.getSelection())==null?void 0:Ne.toString().length)>0)return;let vn=le.clientY-Kr.current.y,hs=le.clientX-Kr.current.x,sr=(Fe=t.swipeDirections)!=null?Fe:VC(X);!ie&&(Math.abs(hs)>1||Math.abs(vn)>1)&&se(Math.abs(hs)>Math.abs(vn)?"x":"y");let yn={x:0,y:0};ie==="y"?(sr.includes("top")||sr.includes("bottom"))&&(sr.includes("top")&&vn<0||sr.includes("bottom")&&vn>0)&&(yn.y=vn):ie==="x"&&(sr.includes("left")||sr.includes("right"))&&(sr.includes("left")&&hs<0||sr.includes("right")&&hs>0)&&(yn.x=hs),(Math.abs(yn.x)>0||Math.abs(yn.y)>0)&&Cr(!0),(rr=B.current)==null||rr.style.setProperty("--swipe-amount-x",`${yn.x}px`),(nr=B.current)==null||nr.style.setProperty("--swipe-amount-y",`${yn.y}px`)}},Tr&&!p.jsx?P.createElement("button",{"aria-label":ne,"data-disabled":wu,"data-close-button":!0,onClick:wu||!ve?()=>{}:()=>{var le;gn(),(le=p.onDismiss)==null||le.call(p,p)},className:or(N==null?void 0:N.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=V==null?void 0:V.close)!=null?i:CC):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:P.createElement(P.Fragment,null,Z||p.icon||p.promise?P.createElement("div",{"data-icon":"",className:or(N==null?void 0:N.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Gb():null,p.type!=="loading"?p.icon||(V==null?void 0:V[Z])||wC(Z):null):null,P.createElement("div",{"data-content":"",className:or(N==null?void 0:N.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},P.createElement("div",{"data-title":"",className:or(N==null?void 0:N.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?P.createElement("div",{"data-description":"",className:or(W,Ct,N==null?void 0:N.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&il(p.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:le=>{var Ne,Fe;il(p.cancel)&&ve&&((Fe=(Ne=p.cancel).onClick)==null||Fe.call(Ne,le),gn())},className:or(N==null?void 0:N.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&il(p.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||Q,onClick:le=>{var Ne,Fe;il(p.action)&&((Fe=(Ne=p.action).onClick)==null||Fe.call(Ne,le),!le.defaultPrevented&&gn())},className:or(N==null?void 0:N.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function rg(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function WC(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?DC:MC;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=a:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var HC=w.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:p,visibleToasts:_=LC,toastOptions:m,dir:x=rg(),gap:y=FC,loadingIcon:h,icons:v,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:S}=t,[C,E]=P.useState([]),j=P.useMemo(()=>Array.from(new Set([n].concat(C.filter(re=>re.position).map(re=>re.position)))),[C,n]),[M,D]=P.useState([]),[Q,I]=P.useState(!1),[W,L]=P.useState(!1),[X,K]=P.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=P.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=P.useRef(null),V=P.useRef(!1),ne=P.useCallback(re=>{E(ie=>{var se;return(se=ie.find(Ae=>Ae.id===re.id))!=null&&se.delete||At.dismiss(re.id),ie.filter(({id:Ae})=>Ae!==re.id)})},[]);return P.useEffect(()=>At.subscribe(re=>{if(re.dismiss){E(ie=>ie.map(se=>se.id===re.id?{...se,delete:!0}:se));return}setTimeout(()=>{J0.flushSync(()=>{E(ie=>{let se=ie.findIndex(Ae=>Ae.id===re.id);return se!==-1?[...ie.slice(0,se),{...ie[se],...re},...ie.slice(se+1)]:[re,...ie]})})})}),[]),P.useEffect(()=>{if(u!=="system"){K(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:ie})=>{K(ie?"dark":"light")})}catch{re.addListener(({matches:se})=>{try{K(se?"dark":"light")}catch(Ae){console.error(Ae)}})}},[u]),P.useEffect(()=>{C.length<=1&&I(!1)},[C]),P.useEffect(()=>{let re=ie=>{var se,Ae;s.every($e=>ie[$e]||ie.code===$e)&&(I(!0),(se=J.current)==null||se.focus()),ie.code==="Escape"&&(document.activeElement===J.current||(Ae=J.current)!=null&&Ae.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[s]),P.useEffect(()=>{if(J.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,V.current=!1)}},[J.current]),P.createElement("section",{ref:e,"aria-label":`${b} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((re,ie)=>{var se;let[Ae,$e]=re.split("-");return C.length?P.createElement("ol",{key:re,dir:x==="auto"?rg():x,tabIndex:-1,ref:J,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":Ae,"data-lifted":Q&&C.length>1&&!i,"data-x-position":$e,style:{"--front-toast-height":`${((se=M[0])==null?void 0:se.height)||0}px`,"--width":`${$C}px`,"--gap":`${y}px`,...p,...WC(l,c)},onBlur:H=>{V.current&&!H.currentTarget.contains(H.relatedTarget)&&(V.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||V.current||(V.current=!0,N.current=H.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{W||I(!1)},onDragEnd:()=>I(!1),onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},C.filter(H=>!H.position&&ie===0||H.position===re).map((H,Se)=>{var je,ye;return P.createElement(BC,{key:H.id,icons:v,index:Se,toast:H,defaultRichColors:d,duration:(je=m==null?void 0:m.duration)!=null?je:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:_,closeButton:(ye=m==null?void 0:m.closeButton)!=null?ye:o,interacting:W,position:re,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:ne,toasts:C.filter(ge=>ge.position==H.position),heights:M.filter(ge=>ge.position==H.position),setHeights:D,expandByDefault:i,gap:y,loadingIcon:h,expanded:Q,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const qC=({...t})=>{const{theme:e="system"}=yC();return g.jsx(HC,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var KC=Xf[" useId ".trim().toString()]||(()=>{}),GC=0;function Ra(t){const[e,r]=w.useState(KC());return at(()=>{r(n=>n??String(GC++))},[t]),e?`radix-${e}`:""}const QC=["top","right","bottom","left"],rs=Math.min,Ft=Math.max,sc=Math.round,ol=Math.floor,Ur=t=>({x:t,y:t}),ZC={left:"right",right:"left",bottom:"top",top:"bottom"},YC={start:"end",end:"start"};function mf(t,e,r){return Ft(t,rs(e,r))}function fn(t,e){return typeof t=="function"?t(e):t}function hn(t){return t.split("-")[0]}function oo(t){return t.split("-")[1]}function Xh(t){return t==="x"?"y":"x"}function ep(t){return t==="y"?"height":"width"}const JC=new Set(["top","bottom"]);function Mr(t){return JC.has(hn(t))?"y":"x"}function tp(t){return Xh(Mr(t))}function XC(t,e,r){r===void 0&&(r=!1);const n=oo(t),s=tp(t),i=ep(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ic(o)),[o,ic(o)]}function eT(t){const e=ic(t);return[gf(t),e,gf(e)]}function gf(t){return t.replace(/start|end/g,e=>YC[e])}const ng=["left","right"],sg=["right","left"],tT=["top","bottom"],rT=["bottom","top"];function nT(t,e,r){switch(t){case"top":case"bottom":return r?e?sg:ng:e?ng:sg;case"left":case"right":return e?tT:rT;default:return[]}}function sT(t,e,r,n){const s=oo(t);let i=nT(hn(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(gf)))),i}function ic(t){return t.replace(/left|right|bottom|top/g,e=>ZC[e])}function iT(t){return{top:0,right:0,bottom:0,left:0,...t}}function Bw(t){return typeof t!="number"?iT(t):{top:t,right:t,bottom:t,left:t}}function oc(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function ig(t,e,r){let{reference:n,floating:s}=t;const i=Mr(e),o=tp(e),a=ep(o),l=hn(e),c=i==="y",u=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let p;switch(l){case"top":p={x:u,y:n.y-s.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-s.width,y:d};break;default:p={x:n.x,y:n.y}}switch(oo(e)){case"start":p[o]-=f*(r&&c?-1:1);break;case"end":p[o]+=f*(r&&c?-1:1);break}return p}const oT=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=ig(c,n,l),f=n,p={},_=0;for(let m=0;m<a.length;m++){const{name:x,fn:y}=a[m],{x:h,y:v,data:b,reset:S}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=h??u,d=v??d,p={...p,[x]:{...p[x],...b}},S&&_<=50&&(_++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:d}=ig(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:p}};async function pa(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=fn(e,t),_=Bw(p),x=a[f?d==="floating"?"reference":"floating":d],y=oc(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),h=d==="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},S=oc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:v,strategy:l}):h);return{top:(y.top-S.top+_.top)/b.y,bottom:(S.bottom-y.bottom+_.bottom)/b.y,left:(y.left-S.left+_.left)/b.x,right:(S.right-y.right+_.right)/b.x}}const aT=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=fn(t,e)||{};if(c==null)return{};const d=Bw(u),f={x:r,y:n},p=tp(s),_=ep(p),m=await o.getDimensions(c),x=p==="y",y=x?"top":"left",h=x?"bottom":"right",v=x?"clientHeight":"clientWidth",b=i.reference[_]+i.reference[p]-f[p]-i.floating[_],S=f[p]-i.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=C?C[v]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=a.floating[v]||i.floating[_]);const j=b/2-S/2,M=E/2-m[_]/2-1,D=rs(d[y],M),Q=rs(d[h],M),I=D,W=E-m[_]-Q,L=E/2-m[_]/2+j,X=mf(I,L,W),K=!l.arrow&&oo(s)!=null&&L!==X&&i.reference[_]/2-(L<I?D:Q)-m[_]/2<0,J=K?L<I?L-I:L-W:0;return{[p]:f[p]+J,data:{[p]:X,centerOffset:L-X-J,...K&&{alignmentOffset:J}},reset:K}}}),lT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:m=!0,...x}=fn(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=hn(s),h=Mr(a),v=hn(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(v||!m?[ic(a)]:eT(a)),C=_!=="none";!f&&C&&S.push(...sT(a,m,_,b));const E=[a,...S],j=await pa(e,x),M=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(j[y]),d){const L=XC(s,o,b);M.push(j[L[0]],j[L[1]])}if(D=[...D,{placement:s,overflows:M}],!M.every(L=>L<=0)){var Q,I;const L=(((Q=i.flip)==null?void 0:Q.index)||0)+1,X=E[L];if(X&&(!(d==="alignment"?h!==Mr(X):!1)||D.every(A=>A.overflows[0]>0&&Mr(A.placement)===h)))return{data:{index:L,overflows:D},reset:{placement:X}};let K=(I=D.filter(J=>J.overflows[0]<=0).sort((J,A)=>J.overflows[1]-A.overflows[1])[0])==null?void 0:I.placement;if(!K)switch(p){case"bestFit":{var W;const J=(W=D.filter(A=>{if(C){const N=Mr(A.placement);return N===h||N==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(N=>N>0).reduce((N,V)=>N+V,0)]).sort((A,N)=>A[1]-N[1])[0])==null?void 0:W[0];J&&(K=J);break}case"initialPlacement":K=a;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function og(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ag(t){return QC.some(e=>t[e]>=0)}const cT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=fn(t,e);switch(n){case"referenceHidden":{const i=await pa(e,{...s,elementContext:"reference"}),o=og(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ag(o)}}}case"escaped":{const i=await pa(e,{...s,altBoundary:!0}),o=og(i,r.floating);return{data:{escapedOffsets:o,escaped:ag(o)}}}default:return{}}}}},Ww=new Set(["left","top"]);async function uT(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=hn(r),a=oo(r),l=Mr(r)==="y",c=Ww.has(o)?-1:1,u=i&&l?-1:1,d=fn(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:_}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof _=="number"&&(p=a==="end"?_*-1:_),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const dT=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await uT(e,t);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}}}}},fT=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:y,y:h}=x;return{x:y,y:h}}},...l}=fn(t,e),c={x:r,y:n},u=await pa(e,l),d=Mr(hn(s)),f=Xh(d);let p=c[f],_=c[d];if(i){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",h=p+u[x],v=p-u[y];p=mf(h,p,v)}if(o){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",h=_+u[x],v=_-u[y];_=mf(h,_,v)}const m=a.fn({...e,[f]:p,[d]:_});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:i,[d]:o}}}}}},hT=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=fn(t,e),u={x:r,y:n},d=Mr(s),f=Xh(d);let p=u[f],_=u[d];const m=fn(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const v=f==="y"?"height":"width",b=i.reference[f]-i.floating[v]+x.mainAxis,S=i.reference[f]+i.reference[v]-x.mainAxis;p<b?p=b:p>S&&(p=S)}if(c){var y,h;const v=f==="y"?"width":"height",b=Ww.has(hn(s)),S=i.reference[d]-i.floating[v]+(b&&((y=o.offset)==null?void 0:y[d])||0)+(b?0:x.crossAxis),C=i.reference[d]+i.reference[v]+(b?0:((h=o.offset)==null?void 0:h[d])||0)-(b?x.crossAxis:0);_<S?_=S:_>C&&(_=C)}return{[f]:p,[d]:_}}}},pT=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=fn(t,e),u=await pa(e,c),d=hn(s),f=oo(s),p=Mr(s)==="y",{width:_,height:m}=i.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,x=f==="end"?"top":"bottom");const h=m-u.top-u.bottom,v=_-u.left-u.right,b=rs(m-u[x],h),S=rs(_-u[y],v),C=!e.middlewareData.shift;let E=b,j=S;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(j=v),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(E=h),C&&!f){const D=Ft(u.left,0),Q=Ft(u.right,0),I=Ft(u.top,0),W=Ft(u.bottom,0);p?j=_-2*(D!==0||Q!==0?D+Q:Ft(u.left,u.right)):E=m-2*(I!==0||W!==0?I+W:Ft(u.top,u.bottom))}await l({...e,availableWidth:j,availableHeight:E});const M=await o.getDimensions(a.floating);return _!==M.width||m!==M.height?{reset:{rects:!0}}:{}}}};function Wc(){return typeof window<"u"}function ao(t){return Hw(t)?(t.nodeName||"").toLowerCase():"#document"}function Vt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Br(t){var e;return(e=(Hw(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Hw(t){return Wc()?t instanceof Node||t instanceof Vt(t).Node:!1}function br(t){return Wc()?t instanceof Element||t instanceof Vt(t).Element:!1}function Vr(t){return Wc()?t instanceof HTMLElement||t instanceof Vt(t).HTMLElement:!1}function lg(t){return!Wc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Vt(t).ShadowRoot}const mT=new Set(["inline","contents"]);function Na(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Sr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!mT.has(s)}const gT=new Set(["table","td","th"]);function vT(t){return gT.has(ao(t))}const yT=[":popover-open",":modal"];function Hc(t){return yT.some(e=>{try{return t.matches(e)}catch{return!1}})}const wT=["transform","translate","scale","rotate","perspective"],xT=["transform","translate","scale","rotate","perspective","filter"],_T=["paint","layout","strict","content"];function rp(t){const e=np(),r=br(t)?Sr(t):t;return wT.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||xT.some(n=>(r.willChange||"").includes(n))||_T.some(n=>(r.contain||"").includes(n))}function bT(t){let e=ns(t);for(;Vr(e)&&!Qi(e);){if(rp(e))return e;if(Hc(e))return null;e=ns(e)}return null}function np(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ST=new Set(["html","body","#document"]);function Qi(t){return ST.has(ao(t))}function Sr(t){return Vt(t).getComputedStyle(t)}function qc(t){return br(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ns(t){if(ao(t)==="html")return t;const e=t.assignedSlot||t.parentNode||lg(t)&&t.host||Br(t);return lg(e)?e.host:e}function qw(t){const e=ns(t);return Qi(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vr(e)&&Na(e)?e:qw(e)}function ma(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=qw(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Vt(s);if(i){const a=vf(o);return e.concat(o,o.visualViewport||[],Na(s)?s:[],a&&r?ma(a):[])}return e.concat(s,ma(s,[],r))}function vf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kw(t){const e=Sr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Vr(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=sc(r)!==i||sc(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function sp(t){return br(t)?t:t.contextElement}function Ri(t){const e=sp(t);if(!Vr(e))return Ur(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=Kw(e);let o=(i?sc(r.width):r.width)/n,a=(i?sc(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const kT=Ur(0);function Gw(t){const e=Vt(t);return!np()||!e.visualViewport?kT:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ET(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Vt(t)?!1:e}function Us(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=sp(t);let o=Ur(1);e&&(n?br(n)&&(o=Ri(n)):o=Ri(t));const a=ET(i,r,n)?Gw(i):Ur(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const f=Vt(i),p=n&&br(n)?Vt(n):n;let _=f,m=vf(_);for(;m&&n&&p!==_;){const x=Ri(m),y=m.getBoundingClientRect(),h=Sr(m),v=y.left+(m.clientLeft+parseFloat(h.paddingLeft))*x.x,b=y.top+(m.clientTop+parseFloat(h.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=v,c+=b,_=Vt(m),m=vf(_)}}return oc({width:u,height:d,x:l,y:c})}function ip(t,e){const r=qc(t).scrollLeft;return e?e.left+r:Us(Br(t)).left+r}function Qw(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-(r?0:ip(t,n)),i=n.top+e.scrollTop;return{x:s,y:i}}function CT(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=Br(n),a=e?Hc(e.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Ur(1);const u=Ur(0),d=Vr(n);if((d||!d&&!i)&&((ao(n)!=="body"||Na(o))&&(l=qc(n)),Vr(n))){const p=Us(n);c=Ri(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const f=o&&!d&&!i?Qw(o,l,!0):Ur(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function TT(t){return Array.from(t.getClientRects())}function PT(t){const e=Br(t),r=qc(t),n=t.ownerDocument.body,s=Ft(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ft(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+ip(t);const a=-r.scrollTop;return Sr(n).direction==="rtl"&&(o+=Ft(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function AT(t,e){const r=Vt(t),n=Br(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=np();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const RT=new Set(["absolute","fixed"]);function NT(t,e){const r=Us(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Vr(t)?Ri(t):Ur(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function cg(t,e,r){let n;if(e==="viewport")n=AT(t,r);else if(e==="document")n=PT(Br(t));else if(br(e))n=NT(e,r);else{const s=Gw(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return oc(n)}function Zw(t,e){const r=ns(t);return r===e||!br(r)||Qi(r)?!1:Sr(r).position==="fixed"||Zw(r,e)}function jT(t,e){const r=e.get(t);if(r)return r;let n=ma(t,[],!1).filter(a=>br(a)&&ao(a)!=="body"),s=null;const i=Sr(t).position==="fixed";let o=i?ns(t):t;for(;br(o)&&!Qi(o);){const a=Sr(o),l=rp(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&RT.has(s.position)||Na(o)&&!l&&Zw(t,o))?n=n.filter(u=>u!==o):s=a,o=ns(o)}return e.set(t,n),n}function OT(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?Hc(e)?[]:jT(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const d=cg(e,u,s);return c.top=Ft(d.top,c.top),c.right=rs(d.right,c.right),c.bottom=rs(d.bottom,c.bottom),c.left=Ft(d.left,c.left),c},cg(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function IT(t){const{width:e,height:r}=Kw(t);return{width:e,height:r}}function LT(t,e,r){const n=Vr(e),s=Br(e),i=r==="fixed",o=Us(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Ur(0);function c(){l.x=ip(s)}if(n||!n&&!i)if((ao(e)!=="body"||Na(s))&&(a=qc(e)),n){const p=Us(e,!0,i,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else s&&c();i&&!n&&s&&c();const u=s&&!n&&!i?Qw(s,a):Ur(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Yu(t){return Sr(t).position==="static"}function ug(t,e){if(!Vr(t)||Sr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Br(t)===r&&(r=r.ownerDocument.body),r}function Yw(t,e){const r=Vt(t);if(Hc(t))return r;if(!Vr(t)){let s=ns(t);for(;s&&!Qi(s);){if(br(s)&&!Yu(s))return s;s=ns(s)}return r}let n=ug(t,e);for(;n&&vT(n)&&Yu(n);)n=ug(n,e);return n&&Qi(n)&&Yu(n)&&!rp(n)?r:n||bT(t)||r}const MT=async function(t){const e=this.getOffsetParent||Yw,r=this.getDimensions,n=await r(t.floating);return{reference:LT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function DT(t){return Sr(t).direction==="rtl"}const $T={convertOffsetParentRelativeRectToViewportRelativeRect:CT,getDocumentElement:Br,getClippingRect:OT,getOffsetParent:Yw,getElementRects:MT,getClientRects:TT,getDimensions:IT,getScale:Ri,isElement:br,isRTL:DT};function Jw(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function FT(t,e){let r=null,n;const s=Br(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||e(),!f||!p)return;const _=ol(d),m=ol(s.clientWidth-(u+f)),x=ol(s.clientHeight-(d+p)),y=ol(u),v={rootMargin:-_+"px "+-m+"px "+-x+"px "+-y+"px",threshold:Ft(0,rs(1,l))||1};let b=!0;function S(C){const E=C[0].intersectionRatio;if(E!==l){if(!b)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!Jw(c,t.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,v)}r.observe(t)}return o(!0),i}function UT(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=sp(t),u=s||i?[...c?ma(c):[],...ma(e)]:[];u.forEach(y=>{s&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const d=c&&a?FT(c,r):null;let f=-1,p=null;o&&(p=new ResizeObserver(y=>{let[h]=y;h&&h.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(e)})),r()}),c&&!l&&p.observe(c),p.observe(e));let _,m=l?Us(t):null;l&&x();function x(){const y=Us(t);m&&!Jw(m,y)&&r(),m=y,_=requestAnimationFrame(x)}return r(),()=>{var y;u.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(_)}}const zT=dT,VT=fT,BT=lT,WT=pT,HT=cT,dg=aT,qT=hT,KT=(t,e,r)=>{const n=new Map,s={platform:$T,...r},i={...s.platform,_c:n};return oT(t,e,{...s,platform:i})};var GT=typeof document<"u",QT=function(){},Rl=GT?w.useLayoutEffect:QT;function ac(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!ac(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!ac(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Xw(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function fg(t,e){const r=Xw(t);return Math.round(e*r)/r}function Ju(t){const e=w.useRef(t);return Rl(()=>{e.current=t}),e}function ZT(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=w.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(n);ac(f,n)||p(n);const[_,m]=w.useState(null),[x,y]=w.useState(null),h=w.useCallback(A=>{A!==C.current&&(C.current=A,m(A))},[]),v=w.useCallback(A=>{A!==E.current&&(E.current=A,y(A))},[]),b=i||_,S=o||x,C=w.useRef(null),E=w.useRef(null),j=w.useRef(u),M=l!=null,D=Ju(l),Q=Ju(s),I=Ju(c),W=w.useCallback(()=>{if(!C.current||!E.current)return;const A={placement:e,strategy:r,middleware:f};Q.current&&(A.platform=Q.current),KT(C.current,E.current,A).then(N=>{const V={...N,isPositioned:I.current!==!1};L.current&&!ac(j.current,V)&&(j.current=V,Ks.flushSync(()=>{d(V)}))})},[f,e,r,Q,I]);Rl(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const L=w.useRef(!1);Rl(()=>(L.current=!0,()=>{L.current=!1}),[]),Rl(()=>{if(b&&(C.current=b),S&&(E.current=S),b&&S){if(D.current)return D.current(b,S,W);W()}},[b,S,W,D,M]);const X=w.useMemo(()=>({reference:C,floating:E,setReference:h,setFloating:v}),[h,v]),K=w.useMemo(()=>({reference:b,floating:S}),[b,S]),J=w.useMemo(()=>{const A={position:r,left:0,top:0};if(!K.floating)return A;const N=fg(K.floating,u.x),V=fg(K.floating,u.y);return a?{...A,transform:"translate("+N+"px, "+V+"px)",...Xw(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:V}},[r,a,K.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:W,refs:X,elements:K,floatingStyles:J}),[u,W,X,K,J])}const YT=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?dg({element:n.current,padding:s}).fn(r):{}:n?dg({element:n,padding:s}).fn(r):{}}}},JT=(t,e)=>({...zT(t),options:[t,e]}),XT=(t,e)=>({...VT(t),options:[t,e]}),eP=(t,e)=>({...qT(t),options:[t,e]}),tP=(t,e)=>({...BT(t),options:[t,e]}),rP=(t,e)=>({...WT(t),options:[t,e]}),nP=(t,e)=>({...HT(t),options:[t,e]}),sP=(t,e)=>({...YT(t),options:[t,e]});var iP="Arrow",ex=w.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return g.jsx(xe.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});ex.displayName=iP;var oP=ex;function aP(t){const[e,r]=w.useState(void 0);return at(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var op="Popper",[tx,Kc]=Gs(op),[lP,rx]=tx(op),nx=t=>{const{__scopePopper:e,children:r}=t,[n,s]=w.useState(null);return g.jsx(lP,{scope:e,anchor:n,onAnchorChange:s,children:r})};nx.displayName=op;var sx="PopperAnchor",ix=w.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=rx(sx,r),o=w.useRef(null),a=ze(e,o);return w.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:g.jsx(xe.div,{...s,ref:a})});ix.displayName=sx;var ap="PopperContent",[cP,uP]=tx(ap),ox=w.forwardRef((t,e)=>{var H,Se,je,ye,ge,we;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:_,...m}=t,x=rx(ap,r),[y,h]=w.useState(null),v=ze(e,nt=>h(nt)),[b,S]=w.useState(null),C=aP(b),E=(C==null?void 0:C.width)??0,j=(C==null?void 0:C.height)??0,M=n+(i!=="center"?"-"+i:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},Q=Array.isArray(c)?c:[c],I=Q.length>0,W={padding:D,boundary:Q.filter(fP),altBoundary:I},{refs:L,floatingStyles:X,placement:K,isPositioned:J,middlewareData:A}=ZT({strategy:"fixed",placement:M,whileElementsMounted:(...nt)=>UT(...nt,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[JT({mainAxis:s+j,alignmentAxis:o}),l&&XT({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?eP():void 0,...W}),l&&tP({...W}),rP({...W,apply:({elements:nt,rects:yt,availableWidth:Er,availableHeight:Cr})=>{const{width:Wr,height:Zs}=yt.reference,Hr=nt.floating.style;Hr.setProperty("--radix-popper-available-width",`${Er}px`),Hr.setProperty("--radix-popper-available-height",`${Cr}px`),Hr.setProperty("--radix-popper-anchor-width",`${Wr}px`),Hr.setProperty("--radix-popper-anchor-height",`${Zs}px`)}}),b&&sP({element:b,padding:a}),hP({arrowWidth:E,arrowHeight:j}),f&&nP({strategy:"referenceHidden",...W})]}),[N,V]=cx(K),ne=_r(_);at(()=>{J&&(ne==null||ne())},[J,ne]);const re=(H=A.arrow)==null?void 0:H.x,ie=(Se=A.arrow)==null?void 0:Se.y,se=((je=A.arrow)==null?void 0:je.centerOffset)!==0,[Ae,$e]=w.useState();return at(()=>{y&&$e(window.getComputedStyle(y).zIndex)},[y]),g.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:J?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[(ye=A.transformOrigin)==null?void 0:ye.x,(ge=A.transformOrigin)==null?void 0:ge.y].join(" "),...((we=A.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(cP,{scope:r,placedSide:N,onArrowChange:S,arrowX:re,arrowY:ie,shouldHideArrow:se,children:g.jsx(xe.div,{"data-side":N,"data-align":V,...m,ref:v,style:{...m.style,animation:J?void 0:"none"}})})})});ox.displayName=ap;var ax="PopperArrow",dP={top:"bottom",right:"left",bottom:"top",left:"right"},lx=w.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=uP(ax,n),o=dP[i.placedSide];return g.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:g.jsx(oP,{...s,ref:r,style:{...s.style,display:"block"}})})});lx.displayName=ax;function fP(t){return t!==null}var hP=t=>({name:"transformOrigin",options:t,fn(e){var x,y,h;const{placement:r,rects:n,middlewareData:s}=e,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=cx(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,p=(((h=s.arrow)==null?void 0:h.y)??0)+l/2;let _="",m="";return c==="bottom"?(_=o?d:`${f}px`,m=`${-l}px`):c==="top"?(_=o?d:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(_=`${-l}px`,m=o?d:`${p}px`):c==="left"&&(_=`${n.floating.width+l}px`,m=o?d:`${p}px`),{data:{x:_,y:m}}}});function cx(t){const[e,r="center"]=t.split("-");return[e,r]}var pP=nx,ux=ix,dx=ox,fx=lx,[Gc,RI]=Gs("Tooltip",[Kc]),lp=Kc(),hx="TooltipProvider",mP=700,hg="tooltip.open",[gP,px]=Gc(hx),mx=t=>{const{__scopeTooltip:e,delayDuration:r=mP,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=w.useRef(!0),a=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),g.jsx(gP,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:w.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};mx.displayName=hx;var gx="Tooltip",[NI,Qc]=Gc(gx),yf="TooltipTrigger",vP=w.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Qc(yf,r),i=px(yf,r),o=lp(r),a=w.useRef(null),l=ze(e,a,s.onTriggerChange),c=w.useRef(!1),u=w.useRef(!1),d=w.useCallback(()=>c.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(ux,{asChild:!0,...o,children:g.jsx(xe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:fe(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:fe(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:fe(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:fe(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:fe(t.onBlur,s.onClose),onClick:fe(t.onClick,s.onClose)})})});vP.displayName=yf;var yP="TooltipPortal",[jI,wP]=Gc(yP,{forceMount:void 0}),Zi="TooltipContent",vx=w.forwardRef((t,e)=>{const r=wP(Zi,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=Qc(Zi,t.__scopeTooltip);return g.jsx(zc,{present:n||o.open,children:o.disableHoverableContent?g.jsx(yx,{side:s,...i,ref:e}):g.jsx(xP,{side:s,...i,ref:e})})}),xP=w.forwardRef((t,e)=>{const r=Qc(Zi,t.__scopeTooltip),n=px(Zi,t.__scopeTooltip),s=w.useRef(null),i=ze(e,s),[o,a]=w.useState(null),{trigger:l,onClose:c}=r,u=s.current,{onPointerInTransitChange:d}=n,f=w.useCallback(()=>{a(null),d(!1)},[d]),p=w.useCallback((_,m)=>{const x=_.currentTarget,y={x:_.clientX,y:_.clientY},h=EP(y,x.getBoundingClientRect()),v=CP(y,h),b=TP(m.getBoundingClientRect()),S=AP([...v,...b]);a(S),d(!0)},[d]);return w.useEffect(()=>()=>f(),[f]),w.useEffect(()=>{if(l&&u){const _=x=>p(x,u),m=x=>p(x,l);return l.addEventListener("pointerleave",_),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",_),u.removeEventListener("pointerleave",m)}}},[l,u,p,f]),w.useEffect(()=>{if(o){const _=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},h=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),v=!PP(y,o);h?f():v&&(f(),c())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,u,o,c,f]),g.jsx(yx,{...t,ref:i})}),[_P,bP]=Gc(gx,{isInside:!1}),SP=Rk("TooltipContent"),yx=w.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Qc(Zi,r),c=lp(r),{onClose:u}=l;return w.useEffect(()=>(document.addEventListener(hg,u),()=>document.removeEventListener(hg,u)),[u]),w.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),g.jsx(Uc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:g.jsxs(dx,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(SP,{children:n}),g.jsx(_P,{scope:r,isInside:!0,children:g.jsx(Jk,{id:l.contentId,role:"tooltip",children:s||n})})]})})});vx.displayName=Zi;var wx="TooltipArrow",kP=w.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=lp(r);return bP(wx,r).isInside?null:g.jsx(fx,{...s,...n,ref:e})});kP.displayName=wx;function EP(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.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 CP(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function TP(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function PP(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(s=!s)}return s}function AP(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),RP(e)}function RP(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const s=t[n];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[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(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var NP=mx,xx=vx;const jP=NP,OP=w.forwardRef(({className:t,sideOffset:e=4,...r},n)=>g.jsx(xx,{ref:n,sideOffset:e,className:Ce("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",t),...r}));OP.displayName=xx.displayName;var Zc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yc=typeof window>"u"||"Deno"in globalThis;function ur(){}function IP(t,e){return typeof t=="function"?t(e):t}function LP(t){return typeof t=="number"&&t>=0&&t!==1/0}function MP(t,e){return Math.max(t+(e||0)-Date.now(),0)}function wf(t,e){return typeof t=="function"?t(e):t}function DP(t,e){return typeof t=="function"?t(e):t}function pg(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==cp(o,e.options))return!1}else if(!va(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function mg(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(ga(e.options.mutationKey)!==ga(i))return!1}else if(!va(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function cp(t,e){return((e==null?void 0:e.queryKeyHashFn)||ga)(t)}function ga(t){return JSON.stringify(t,(e,r)=>xf(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function va(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>va(t[r],e[r])):!1}function _x(t,e){if(t===e)return t;const r=gg(t)&&gg(e);if(r||xf(t)&&xf(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<o;u++){const d=r?u:i[u];(!r&&l.has(d)||r)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=_x(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function gg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function xf(t){if(!vg(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!vg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function vg(t){return Object.prototype.toString.call(t)==="[object Object]"}function $P(t){return new Promise(e=>{setTimeout(e,t)})}function FP(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?_x(t,e):e}function UP(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function zP(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var up=Symbol();function bx(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===up?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ts,Mn,Oi,Nv,VP=(Nv=class extends Zc{constructor(){super();ke(this,Ts);ke(this,Mn);ke(this,Oi);ce(this,Oi,e=>{if(!Yc&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,Mn)||this.setEventListener(O(this,Oi))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,Mn))==null||e.call(this),ce(this,Mn,void 0))}setEventListener(e){var r;ce(this,Oi,e),(r=O(this,Mn))==null||r.call(this),ce(this,Mn,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){O(this,Ts)!==e&&(ce(this,Ts,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof O(this,Ts)=="boolean"?O(this,Ts):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ts=new WeakMap,Mn=new WeakMap,Oi=new WeakMap,Nv),Sx=new VP,Ii,Dn,Li,jv,BP=(jv=class extends Zc{constructor(){super();ke(this,Ii,!0);ke(this,Dn);ke(this,Li);ce(this,Li,e=>{if(!Yc&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){O(this,Dn)||this.setEventListener(O(this,Li))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,Dn))==null||e.call(this),ce(this,Dn,void 0))}setEventListener(e){var r;ce(this,Li,e),(r=O(this,Dn))==null||r.call(this),ce(this,Dn,e(this.setOnline.bind(this)))}setOnline(e){O(this,Ii)!==e&&(ce(this,Ii,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return O(this,Ii)}},Ii=new WeakMap,Dn=new WeakMap,Li=new WeakMap,jv),lc=new BP;function WP(){let t,e;const r=new Promise((s,i)=>{t=s,e=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}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function HP(t){return Math.min(1e3*2**t,3e4)}function kx(t){return(t??"online")==="online"?lc.isOnline():!0}var Ex=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Xu(t){return t instanceof Ex}function Cx(t){let e=!1,r=0,n=!1,s;const i=WP(),o=m=>{var x;n||(f(new Ex(m)),(x=t.abort)==null||x.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>Sx.isFocused()&&(t.networkMode==="always"||lc.isOnline())&&t.canRun(),u=()=>kx(t.networkMode)&&t.canRun(),d=m=>{var x;n||(n=!0,(x=t.onSuccess)==null||x.call(t,m),s==null||s(),i.resolve(m))},f=m=>{var x;n||(n=!0,(x=t.onError)==null||x.call(t,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var x;s=y=>{(n||c())&&m(y)},(x=t.onPause)==null||x.call(t)}).then(()=>{var m;s=void 0,n||(m=t.onContinue)==null||m.call(t)}),_=()=>{if(n)return;let m;const x=r===0?t.initialPromise:void 0;try{m=x??t.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var C;if(n)return;const h=t.retry??(Yc?0:3),v=t.retryDelay??HP,b=typeof v=="function"?v(r,y):v,S=h===!0||typeof h=="number"&&r<h||typeof h=="function"&&h(r,y);if(e||!S){f(y);return}r++,(C=t.onFail)==null||C.call(t,r,y),$P(b).then(()=>c()?void 0:p()).then(()=>{e?f(y):_()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?_():p().then(_),i)}}var qP=t=>setTimeout(t,0);function KP(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=qP;const i=a=>{e?t.push(a):s(()=>{r(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var bt=KP(),Ps,Ov,Tx=(Ov=class{constructor(){ke(this,Ps)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),LP(this.gcTime)&&ce(this,Ps,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Yc?1/0:5*60*1e3))}clearGcTimeout(){O(this,Ps)&&(clearTimeout(O(this,Ps)),ce(this,Ps,void 0))}},Ps=new WeakMap,Ov),Mi,As,Kt,Rs,mt,ba,Ns,dr,Zr,Iv,GP=(Iv=class extends Tx{constructor(e){super();ke(this,dr);ke(this,Mi);ke(this,As);ke(this,Kt);ke(this,Rs);ke(this,mt);ke(this,ba);ke(this,Ns);ce(this,Ns,!1),ce(this,ba,e.defaultOptions),this.setOptions(e.options),this.observers=[],ce(this,Rs,e.client),ce(this,Kt,O(this,Rs).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ce(this,Mi,ZP(this.options)),this.state=e.state??O(this,Mi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=O(this,mt))==null?void 0:e.promise}setOptions(e){this.options={...O(this,ba),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Kt).remove(this)}setData(e,r){const n=FP(this.state.data,e,this.options);return ft(this,dr,Zr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){ft(this,dr,Zr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=O(this,mt))==null?void 0:n.promise;return(s=O(this,mt))==null||s.cancel(e),r?r.then(ur).catch(ur):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Mi))}isActive(){return this.observers.some(e=>DP(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===up||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>wf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!MP(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=O(this,mt))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=O(this,mt))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),O(this,Kt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(O(this,mt)&&(O(this,Ns)?O(this,mt).cancel({revert:!0}):O(this,mt).cancelRetry()),this.scheduleGc()),O(this,Kt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ft(this,dr,Zr).call(this,{type:"invalidate"})}fetch(e,r){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,mt))return O(this,mt).continueRetry(),O(this,mt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ce(this,Ns,!0),n.signal)})},i=()=>{const f=bx(this.options,r),_=(()=>{const m={client:O(this,Rs),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return ce(this,Ns,!1),this.options.persister?this.options.persister(f,_,this):f(_)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,Rs),state:this.state,fetchFn:i};return s(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),ce(this,As,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ft(this,dr,Zr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var p,_,m,x;Xu(f)&&f.silent||ft(this,dr,Zr).call(this,{type:"error",error:f}),Xu(f)||((_=(p=O(this,Kt).config).onError)==null||_.call(p,f,this),(x=(m=O(this,Kt).config).onSettled)==null||x.call(m,this.state.data,f,this)),this.scheduleGc()};return ce(this,mt,Cx({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var p,_,m,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){l(y);return}(_=(p=O(this,Kt).config).onSuccess)==null||_.call(p,f,this),(x=(m=O(this,Kt).config).onSettled)==null||x.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,p)=>{ft(this,dr,Zr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{ft(this,dr,Zr).call(this,{type:"pause"})},onContinue:()=>{ft(this,dr,Zr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),O(this,mt).start()}},Mi=new WeakMap,As=new WeakMap,Kt=new WeakMap,Rs=new WeakMap,mt=new WeakMap,ba=new WeakMap,Ns=new WeakMap,dr=new WeakSet,Zr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...QP(n.data,this.options),fetchMeta:e.meta??null};case"success":return ce(this,As,void 0),{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return Xu(s)&&s.revert&&O(this,As)?{...O(this,As),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),bt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),O(this,Kt).notify({query:this,type:"updated",action:e})})},Iv);function QP(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kx(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ZP(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 Nr,Lv,YP=(Lv=class extends Zc{constructor(e={}){super();ke(this,Nr);this.config=e,ce(this,Nr,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??cp(s,r);let o=this.get(i);return o||(o=new GP({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){O(this,Nr).has(e.queryHash)||(O(this,Nr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=O(this,Nr).get(e.queryHash);r&&(e.destroy(),r===e&&O(this,Nr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return O(this,Nr).get(e)}getAll(){return[...O(this,Nr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>pg(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>pg(e,n)):r}notify(e){bt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){bt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Nr=new WeakMap,Lv),jr,wt,js,Or,Sn,Mv,JP=(Mv=class extends Tx{constructor(e){super();ke(this,Or);ke(this,jr);ke(this,wt);ke(this,js);this.mutationId=e.mutationId,ce(this,wt,e.mutationCache),ce(this,jr,[]),this.state=e.state||XP(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){O(this,jr).includes(e)||(O(this,jr).push(e),this.clearGcTimeout(),O(this,wt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ce(this,jr,O(this,jr).filter(r=>r!==e)),this.scheduleGc(),O(this,wt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){O(this,jr).length||(this.state.status==="pending"?this.scheduleGc():O(this,wt).remove(this))}continue(){var e;return((e=O(this,js))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,d,f,p,_,m,x,y,h,v,b,S,C,E,j;const r=()=>{ft(this,Or,Sn).call(this,{type:"continue"})};ce(this,js,Cx({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{ft(this,Or,Sn).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{ft(this,Or,Sn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,wt).canRun(this)}));const n=this.state.status==="pending",s=!O(this,js).canStart();try{if(n)r();else{ft(this,Or,Sn).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=O(this,wt).config).onMutate)==null?void 0:o.call(i,e,this));const D=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));D!==this.state.context&&ft(this,Or,Sn).call(this,{type:"pending",context:D,variables:e,isPaused:s})}const M=await O(this,js).start();return await((u=(c=O(this,wt).config).onSuccess)==null?void 0:u.call(c,M,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,M,e,this.state.context)),await((_=(p=O(this,wt).config).onSettled)==null?void 0:_.call(p,M,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,M,null,e,this.state.context)),ft(this,Or,Sn).call(this,{type:"success",data:M}),M}catch(M){try{throw await((h=(y=O(this,wt).config).onError)==null?void 0:h.call(y,M,e,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,M,e,this.state.context)),await((C=(S=O(this,wt).config).onSettled)==null?void 0:C.call(S,void 0,M,this.state.variables,this.state.context,this)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,M,e,this.state.context)),M}finally{ft(this,Or,Sn).call(this,{type:"error",error:M})}}finally{O(this,wt).runNext(this)}}},jr=new WeakMap,wt=new WeakMap,js=new WeakMap,Or=new WeakSet,Sn=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),bt.batch(()=>{O(this,jr).forEach(n=>{n.onMutationUpdate(e)}),O(this,wt).notify({mutation:this,type:"updated",action:e})})},Mv);function XP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rn,fr,Sa,Dv,eA=(Dv=class extends Zc{constructor(e={}){super();ke(this,rn);ke(this,fr);ke(this,Sa);this.config=e,ce(this,rn,new Set),ce(this,fr,new Map),ce(this,Sa,0)}build(e,r,n){const s=new JP({mutationCache:this,mutationId:++Fa(this,Sa)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){O(this,rn).add(e);const r=al(e);if(typeof r=="string"){const n=O(this,fr).get(r);n?n.push(e):O(this,fr).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(O(this,rn).delete(e)){const r=al(e);if(typeof r=="string"){const n=O(this,fr).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&O(this,fr).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=al(e);if(typeof r=="string"){const n=O(this,fr).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=al(e);if(typeof r=="string"){const s=(n=O(this,fr).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){bt.batch(()=>{O(this,rn).forEach(e=>{this.notify({type:"removed",mutation:e})}),O(this,rn).clear(),O(this,fr).clear()})}getAll(){return Array.from(O(this,rn))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>mg(r,n))}findAll(e={}){return this.getAll().filter(r=>mg(e,r))}notify(e){bt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return bt.batch(()=>Promise.all(e.map(r=>r.continue().catch(ur))))}},rn=new WeakMap,fr=new WeakMap,Sa=new WeakMap,Dv);function al(t){var e;return(e=t.options.scope)==null?void 0:e.id}function yg(t){return{onFetch:(e,r)=>{var u,d,f,p,_;const n=e.options,s=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=e.state.data)==null?void 0:p.pages)||[],o=((_=e.state.data)==null?void 0:_.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},y=bx(e.options,e.fetchOptions),h=async(v,b,S)=>{if(m)return Promise.reject();if(b==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const Q={client:e.client,queryKey:e.queryKey,pageParam:b,direction:S?"backward":"forward",meta:e.options.meta};return x(Q),Q})(),j=await y(E),{maxPages:M}=e.options,D=S?zP:UP;return{pages:D(v.pages,j,M),pageParams:D(v.pageParams,b,M)}};if(s&&i.length){const v=s==="backward",b=v?tA:wg,S={pages:i,pageParams:o},C=b(n,S);a=await h(S,C,v)}else{const v=t??i.length;do{const b=l===0?o[0]??n.initialPageParam:wg(n,a);if(l>0&&b==null)break;a=await h(a,b),l++}while(l<v)}return a};e.options.persister?e.fetchFn=()=>{var m,x;return(x=(m=e.options).persister)==null?void 0:x.call(m,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=c}}}function wg(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function tA(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var He,$n,Fn,Di,$i,Un,Fi,Ui,$v,rA=($v=class{constructor(t={}){ke(this,He);ke(this,$n);ke(this,Fn);ke(this,Di);ke(this,$i);ke(this,Un);ke(this,Fi);ke(this,Ui);ce(this,He,t.queryCache||new YP),ce(this,$n,t.mutationCache||new eA),ce(this,Fn,t.defaultOptions||{}),ce(this,Di,new Map),ce(this,$i,new Map),ce(this,Un,0)}mount(){Fa(this,Un)._++,O(this,Un)===1&&(ce(this,Fi,Sx.subscribe(async t=>{t&&(await this.resumePausedMutations(),O(this,He).onFocus())})),ce(this,Ui,lc.subscribe(async t=>{t&&(await this.resumePausedMutations(),O(this,He).onOnline())})))}unmount(){var t,e;Fa(this,Un)._--,O(this,Un)===0&&((t=O(this,Fi))==null||t.call(this),ce(this,Fi,void 0),(e=O(this,Ui))==null||e.call(this),ce(this,Ui,void 0))}isFetching(t){return O(this,He).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return O(this,$n).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=O(this,He).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=O(this,He).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(wf(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return O(this,He).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=O(this,He).get(n.queryHash),i=s==null?void 0:s.state.data,o=IP(e,i);if(o!==void 0)return O(this,He).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return bt.batch(()=>O(this,He).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=O(this,He).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=O(this,He);bt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=O(this,He);return bt.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=bt.batch(()=>O(this,He).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(ur).catch(ur)}invalidateQueries(t,e={}){return bt.batch(()=>(O(this,He).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=bt.batch(()=>O(this,He).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(ur)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(ur)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=O(this,He).build(this,e);return r.isStaleByTime(wf(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ur).catch(ur)}fetchInfiniteQuery(t){return t.behavior=yg(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ur).catch(ur)}ensureInfiniteQueryData(t){return t.behavior=yg(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return lc.isOnline()?O(this,$n).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,He)}getMutationCache(){return O(this,$n)}getDefaultOptions(){return O(this,Fn)}setDefaultOptions(t){ce(this,Fn,t)}setQueryDefaults(t,e){O(this,Di).set(ga(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...O(this,Di).values()],r={};return e.forEach(n=>{va(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){O(this,$i).set(ga(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...O(this,$i).values()],r={};return e.forEach(n=>{va(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...O(this,Fn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=cp(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===up&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...O(this,Fn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){O(this,He).clear(),O(this,$n).clear()}},He=new WeakMap,$n=new WeakMap,Fn=new WeakMap,Di=new WeakMap,$i=new WeakMap,Un=new WeakMap,Fi=new WeakMap,Ui=new WeakMap,$v),nA=w.createContext(void 0),sA=({client:t,children:e})=>(w.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(nA.Provider,{value:t,children:e}));/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function cc(){return cc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cc.apply(this,arguments)}var Bn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Bn||(Bn={}));const xg="popstate";function iA(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:o,hash:a}=n.location;return _f("",{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:Ax(s)}return aA(e,r,null,t)}function Mt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Px(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function oA(){return Math.random().toString(36).substr(2,8)}function _g(t,e){return{usr:t.state,key:t.key,idx:e}}function _f(t,e,r,n){return r===void 0&&(r=null),cc({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Jc(e):e,{state:r,key:e&&e.key||n||oA()})}function Ax(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Jc(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function aA(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=Bn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(cc({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Bn.Pop;let x=u(),y=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:y})}function f(x,y){a=Bn.Push;let h=_f(m.location,x,y);c=u()+1;let v=_g(h,c),b=m.createHref(h);try{o.pushState(v,"",b)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(b)}i&&l&&l({action:a,location:m.location,delta:1})}function p(x,y){a=Bn.Replace;let h=_f(m.location,x,y);c=u();let v=_g(h,c),b=m.createHref(h);o.replaceState(v,"",b),i&&l&&l({action:a,location:m.location,delta:0})}function _(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof x=="string"?x:Ax(x);return h=h.replace(/ $/,"%20"),Mt(y,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,y)}let m={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(xg,d),l=x,()=>{s.removeEventListener(xg,d),l=null}},createHref(x){return e(s,x)},createURL:_,encodeLocation(x){let y=_(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(x){return o.go(x)}};return m}var bg;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(bg||(bg={}));function lA(t,e,r){return r===void 0&&(r="/"),cA(t,e,r,!1)}function cA(t,e,r,n){let s=typeof e=="string"?Jc(e):e,i=jx(s.pathname||"/",r);if(i==null)return null;let o=Rx(t);uA(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=_A(i);a=wA(o[l],c,n)}return a}function Rx(t,e,r,n){e===void 0&&(e=[]),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("/")&&(Mt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Ni([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(Mt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Rx(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:vA(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Nx(i.path))s(i,o,l)}),e}function Nx(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=Nx(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function uA(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:yA(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const dA=/^:[\w-]+$/,fA=3,hA=2,pA=1,mA=10,gA=-2,Sg=t=>t==="*";function vA(t,e){let r=t.split("/"),n=r.length;return r.some(Sg)&&(n+=gA),e&&(n+=hA),r.filter(s=>!Sg(s)).reduce((s,i)=>s+(dA.test(i)?fA:i===""?pA:mA),n)}function yA(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function wA(t,e,r){let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,u=i==="/"?e:e.slice(i.length)||"/",d=kg({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=kg({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(s,d.params),o.push({params:s,pathname:Ni([i,d.pathname]),pathnameBase:bA(Ni([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Ni([i,d.pathnameBase]))}return o}function kg(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=xA(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,u,d)=>{let{paramName:f,isOptional:p}=u;if(f==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const _=a[d];return p&&!_?c[f]=void 0:c[f]=(_||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function xA(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Px(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function _A(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Px(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function jx(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const Ni=t=>t.join("/").replace(/\/\/+/g,"/"),bA=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function SA(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Ox=["post","put","patch","delete"];new Set(Ox);const kA=["get",...Ox];new Set(kA);/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function uc(){return uc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},uc.apply(this,arguments)}const EA=w.createContext(null),CA=w.createContext(null),Ix=w.createContext(null),Xc=w.createContext(null),eu=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Lx=w.createContext(null);function dp(){return w.useContext(Xc)!=null}function Mx(){return dp()||Mt(!1),w.useContext(Xc).location}function TA(t,e){return PA(t,e)}function PA(t,e,r,n){dp()||Mt(!1);let{navigator:s}=w.useContext(Ix),{matches:i}=w.useContext(eu),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Mx(),u;if(e){var d;let x=typeof e=="string"?Jc(e):e;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||Mt(!1),u=x}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let _=lA(t,{pathname:p}),m=OA(_&&_.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Ni([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Ni([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return e&&m?w.createElement(Xc.Provider,{value:{location:uc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Bn.Pop}},m):m}function AA(){let t=DA(),e=SA(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},e),r?w.createElement("pre",{style:s},r):null,null)}const RA=w.createElement(AA,null);class NA extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?w.createElement(eu.Provider,{value:this.props.routeContext},w.createElement(Lx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jA(t){let{routeContext:e,match:r,children:n}=t,s=w.useContext(EA);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(eu.Provider,{value:e},n)}function OA(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Mt(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:p}=r,_=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||_){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,f)=>{let p,_=!1,m=null,x=null;r&&(p=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||RA,l&&(c<0&&f===0?(_=!0,x=null):c===f&&(_=!0,x=d.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,f+1)),h=()=>{let v;return p?v=m:_?v=x:d.route.Component?v=w.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=u,w.createElement(jA,{match:d,routeContext:{outlet:u,matches:y,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?w.createElement(NA,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:h(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):h()},null)}var bf=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(bf||{});function IA(t){let e=w.useContext(CA);return e||Mt(!1),e}function LA(t){let e=w.useContext(eu);return e||Mt(!1),e}function MA(t){let e=LA(),r=e.matches[e.matches.length-1];return r.route.id||Mt(!1),r.route.id}function DA(){var t;let e=w.useContext(Lx),r=IA(bf.UseRouteError),n=MA(bf.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function $A(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Sf(t){Mt(!1)}function FA(t){let{basename:e="/",children:r=null,location:n,navigationType:s=Bn.Pop,navigator:i,static:o=!1,future:a}=t;dp()&&Mt(!1);let l=e.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:i,static:o,future:uc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Jc(n));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:_="default"}=n,m=w.useMemo(()=>{let x=jx(u,l);return x==null?null:{location:{pathname:x,search:d,hash:f,state:p,key:_},navigationType:s}},[l,u,d,f,p,_,s]);return m==null?null:w.createElement(Ix.Provider,{value:c},w.createElement(Xc.Provider,{children:r,value:m}))}function UA(t){let{children:e,location:r}=t;return TA(kf(e),r)}new Promise(()=>{});function kf(t,e){e===void 0&&(e=[]);let r=[];return w.Children.forEach(t,(n,s)=>{if(!w.isValidElement(n))return;let i=[...e,s];if(n.type===w.Fragment){r.push.apply(r,kf(n.props.children,i));return}n.type!==Sf&&Mt(!1),!n.props.index||!n.props.children||Mt(!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=kf(n.props.children,i)),r.push(o)}),r}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const zA="6";try{window.__reactRouterVersion=zA}catch{}const VA="startTransition",Eg=Xf[VA];function BA(t){let{basename:e,children:r,future:n,window:s}=t,i=w.useRef();i.current==null&&(i.current=iA({window:s,v5Compat:!0}));let o=i.current,[a,l]=w.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=w.useCallback(d=>{c&&Eg?Eg(()=>l(d)):l(d)},[l,c]);return w.useLayoutEffect(()=>o.listen(u),[o,u]),w.useEffect(()=>$A(n),[n]),w.createElement(FA,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}var Cg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Cg||(Cg={}));var Tg;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Tg||(Tg={}));const WA=Qh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-transparent border-2 border-white text-white hover:bg-white hover:text-primary"},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"}}),zs=w.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const o=n?tw:"button";return g.jsx(o,{className:Ce(WA({variant:e,size:r,className:t})),ref:i,...s})});zs.displayName="Button";const Dx="/assets/logo-CUstABI3.png",HA=()=>{const[t,e]=w.useState(!1),[r,n]=w.useState(!1);w.useEffect(()=>{const i=()=>{e(window.scrollY>20)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)},[]);const s=i=>{const o=document.getElementById(i);o&&(o.scrollIntoView({behavior:"smooth"}),n(!1))};return g.jsx("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${t?"bg-background/95 backdrop-blur-md shadow-md":"bg-transparent"}`,children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"flex items-center justify-between h-20",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("img",{src:Dx,alt:"Casageo Shipping",className:"h-12 w-12"}),g.jsx("span",{className:"text-xl font-bold text-foreground",children:"CASAGEO Shipping"})]}),g.jsxs("div",{className:"hidden md:flex items-center space-x-8",children:[g.jsx("button",{onClick:()=>s("services"),className:"text-foreground hover:text-primary transition-colors",children:"Services"}),g.jsx("button",{onClick:()=>s("schedule"),className:"text-foreground hover:text-primary transition-colors",children:"Schedule Pickup"}),g.jsx("button",{onClick:()=>s("location"),className:"text-foreground hover:text-primary transition-colors",children:"Location"}),g.jsx("button",{onClick:()=>s("faq"),className:"text-foreground hover:text-primary transition-colors",children:"FAQ"}),g.jsx(zs,{onClick:()=>s("quote"),size:"lg",className:"bg-primary hover:bg-primary/90",children:"Get a Quote"})]}),g.jsx("button",{className:"md:hidden text-foreground",onClick:()=>n(!r),children:r?g.jsx(jw,{size:24}):g.jsx(CE,{size:24})})]}),r&&g.jsxs("div",{className:"md:hidden bg-background border-t border-border py-4 space-y-4",children:[g.jsx("button",{onClick:()=>s("services"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted",children:"Services"}),g.jsx("button",{onClick:()=>s("schedule"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted",children:"Schedule Pickup"}),g.jsx("button",{onClick:()=>s("location"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted",children:"Location"}),g.jsx("button",{onClick:()=>s("faq"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted",children:"FAQ"}),g.jsx("div",{className:"px-4",children:g.jsx(zs,{onClick:()=>s("quote"),className:"w-full bg-primary hover:bg-primary/90",children:"Get a Quote"})})]})]})})},qA="/assets/hero-ship-1-BYATEmGj.jpg",KA="/assets/hero-truck-1-5sAqzL7b.jpg",GA="/assets/hero-port-1-Civ0ohE1.jpg",ps=[{image:qA,title:"Fast, reliable delivery for every shipment"},{image:KA,title:"Express Road Transport Nationwide"},{image:GA,title:"Global Ocean & Air Freight Solutions"}],QA=()=>{const[t,e]=w.useState(0);w.useEffect(()=>{const i=setInterval(()=>{e(o=>(o+1)%ps.length)},5e3);return()=>clearInterval(i)},[]);const r=()=>e(i=>(i+1)%ps.length),n=()=>e(i=>(i-1+ps.length)%ps.length),s=()=>{const i=document.getElementById("quote");i&&i.scrollIntoView({behavior:"smooth"})};return g.jsxs("div",{className:"relative h-screen w-full overflow-hidden",children:[ps.map((i,o)=>g.jsxs("div",{className:`absolute inset-0 transition-opacity duration-1000 ${o===t?"opacity-100":"opacity-0"}`,children:[g.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/90 to-primary/70"})]},o)),g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsxs("div",{className:"container mx-auto px-4 text-center text-white",children:[g.jsx("h1",{className:"text-5xl md:text-7xl font-bold mb-6 animate-fade-in",children:ps[t].title}),g.jsx("p",{className:"text-xl md:text-2xl mb-8 max-w-3xl mx-auto",children:"From local couriers to global freight, manage tracking, quotes, and pickups in one place."}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[g.jsx(zs,{onClick:s,size:"lg",className:"bg-secondary hover:bg-secondary/90 text-white text-lg px-8 py-6",children:"Get a Quote"}),g.jsx(zs,{onClick:()=>window.location.href="#",variant:"hero",size:"lg",className:"text-lg px-8 py-6",children:"Track Shipment"})]})]})}),g.jsx("button",{onClick:n,className:"absolute left-4 top-1/2 -translate-y-1/2 bg-white/20 hover:bg-white/30 backdrop-blur-sm p-3 rounded-full transition-colors",children:g.jsx(_E,{className:"text-white",size:32})}),g.jsx("button",{onClick:r,className:"absolute right-4 top-1/2 -translate-y-1/2 bg-white/20 hover:bg-white/30 backdrop-blur-sm p-3 rounded-full transition-colors",children:g.jsx(bE,{className:"text-white",size:32})}),g.jsx("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 flex gap-3",children:ps.map((i,o)=>g.jsx("button",{onClick:()=>e(o),className:`h-3 rounded-full transition-all ${o===t?"w-12 bg-white":"w-3 bg-white/50"}`},o))})]})},Bo=w.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Ce("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Bo.displayName="Card";const ZA=w.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Ce("flex flex-col space-y-1.5 p-6",t),...e}));ZA.displayName="CardHeader";const YA=w.forwardRef(({className:t,...e},r)=>g.jsx("h3",{ref:r,className:Ce("text-2xl font-semibold leading-none tracking-tight",t),...e}));YA.displayName="CardTitle";const JA=w.forwardRef(({className:t,...e},r)=>g.jsx("p",{ref:r,className:Ce("text-sm text-muted-foreground",t),...e}));JA.displayName="CardDescription";const Wo=w.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Ce("p-6 pt-0",t),...e}));Wo.displayName="CardContent";const XA=w.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Ce("flex items-center p-6 pt-0",t),...e}));XA.displayName="CardFooter";const eR=[{icon:jE,title:"Express Road",description:"Casageo Express Road Service is designed for businesses and individuals who need a reliable and fast solution for regional and national deliveries. Our road network has been built to ensure smooth and efficient transportation, whether it is for small packages or bulk goods. We understand the importance of deadlines, which is why our road service focuses on timely delivery while keeping costs affordable. Every vehicle in our fleet is maintained to the highest standards to ensure safe handling of goods. We also provide real-time tracking, giving our clients the ability to monitor shipments every step of the way."},{icon:PE,title:"Air Freight",description:"Global air solutions with priority handling for time-sensitive shipments. Our air freight service ensures your cargo reaches its destination quickly and safely, with comprehensive tracking and customs support throughout the journey."},{icon:RE,title:"Ocean Freight",description:"Casageo Ocean Freight Service offers the perfect balance of affordability and reliability for businesses and individuals transporting large or heavy shipments internationally. Ocean freight is an essential choice for companies that regularly import or export goods in bulk, and Casageo makes this process seamless and stress-free. We provide both Full Container Load (FCL) and Less than Container Load (LCL) options, giving flexibility to our clients based on their specific needs. Our partnerships with major shipping lines allow us to offer competitive pricing while maintaining high standards of safety and efficiency."},{icon:AE,title:"Insured & Secure",description:"Casageo Insured & Secure Service is designed to give customers complete peace of mind when shipping valuable or sensitive items. We understand that certain shipments — such as jewelry, documents, electronics, or fragile goods — require an extra layer of protection. That's why we offer comprehensive insurance coverage and secure handling protocols across all our logistics solutions. Every shipment under this service is carefully monitored from pickup to delivery, ensuring maximum safety against theft, damage, or loss."}],tR=()=>g.jsx("section",{id:"services",className:"py-24 bg-muted/30",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"text-center mb-16",children:[g.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 text-foreground",children:"Services built for Speed and Scale"}),g.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto",children:"Comprehensive logistics solutions tailored to your business needs"})]}),g.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:eR.map((t,e)=>{const r=t.icon;return g.jsx(Bo,{className:"border-border hover:shadow-lg transition-all duration-300 hover:-translate-y-1",children:g.jsx(Wo,{className:"p-8",children:g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-4 rounded-lg",children:g.jsx(r,{className:"text-primary",size:32})}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h3",{className:"text-2xl font-bold mb-3 text-foreground",children:t.title}),g.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.description})]})]})})},e)})})]})});var ja=t=>t.type==="checkbox",Cs=t=>t instanceof Date,_t=t=>t==null;const $x=t=>typeof t=="object";var Ze=t=>!_t(t)&&!Array.isArray(t)&&$x(t)&&!Cs(t),Fx=t=>Ze(t)&&t.target?ja(t.target)?t.target.checked:t.target.value:t,rR=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,Ux=(t,e)=>t.has(rR(e)),nR=t=>{const e=t.constructor&&t.constructor.prototype;return Ze(e)&&e.hasOwnProperty("isPrototypeOf")},fp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Xe(t){let e;const r=Array.isArray(t),n=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(fp&&(t instanceof Blob||n))&&(r||Ze(t)))if(e=r?[]:{},!r&&!nR(t))e=t;else for(const s in t)t.hasOwnProperty(s)&&(e[s]=Xe(t[s]));else return t;return e}var tu=t=>/^\w*$/.test(t),Ge=t=>t===void 0,hp=t=>Array.isArray(t)?t.filter(Boolean):[],pp=t=>hp(t.replace(/["|']|\]/g,"").split(/\.|\[/)),q=(t,e,r)=>{if(!e||!Ze(t))return r;const n=(tu(e)?[e]:pp(e)).reduce((s,i)=>_t(s)?s:s[i],t);return Ge(n)||n===t?Ge(t[e])?r:t[e]:n},$t=t=>typeof t=="boolean",Te=(t,e,r)=>{let n=-1;const s=tu(e)?[e]:pp(e),i=s.length,o=i-1;for(;++n<i;){const a=s[n];let l=r;if(n!==o){const c=t[a];l=Ze(c)||Array.isArray(c)?c:isNaN(+s[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;t[a]=l,t=t[a]}};const dc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},gr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mp=P.createContext(null);mp.displayName="HookFormContext";const ru=()=>P.useContext(mp),sR=t=>{const{children:e,...r}=t;return P.createElement(mp.Provider,{value:r},e)};var zx=(t,e,r,n=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const o=i;return e._proxyFormState[o]!==gr.all&&(e._proxyFormState[o]=!n||gr.all),r&&(r[o]=!0),t[o]}});return s};const gp=typeof window<"u"?P.useLayoutEffect:P.useEffect;function iR(t){const e=ru(),{control:r=e.control,disabled:n,name:s,exact:i}=t||{},[o,a]=P.useState(r._formState),l=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return gp(()=>r._subscribe({name:s,formState:l.current,exact:i,callback:c=>{!n&&a({...r._formState,...c})}}),[s,n,i]),P.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>zx(o,r,l.current,!1),[o,r])}var Dr=t=>typeof t=="string",Vx=(t,e,r,n,s)=>Dr(t)?(n&&e.watch.add(t),q(r,t,s)):Array.isArray(t)?t.map(i=>(n&&e.watch.add(i),q(r,i))):(n&&(e.watchAll=!0),r),Ef=t=>_t(t)||!$x(t);function nn(t,e,r=new WeakSet){if(Ef(t)||Ef(e))return t===e;if(Cs(t)&&Cs(e))return t.getTime()===e.getTime();const n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const i of n){const o=t[i];if(!s.includes(i))return!1;if(i!=="ref"){const a=e[i];if(Cs(o)&&Cs(a)||Ze(o)&&Ze(a)||Array.isArray(o)&&Array.isArray(a)?!nn(o,a,r):o!==a)return!1}}return!0}function oR(t){const e=ru(),{control:r=e.control,name:n,defaultValue:s,disabled:i,exact:o,compute:a}=t||{},l=P.useRef(s),c=P.useRef(a),u=P.useRef(void 0);c.current=a;const d=P.useMemo(()=>r._getWatch(n,l.current),[r,n]),[f,p]=P.useState(c.current?c.current(d):d);return gp(()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:_=>{if(!i){const m=Vx(n,r._names,_.values||r._formValues,!1,l.current);if(c.current){const x=c.current(m);nn(x,u.current)||(p(x),u.current=x)}else p(m)}}}),[r,i,n,o]),P.useEffect(()=>r._removeUnmounted()),f}function aR(t){const e=ru(),{name:r,disabled:n,control:s=e.control,shouldUnregister:i,defaultValue:o}=t,a=Ux(s._names.array,r),l=P.useMemo(()=>q(s._formValues,r,q(s._defaultValues,r,o)),[s,r,o]),c=oR({control:s,name:r,defaultValue:l,exact:!0}),u=iR({control:s,name:r,exact:!0}),d=P.useRef(t),f=P.useRef(s.register(r,{...t.rules,value:c,...$t(t.disabled)?{disabled:t.disabled}:{}}));d.current=t;const p=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!q(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!q(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!q(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!q(u.validatingFields,r)},error:{enumerable:!0,get:()=>q(u.errors,r)}}),[u,r]),_=P.useCallback(h=>f.current.onChange({target:{value:Fx(h),name:r},type:dc.CHANGE}),[r]),m=P.useCallback(()=>f.current.onBlur({target:{value:q(s._formValues,r),name:r},type:dc.BLUR}),[r,s._formValues]),x=P.useCallback(h=>{const v=q(s._fields,r);v&&h&&(v._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:b=>h.setCustomValidity(b),reportValidity:()=>h.reportValidity()})},[s._fields,r]),y=P.useMemo(()=>({name:r,value:c,...$t(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:_,onBlur:m,ref:x}),[r,n,u.disabled,_,m,x,c]);return P.useEffect(()=>{const h=s._options.shouldUnregister||i;s.register(r,{...d.current.rules,...$t(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(b,S)=>{const C=q(s._fields,b);C&&C._f&&(C._f.mount=S)};if(v(r,!0),h){const b=Xe(q(s._options.defaultValues,r));Te(s._defaultValues,r,b),Ge(q(s._formValues,r))&&Te(s._formValues,r,b)}return!a&&s.register(r),()=>{(a?h&&!s._state.action:h)?s.unregister(r):v(r,!1)}},[r,s,a,i]),P.useEffect(()=>{s._setDisabledField({disabled:n,name:r})},[n,r,s]),P.useMemo(()=>({field:y,formState:u,fieldState:p}),[y,u,p])}const lR=t=>t.render(aR(t));var Bx=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{},Ho=t=>Array.isArray(t)?t:[t],Pg=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}},Pt=t=>Ze(t)&&!Object.keys(t).length,vp=t=>t.type==="file",vr=t=>typeof t=="function",fc=t=>{if(!fp)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Wx=t=>t.type==="select-multiple",yp=t=>t.type==="radio",cR=t=>yp(t)||ja(t),ed=t=>fc(t)&&t.isConnected;function uR(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=Ge(t)?n++:t[e[n++]];return t}function dR(t){for(const e in t)if(t.hasOwnProperty(e)&&!Ge(t[e]))return!1;return!0}function Ye(t,e){const r=Array.isArray(e)?e:tu(e)?[e]:pp(e),n=r.length===1?t:uR(t,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(Ze(n)&&Pt(n)||Array.isArray(n)&&dR(n))&&Ye(t,r.slice(0,-1)),t}var Hx=t=>{for(const e in t)if(vr(t[e]))return!0;return!1};function hc(t,e={}){const r=Array.isArray(t);if(Ze(t)||r)for(const n in t)Array.isArray(t[n])||Ze(t[n])&&!Hx(t[n])?(e[n]=Array.isArray(t[n])?[]:{},hc(t[n],e[n])):_t(t[n])||(e[n]=!0);return e}function qx(t,e,r){const n=Array.isArray(t);if(Ze(t)||n)for(const s in t)Array.isArray(t[s])||Ze(t[s])&&!Hx(t[s])?Ge(e)||Ef(r[s])?r[s]=Array.isArray(t[s])?hc(t[s],[]):{...hc(t[s])}:qx(t[s],_t(e)?{}:e[s],r[s]):r[s]=!nn(t[s],e[s]);return r}var bo=(t,e)=>qx(t,e,hc(e));const Ag={value:!1,isValid:!1},Rg={value:!0,isValid:!0};var Kx=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Ge(t[0].attributes.value)?Ge(t[0].value)||t[0].value===""?Rg:{value:t[0].value,isValid:!0}:Rg:Ag}return Ag},Gx=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>Ge(t)?t:e?t===""?NaN:t&&+t:r&&Dr(t)?new Date(t):n?n(t):t;const Ng={isValid:!1,value:null};var Qx=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,Ng):Ng;function jg(t){const e=t.ref;return vp(e)?e.files:yp(e)?Qx(t.refs).value:Wx(e)?[...e.selectedOptions].map(({value:r})=>r):ja(e)?Kx(t.refs).value:Gx(Ge(e.value)?t.ref.value:e.value,t)}var fR=(t,e,r,n)=>{const s={};for(const i of t){const o=q(e,i);o&&Te(s,i,o._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},pc=t=>t instanceof RegExp,So=t=>Ge(t)?t:pc(t)?t.source:Ze(t)?pc(t.value)?t.value.source:t.value:t,Og=t=>({isOnSubmit:!t||t===gr.onSubmit,isOnBlur:t===gr.onBlur,isOnChange:t===gr.onChange,isOnAll:t===gr.all,isOnTouch:t===gr.onTouched});const Ig="AsyncFunction";var hR=t=>!!t&&!!t.validate&&!!(vr(t.validate)&&t.validate.constructor.name===Ig||Ze(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Ig)),pR=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Lg=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const qo=(t,e,r,n)=>{for(const s of r||Object.keys(t)){const i=q(t,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],s)&&!n)return!0;if(o.ref&&e(o.ref,o.name)&&!n)return!0;if(qo(a,e))break}else if(Ze(a)&&qo(a,e))break}}};function Mg(t,e,r){const n=q(t,r);if(n||tu(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),o=q(e,i),a=q(t,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};s.pop()}return{name:r}}var mR=(t,e,r,n)=>{r(t);const{name:s,...i}=t;return Pt(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!n||gr.all))},gR=(t,e,r)=>!t||!e||t===e||Ho(t).some(n=>n&&(r?n===e:n.startsWith(e)||e.startsWith(n))),vR=(t,e,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(e||t):(r?n.isOnBlur:s.isOnBlur)?!t:(r?n.isOnChange:s.isOnChange)?t:!0,yR=(t,e)=>!hp(q(t,e)).length&&Ye(t,e),wR=(t,e,r)=>{const n=Ho(q(t,r));return Te(n,"root",e[r]),Te(t,r,n),t},Nl=t=>Dr(t);function Dg(t,e,r="validate"){if(Nl(t)||Array.isArray(t)&&t.every(Nl)||$t(t)&&!t)return{type:r,message:Nl(t)?t:"",ref:e}}var Js=t=>Ze(t)&&!pc(t)?t:{value:t,message:""},$g=async(t,e,r,n,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:p,validate:_,name:m,valueAsNumber:x,mount:y}=t._f,h=q(r,m);if(!y||e.has(m))return{};const v=a?a[0]:o,b=I=>{s&&v.reportValidity&&(v.setCustomValidity($t(I)?"":I||""),v.reportValidity())},S={},C=yp(o),E=ja(o),j=C||E,M=(x||vp(o))&&Ge(o.value)&&Ge(h)||fc(o)&&o.value===""||h===""||Array.isArray(h)&&!h.length,D=Bx.bind(null,m,n,S),Q=(I,W,L,X=Qr.maxLength,K=Qr.minLength)=>{const J=I?W:L;S[m]={type:I?X:K,message:J,ref:o,...D(I?X:K,J)}};if(i?!Array.isArray(h)||!h.length:l&&(!j&&(M||_t(h))||$t(h)&&!h||E&&!Kx(a).isValid||C&&!Qx(a).isValid)){const{value:I,message:W}=Nl(l)?{value:!!l,message:l}:Js(l);if(I&&(S[m]={type:Qr.required,message:W,ref:v,...D(Qr.required,W)},!n))return b(W),S}if(!M&&(!_t(d)||!_t(f))){let I,W;const L=Js(f),X=Js(d);if(!_t(h)&&!isNaN(h)){const K=o.valueAsNumber||h&&+h;_t(L.value)||(I=K>L.value),_t(X.value)||(W=K<X.value)}else{const K=o.valueAsDate||new Date(h),J=V=>new Date(new Date().toDateString()+" "+V),A=o.type=="time",N=o.type=="week";Dr(L.value)&&h&&(I=A?J(h)>J(L.value):N?h>L.value:K>new Date(L.value)),Dr(X.value)&&h&&(W=A?J(h)<J(X.value):N?h<X.value:K<new Date(X.value))}if((I||W)&&(Q(!!I,L.message,X.message,Qr.max,Qr.min),!n))return b(S[m].message),S}if((c||u)&&!M&&(Dr(h)||i&&Array.isArray(h))){const I=Js(c),W=Js(u),L=!_t(I.value)&&h.length>+I.value,X=!_t(W.value)&&h.length<+W.value;if((L||X)&&(Q(L,I.message,W.message),!n))return b(S[m].message),S}if(p&&!M&&Dr(h)){const{value:I,message:W}=Js(p);if(pc(I)&&!h.match(I)&&(S[m]={type:Qr.pattern,message:W,ref:o,...D(Qr.pattern,W)},!n))return b(W),S}if(_){if(vr(_)){const I=await _(h,r),W=Dg(I,v);if(W&&(S[m]={...W,...D(Qr.validate,W.message)},!n))return b(W.message),S}else if(Ze(_)){let I={};for(const W in _){if(!Pt(I)&&!n)break;const L=Dg(await _[W](h,r),v,W);L&&(I={...L,...D(W,L.message)},b(L.message),n&&(S[m]=I))}if(!Pt(I)&&(S[m]={ref:v,...I},!n))return S}}return b(!0),S};const xR={mode:gr.onSubmit,reValidateMode:gr.onChange,shouldFocusError:!0};function _R(t={}){let e={...xR,...t},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:vr(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},n={},s=Ze(e.defaultValues)||Ze(e.values)?Xe(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:Xe(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:Pg(),state:Pg()},p=e.criteriaMode===gr.all,_=k=>T=>{clearTimeout(c),c=setTimeout(k,T)},m=async k=>{if(!e.disabled&&(u.isValid||d.isValid||k)){const T=e.resolver?Pt((await E()).errors):await M(n,!0);T!==r.isValid&&f.state.next({isValid:T})}},x=(k,T)=>{!e.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(R=>{R&&(T?Te(r.validatingFields,R,T):Ye(r.validatingFields,R))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Pt(r.validatingFields)}))},y=(k,T=[],R,B,z=!0,U=!0)=>{if(B&&R&&!e.disabled){if(o.action=!0,U&&Array.isArray(q(n,k))){const Z=R(q(n,k),B.argA,B.argB);z&&Te(n,k,Z)}if(U&&Array.isArray(q(r.errors,k))){const Z=R(q(r.errors,k),B.argA,B.argB);z&&Te(r.errors,k,Z),yR(r.errors,k)}if((u.touchedFields||d.touchedFields)&&U&&Array.isArray(q(r.touchedFields,k))){const Z=R(q(r.touchedFields,k),B.argA,B.argB);z&&Te(r.touchedFields,k,Z)}(u.dirtyFields||d.dirtyFields)&&(r.dirtyFields=bo(s,i)),f.state.next({name:k,isDirty:Q(k,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Te(i,k,T)},h=(k,T)=>{Te(r.errors,k,T),f.state.next({errors:r.errors})},v=k=>{r.errors=k,f.state.next({errors:r.errors,isValid:!1})},b=(k,T,R,B)=>{const z=q(n,k);if(z){const U=q(i,k,Ge(R)?q(s,k):R);Ge(U)||B&&B.defaultChecked||T?Te(i,k,T?U:jg(z._f)):L(k,U),o.mount&&m()}},S=(k,T,R,B,z)=>{let U=!1,Z=!1;const ve={name:k};if(!e.disabled){if(!R||B){(u.isDirty||d.isDirty)&&(Z=r.isDirty,r.isDirty=ve.isDirty=Q(),U=Z!==ve.isDirty);const Re=nn(q(s,k),T);Z=!!q(r.dirtyFields,k),Re?Ye(r.dirtyFields,k):Te(r.dirtyFields,k,!0),ve.dirtyFields=r.dirtyFields,U=U||(u.dirtyFields||d.dirtyFields)&&Z!==!Re}if(R){const Re=q(r.touchedFields,k);Re||(Te(r.touchedFields,k,R),ve.touchedFields=r.touchedFields,U=U||(u.touchedFields||d.touchedFields)&&Re!==R)}U&&z&&f.state.next(ve)}return U?ve:{}},C=(k,T,R,B)=>{const z=q(r.errors,k),U=(u.isValid||d.isValid)&&$t(T)&&r.isValid!==T;if(e.delayError&&R?(l=_(()=>h(k,R)),l(e.delayError)):(clearTimeout(c),l=null,R?Te(r.errors,k,R):Ye(r.errors,k)),(R?!nn(z,R):z)||!Pt(B)||U){const Z={...B,...U&&$t(T)?{isValid:T}:{},errors:r.errors,name:k};r={...r,...Z},f.state.next(Z)}},E=async k=>{x(k,!0);const T=await e.resolver(i,e.context,fR(k||a.mount,n,e.criteriaMode,e.shouldUseNativeValidation));return x(k),T},j=async k=>{const{errors:T}=await E(k);if(k)for(const R of k){const B=q(T,R);B?Te(r.errors,R,B):Ye(r.errors,R)}else r.errors=T;return T},M=async(k,T,R={valid:!0})=>{for(const B in k){const z=k[B];if(z){const{_f:U,...Z}=z;if(U){const ve=a.array.has(U.name),Re=z._f&&hR(z._f);Re&&u.validatingFields&&x([B],!0);const Ct=await $g(z,a.disabled,i,p,e.shouldUseNativeValidation&&!T,ve);if(Re&&u.validatingFields&&x([B]),Ct[U.name]&&(R.valid=!1,T))break;!T&&(q(Ct,U.name)?ve?wR(r.errors,Ct,U.name):Te(r.errors,U.name,Ct[U.name]):Ye(r.errors,U.name))}!Pt(Z)&&await M(Z,T,R)}}return R.valid},D=()=>{for(const k of a.unMount){const T=q(n,k);T&&(T._f.refs?T._f.refs.every(R=>!ed(R)):!ed(T._f.ref))&&H(k)}a.unMount=new Set},Q=(k,T)=>!e.disabled&&(k&&T&&Te(i,k,T),!nn(V(),s)),I=(k,T,R)=>Vx(k,a,{...o.mount?i:Ge(T)?s:Dr(k)?{[k]:T}:T},R,T),W=k=>hp(q(o.mount?i:s,k,e.shouldUnregister?q(s,k,[]):[])),L=(k,T,R={})=>{const B=q(n,k);let z=T;if(B){const U=B._f;U&&(!U.disabled&&Te(i,k,Gx(T,U)),z=fc(U.ref)&&_t(T)?"":T,Wx(U.ref)?[...U.ref.options].forEach(Z=>Z.selected=z.includes(Z.value)):U.refs?ja(U.ref)?U.refs.forEach(Z=>{(!Z.defaultChecked||!Z.disabled)&&(Array.isArray(z)?Z.checked=!!z.find(ve=>ve===Z.value):Z.checked=z===Z.value||!!z)}):U.refs.forEach(Z=>Z.checked=Z.value===z):vp(U.ref)?U.ref.value="":(U.ref.value=z,U.ref.type||f.state.next({name:k,values:Xe(i)})))}(R.shouldDirty||R.shouldTouch)&&S(k,z,R.shouldTouch,R.shouldDirty,!0),R.shouldValidate&&N(k)},X=(k,T,R)=>{for(const B in T){if(!T.hasOwnProperty(B))return;const z=T[B],U=k+"."+B,Z=q(n,U);(a.array.has(k)||Ze(z)||Z&&!Z._f)&&!Cs(z)?X(U,z,R):L(U,z,R)}},K=(k,T,R={})=>{const B=q(n,k),z=a.array.has(k),U=Xe(T);Te(i,k,U),z?(f.array.next({name:k,values:Xe(i)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&R.shouldDirty&&f.state.next({name:k,dirtyFields:bo(s,i),isDirty:Q(k,U)})):B&&!B._f&&!_t(U)?X(k,U,R):L(k,U,R),Lg(k,a)&&f.state.next({...r,name:k}),f.state.next({name:o.mount?k:void 0,values:Xe(i)})},J=async k=>{o.mount=!0;const T=k.target;let R=T.name,B=!0;const z=q(n,R),U=Re=>{B=Number.isNaN(Re)||Cs(Re)&&isNaN(Re.getTime())||nn(Re,q(i,R,Re))},Z=Og(e.mode),ve=Og(e.reValidateMode);if(z){let Re,Ct;const qr=T.type?jg(z._f):Fx(k),Tr=k.type===dc.BLUR||k.type===dc.FOCUS_OUT,Ma=!pR(z._f)&&!e.resolver&&!q(r.errors,R)&&!z._f.deps||vR(Tr,q(r.touchedFields,R),r.isSubmitted,ve,Z),fs=Lg(R,a,Tr);Te(i,R,qr),Tr?(z._f.onBlur&&z._f.onBlur(k),l&&l(0)):z._f.onChange&&z._f.onChange(k);const Pr=S(R,qr,Tr),Da=!Pt(Pr)||fs;if(!Tr&&f.state.next({name:R,type:k.type,values:Xe(i)}),Ma)return(u.isValid||d.isValid)&&(e.mode==="onBlur"?Tr&&m():Tr||m()),Da&&f.state.next({name:R,...fs?{}:Pr});if(!Tr&&fs&&f.state.next({...r}),e.resolver){const{errors:Kr}=await E([R]);if(U(qr),B){const yu=Mg(r.errors,n,R),$a=Mg(Kr,n,yu.name||R);Re=$a.error,R=$a.name,Ct=Pt(Kr)}}else x([R],!0),Re=(await $g(z,a.disabled,i,p,e.shouldUseNativeValidation))[R],x([R]),U(qr),B&&(Re?Ct=!1:(u.isValid||d.isValid)&&(Ct=await M(n,!0)));B&&(z._f.deps&&N(z._f.deps),C(R,Ct,Re,Pr))}},A=(k,T)=>{if(q(r.errors,T)&&k.focus)return k.focus(),1},N=async(k,T={})=>{let R,B;const z=Ho(k);if(e.resolver){const U=await j(Ge(k)?k:z);R=Pt(U),B=k?!z.some(Z=>q(U,Z)):R}else k?(B=(await Promise.all(z.map(async U=>{const Z=q(n,U);return await M(Z&&Z._f?{[U]:Z}:Z)}))).every(Boolean),!(!B&&!r.isValid)&&m()):B=R=await M(n);return f.state.next({...!Dr(k)||(u.isValid||d.isValid)&&R!==r.isValid?{}:{name:k},...e.resolver||!k?{isValid:R}:{},errors:r.errors}),T.shouldFocus&&!B&&qo(n,A,k?z:a.mount),B},V=k=>{const T={...o.mount?i:s};return Ge(k)?T:Dr(k)?q(T,k):k.map(R=>q(T,R))},ne=(k,T)=>({invalid:!!q((T||r).errors,k),isDirty:!!q((T||r).dirtyFields,k),error:q((T||r).errors,k),isValidating:!!q(r.validatingFields,k),isTouched:!!q((T||r).touchedFields,k)}),re=k=>{k&&Ho(k).forEach(T=>Ye(r.errors,T)),f.state.next({errors:k?r.errors:{}})},ie=(k,T,R)=>{const B=(q(n,k,{_f:{}})._f||{}).ref,z=q(r.errors,k)||{},{ref:U,message:Z,type:ve,...Re}=z;Te(r.errors,k,{...Re,...T,ref:B}),f.state.next({name:k,errors:r.errors,isValid:!1}),R&&R.shouldFocus&&B&&B.focus&&B.focus()},se=(k,T)=>vr(k)?f.state.subscribe({next:R=>"values"in R&&k(I(void 0,T),R)}):I(k,T,!0),Ae=k=>f.state.subscribe({next:T=>{gR(k.name,T.name,k.exact)&&mR(T,k.formState||u,Wr,k.reRenderRoot)&&k.callback({values:{...i},...r,...T,defaultValues:s})}}).unsubscribe,$e=k=>(o.mount=!0,d={...d,...k.formState},Ae({...k,formState:d})),H=(k,T={})=>{for(const R of k?Ho(k):a.mount)a.mount.delete(R),a.array.delete(R),T.keepValue||(Ye(n,R),Ye(i,R)),!T.keepError&&Ye(r.errors,R),!T.keepDirty&&Ye(r.dirtyFields,R),!T.keepTouched&&Ye(r.touchedFields,R),!T.keepIsValidating&&Ye(r.validatingFields,R),!e.shouldUnregister&&!T.keepDefaultValue&&Ye(s,R);f.state.next({values:Xe(i)}),f.state.next({...r,...T.keepDirty?{isDirty:Q()}:{}}),!T.keepIsValid&&m()},Se=({disabled:k,name:T})=>{($t(k)&&o.mount||k||a.disabled.has(T))&&(k?a.disabled.add(T):a.disabled.delete(T))},je=(k,T={})=>{let R=q(n,k);const B=$t(T.disabled)||$t(e.disabled);return Te(n,k,{...R||{},_f:{...R&&R._f?R._f:{ref:{name:k}},name:k,mount:!0,...T}}),a.mount.add(k),R?Se({disabled:$t(T.disabled)?T.disabled:e.disabled,name:k}):b(k,!0,T.value),{...B?{disabled:T.disabled||e.disabled}:{},...e.progressive?{required:!!T.required,min:So(T.min),max:So(T.max),minLength:So(T.minLength),maxLength:So(T.maxLength),pattern:So(T.pattern)}:{},name:k,onChange:J,onBlur:J,ref:z=>{if(z){je(k,T),R=q(n,k);const U=Ge(z.value)&&z.querySelectorAll&&z.querySelectorAll("input,select,textarea")[0]||z,Z=cR(U),ve=R._f.refs||[];if(Z?ve.find(Re=>Re===U):U===R._f.ref)return;Te(n,k,{_f:{...R._f,...Z?{refs:[...ve.filter(ed),U,...Array.isArray(q(s,k))?[{}]:[]],ref:{type:U.type,name:k}}:{ref:U}}}),b(k,!1,void 0,U)}else R=q(n,k,{}),R._f&&(R._f.mount=!1),(e.shouldUnregister||T.shouldUnregister)&&!(Ux(a.array,k)&&o.action)&&a.unMount.add(k)}}},ye=()=>e.shouldFocusError&&qo(n,A,a.mount),ge=k=>{$t(k)&&(f.state.next({disabled:k}),qo(n,(T,R)=>{const B=q(n,R);B&&(T.disabled=B._f.disabled||k,Array.isArray(B._f.refs)&&B._f.refs.forEach(z=>{z.disabled=B._f.disabled||k}))},0,!1))},we=(k,T)=>async R=>{let B;R&&(R.preventDefault&&R.preventDefault(),R.persist&&R.persist());let z=Xe(i);if(f.state.next({isSubmitting:!0}),e.resolver){const{errors:U,values:Z}=await E();r.errors=U,z=Xe(Z)}else await M(n);if(a.disabled.size)for(const U of a.disabled)Ye(z,U);if(Ye(r.errors,"root"),Pt(r.errors)){f.state.next({errors:{}});try{await k(z,R)}catch(U){B=U}}else T&&await T({...r.errors},R),ye(),setTimeout(ye);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Pt(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},nt=(k,T={})=>{q(n,k)&&(Ge(T.defaultValue)?K(k,Xe(q(s,k))):(K(k,T.defaultValue),Te(s,k,Xe(T.defaultValue))),T.keepTouched||Ye(r.touchedFields,k),T.keepDirty||(Ye(r.dirtyFields,k),r.isDirty=T.defaultValue?Q(k,Xe(q(s,k))):Q()),T.keepError||(Ye(r.errors,k),u.isValid&&m()),f.state.next({...r}))},yt=(k,T={})=>{const R=k?Xe(k):s,B=Xe(R),z=Pt(k),U=z?s:B;if(T.keepDefaultValues||(s=R),!T.keepValues){if(T.keepDirtyValues){const Z=new Set([...a.mount,...Object.keys(bo(s,i))]);for(const ve of Array.from(Z))q(r.dirtyFields,ve)?Te(U,ve,q(i,ve)):K(ve,q(U,ve))}else{if(fp&&Ge(k))for(const Z of a.mount){const ve=q(n,Z);if(ve&&ve._f){const Re=Array.isArray(ve._f.refs)?ve._f.refs[0]:ve._f.ref;if(fc(Re)){const Ct=Re.closest("form");if(Ct){Ct.reset();break}}}}if(T.keepFieldsRef)for(const Z of a.mount)K(Z,q(U,Z));else n={}}i=e.shouldUnregister?T.keepDefaultValues?Xe(s):{}:Xe(U),f.array.next({values:{...U}}),f.state.next({values:{...U}})}a={mount:T.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!T.keepIsValid||!!T.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:z?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!nn(k,s)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:z?{}:T.keepDirtyValues?T.keepDefaultValues&&i?bo(s,i):r.dirtyFields:T.keepDefaultValues&&k?bo(s,k):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Er=(k,T)=>yt(vr(k)?k(i):k,T),Cr=(k,T={})=>{const R=q(n,k),B=R&&R._f;if(B){const z=B.refs?B.refs[0]:B.ref;z.focus&&(z.focus(),T.shouldSelect&&vr(z.select)&&z.select())}},Wr=k=>{r={...r,...k}},Hr={control:{register:je,unregister:H,getFieldState:ne,handleSubmit:we,setError:ie,_subscribe:Ae,_runSchema:E,_focusError:ye,_getWatch:I,_getDirty:Q,_setValid:m,_setFieldArray:y,_setDisabledField:Se,_setErrors:v,_getFieldArray:W,_reset:yt,_resetDefaultValues:()=>vr(e.defaultValues)&&e.defaultValues().then(k=>{Er(k,e.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:ge,_subjects:f,_proxyFormState:u,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(k){o=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return r},get _options(){return e},set _options(k){e={...e,...k}}},subscribe:$e,trigger:N,register:je,handleSubmit:we,watch:se,setValue:K,getValues:V,reset:Er,resetField:nt,clearErrors:re,unregister:H,setError:ie,setFocus:Cr,getFieldState:ne};return{...Hr,formControl:Hr}}function bR(t={}){const e=P.useRef(void 0),r=P.useRef(void 0),[n,s]=P.useState({isDirty:!1,isValidating:!1,isLoading:vr(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:vr(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:n},t.defaultValues&&!vr(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...a}=_R(t);e.current={...a,formState:n}}const i=e.current.control;return i._options=t,gp(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s(a=>({...a,isReady:!0})),i._formState.isReady=!0,o},[i]),P.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),P.useEffect(()=>{t.mode&&(i._options.mode=t.mode),t.reValidateMode&&(i._options.reValidateMode=t.reValidateMode)},[i,t.mode,t.reValidateMode]),P.useEffect(()=>{t.errors&&(i._setErrors(t.errors),i._focusError())},[i,t.errors]),P.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,t.shouldUnregister]),P.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),P.useEffect(()=>{t.values&&!nn(t.values,r.current)?(i._reset(t.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=t.values,s(o=>({...o}))):i._resetDefaultValues()},[i,t.values]),P.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=zx(n,i),e.current}const Fg=(t,e,r)=>{if(t&&"reportValidity"in t){const n=q(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Zx=(t,e)=>{for(const r in e.fields){const n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?Fg(n.ref,r,t):n.refs&&n.refs.forEach(s=>Fg(s,r,t))}},SR=(t,e)=>{e.shouldUseNativeValidation&&Zx(t,e);const r={};for(const n in t){const s=q(e.fields,n),i=Object.assign(t[n]||{},{ref:s&&s.ref});if(kR(e.names||Object.keys(t),n)){const o=Object.assign({},q(r,n));Te(o,"root",i),Te(r,n,o)}else Te(r,n,i)}return r},kR=(t,e)=>t.some(r=>r.startsWith(e+"."));var ER=function(t,e){for(var r={};t.length;){var n=t[0],s=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[o]={message:a.message,type:a.code}}else r[o]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return t.push(d)})}),e){var l=r[o].types,c=l&&l[n.code];r[o]=Bx(o,e,r,s,c?[].concat(c,n.message):n.message)}t.shift()}return r},CR=function(t,e,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(t[r.mode==="sync"?"parse":"parseAsync"](n,e)).then(function(c){return i.shouldUseNativeValidation&&Zx({},i),{errors:{},values:r.raw?n:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:SR(ER(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},Ee;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Ee||(Ee={}));var Ug;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ug||(Ug={}));const ee=Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jn=t=>{switch(typeof t){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return Number.isNaN(t)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(t)?ee.array:t===null?ee.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ee.promise:typeof Map<"u"&&t instanceof Map?ee.map:typeof Set<"u"&&t instanceof Set?ee.set:typeof Date<"u"&&t instanceof Date?ee.date:ee.object;default:return ee.unknown}},F=Ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pn extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),n}static assert(e){if(!(e instanceof pn))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];r[i]=r[i]||[],r[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}pn.create=t=>new pn(t);const Cf=(t,e)=>{let r;switch(t.code){case F.invalid_type:t.received===ee.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case F.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ee.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ee.joinValues(t.keys,", ")}`;break;case F.invalid_union:r="Invalid input";break;case F.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ee.joinValues(t.options)}`;break;case F.invalid_enum_value:r=`Invalid enum value. Expected ${Ee.joinValues(t.options)}, received '${t.received}'`;break;case F.invalid_arguments:r="Invalid function arguments";break;case F.invalid_return_type:r="Invalid function return type";break;case F.invalid_date:r="Invalid date";break;case F.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ee.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case F.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case F.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case F.custom:r="Invalid input";break;case F.invalid_intersection_types:r="Intersection results could not be merged";break;case F.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case F.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ee.assertNever(t)}return{message:r}};let TR=Cf;function PR(){return TR}const AR=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function G(t,e){const r=PR(),n=AR({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Cf?void 0:Cf].filter(s=>!!s)});t.common.issues.push(n)}class Wt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return oe;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const i=await s.key,o=await s.value;n.push({key:i,value:o})}return Wt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return oe;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const oe=Object.freeze({status:"aborted"}),Ao=t=>({status:"dirty",value:t}),tr=t=>({status:"valid",value:t}),zg=t=>t.status==="aborted",Vg=t=>t.status==="dirty",Yi=t=>t.status==="valid",mc=t=>typeof Promise<"u"&&t instanceof Promise;var te;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(te||(te={}));class ss{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Bg=(t,e)=>{if(Yi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new pn(t.common.issues);return this._error=r,this._error}}};function he(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??r??a.defaultError}},description:s}}class be{get description(){return this._def.description}_getType(e){return jn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:jn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Wt,ctx:{common:e.parent.common,data:e.data,parsedType:jn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(mc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:jn(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Bg(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:jn(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return Yi(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(s=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>Yi(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:jn(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(mc(s)?s:Promise.resolve(s));return Bg(n,i)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=e(s),a=()=>i.addIssue({code:F.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new Xi({schema:this,typeName:ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Xn.create(this,this._def)}nullable(){return eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zr.create(this)}promise(){return wc.create(this,this._def)}or(e){return vc.create([this,e],this._def)}and(e){return yc.create(this,e,this._def)}transform(e){return new Xi({...he(this._def),schema:this,typeName:ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Pf({...he(this._def),innerType:this,defaultValue:r,typeName:ae.ZodDefault})}brand(){return new JR({typeName:ae.ZodBranded,type:this,...he(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Af({...he(this._def),innerType:this,catchValue:r,typeName:ae.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return wp.create(this,e)}readonly(){return Rf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const RR=/^c[^\s-]{8,}$/i,NR=/^[0-9a-z]+$/,jR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,OR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,IR=/^[a-z0-9_-]{21}$/i,LR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,MR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,DR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$R="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let td;const FR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,UR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,zR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,VR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,BR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,WR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Yx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",HR=new RegExp(`^${Yx}$`);function Jx(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function qR(t){return new RegExp(`^${Jx(t)}$`)}function KR(t){let e=`${Yx}T${Jx(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function GR(t,e){return!!((e==="v4"||!e)&&FR.test(t)||(e==="v6"||!e)&&zR.test(t))}function QR(t,e){if(!LR.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function ZR(t,e){return!!((e==="v4"||!e)&&UR.test(t)||(e==="v6"||!e)&&VR.test(t))}class Wn extends be{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ee.string){const i=this._getOrReturnCtx(e);return G(i,{code:F.invalid_type,expected:ee.string,received:i.parsedType}),oe}const n=new Wt;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),G(s,{code:F.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),G(s,{code:F.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?G(s,{code:F.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&G(s,{code:F.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")DR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"email",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")td||(td=new RegExp($R,"u")),td.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"emoji",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")OR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"uuid",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")IR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"nanoid",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")RR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"cuid",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")NR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"cuid2",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")jR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"ulid",code:F.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),G(s,{validation:"url",code:F.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"regex",code:F.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),G(s,{code:F.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),G(s,{code:F.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),G(s,{code:F.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?KR(i).test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{code:F.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?HR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{code:F.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?qR(i).test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{code:F.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?MR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"duration",code:F.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?GR(e.data,i.version)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"ip",code:F.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?QR(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"jwt",code:F.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?ZR(e.data,i.version)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"cidr",code:F.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?BR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"base64",code:F.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?WR.test(e.data)||(s=this._getOrReturnCtx(e,s),G(s,{validation:"base64url",code:F.invalid_string,message:i.message}),n.dirty()):Ee.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:F.invalid_string,...te.errToObj(n)})}_addCheck(e){return new Wn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...te.errToObj(e)})}url(e){return this._addCheck({kind:"url",...te.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...te.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...te.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...te.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...te.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...te.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...te.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...te.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...te.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...te.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...te.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...te.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...te.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...te.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...te.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...te.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...te.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...te.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...te.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...te.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...te.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...te.errToObj(r)})}nonempty(e){return this.min(1,te.errToObj(e))}trim(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Wn.create=t=>new Wn({checks:[],typeName:ae.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...he(t)});function YR(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class ya extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ee.number){const i=this._getOrReturnCtx(e);return G(i,{code:F.invalid_type,expected:ee.number,received:i.parsedType}),oe}let n;const s=new Wt;for(const i of this._def.checks)i.kind==="int"?Ee.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{code:F.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),G(n,{code:F.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),G(n,{code:F.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?YR(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),G(n,{code:F.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{code:F.not_finite,message:i.message}),s.dirty()):Ee.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,n,s){return new ya({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:te.toString(s)}]})}_addCheck(e){return new ya({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:te.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:te.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:te.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:te.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ee.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ya.create=t=>new ya({checks:[],typeName:ae.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...he(t)});class wa extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ee.bigint)return this._getInvalidInput(e);let n;const s=new Wt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),G(n,{code:F.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),G(n,{code:F.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),G(n,{code:F.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Ee.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return G(r,{code:F.invalid_type,expected:ee.bigint,received:r.parsedType}),oe}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,n,s){return new wa({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:te.toString(s)}]})}_addCheck(e){return new wa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}wa.create=t=>new wa({checks:[],typeName:ae.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...he(t)});class Wg extends be{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ee.boolean){const n=this._getOrReturnCtx(e);return G(n,{code:F.invalid_type,expected:ee.boolean,received:n.parsedType}),oe}return tr(e.data)}}Wg.create=t=>new Wg({typeName:ae.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...he(t)});class gc extends be{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ee.date){const i=this._getOrReturnCtx(e);return G(i,{code:F.invalid_type,expected:ee.date,received:i.parsedType}),oe}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return G(i,{code:F.invalid_date}),oe}const n=new Wt;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),G(s,{code:F.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),G(s,{code:F.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Ee.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new gc({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:te.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:te.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}gc.create=t=>new gc({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ae.ZodDate,...he(t)});class Hg extends be{_parse(e){if(this._getType(e)!==ee.symbol){const n=this._getOrReturnCtx(e);return G(n,{code:F.invalid_type,expected:ee.symbol,received:n.parsedType}),oe}return tr(e.data)}}Hg.create=t=>new Hg({typeName:ae.ZodSymbol,...he(t)});class qg extends be{_parse(e){if(this._getType(e)!==ee.undefined){const n=this._getOrReturnCtx(e);return G(n,{code:F.invalid_type,expected:ee.undefined,received:n.parsedType}),oe}return tr(e.data)}}qg.create=t=>new qg({typeName:ae.ZodUndefined,...he(t)});class Kg extends be{_parse(e){if(this._getType(e)!==ee.null){const n=this._getOrReturnCtx(e);return G(n,{code:F.invalid_type,expected:ee.null,received:n.parsedType}),oe}return tr(e.data)}}Kg.create=t=>new Kg({typeName:ae.ZodNull,...he(t)});class Gg extends be{constructor(){super(...arguments),this._any=!0}_parse(e){return tr(e.data)}}Gg.create=t=>new Gg({typeName:ae.ZodAny,...he(t)});class Qg extends be{constructor(){super(...arguments),this._unknown=!0}_parse(e){return tr(e.data)}}Qg.create=t=>new Qg({typeName:ae.ZodUnknown,...he(t)});class is extends be{_parse(e){const r=this._getOrReturnCtx(e);return G(r,{code:F.invalid_type,expected:ee.never,received:r.parsedType}),oe}}is.create=t=>new is({typeName:ae.ZodNever,...he(t)});class Zg extends be{_parse(e){if(this._getType(e)!==ee.undefined){const n=this._getOrReturnCtx(e);return G(n,{code:F.invalid_type,expected:ee.void,received:n.parsedType}),oe}return tr(e.data)}}Zg.create=t=>new Zg({typeName:ae.ZodVoid,...he(t)});class zr extends be{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==ee.array)return G(r,{code:F.invalid_type,expected:ee.array,received:r.parsedType}),oe;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(G(r,{code:o?F.too_big:F.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(G(r,{code:F.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(G(r,{code:F.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new ss(r,o,r.path,a)))).then(o=>Wt.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new ss(r,o,r.path,a)));return Wt.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new zr({...this._def,minLength:{value:e,message:te.toString(r)}})}max(e,r){return new zr({...this._def,maxLength:{value:e,message:te.toString(r)}})}length(e,r){return new zr({...this._def,exactLength:{value:e,message:te.toString(r)}})}nonempty(e){return this.min(1,e)}}zr.create=(t,e)=>new zr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ae.ZodArray,...he(e)});function ai(t){if(t instanceof qe){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Xn.create(ai(n))}return new qe({...t._def,shape:()=>e})}else return t instanceof zr?new zr({...t._def,type:ai(t.element)}):t instanceof Xn?Xn.create(ai(t.unwrap())):t instanceof eo?eo.create(ai(t.unwrap())):t instanceof Vs?Vs.create(t.items.map(e=>ai(e))):t}class qe extends be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ee.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==ee.object){const c=this._getOrReturnCtx(e);return G(c,{code:F.invalid_type,expected:ee.object,received:c.parsedType}),oe}const{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof is&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ss(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof is){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(G(s,{code:F.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ss(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Wt.mergeObjectSync(n,c)):Wt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return te.errToObj,new qe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:te.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new qe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ae.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new qe({...this._def,catchall:e})}pick(e){const r={};for(const n of Ee.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new qe({...this._def,shape:()=>r})}omit(e){const r={};for(const n of Ee.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new qe({...this._def,shape:()=>r})}deepPartial(){return ai(this)}partial(e){const r={};for(const n of Ee.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new qe({...this._def,shape:()=>r})}required(e){const r={};for(const n of Ee.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Xn;)i=i._def.innerType;r[n]=i}return new qe({...this._def,shape:()=>r})}keyof(){return Xx(Ee.objectKeys(this.shape))}}qe.create=(t,e)=>new qe({shape:()=>t,unknownKeys:"strip",catchall:is.create(),typeName:ae.ZodObject,...he(e)});qe.strictCreate=(t,e)=>new qe({shape:()=>t,unknownKeys:"strict",catchall:is.create(),typeName:ae.ZodObject,...he(e)});qe.lazycreate=(t,e)=>new qe({shape:t,unknownKeys:"strip",catchall:is.create(),typeName:ae.ZodObject,...he(e)});class vc extends be{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new pn(a.ctx.common.issues));return G(r,{code:F.invalid_union,unionErrors:o}),oe}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new pn(l));return G(r,{code:F.invalid_union,unionErrors:a}),oe}}get options(){return this._def.options}}vc.create=(t,e)=>new vc({options:t,typeName:ae.ZodUnion,...he(e)});function Tf(t,e){const r=jn(t),n=jn(e);if(t===e)return{valid:!0,data:t};if(r===ee.object&&n===ee.object){const s=Ee.objectKeys(e),i=Ee.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=Tf(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===ee.array&&n===ee.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=Tf(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===ee.date&&n===ee.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class yc extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(i,o)=>{if(zg(i)||zg(o))return oe;const a=Tf(i.value,o.value);return a.valid?((Vg(i)||Vg(o))&&r.dirty(),{status:r.value,value:a.data}):(G(n,{code:F.invalid_intersection_types}),oe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}yc.create=(t,e,r)=>new yc({left:t,right:e,typeName:ae.ZodIntersection,...he(r)});class Vs extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ee.array)return G(n,{code:F.invalid_type,expected:ee.array,received:n.parsedType}),oe;if(n.data.length<this._def.items.length)return G(n,{code:F.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),oe;!this._def.rest&&n.data.length>this._def.items.length&&(G(n,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new ss(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>Wt.mergeArray(r,o)):Wt.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new Vs({...this._def,rest:e})}}Vs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vs({items:t,typeName:ae.ZodTuple,rest:null,...he(e)})};class Yg extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ee.map)return G(n,{code:F.invalid_type,expected:ee.map,received:n.parsedType}),oe;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new ss(n,a,n.path,[c,"key"])),value:i._parse(new ss(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return oe;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return oe;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}Yg.create=(t,e,r)=>new Yg({valueType:e,keyType:t,typeName:ae.ZodMap,...he(r)});class xa extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ee.set)return G(n,{code:F.invalid_type,expected:ee.set,received:n.parsedType}),oe;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(G(n,{code:F.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(G(n,{code:F.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return oe;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>i._parse(new ss(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new xa({...this._def,minSize:{value:e,message:te.toString(r)}})}max(e,r){return new xa({...this._def,maxSize:{value:e,message:te.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}xa.create=(t,e)=>new xa({valueType:t,minSize:null,maxSize:null,typeName:ae.ZodSet,...he(e)});class Jg extends be{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Jg.create=(t,e)=>new Jg({getter:t,typeName:ae.ZodLazy,...he(e)});class Xg extends be{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return G(r,{received:r.data,code:F.invalid_literal,expected:this._def.value}),oe}return{status:"valid",value:e.data}}get value(){return this._def.value}}Xg.create=(t,e)=>new Xg({value:t,typeName:ae.ZodLiteral,...he(e)});function Xx(t,e){return new Ji({values:t,typeName:ae.ZodEnum,...he(e)})}class Ji extends be{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return G(r,{expected:Ee.joinValues(n),received:r.parsedType,code:F.invalid_type}),oe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return G(r,{received:r.data,code:F.invalid_enum_value,options:n}),oe}return tr(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Ji.create(e,{...this._def,...r})}exclude(e,r=this._def){return Ji.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Ji.create=Xx;class ev extends be{_parse(e){const r=Ee.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ee.string&&n.parsedType!==ee.number){const s=Ee.objectValues(r);return G(n,{expected:Ee.joinValues(s),received:n.parsedType,code:F.invalid_type}),oe}if(this._cache||(this._cache=new Set(Ee.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Ee.objectValues(r);return G(n,{received:n.data,code:F.invalid_enum_value,options:s}),oe}return tr(e.data)}get enum(){return this._def.values}}ev.create=(t,e)=>new ev({values:t,typeName:ae.ZodNativeEnum,...he(e)});class wc extends be{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==ee.promise&&r.common.async===!1)return G(r,{code:F.invalid_type,expected:ee.promise,received:r.parsedType}),oe;const n=r.parsedType===ee.promise?r.data:Promise.resolve(r.data);return tr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}wc.create=(t,e)=>new wc({type:t,typeName:ae.ZodPromise,...he(e)});class Xi extends be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{G(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return oe;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?oe:l.status==="dirty"||r.value==="dirty"?Ao(l.value):l});{if(r.value==="aborted")return oe;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?oe:a.status==="dirty"||r.value==="dirty"?Ao(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?oe:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?oe:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Yi(o))return oe;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Yi(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):oe);Ee.assertNever(s)}}Xi.create=(t,e,r)=>new Xi({schema:t,typeName:ae.ZodEffects,effect:e,...he(r)});Xi.createWithPreprocess=(t,e,r)=>new Xi({schema:e,effect:{type:"preprocess",transform:t},typeName:ae.ZodEffects,...he(r)});class Xn extends be{_parse(e){return this._getType(e)===ee.undefined?tr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xn.create=(t,e)=>new Xn({innerType:t,typeName:ae.ZodOptional,...he(e)});class eo extends be{_parse(e){return this._getType(e)===ee.null?tr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eo.create=(t,e)=>new eo({innerType:t,typeName:ae.ZodNullable,...he(e)});class Pf extends be{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===ee.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Pf.create=(t,e)=>new Pf({innerType:t,typeName:ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...he(e)});class Af extends be{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return mc(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new pn(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new pn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Af.create=(t,e)=>new Af({innerType:t,typeName:ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...he(e)});class tv extends be{_parse(e){if(this._getType(e)!==ee.nan){const n=this._getOrReturnCtx(e);return G(n,{code:F.invalid_type,expected:ee.nan,received:n.parsedType}),oe}return{status:"valid",value:e.data}}}tv.create=t=>new tv({typeName:ae.ZodNaN,...he(t)});class JR extends be{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class wp extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?oe:i.status==="dirty"?(r.dirty(),Ao(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?oe:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new wp({in:e,out:r,typeName:ae.ZodPipeline})}}class Rf extends be{_parse(e){const r=this._def.innerType._parse(e),n=s=>(Yi(s)&&(s.value=Object.freeze(s.value)),s);return mc(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Rf.create=(t,e)=>new Rf({innerType:t,typeName:ae.ZodReadonly,...he(e)});qe.lazycreate;var ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ae||(ae={}));const ms=Wn.create;is.create;zr.create;const XR=qe.create;qe.strictCreate;vc.create;yc.create;Vs.create;Ji.create;wc.create;Xn.create;eo.create;const li=w.forwardRef(({className:t,type:e,...r},n)=>g.jsx("input",{type:e,className:Ce("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",t),ref:n,...r}));li.displayName="Input";const e_=w.forwardRef(({className:t,...e},r)=>g.jsx("textarea",{className:Ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-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",t),ref:r,...e}));e_.displayName="Textarea";function rv(t,[e,r]){return Math.min(r,Math.max(e,t))}var eN=w.createContext(void 0);function t_(t){const e=w.useContext(eN);return t||e||"ltr"}var rd=0;function tN(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??nv()),document.body.insertAdjacentElement("beforeend",t[1]??nv()),rd++,()=>{rd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),rd--}},[])}function nv(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var nd="focusScope.autoFocusOnMount",sd="focusScope.autoFocusOnUnmount",sv={bubbles:!1,cancelable:!0},rN="FocusScope",r_=w.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=w.useState(null),c=_r(s),u=_r(i),d=w.useRef(null),f=ze(e,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let m=function(v){if(p.paused||!a)return;const b=v.target;a.contains(b)?d.current=b:kn(d.current,{select:!0})},x=function(v){if(p.paused||!a)return;const b=v.relatedTarget;b!==null&&(a.contains(b)||kn(d.current,{select:!0}))},y=function(v){if(document.activeElement===document.body)for(const S of v)S.removedNodes.length>0&&kn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const h=new MutationObserver(y);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),h.disconnect()}}},[n,a,p.paused]),w.useEffect(()=>{if(a){ov.add(p);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(nd,sv);a.addEventListener(nd,c),a.dispatchEvent(y),y.defaultPrevented||(nN(lN(n_(a)),{select:!0}),document.activeElement===m&&kn(a))}return()=>{a.removeEventListener(nd,c),setTimeout(()=>{const y=new CustomEvent(sd,sv);a.addEventListener(sd,u),a.dispatchEvent(y),y.defaultPrevented||kn(m??document.body,{select:!0}),a.removeEventListener(sd,u),ov.remove(p)},0)}}},[a,c,u,p]);const _=w.useCallback(m=>{if(!r&&!n||p.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const h=m.currentTarget,[v,b]=sN(h);v&&b?!m.shiftKey&&y===b?(m.preventDefault(),r&&kn(v,{select:!0})):m.shiftKey&&y===v&&(m.preventDefault(),r&&kn(b,{select:!0})):y===h&&m.preventDefault()}},[r,n,p.paused]);return g.jsx(xe.div,{tabIndex:-1,...o,ref:f,onKeyDown:_})});r_.displayName=rN;function nN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(kn(n,{select:e}),document.activeElement!==r)return}function sN(t){const e=n_(t),r=iv(e,t),n=iv(e.reverse(),t);return[r,n]}function n_(t){const e=[],r=document.createTreeWalker(t,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();)e.push(r.currentNode);return e}function iv(t,e){for(const r of t)if(!iN(r,{upTo:e}))return r}function iN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function oN(t){return t instanceof HTMLInputElement&&"select"in t}function kn(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&oN(t)&&e&&t.select()}}var ov=aN();function aN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=av(t,e),t.unshift(e)},remove(e){var r;t=av(t,e),(r=t[0])==null||r.resume()}}}function av(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function lN(t){return t.filter(e=>e.tagName!=="A")}function cN(t){const e=w.useRef({value:t,previous:t});return w.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var uN=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Xs=new WeakMap,ll=new WeakMap,cl={},id=0,s_=function(t){return t&&(t.host||s_(t.parentNode))},dN=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=s_(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},fN=function(t,e,r,n){var s=dN(e,Array.isArray(t)?t:[t]);cl[r]||(cl[r]=new WeakMap);var i=cl[r],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var p=f.getAttribute(n),_=p!==null&&p!=="false",m=(Xs.get(f)||0)+1,x=(i.get(f)||0)+1;Xs.set(f,m),i.set(f,x),o.push(f),m===1&&_&&ll.set(f,!0),x===1&&f.setAttribute(r,"true"),_||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return u(e),a.clear(),id++,function(){o.forEach(function(d){var f=Xs.get(d)-1,p=i.get(d)-1;Xs.set(d,f),i.set(d,p),f||(ll.has(d)||d.removeAttribute(n),ll.delete(d)),p||d.removeAttribute(r)}),id--,id||(Xs=new WeakMap,Xs=new WeakMap,ll=new WeakMap,cl={})}},hN=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=uN(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),fN(n,s,r,"aria-hidden")):function(){return null}},Lr=function(){return Lr=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Lr.apply(this,arguments)};function i_(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function pN(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var jl="right-scroll-bar-position",Ol="width-before-scroll-bar",mN="with-scroll-bars-hidden",gN="--removed-body-scroll-bar-size";function od(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function vN(t,e){var r=w.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var yN=typeof window<"u"?w.useLayoutEffect:w.useEffect,lv=new WeakMap;function wN(t,e){var r=vN(null,function(n){return t.forEach(function(s){return od(s,n)})});return yN(function(){var n=lv.get(r);if(n){var s=new Set(n),i=new Set(t),o=r.current;s.forEach(function(a){i.has(a)||od(a,null)}),i.forEach(function(a){s.has(a)||od(a,o)})}lv.set(r,t)},[t]),r}function xN(t){return t}function _N(t,e){e===void 0&&(e=xN);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),r}}}};return s}function bN(t){t===void 0&&(t={});var e=_N(null);return e.options=Lr({async:!0,ssr:!1},t),e}var o_=function(t){var e=t.sideCar,r=i_(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,Lr({},r))};o_.isSideCarExport=!0;function SN(t,e){return t.useMedium(e),o_}var a_=bN(),ad=function(){},nu=w.forwardRef(function(t,e){var r=w.useRef(null),n=w.useState({onScrollCapture:ad,onWheelCapture:ad,onTouchMoveCapture:ad}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,p=t.noRelative,_=t.noIsolation,m=t.inert,x=t.allowPinchZoom,y=t.as,h=y===void 0?"div":y,v=t.gapMode,b=i_(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,C=wN([r,e]),E=Lr(Lr({},b),s);return w.createElement(w.Fragment,null,u&&w.createElement(S,{sideCar:a_,removeScrollBar:c,shards:d,noRelative:p,noIsolation:_,inert:m,setCallbacks:i,allowPinchZoom:!!x,lockRef:r,gapMode:v}),o?w.cloneElement(w.Children.only(a),Lr(Lr({},E),{ref:C})):w.createElement(h,Lr({},E,{className:l,ref:C}),a))});nu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nu.classNames={fullWidth:Ol,zeroRight:jl};var kN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function EN(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=kN();return e&&t.setAttribute("nonce",e),t}function CN(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function TN(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var PN=function(){var t=0,e=null;return{add:function(r){t==0&&(e=EN())&&(CN(e,r),TN(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},AN=function(){var t=PN();return function(e,r){w.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},l_=function(){var t=AN(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},RN={left:0,top:0,right:0,gap:0},ld=function(t){return parseInt(t||"",10)||0},NN=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[ld(r),ld(n),ld(s)]},jN=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return RN;var e=NN(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},ON=l_(),ji="data-scroll-locked",IN=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` .`.concat(mN,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } body[`).concat(ji,`] { overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` padding-left: `.concat(s,`px; padding-top: `).concat(i,`px; padding-right: `).concat(o,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(n,`; `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } .`).concat(jl,` { right: `).concat(a,"px ").concat(n,`; } .`).concat(Ol,` { margin-right: `).concat(a,"px ").concat(n,`; } .`).concat(jl," .").concat(jl,` { right: 0 `).concat(n,`; } .`).concat(Ol," .").concat(Ol,` { margin-right: 0 `).concat(n,`; } body[`).concat(ji,`] { `).concat(gN,": ").concat(a,`px; } `)},cv=function(){var t=parseInt(document.body.getAttribute(ji)||"0",10);return isFinite(t)?t:0},LN=function(){w.useEffect(function(){return document.body.setAttribute(ji,(cv()+1).toString()),function(){var t=cv()-1;t<=0?document.body.removeAttribute(ji):document.body.setAttribute(ji,t.toString())}},[])},MN=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;LN();var i=w.useMemo(function(){return jN(s)},[s]);return w.createElement(ON,{styles:IN(i,!e,s,r?"":"!important")})},Nf=!1;if(typeof window<"u")try{var ul=Object.defineProperty({},"passive",{get:function(){return Nf=!0,!0}});window.addEventListener("test",ul,ul),window.removeEventListener("test",ul,ul)}catch{Nf=!1}var ei=Nf?{passive:!1}:!1,DN=function(t){return t.tagName==="TEXTAREA"},c_=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!DN(t)&&r[e]==="visible")},$N=function(t){return c_(t,"overflowY")},FN=function(t){return c_(t,"overflowX")},uv=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=u_(t,n);if(s){var i=d_(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},UN=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},zN=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},u_=function(t,e){return t==="v"?$N(e):FN(e)},d_=function(t,e){return t==="v"?UN(e):zN(e)},VN=function(t,e){return t==="h"&&e==="rtl"?-1:1},BN=function(t,e,r,n,s){var i=VN(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,u=o>0,d=0,f=0;do{if(!a)break;var p=d_(t,a),_=p[0],m=p[1],x=p[2],y=m-x-i*_;(_||y)&&u_(t,a)&&(d+=y,f+=_);var h=a.parentNode;a=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(d)<1||!s)||!u&&(Math.abs(f)<1||!s))&&(c=!0),c},dl=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},dv=function(t){return[t.deltaX,t.deltaY]},fv=function(t){return t&&"current"in t?t.current:t},WN=function(t,e){return t[0]===e[0]&&t[1]===e[1]},HN=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} `)},qN=0,ti=[];function KN(t){var e=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),s=w.useState(qN++)[0],i=w.useState(l_)[0],o=w.useRef(t);w.useEffect(function(){o.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=pN([t.lockRef.current],(t.shards||[]).map(fv),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=w.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=dl(m),h=r.current,v="deltaX"in m?m.deltaX:h[0]-y[0],b="deltaY"in m?m.deltaY:h[1]-y[1],S,C=m.target,E=Math.abs(v)>Math.abs(b)?"h":"v";if("touches"in m&&E==="h"&&C.type==="range")return!1;var j=uv(E,C);if(!j)return!0;if(j?S=E:(S=E==="v"?"h":"v",j=uv(E,C)),!j)return!1;if(!n.current&&"changedTouches"in m&&(v||b)&&(n.current=S),!S)return!0;var M=n.current||S;return BN(M,x,m,M==="h"?v:b,!0)},[]),l=w.useCallback(function(m){var x=m;if(!(!ti.length||ti[ti.length-1]!==i)){var y="deltaY"in x?dv(x):dl(x),h=e.current.filter(function(S){return S.name===x.type&&(S.target===x.target||x.target===S.shadowParent)&&WN(S.delta,y)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var v=(o.current.shards||[]).map(fv).filter(Boolean).filter(function(S){return S.contains(x.target)}),b=v.length>0?a(x,v[0]):!o.current.noIsolation;b&&x.cancelable&&x.preventDefault()}}},[]),c=w.useCallback(function(m,x,y,h){var v={name:m,delta:x,target:y,should:h,shadowParent:GN(y)};e.current.push(v),setTimeout(function(){e.current=e.current.filter(function(b){return b!==v})},1)},[]),u=w.useCallback(function(m){r.current=dl(m),n.current=void 0},[]),d=w.useCallback(function(m){c(m.type,dv(m),m.target,a(m,t.lockRef.current))},[]),f=w.useCallback(function(m){c(m.type,dl(m),m.target,a(m,t.lockRef.current))},[]);w.useEffect(function(){return ti.push(i),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ei),document.addEventListener("touchmove",l,ei),document.addEventListener("touchstart",u,ei),function(){ti=ti.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,ei),document.removeEventListener("touchmove",l,ei),document.removeEventListener("touchstart",u,ei)}},[]);var p=t.removeScrollBar,_=t.inert;return w.createElement(w.Fragment,null,_?w.createElement(i,{styles:HN(s)}):null,p?w.createElement(MN,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function GN(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const QN=SN(a_,KN);var f_=w.forwardRef(function(t,e){return w.createElement(nu,Lr({},t,{ref:e,sideCar:QN}))});f_.classNames=nu.classNames;var ZN=[" ","Enter","ArrowUp","ArrowDown"],YN=[" ","Enter"],Bs="Select",[su,iu,JN]=Wh(Bs),[lo,OI]=Gs(Bs,[JN,Kc]),ou=Kc(),[XN,cs]=lo(Bs),[ej,tj]=lo(Bs),h_=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:_}=t,m=ou(e),[x,y]=w.useState(null),[h,v]=w.useState(null),[b,S]=w.useState(!1),C=t_(c),[E,j]=Gi({prop:n,defaultProp:s??!1,onChange:i,caller:Bs}),[M,D]=Gi({prop:o,defaultProp:a,onChange:l,caller:Bs}),Q=w.useRef(null),I=x?_||!!x.closest("form"):!0,[W,L]=w.useState(new Set),X=Array.from(W).map(K=>K.props.value).join(";");return g.jsx(pP,{...m,children:g.jsxs(XN,{required:p,scope:e,trigger:x,onTriggerChange:y,valueNode:h,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:Ra(),value:M,onValueChange:D,open:E,onOpenChange:j,dir:C,triggerPointerDownPosRef:Q,disabled:f,children:[g.jsx(su.Provider,{scope:e,children:g.jsx(ej,{scope:t.__scopeSelect,onNativeOptionAdd:w.useCallback(K=>{L(J=>new Set(J).add(K))},[]),onNativeOptionRemove:w.useCallback(K=>{L(J=>{const A=new Set(J);return A.delete(K),A})},[]),children:r})}),I?g.jsxs(D_,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:M,onChange:K=>D(K.target.value),disabled:f,form:_,children:[M===void 0?g.jsx("option",{value:""}):null,Array.from(W)]},X):null]})})};h_.displayName=Bs;var p_="SelectTrigger",m_=w.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=ou(r),o=cs(p_,r),a=o.disabled||n,l=ze(e,o.onTriggerChange),c=iu(r),u=w.useRef("touch"),[d,f,p]=F_(m=>{const x=c().filter(v=>!v.disabled),y=x.find(v=>v.value===o.value),h=U_(x,m,y);h!==void 0&&o.onValueChange(h.value)}),_=m=>{a||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return g.jsx(ux,{asChild:!0,...i,children:g.jsx(xe.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":$_(o.value)?"":void 0,...s,ref:l,onClick:fe(s.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&_(m)}),onPointerDown:fe(s.onPointerDown,m=>{u.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(_(m),m.preventDefault())}),onKeyDown:fe(s.onKeyDown,m=>{const x=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(x&&m.key===" ")&&ZN.includes(m.key)&&(_(),m.preventDefault())})})})});m_.displayName=p_;var g_="SelectValue",v_=w.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,l=cs(g_,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=ze(e,l.onValueNodeChange);return at(()=>{c(u)},[c,u]),g.jsx(xe.span,{...a,ref:d,style:{pointerEvents:"none"},children:$_(l.value)?g.jsx(g.Fragment,{children:o}):i})});v_.displayName=g_;var rj="SelectIcon",y_=w.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return g.jsx(xe.span,{"aria-hidden":!0,...s,ref:e,children:n||"▼"})});y_.displayName=rj;var nj="SelectPortal",w_=t=>g.jsx(Hh,{asChild:!0,...t});w_.displayName=nj;var Ws="SelectContent",x_=w.forwardRef((t,e)=>{const r=cs(Ws,t.__scopeSelect),[n,s]=w.useState();if(at(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Ks.createPortal(g.jsx(__,{scope:t.__scopeSelect,children:g.jsx(su.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),i):null}return g.jsx(b_,{...t,ref:e})});x_.displayName=Ws;var lr=10,[__,us]=lo(Ws),sj="SelectContentImpl",ij=ha("SelectContent.RemoveScroll"),b_=w.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:_,hideWhenDetached:m,avoidCollisions:x,...y}=t,h=cs(Ws,r),[v,b]=w.useState(null),[S,C]=w.useState(null),E=ze(e,H=>b(H)),[j,M]=w.useState(null),[D,Q]=w.useState(null),I=iu(r),[W,L]=w.useState(!1),X=w.useRef(!1);w.useEffect(()=>{if(v)return hN(v)},[v]),tN();const K=w.useCallback(H=>{const[Se,...je]=I().map(we=>we.ref.current),[ye]=je.slice(-1),ge=document.activeElement;for(const we of H)if(we===ge||(we==null||we.scrollIntoView({block:"nearest"}),we===Se&&S&&(S.scrollTop=0),we===ye&&S&&(S.scrollTop=S.scrollHeight),we==null||we.focus(),document.activeElement!==ge))return},[I,S]),J=w.useCallback(()=>K([j,v]),[K,j,v]);w.useEffect(()=>{W&&J()},[W,J]);const{onOpenChange:A,triggerPointerDownPosRef:N}=h;w.useEffect(()=>{if(v){let H={x:0,y:0};const Se=ye=>{var ge,we;H={x:Math.abs(Math.round(ye.pageX)-(((ge=N.current)==null?void 0:ge.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((we=N.current)==null?void 0:we.y)??0))}},je=ye=>{H.x<=10&&H.y<=10?ye.preventDefault():v.contains(ye.target)||A(!1),document.removeEventListener("pointermove",Se),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",je,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",je,{capture:!0})}}},[v,A,N]),w.useEffect(()=>{const H=()=>A(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[A]);const[V,ne]=F_(H=>{const Se=I().filter(ge=>!ge.disabled),je=Se.find(ge=>ge.ref.current===document.activeElement),ye=U_(Se,H,je);ye&&setTimeout(()=>ye.ref.current.focus())}),re=w.useCallback((H,Se,je)=>{const ye=!X.current&&!je;(h.value!==void 0&&h.value===Se||ye)&&(M(H),ye&&(X.current=!0))},[h.value]),ie=w.useCallback(()=>v==null?void 0:v.focus(),[v]),se=w.useCallback((H,Se,je)=>{const ye=!X.current&&!je;(h.value!==void 0&&h.value===Se||ye)&&Q(H)},[h.value]),Ae=n==="popper"?jf:S_,$e=Ae===jf?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:_,hideWhenDetached:m,avoidCollisions:x}:{};return g.jsx(__,{scope:r,content:v,viewport:S,onViewportChange:C,itemRefCallback:re,selectedItem:j,onItemLeave:ie,itemTextRefCallback:se,focusSelectedItem:J,selectedItemText:D,position:n,isPositioned:W,searchRef:V,children:g.jsx(f_,{as:ij,allowPinchZoom:!0,children:g.jsx(r_,{asChild:!0,trapped:h.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:fe(s,H=>{var Se;(Se=h.trigger)==null||Se.focus({preventScroll:!0}),H.preventDefault()}),children:g.jsx(Uc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:g.jsx(Ae,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:H=>H.preventDefault(),...y,...$e,onPlaced:()=>L(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:fe(y.onKeyDown,H=>{const Se=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!Se&&H.key.length===1&&ne(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let ye=I().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(H.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const ge=H.target,we=ye.indexOf(ge);ye=ye.slice(we+1)}setTimeout(()=>K(ye)),H.preventDefault()}})})})})})})});b_.displayName=sj;var oj="SelectItemAlignedPosition",S_=w.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=cs(Ws,r),o=us(Ws,r),[a,l]=w.useState(null),[c,u]=w.useState(null),d=ze(e,E=>u(E)),f=iu(r),p=w.useRef(!1),_=w.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:y,focusSelectedItem:h}=o,v=w.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&x&&y){const E=i.trigger.getBoundingClientRect(),j=c.getBoundingClientRect(),M=i.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(i.dir!=="rtl"){const ge=D.left-j.left,we=M.left-ge,nt=E.left-we,yt=E.width+nt,Er=Math.max(yt,j.width),Cr=window.innerWidth-lr,Wr=rv(we,[lr,Math.max(lr,Cr-Er)]);a.style.minWidth=yt+"px",a.style.left=Wr+"px"}else{const ge=j.right-D.right,we=window.innerWidth-M.right-ge,nt=window.innerWidth-E.right-we,yt=E.width+nt,Er=Math.max(yt,j.width),Cr=window.innerWidth-lr,Wr=rv(we,[lr,Math.max(lr,Cr-Er)]);a.style.minWidth=yt+"px",a.style.right=Wr+"px"}const Q=f(),I=window.innerHeight-lr*2,W=m.scrollHeight,L=window.getComputedStyle(c),X=parseInt(L.borderTopWidth,10),K=parseInt(L.paddingTop,10),J=parseInt(L.borderBottomWidth,10),A=parseInt(L.paddingBottom,10),N=X+K+W+A+J,V=Math.min(x.offsetHeight*5,N),ne=window.getComputedStyle(m),re=parseInt(ne.paddingTop,10),ie=parseInt(ne.paddingBottom,10),se=E.top+E.height/2-lr,Ae=I-se,$e=x.offsetHeight/2,H=x.offsetTop+$e,Se=X+K+H,je=N-Se;if(Se<=se){const ge=Q.length>0&&x===Q[Q.length-1].ref.current;a.style.bottom="0px";const we=c.clientHeight-m.offsetTop-m.offsetHeight,nt=Math.max(Ae,$e+(ge?ie:0)+we+J),yt=Se+nt;a.style.height=yt+"px"}else{const ge=Q.length>0&&x===Q[0].ref.current;a.style.top="0px";const nt=Math.max(se,X+m.offsetTop+(ge?re:0)+$e)+je;a.style.height=nt+"px",m.scrollTop=Se-se+m.offsetTop}a.style.margin=`${lr}px 0`,a.style.minHeight=V+"px",a.style.maxHeight=I+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,a,c,m,x,y,i.dir,n]);at(()=>v(),[v]);const[b,S]=w.useState();at(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const C=w.useCallback(E=>{E&&_.current===!0&&(v(),h==null||h(),_.current=!1)},[v,h]);return g.jsx(lj,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:g.jsx(xe.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});S_.displayName=oj;var aj="SelectPopperPosition",jf=w.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=lr,...i}=t,o=ou(r);return g.jsx(dx,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jf.displayName=aj;var[lj,xp]=lo(Ws,{}),Of="SelectViewport",k_=w.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=us(Of,r),o=xp(Of,r),a=ze(e,i.onViewportChange),l=w.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),g.jsx(su.Slot,{scope:r,children:g.jsx(xe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:fe(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const p=Math.abs(l.current-u.scrollTop);if(p>0){const _=window.innerHeight-lr*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),y=Math.max(m,x);if(y<_){const h=y+p,v=Math.min(_,h),b=h-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=b>0?b:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});k_.displayName=Of;var E_="SelectGroup",[cj,uj]=lo(E_),dj=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Ra();return g.jsx(cj,{scope:r,id:s,children:g.jsx(xe.div,{role:"group","aria-labelledby":s,...n,ref:e})})});dj.displayName=E_;var C_="SelectLabel",T_=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=uj(C_,r);return g.jsx(xe.div,{id:s.id,...n,ref:e})});T_.displayName=C_;var xc="SelectItem",[fj,P_]=lo(xc),A_=w.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=cs(xc,r),l=us(xc,r),c=a.value===n,[u,d]=w.useState(i??""),[f,p]=w.useState(!1),_=ze(e,h=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,h,n,s)}),m=Ra(),x=w.useRef("touch"),y=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(fj,{scope:r,value:n,disabled:s,textId:m,isSelected:c,onItemTextChange:w.useCallback(h=>{d(v=>v||((h==null?void 0:h.textContent)??"").trim())},[]),children:g.jsx(su.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:g.jsx(xe.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:_,onFocus:fe(o.onFocus,()=>p(!0)),onBlur:fe(o.onBlur,()=>p(!1)),onClick:fe(o.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:fe(o.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:fe(o.onPointerDown,h=>{x.current=h.pointerType}),onPointerMove:fe(o.onPointerMove,h=>{var v;x.current=h.pointerType,s?(v=l.onItemLeave)==null||v.call(l):x.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:fe(o.onPointerLeave,h=>{var v;h.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:fe(o.onKeyDown,h=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&h.key===" "||(YN.includes(h.key)&&y(),h.key===" "&&h.preventDefault())})})})})});A_.displayName=xc;var Ro="SelectItemText",R_=w.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=cs(Ro,r),a=us(Ro,r),l=P_(Ro,r),c=tj(Ro,r),[u,d]=w.useState(null),f=ze(e,y=>d(y),l.onItemTextChange,y=>{var h;return(h=a.itemTextRefCallback)==null?void 0:h.call(a,y,l.value,l.disabled)}),p=u==null?void 0:u.textContent,_=w.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=c;return at(()=>(m(_),()=>x(_)),[m,x,_]),g.jsxs(g.Fragment,{children:[g.jsx(xe.span,{id:l.textId,...i,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ks.createPortal(i.children,o.valueNode):null]})});R_.displayName=Ro;var N_="SelectItemIndicator",j_=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return P_(N_,r).isSelected?g.jsx(xe.span,{"aria-hidden":!0,...n,ref:e}):null});j_.displayName=N_;var If="SelectScrollUpButton",O_=w.forwardRef((t,e)=>{const r=us(If,t.__scopeSelect),n=xp(If,t.__scopeSelect),[s,i]=w.useState(!1),o=ze(e,n.onScrollButtonChange);return at(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?g.jsx(L_,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});O_.displayName=If;var Lf="SelectScrollDownButton",I_=w.forwardRef((t,e)=>{const r=us(Lf,t.__scopeSelect),n=xp(Lf,t.__scopeSelect),[s,i]=w.useState(!1),o=ze(e,n.onScrollButtonChange);return at(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?g.jsx(L_,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});I_.displayName=Lf;var L_=w.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=us("SelectScrollButton",r),o=w.useRef(null),a=iu(r),l=w.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),at(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),g.jsx(xe.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:fe(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:fe(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:fe(s.onPointerLeave,()=>{l()})})}),hj="SelectSeparator",M_=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return g.jsx(xe.div,{"aria-hidden":!0,...n,ref:e})});M_.displayName=hj;var Mf="SelectArrow",pj=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=ou(r),i=cs(Mf,r),o=us(Mf,r);return i.open&&o.position==="popper"?g.jsx(fx,{...s,...n,ref:e}):null});pj.displayName=Mf;var mj="SelectBubbleInput",D_=w.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const s=w.useRef(null),i=ze(n,s),o=cN(e);return w.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const d=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(d)}},[o,e]),g.jsx(xe.select,{...r,style:{...aw,...r.style},ref:i,defaultValue:e})});D_.displayName=mj;function $_(t){return t===""||t===void 0}function F_(t){const e=_r(t),r=w.useRef(""),n=w.useRef(0),s=w.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function U_(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=gj(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function gj(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var vj=h_,z_=m_,yj=v_,wj=y_,xj=w_,V_=x_,_j=k_,B_=T_,W_=A_,bj=R_,Sj=j_,H_=O_,q_=I_,K_=M_;const kj=vj,Ej=yj,G_=w.forwardRef(({className:t,children:e,...r},n)=>g.jsxs(z_,{ref:n,className:Ce("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[e,g.jsx(wj,{asChild:!0,children:g.jsx(Zh,{className:"h-4 w-4 opacity-50"})})]}));G_.displayName=z_.displayName;const Q_=w.forwardRef(({className:t,...e},r)=>g.jsx(H_,{ref:r,className:Ce("flex cursor-default items-center justify-center py-1",t),...e,children:g.jsx(SE,{className:"h-4 w-4"})}));Q_.displayName=H_.displayName;const Z_=w.forwardRef(({className:t,...e},r)=>g.jsx(q_,{ref:r,className:Ce("flex cursor-default items-center justify-center py-1",t),...e,children:g.jsx(Zh,{className:"h-4 w-4"})}));Z_.displayName=q_.displayName;const Y_=w.forwardRef(({className:t,children:e,position:r="popper",...n},s)=>g.jsx(xj,{children:g.jsxs(V_,{ref:s,className:Ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:[g.jsx(Q_,{}),g.jsx(_j,{className:Ce("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),g.jsx(Z_,{})]})}));Y_.displayName=V_.displayName;const Cj=w.forwardRef(({className:t,...e},r)=>g.jsx(B_,{ref:r,className:Ce("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));Cj.displayName=B_.displayName;const No=w.forwardRef(({className:t,children:e,...r},n)=>g.jsxs(W_,{ref:n,className:Ce("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(Sj,{children:g.jsx(xE,{className:"h-4 w-4"})})}),g.jsx(bj,{children:e})]}));No.displayName=W_.displayName;const Tj=w.forwardRef(({className:t,...e},r)=>g.jsx(K_,{ref:r,className:Ce("-mx-1 my-1 h-px bg-muted",t),...e}));Tj.displayName=K_.displayName;var Pj="Label",J_=w.forwardRef((t,e)=>g.jsx(xe.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));J_.displayName=Pj;var X_=J_;const Aj=Qh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),eb=w.forwardRef(({className:t,...e},r)=>g.jsx(X_,{ref:r,className:Ce(Aj(),t),...e}));eb.displayName=X_.displayName;const Rj=sR,tb=w.createContext({}),gs=({...t})=>g.jsx(tb.Provider,{value:{name:t.name},children:g.jsx(lR,{...t})}),au=()=>{const t=w.useContext(tb),e=w.useContext(rb),{getFieldState:r,formState:n}=ru(),s=r(t.name,n);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:i}=e;return{id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},rb=w.createContext({}),En=w.forwardRef(({className:t,...e},r)=>{const n=w.useId();return g.jsx(rb.Provider,{value:{id:n},children:g.jsx("div",{ref:r,className:Ce("space-y-2",t),...e})})});En.displayName="FormItem";const Cn=w.forwardRef(({className:t,...e},r)=>{const{error:n,formItemId:s}=au();return g.jsx(eb,{ref:r,className:Ce(n&&"text-destructive",t),htmlFor:s,...e})});Cn.displayName="FormLabel";const Tn=w.forwardRef(({...t},e)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:i}=au();return g.jsx(tw,{ref:e,id:n,"aria-describedby":r?`${s} ${i}`:`${s}`,"aria-invalid":!!r,...t})});Tn.displayName="FormControl";const Nj=w.forwardRef(({className:t,...e},r)=>{const{formDescriptionId:n}=au();return g.jsx("p",{ref:r,id:n,className:Ce("text-sm text-muted-foreground",t),...e})});Nj.displayName="FormDescription";const Pn=w.forwardRef(({className:t,children:e,...r},n)=>{const{error:s,formMessageId:i}=au(),o=s?String(s==null?void 0:s.message):e;return o?g.jsx("p",{ref:n,id:i,className:Ce("text-sm font-medium text-destructive",t),...r,children:o}):null});Pn.displayName="FormMessage";const jj="modulepreload",Oj=function(t){return"/"+t},hv={},Oa=function(e,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=Oj(l),l in hv)return;hv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":jj,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})},Ij=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Oa(async()=>{const{default:n}=await Promise.resolve().then(()=>co);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};class _p extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class Lj extends _p{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class pv extends _p{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class mv extends _p{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Df;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Df||(Df={}));var Mj=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};class Dj{constructor(e,{headers:r={},customFetch:n,region:s=Df.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=Ij(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,r={}){var n;return Mj(this,void 0,void 0,function*(){try{const{headers:s,method:i,body:o}=r;let a={},{region:l}=r;l||(l=this.region);const c=new URL(`${this.url}/${e}`);l&&l!=="any"&&(a["x-region"]=l,c.searchParams.set("forceFunctionRegion",l));let u;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",u=o):typeof o=="string"?(a["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(a["Content-Type"]="application/json",u=JSON.stringify(o)));const d=yield this.fetch(c.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:u}).catch(m=>{throw new Lj(m)}),f=d.headers.get("x-relay-error");if(f&&f==="true")throw new pv(d);if(!d.ok)throw new mv(d);let p=((n=d.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),_;return p==="application/json"?_=yield d.json():p==="application/octet-stream"?_=yield d.blob():p==="text/event-stream"?_=d:p==="multipart/form-data"?_=yield d.formData():_=yield d.text(),{data:_,error:null,response:d}}catch(s){return{data:null,error:s,response:s instanceof mv||s instanceof pv?s.context:void 0}}})}}var Nt={},bp={},lu={},Ia={},cu={},uu={},$j=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},to=$j();const Fj=to.fetch,nb=to.fetch.bind(to),sb=to.Headers,Uj=to.Request,zj=to.Response,co=Object.freeze(Object.defineProperty({__proto__:null,Headers:sb,Request:Uj,Response:zj,default:nb,fetch:Fj},Symbol.toStringTag,{value:"Module"})),Vj=Zb(co);var du={};Object.defineProperty(du,"__esModule",{value:!0});let Bj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}};du.default=Bj;var ib=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uu,"__esModule",{value:!0});const Wj=ib(Vj),Hj=ib(du);let qj=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=Wj.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,r){return this.headers=Object.assign({},this.headers),this.headers[e]=r,this}then(e,r){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["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=>{var o,a,l;let c=null,u=null,d=null,f=i.status,p=i.statusText;if(i.ok){if(this.method!=="HEAD"){const y=await i.text();y===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?u=y:u=JSON.parse(y))}const m=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),x=(a=i.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");m&&x&&x.length>1&&(d=parseInt(x[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(c={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,d=null,f=406,p="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const m=await i.text();try{c=JSON.parse(m),Array.isArray(c)&&i.status===404&&(u=[],c=null,f=200,p="OK")}catch{i.status===404&&m===""?(f=204,p="No Content"):c={message:m}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,f=200,p="OK"),c&&this.shouldThrowOnError)throw new Hj.default(c)}return{error:c,data:u,count:d,status:f,statusText:p}});return this.shouldThrowOnError||(s=s.catch(i=>{var o,a,l;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(a=i==null?void 0:i.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=i==null?void 0:i.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(e,r)}returns(){return this}overrideTypes(){return this}};uu.default=qj;var Kj=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cu,"__esModule",{value:!0});const Gj=Kj(uu);let Qj=class extends Gj.default{select(e){let r=!1;const n=(e??"*").split("").map(s=>/\s/.test(s)&&!r?"":(s==='"'&&(r=!r),s)).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:r=!0,nullsFirst:n,foreignTable:s,referencedTable:i=s}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${r?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,r,{foreignTable:n,referencedTable:s=n}={}){const i=typeof s>"u"?"offset":`${s}.offset`,o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${r-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:r=!1,settings:n=!1,buffers:s=!1,wal:i=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,r?"verbose":null,n?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};cu.default=Qj;var Zj=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ia,"__esModule",{value:!0});const Yj=Zj(cu);let Jj=class extends Yj.default{eq(e,r){return this.url.searchParams.append(e,`eq.${r}`),this}neq(e,r){return this.url.searchParams.append(e,`neq.${r}`),this}gt(e,r){return this.url.searchParams.append(e,`gt.${r}`),this}gte(e,r){return this.url.searchParams.append(e,`gte.${r}`),this}lt(e,r){return this.url.searchParams.append(e,`lt.${r}`),this}lte(e,r){return this.url.searchParams.append(e,`lte.${r}`),this}like(e,r){return this.url.searchParams.append(e,`like.${r}`),this}likeAllOf(e,r){return this.url.searchParams.append(e,`like(all).{${r.join(",")}}`),this}likeAnyOf(e,r){return this.url.searchParams.append(e,`like(any).{${r.join(",")}}`),this}ilike(e,r){return this.url.searchParams.append(e,`ilike.${r}`),this}ilikeAllOf(e,r){return this.url.searchParams.append(e,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(e,r){return this.url.searchParams.append(e,`ilike(any).{${r.join(",")}}`),this}is(e,r){return this.url.searchParams.append(e,`is.${r}`),this}in(e,r){const n=Array.from(new Set(r)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cs.{${r.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(r)}`),this}containedBy(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cd.{${r.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(r)}`),this}rangeGt(e,r){return this.url.searchParams.append(e,`sr.${r}`),this}rangeGte(e,r){return this.url.searchParams.append(e,`nxl.${r}`),this}rangeLt(e,r){return this.url.searchParams.append(e,`sl.${r}`),this}rangeLte(e,r){return this.url.searchParams.append(e,`nxr.${r}`),this}rangeAdjacent(e,r){return this.url.searchParams.append(e,`adj.${r}`),this}overlaps(e,r){return typeof r=="string"?this.url.searchParams.append(e,`ov.${r}`):this.url.searchParams.append(e,`ov.{${r.join(",")}}`),this}textSearch(e,r,{config:n,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${o}.${r}`),this}match(e){return Object.entries(e).forEach(([r,n])=>{this.url.searchParams.append(r,`eq.${n}`)}),this}not(e,r,n){return this.url.searchParams.append(e,`not.${r}.${n}`),this}or(e,{foreignTable:r,referencedTable:n=r}={}){const s=n?`${n}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,r,n){return this.url.searchParams.append(e,`${r}.${n}`),this}};Ia.default=Jj;var Xj=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lu,"__esModule",{value:!0});const ko=Xj(Ia);let eO=class{constructor(e,{headers:r={},schema:n,fetch:s}){this.url=e,this.headers=r,this.schema=n,this.fetch=s}select(e,{head:r=!1,count:n}={}){const 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.Prefer=`count=${n}`),new ko.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:r,defaultToNull:n=!0}={}){const s="POST",i=[];if(this.headers.Prefer&&i.push(this.headers.Prefer),r&&i.push(`count=${r}`),n||i.push("missing=default"),this.headers.Prefer=i.join(","),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new ko.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:r,ignoreDuplicates:n=!1,count:s,defaultToNull:i=!0}={}){const o="POST",a=[`resolution=${n?"ignore":"merge"}-duplicates`];if(r!==void 0&&this.url.searchParams.set("on_conflict",r),this.headers.Prefer&&a.push(this.headers.Prefer),s&&a.push(`count=${s}`),i||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new ko.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:r}={}){const n="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),r&&s.push(`count=${r}`),this.headers.Prefer=s.join(","),new ko.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const r="DELETE",n=[];return e&&n.push(`count=${e}`),this.headers.Prefer&&n.unshift(this.headers.Prefer),this.headers.Prefer=n.join(","),new ko.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};lu.default=eO;var fu={},hu={};Object.defineProperty(hu,"__esModule",{value:!0});hu.version=void 0;hu.version="0.0.0-automated";Object.defineProperty(fu,"__esModule",{value:!0});fu.DEFAULT_HEADERS=void 0;const tO=hu;fu.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${tO.version}`};var ob=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bp,"__esModule",{value:!0});const rO=ob(lu),nO=ob(Ia),sO=fu;let iO=class ab{constructor(e,{headers:r={},schema:n,fetch:s}={}){this.url=e,this.headers=Object.assign(Object.assign({},sO.DEFAULT_HEADERS),r),this.schemaName=n,this.fetch=s}from(e){const r=new URL(`${this.url}/${e}`);return new rO.default(r,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new ab(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let l;n||s?(o=n?"HEAD":"GET",Object.entries(r).filter(([u,d])=>d!==void 0).map(([u,d])=>[u,Array.isArray(d)?`{${d.join(",")}}`:`${d}`]).forEach(([u,d])=>{a.searchParams.append(u,d)})):(o="POST",l=r);const c=Object.assign({},this.headers);return i&&(c.Prefer=`count=${i}`),new nO.default({method:o,url:a,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};bp.default=iO;var uo=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.PostgrestError=Nt.PostgrestBuilder=Nt.PostgrestTransformBuilder=Nt.PostgrestFilterBuilder=Nt.PostgrestQueryBuilder=Nt.PostgrestClient=void 0;const lb=uo(bp);Nt.PostgrestClient=lb.default;const cb=uo(lu);Nt.PostgrestQueryBuilder=cb.default;const ub=uo(Ia);Nt.PostgrestFilterBuilder=ub.default;const db=uo(cu);Nt.PostgrestTransformBuilder=db.default;const fb=uo(uu);Nt.PostgrestBuilder=fb.default;const hb=uo(du);Nt.PostgrestError=hb.default;var oO=Nt.default={PostgrestClient:lb.default,PostgrestQueryBuilder:cb.default,PostgrestFilterBuilder:ub.default,PostgrestTransformBuilder:db.default,PostgrestBuilder:fb.default,PostgrestError:hb.default};const{PostgrestClient:aO,PostgrestQueryBuilder:FI,PostgrestFilterBuilder:UI,PostgrestTransformBuilder:zI,PostgrestBuilder:VI,PostgrestError:BI}=oO;class lO{static dynamicRequire(e){try{return typeof process<"u"&&process.versions&&process.versions.node&&typeof require<"u"?require(e):null}catch{return null}}static detectEnvironment(){var e,r;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"&&process.versions&&process.versions.node){const n=parseInt(process.versions.node.split(".")[0]);if(n>=22)try{if(typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};const s=this.dynamicRequire("undici");if(s&&s.WebSocket)return{type:"native",constructor:s.WebSocket};throw new Error("undici not available")}catch{return{type:"unsupported",error:`Node.js ${n} detected but native WebSocket not found.`,workaround:'Install the "ws" package or check your Node.js installation.'}}try{const s=this.dynamicRequire("ws");if(s)return{type:"ws",constructor:(r=s.WebSocket)!==null&&r!==void 0?r:s};throw new Error("ws package not available")}catch{return{type:"unsupported",error:`Node.js ${n} detected without WebSocket support.`,workaround:'Install the "ws" package: npm install ws'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` Suggested solution: ${e.workaround}`),new Error(r)}static createWebSocket(e,r){const n=this.getWebSocketConstructor();return new n(e,r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const cO="2.15.0",uO=`realtime-js/${cO}`,dO="1.0.0",$f=1e4,fO=1e3,hO=100;var Ko;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Ko||(Ko={}));var et;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(et||(et={}));var pr;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(pr||(pr={}));var Ff;(function(t){t.websocket="websocket"})(Ff||(Ff={}));var bs;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(bs||(bs={}));class pO{constructor(){this.HEADER_LENGTH=1}decode(e,r){return e.constructor===ArrayBuffer?r(this._binaryDecode(e)):r(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const r=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,r,n)}_decodeBroadcast(e,r,n){const s=r.getUint8(1),i=r.getUint8(2);let o=this.HEADER_LENGTH+2;const a=n.decode(e.slice(o,o+s));o=o+s;const l=n.decode(e.slice(o,o+i));o=o+i;const c=JSON.parse(n.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class pb{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,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 Oe;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Oe||(Oe={}));const gv=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return Object.keys(e).reduce((i,o)=>(i[o]=mO(o,t,e,s),i),{})},mO=(t,e,r,n)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=r[t];return i&&!n.includes(i)?mb(i,o):Uf(o)},mb=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return wO(e,r)}switch(t){case Oe.bool:return gO(e);case Oe.float4:case Oe.float8:case Oe.int2:case Oe.int4:case Oe.int8:case Oe.numeric:case Oe.oid:return vO(e);case Oe.json:case Oe.jsonb:return yO(e);case Oe.timestamp:return xO(e);case Oe.abstime:case Oe.date:case Oe.daterange:case Oe.int4range:case Oe.int8range:case Oe.money:case Oe.reltime:case Oe.text:case Oe.time:case Oe.timestamptz:case Oe.timetz:case Oe.tsrange:case Oe.tstzrange:return Uf(e);default:return Uf(e)}},Uf=t=>t,gO=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},vO=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},yO=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},wO=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const o=t.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>mb(e,a))}return t},xO=t=>typeof t=="string"?t.replace(" ","T"):t,gb=t=>{let e=t;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"};class cd{constructor(e,r,n={},s=$f){this.channel=e,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(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var vv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(vv||(vv={}));class Go{constructor(e,r){this.channel=e,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=Go.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Go.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=Go.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,s){const i=this.cloneDeep(e),o=this.transformState(r),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const d=i[c];if(d){const f=u.map(x=>x.presence_ref),p=d.map(x=>x.presence_ref),_=u.filter(x=>p.indexOf(x.presence_ref)<0),m=d.filter(x=>f.indexOf(x.presence_ref)<0);_.length>0&&(a[c]=_),m.length>0&&(l[c]=m)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},n,s)}static syncDiff(e,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 c;const u=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),u.length>0){const d=e[a].map(p=>p.presence_ref),f=u.filter(p=>d.indexOf(p.presence_ref)<0);e[a].unshift(...f)}n(a,u,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;const u=l.map(d=>d.presence_ref);c=c.filter(d=>u.indexOf(d.presence_ref)<0),e[a]=c,s(a,c,l),c.length===0&&delete e[a]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[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(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var yv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(yv||(yv={}));var Qo;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Qo||(Qo={}));var Xr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Xr||(Xr={}));class Sp{constructor(e,r={config:{}},n){this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=et.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new cd(this,pr.join,this.params,this.timeout),this.rejoinTimer=new pb(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=et.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=et.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=et.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=et.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=et.errored,this.rejoinTimer.scheduleTimeout())}),this._on(pr.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new Go(this),this.broadcastEndpointURL=gb(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(e,r=this.timeout){var n,s;if(this.socket.isConnected()||this.socket.connect(),this.state==et.closed){const{config:{broadcast:i,presence:o,private:a}}=this.params,l=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[Qo.PRESENCE]&&this.bindings[Qo.PRESENCE].length>0,u={},d={broadcast:i,presence:Object.assign(Object.assign({},o),{enabled:c}),postgres_changes:l,private:a};this.socket.accessTokenValue&&(u.access_token=this.socket.accessTokenValue),this._onError(f=>e==null?void 0:e(Xr.CHANNEL_ERROR,f)),this._onClose(()=>e==null?void 0:e(Xr.CLOSED)),this.updateJoinPayload(Object.assign({config:d},u)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:f})=>{var p;if(this.socket.setAuth(),f===void 0){e==null||e(Xr.SUBSCRIBED);return}else{const _=this.bindings.postgres_changes,m=(p=_==null?void 0:_.length)!==null&&p!==void 0?p:0,x=[];for(let y=0;y<m;y++){const h=_[y],{filter:{event:v,schema:b,table:S,filter:C}}=h,E=f&&f[y];if(E&&E.event===v&&E.schema===b&&E.table===S&&E.filter===C)x.push(Object.assign(Object.assign({},h),{id:E.id}));else{this.unsubscribe(),this.state=et.errored,e==null||e(Xr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=x,e&&e(Xr.SUBSCRIBED);return}}).receive("error",f=>{this.state=et.errored,e==null||e(Xr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(Xr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this.state===et.joined&&e===Qo.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,r,n)}async send(e,r={}){var n,s;if(!this._canPush()&&e.type==="broadcast"){const{event:i,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=et.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(pr.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new cd(this,pr.leave,{},e),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(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=et.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new cd(this,e,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>hO){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var s,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=pr;if(n&&[a,l,c,u].indexOf(o)>=0&&n!==this._joinRef())return;let f=this._onMessage(o,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var _,m,x;return((_=p.filter)===null||_===void 0?void 0:_.event)==="*"||((x=(m=p.filter)===null||m===void 0?void 0:m.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(p=>p.callback(f,n)):(i=this.bindings[o])===null||i===void 0||i.filter(p=>{var _,m,x,y,h,v;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const b=p.id,S=(_=p.filter)===null||_===void 0?void 0:_.event;return b&&((m=r.ids)===null||m===void 0?void 0:m.includes(b))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((x=r.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const b=(h=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||h===void 0?void 0:h.toLocaleLowerCase();return b==="*"||b===((v=r==null?void 0:r.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof f=="object"&&"ids"in f){const _=f.data,{schema:m,table:x,commit_timestamp:y,type:h,errors:v}=_;f=Object.assign(Object.assign({},{schema:m,table:x,commit_timestamp:y,eventType:h,new:{},old:{},errors:v}),this._getPayloadRecords(_))}p.callback(f,n)})}_isClosed(){return this.state===et.closed}_isJoined(){return this.state===et.joined}_isJoining(){return this.state===et.joining}_isLeaving(){return this.state===et.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const s=e.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,r){const n=e.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&&Sp.isEqual(s.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(pr.close,{},e)}_onError(e){this._on(pr.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=et.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=gv(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=gv(e.columns,e.old_record)),r}}const wv=()=>{},fl={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},_O=[1e3,2e3,5e3,1e4],bO=1e4,SO=` addEventListener("message", (e) => { if (e.data.event === "start") { setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); } });`;class kO{constructor(e,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=$f,this.transport=null,this.heartbeatIntervalMs=fl.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=wv,this.ref=0,this.reconnectTimer=null,this.logger=wv,this.conn=null,this.sendBuffer=[],this.serializer=new pO,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>Oa(async()=>{const{default:a}=await Promise.resolve().then(()=>co);return{default:a}},void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((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=`${e}/${Ff.websocket}`,this.httpEndpoint=gb(e),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._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=lO.createWebSocket(this.endpointURL())}catch(e){throw this._setConnectionState("disconnected"),new Error(`WebSocket not available: ${e.message}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:dO}))}disconnect(e,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")},e?this.conn.close(e,r??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Ko.connecting:return bs.Connecting;case Ko.open:return bs.Open;case Ko.closing:return bs.Closing;default:return bs.Closed}}isConnected(){return this.connectionState()===bs.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new Sp(`realtime:${e}`,r,this);return this.channels.push(i),i}}push(e){const{topic:r,event:n,payload:s,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(fO,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},fl.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,r=>{r.topic==="phoenix"&&r.event==="phx_reply"&&this.heartbeatCallback(r.payload.status==="ok"?"ok":"error"),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(c=>c._isMember(n)).forEach(c=>c._trigger(s,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(e){var r;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="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=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var r;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(pr.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${e}${n}${s}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([SO],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(e,r=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(e=null){let r;e?r=e:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const s={access_token:r,version:uO};r&&n.updateJoinPayload(s),n.joinedOnce&&n._isJoined()&&n._push(pr.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${e}`,r)})}_triggerStateCallbacks(e,r){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new pb(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},fl.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,s,i,o,a,l,c;if(this.transport=(r=e==null?void 0:e.transport)!==null&&r!==void 0?r:null,this.timeout=(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:$f,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:fl.HEARTBEAT_INTERVAL,this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(a=e==null?void 0:e.reconnectAfterMs)!==null&&a!==void 0?a:u=>_O[u-1]||bO,this.encode=(l=e==null?void 0:e.encode)!==null&&l!==void 0?l:(u,d)=>d(JSON.stringify(u)),this.decode=(c=e==null?void 0:e.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}class kp extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function st(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class EO extends kp{constructor(e,r,n){super(e),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class zf extends kp{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}var CO=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const vb=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Oa(async()=>{const{default:n}=await Promise.resolve().then(()=>co);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},TO=()=>CO(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Oa(()=>Promise.resolve().then(()=>co),void 0)).Response:Response}),Vf=t=>{if(Array.isArray(t))return t.map(r=>Vf(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Vf(n)}),e},PO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};var Qs=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ud=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),AO=(t,e,r)=>Qs(void 0,void 0,void 0,function*(){const n=yield TO();t instanceof n&&!(r!=null&&r.noResolveJson)?t.json().then(s=>{const i=t.status||500,o=(s==null?void 0:s.statusCode)||i+"";e(new EO(ud(s),i,o))}).catch(s=>{e(new zf(ud(s),s))}):e(new zf(ud(t),t))}),RO=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!n?s:(PO(n)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(n)):s.body=n,Object.assign(Object.assign({},s),r))};function La(t,e,r,n,s,i){return Qs(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(r,RO(e,n,s,i)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>AO(l,a,n))})})}function _c(t,e,r,n){return Qs(this,void 0,void 0,function*(){return La(t,"GET",e,r,n)})}function en(t,e,r,n,s){return Qs(this,void 0,void 0,function*(){return La(t,"POST",e,n,s,r)})}function Bf(t,e,r,n,s){return Qs(this,void 0,void 0,function*(){return La(t,"PUT",e,n,s,r)})}function NO(t,e,r,n){return Qs(this,void 0,void 0,function*(){return La(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function yb(t,e,r,n,s){return Qs(this,void 0,void 0,function*(){return La(t,"DELETE",e,n,s,r)})}var Tt=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const jO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},xv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class OO{constructor(e,r={},n,s){this.url=e,this.headers=r,this.bucketId=n,this.fetch=vb(s)}uploadOrUpdate(e,r,n,s){return Tt(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},xv),s);let a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const c=this._removeEmptyFolders(r),u=this._getFinalPath(c),d=yield(e=="PUT"?Bf:en)(this.fetch,`${this.url}/object/${u}`,i,Object.assign({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:c,id:d.Id,fullPath:d.Key},error:null}}catch(i){if(st(i))return{data:null,error:i};throw i}})}upload(e,r,n){return Tt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,s){return Tt(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",r);try{let l;const c=Object.assign({upsert:xv.upsert},s),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const d=yield Bf(this.fetch,a.toString(),l,{headers:u});return{data:{path:i,fullPath:d.Key},error:null}}catch(l){if(st(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,r){return Tt(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const s=Object.assign({},this.headers);r!=null&&r.upsert&&(s["x-upsert"]="true");const i=yield en(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(this.url+i.url),a=o.searchParams.get("token");if(!a)throw new kp("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(n){if(st(n))return{data:null,error:n};throw n}})}update(e,r,n){return Tt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return Tt(this,void 0,void 0,function*(){try{return{data:yield en(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(st(s))return{data:null,error:s};throw s}})}copy(e,r,n){return Tt(this,void 0,void 0,function*(){try{return{data:{path:(yield en(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(st(s))return{data:null,error:s};throw s}})}createSignedUrl(e,r,n){return Tt(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),i=yield en(this.fetch,`${this.url}/object/sign/${s}`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(st(s))return{data:null,error:s};throw s}})}createSignedUrls(e,r,n){return Tt(this,void 0,void 0,function*(){try{const s=yield en(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(st(s))return{data:null,error:s};throw s}})}download(e,r){return Tt(this,void 0,void 0,function*(){const s=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=i?`?${i}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield _c(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(st(a))return{data:null,error:a};throw a}})}info(e){return Tt(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield _c(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Vf(n),error:null}}catch(n){if(st(n))return{data:null,error:n};throw n}})}exists(e){return Tt(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield NO(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(st(n)&&n instanceof zf){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),s=[],i=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";i!==""&&s.push(i);const a=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&s.push(l);let c=s.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${c}`)}}}remove(e){return Tt(this,void 0,void 0,function*(){try{return{data:yield yb(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if(st(r))return{data:null,error:r};throw r}})}list(e,r,n){return Tt(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},jO),r),{prefix:e||""});return{data:yield en(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},n),error:null}}catch(s){if(st(s))return{data:null,error:s};throw s}})}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 r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const IO="2.10.4",LO={"X-Client-Info":`storage-js/${IO}`};var ri=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};class MO{constructor(e,r={},n,s){const i=new URL(e);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({},LO),r),this.fetch=vb(n)}listBuckets(){return ri(this,void 0,void 0,function*(){try{return{data:yield _c(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(st(e))return{data:null,error:e};throw e}})}getBucket(e){return ri(this,void 0,void 0,function*(){try{return{data:yield _c(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if(st(r))return{data:null,error:r};throw r}})}createBucket(e,r={public:!1}){return ri(this,void 0,void 0,function*(){try{return{data:yield en(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:r.type,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(st(n))return{data:null,error:n};throw n}})}updateBucket(e,r){return ri(this,void 0,void 0,function*(){try{return{data:yield Bf(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(st(n))return{data:null,error:n};throw n}})}emptyBucket(e){return ri(this,void 0,void 0,function*(){try{return{data:yield en(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(st(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ri(this,void 0,void 0,function*(){try{return{data:yield yb(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(st(r))return{data:null,error:r};throw r}})}}class DO extends MO{constructor(e,r={},n,s){super(e,r,n,s)}from(e){return new OO(this.url,this.headers,e,this.fetch)}}const $O="2.54.0";let jo="";typeof Deno<"u"?jo="deno":typeof document<"u"?jo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?jo="react-native":jo="node";const FO={"X-Client-Info":`supabase-js-${jo}/${$O}`},UO={headers:FO},zO={schema:"public"},VO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},BO={};var WO=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const HO=t=>{let e;return t?e=t:typeof fetch>"u"?e=nb:e=fetch,(...r)=>e(...r)},qO=()=>typeof Headers>"u"?sb:Headers,KO=(t,e,r)=>{const n=HO(r),s=qO();return(i,o)=>WO(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:t;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(i,Object.assign(Object.assign({},o),{headers:c}))})};var GO=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function QO(t){return t.endsWith("/")?t:t+"/"}function ZO(t,e){var r,n;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:c,realtime:u,global:d}=e,f={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},c),i),realtime:Object.assign(Object.assign({},u),o),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:()=>GO(this,void 0,void 0,function*(){return""})};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}const wb="2.71.1",ci=30*1e3,Wf=3,dd=Wf*ci,YO="http://localhost:9999",JO="supabase.auth.token",XO={"X-Client-Info":`gotrue-js/${wb}`},Hf="X-Supabase-Api-Version",xb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},e2=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,t2=10*60*1e3;class Ep extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function ue(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class r2 extends Ep{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function n2(t){return ue(t)&&t.name==="AuthApiError"}class _b extends Ep{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class ds extends Ep{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class An extends ds{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function s2(t){return ue(t)&&t.name==="AuthSessionMissingError"}class hl extends ds{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class pl extends ds{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ml extends ds{constructor(e,r=null){super(e,"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 i2(t){return ue(t)&&t.name==="AuthImplicitGrantRedirectError"}class _v extends ds{constructor(e,r=null){super(e,"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 qf extends ds{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function fd(t){return ue(t)&&t.name==="AuthRetryableFetchError"}class bv extends ds{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Kf extends ds{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const bc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Sv=` \r=`.split(""),o2=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Sv.length;e+=1)t[Sv[e].charCodeAt(0)]=-2;for(let e=0;e<bc.length;e+=1)t[bc[e].charCodeAt(0)]=e;return t})();function kv(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(bc[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(bc[n]),e.queuedBits-=6}}function bb(t,e,r){const n=o2[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Ev(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{c2(o,n,r)};for(let o=0;o<t.length;o+=1)bb(t.charCodeAt(o),s,i);return e.join("")}function a2(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function l2(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}a2(n,e)}}function c2(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function u2(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)bb(t.charCodeAt(s),r,n);return new Uint8Array(e)}function d2(t){const e=[];return l2(t,r=>e.push(r)),new Uint8Array(e)}function f2(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>kv(s,r,n)),kv(null,r,n),e.join("")}function h2(t){return Math.round(Date.now()/1e3)+t}function p2(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const ar=()=>typeof window<"u"&&typeof document<"u",vs={tested:!1,writable:!1},Sb=()=>{if(!ar())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(vs.tested)return vs.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),vs.tested=!0,vs.writable=!0}catch{vs.tested=!0,vs.writable=!1}return vs.writable};function m2(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const kb=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Oa(async()=>{const{default:n}=await Promise.resolve().then(()=>co);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},g2=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",ui=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},ys=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},bn=async(t,e)=>{await t.removeItem(e)};class pu{constructor(){this.promise=new pu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}pu.promiseConstructor=Promise;function hd(t){const e=t.split(".");if(e.length!==3)throw new Kf("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!e2.test(e[n]))throw new Kf("JWT not in base64url format");return{header:JSON.parse(Ev(e[0])),payload:JSON.parse(Ev(e[1])),signature:u2(e[2]),raw:{header:e[0],payload:e[1]}}}async function v2(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function y2(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){n(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function w2(t){return("0"+t.toString(16)).substr(-2)}function x2(){const e=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(e),Array.from(e,w2).join("")}async function _2(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function b2(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await _2(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ni(t,e,r=!1){const n=x2();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await ui(t,`${e}-code-verifier`,s);const i=await b2(n);return[i,n===i?"plain":"s256"]}const S2=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function k2(t){const e=t.headers.get(Hf);if(!e||!e.match(S2))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function E2(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function C2(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const T2=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function si(t){if(!T2.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function pd(){const t={};return new Proxy(t,{get:(e,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:(e,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:(e,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 Cv(t){return JSON.parse(JSON.stringify(t))}var P2=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r};const _s=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),A2=[502,503,504];async function Tv(t){var e;if(!g2(t))throw new qf(_s(t),0);if(A2.includes(t.status))throw new qf(_s(t),t.status);let r;try{r=await t.json()}catch(i){throw new _b(_s(i),i)}let n;const s=k2(t);if(s&&s.getTime()>=xb["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 bv(_s(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new An}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 bv(_s(r),t.status,r.weak_password.reasons);throw new r2(_s(r),t.status||500,n)}const R2=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function pe(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Hf]||(i[Hf]=xb["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 N2(t,e,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 N2(t,e,r,n,s,i){const o=R2(e,n,s,i);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new qf(_s(l),0)}if(a.ok||await Tv(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Tv(l)}}function Yr(t){var e;let r=null;L2(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=h2(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function Pv(t){const e=Yr(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Ln(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function j2(t){return{data:t,error:null}}function O2(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,o=P2(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,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 I2(t){return t}function L2(t){return t.access_token&&t.refresh_token&&t.expires_in}const md=["global","local","others"];var M2=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r};class D2{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=kb(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,r=md[0]){if(md.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${md.join(", ")}`);try{return await pe(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ue(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await pe(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Ln})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=M2(e,["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 pe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:O2,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ue(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await pe(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ln})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await pe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:I2});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(_=>{const m=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(_.split(";")[1].split("=")[1]);c[`${x}Page`]=m}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(ue(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){si(e);try{return await pe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ln})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){si(e);try{return await pe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Ln})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){si(e);try{return await pe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Ln})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){si(e.userId);try{const{data:r,error:n}=await pe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(ue(r))return{data:null,error:r};throw r}}async _deleteFactor(e){si(e.userId),si(e.id);try{return{data:await pe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(ue(r))return{data:null,error:r};throw r}}}function Av(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}function $2(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const ii={debug:!!(globalThis&&Sb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Eb extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class F2 extends Eb{}async function U2(t,e,r){ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),ii.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await r()}finally{ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new F2(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(ii.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()}}))}$2();const z2={url:YO,storageKey:JO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:XO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Rv(t,e,r){return await r()}const oi={};class _a{constructor(e){var r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=_a.nextInstanceID,_a.nextInstanceID+=1,this.instanceID>0&&ar()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},z2),e);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new D2({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=kb(s.fetch),this.lock=s.lock||Rv,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:ar()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=U2:this.lock=Rv,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:Sb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Av(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Av(this.memoryStorage)),ar()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var e,r;return(r=(e=oi[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){oi[this.storageKey]=Object.assign(Object.assign({},oi[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=oi[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){oi[this.storageKey]=Object.assign(Object.assign({},oi[this.storageKey]),{cachedAt:e})}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${wb}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const r=m2(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),ar()&&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),i2(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ue(r)?{error:r}:{error:new _b("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Yr}),{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(ue(i))return{data:{user:null,session:null},error:i};throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:u,password:d,options:f}=e;let p=null,_=null;this.flowType==="pkce"&&([p,_]=await ni(this.storage,this.storageKey)),i=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:_},xform:Yr})}else if("phone"in e){const{phone:u,password:d,options:f}=e;i=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Yr})}else throw new pl("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(ue(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:o,options:a}=e;r=await pe(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:Pv})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await pe(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:Pv})}else throw new pl("You must provide either an email or phone number and a password");const{data:n,error:s}=r;return s?{data:{user:null,session:null},error:s}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new hl}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(ue(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;if(r==="solana")return await this.signInWithSolana(e);throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}async signInWithSolana(e){var r,n,s,i,o,a,l,c,u,d,f,p;let _,m;if("message"in e)_=e.message,m=e.signature;else{const{chain:x,wallet:y,statement:h,options:v}=e;let b;if(ar())if(typeof y=="object")b=y;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))b=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=y}const S=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in b&&b.signIn){const C=await b.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),h?{statement:h}:null));let E;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")E=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)E=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)_=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in 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");_=[`${S.host} wants you to sign in with your Solana account:`,b.publicKey.toBase58(),...h?["",h,""]:[""],"Version: 1",`URI: ${S.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}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((d=(u=v==null?void 0:v.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...v.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` `);const C=await b.signMessage(new TextEncoder().encode(_),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=C}}try{const{data:x,error:y}=await pe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:f2(m)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Yr});if(y)throw y;return!x||!x.session||!x.user?{data:{user:null,session:null},error:new hl}:(x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),{data:Object.assign({},x),error:y})}catch(x){if(ue(x))return{data:{user:null,session:null},error:x};throw x}}async _exchangeCodeForSession(e){const r=await ys(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{const{data:i,error:o}=await pe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Yr});if(await bn(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new hl}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(ue(i))return{data:{user:null,session:null,redirectType:null},error:i};throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await pe(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:Yr}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new hl}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(r){if(ue(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await ni(this.storage,this.storageKey));const{error:d}=await pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u}}throw new pl("You must provide either an email or phone number.")}catch(a){if(ue(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await pe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Yr});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(ue(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var r,n,s;try{let i=null,o=null;return this.flowType==="pkce"&&([i,o]=await ni(this.storage,this.storageKey)),await pe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:j2})}catch(i){if(ue(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new An;const{error:s}=await pe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(ue(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await pe(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{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await pe(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new pl("You must provide either an email or phone number and a type")}catch(r){if(ue(r))return{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(e,r){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(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 e=null;const r=await ys(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<dd:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await ys(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=pd()}if(this.storage.isServer&&e.user){let o=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,c,u)=>(!o&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,u))})}return{data:{session:e},error:null}}const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ln}):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 An}:await pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Ln})})}catch(r){if(ue(r))return s2(r)&&(await this._removeSession(),await bn(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new An;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await ni(this.storage,this.storageKey));const{data:c,error:u}=await pe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Ln});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new An;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=hd(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(r){if(ue(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new An;const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(ue(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!ar())throw new ml("No browser detected.");if(e.error||e.error_description||e.error_code)throw new ml(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new _v("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ml("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new _v("No code detected.");const{data:h,error:v}=await this._exchangeCodeForSession(e.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:h.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=e;if(!i||!a||!o||!c)throw new ml("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let f=u+d;l&&(f=parseInt(l));const p=f-u;p*1e3<=ci&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const _=f-d;u-_>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",_,f,u):u-_<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",_,f,u);const{data:m,error:x}=await this._getUser(i);if(x)throw x;const y={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:f,refresh_token:o,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:e.type},error:null}}catch(n){if(ue(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await ys(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return{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,e);if(a&&!(n2(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await bn(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const r=p2(),n={id:r,callback:e,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(e){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(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await ni(this.storage,this.storageKey,!0));try{return await pe(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(ue(i))return{data:null,error:i};throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if(ue(r))return{data:null,error:r};throw r}}async linkIdentity(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await pe(this.fetch,"GET",p,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return ar()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:e.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(ue(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;return await pe(this.fetch,"DELETE",`${this.url}/user/identities/${e.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(ue(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await y2(async s=>(s>0&&await v2(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await pe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Yr})),(s,i)=>{const o=200*Math.pow(2,s);return i&&fd(i)&&Date.now()+o-n<ci})}catch(n){if(this._debug(r,"error",n),ue(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),ar()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await ys(this.storage,this.storageKey);if(s&&this.userStorage){let o=await ys(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await ui(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:pd()}else if(s&&!s.user&&!s.user){const o=await ys(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await bn(this.storage,this.storageKey+"-user"),await ui(this.storage,this.storageKey,s)):s.user=pd()}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()<dd;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${dd}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),fd(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(e){var r,n;if(!e)throw new An;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new pu;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new An;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={session:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),ue(i)){const o={session:null,error:i};return fd(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(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,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(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await ui(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Cv(s);await ui(this.storage,this.storageKey,i)}else{const s=Cv(r);await ui(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await bn(this.storage,this.storageKey),await bn(this.storage,this.storageKey+"-code-verifier"),await bn(this.storage,this.storageKey+"-user"),this.userStorage&&await bn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&ar()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),ci);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async 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-e)/ci);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ci}ms, refresh threshold is ${Wf} ticks`),s<=Wf&&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(e){if(e.isAcquireTimeout||e instanceof Eb)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ar()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(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(e,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 ni(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}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?{data:null,error:i}:await pe(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ue(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:c}=await pe(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?{data:null,error:c}:(e.factorType==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(r){if(ue(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return{data:null,error:i};const{data:o,error:a}=await pe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(r){if(ue(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?{data:null,error:i}:await pe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ue(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){const{data:{user:e},error:r}=await this.getUser();if(r)return{data:null,error:r};const n=(e==null?void 0:e.factors)||[],s=n.filter(o=>o.factor_type==="totp"&&o.status==="verified"),i=n.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:n,totp:s,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var r,n;const{data:{session:s},error:i}=e;if(i)return{data:null,error:i};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=hd(s.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((n=(r=s.user.factors)===null||r===void 0?void 0:r.filter(d=>d.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(l="aal2");const u=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}))}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+t2>s)return n;const{data:i,error:o}=await pe(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===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:p,error:_}=await this.getSession();if(_||!p.session)return{data:null,error:_};n=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=hd(n);r!=null&&r.allowExpired||E2(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const u=C2(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,d2(`${a}.${l}`)))throw new Kf("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(ue(n))return{data:null,error:n};throw n}}}_a.nextInstanceID=0;const V2=_a;class B2 extends V2{constructor(e){super(e)}}var W2=function(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};class H2{constructor(e,r,n){var s,i,o;if(this.supabaseUrl=e,this.supabaseKey=r,!e)throw new Error("supabaseUrl is required.");if(!r)throw new Error("supabaseKey is required.");const a=QO(e),l=new URL(a);this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,u={db:zO,realtime:BO,auth:Object.assign(Object.assign({},VO),{storageKey:c}),global:UO},d=ZO(n??{},u);this.storageKey=(s=d.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(f,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=KO(r,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new aO(new URL("rest/v1",l).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new DO(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new Dj(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,r={},n={}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,r;return W2(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:n}=yield this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,storageKey:i,flowType:o,lock:a,debug:l},c,u){const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new B2({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),c),storageKey:i,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,flowType:o,lock:a,debug:l,fetch:u,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new kO(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?this.changedAccessToken=n:e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const q2=(t,e,r)=>new H2(t,e,r);function K2(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}K2()&&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 G2="https://gowftcizuizukacwewcj.supabase.co",Q2="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imdvd2Z0Y2l6dWl6dWthY3dld2NqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM0NTczMzQsImV4cCI6MjA2OTAzMzMzNH0.SDhn6uQhNS-pCFCkM1ReuVr7cSgdr4LNEL5vCg--LgI",Z2=q2(G2,Q2,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Y2=XR({name:ms().trim().min(2,"Name must be at least 2 characters").max(100),email:ms().trim().email("Invalid email address").max(255),phone:ms().trim().min(10,"Phone number must be at least 10 digits").max(20),serviceType:ms().min(1,"Please select a service"),origin:ms().trim().min(2,"Origin is required").max(200),destination:ms().trim().min(2,"Destination is required").max(200),description:ms().trim().min(10,"Please provide more details").max(1e3)}),J2=()=>{const[t,e]=w.useState(!1),r=bR({resolver:CR(Y2),defaultValues:{name:"",email:"",phone:"",serviceType:"",origin:"",destination:"",description:""}}),n=async s=>{e(!0);try{const{error:i}=await Z2.functions.invoke("send-quote-email",{body:{name:s.name,email:s.email,phone:s.phone,serviceType:s.serviceType,origin:s.origin,destination:s.destination,description:s.description}});if(i)throw i;eg.success("Quote request submitted successfully! We'll get back to you soon."),r.reset()}catch(i){console.error("Error submitting quote:",i),eg.error("Failed to submit quote request. Please try again or contact us directly.")}finally{e(!1)}};return g.jsx("section",{id:"quote",className:"py-24 bg-background",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsxs("div",{className:"text-center mb-12",children:[g.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 text-foreground",children:"Get a Quote"}),g.jsx("p",{className:"text-xl text-muted-foreground",children:"Request a competitive shipping quote tailored to your needs"})]}),g.jsx("div",{className:"bg-card border border-border rounded-lg p-8 shadow-lg",children:g.jsx(Rj,{...r,children:g.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-6",children:[g.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[g.jsx(gs,{control:r.control,name:"name",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Full Name *"}),g.jsx(Tn,{children:g.jsx(li,{placeholder:"John Doe",...s})}),g.jsx(Pn,{})]})}),g.jsx(gs,{control:r.control,name:"email",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Email Address *"}),g.jsx(Tn,{children:g.jsx(li,{type:"email",placeholder:"john@example.com",...s})}),g.jsx(Pn,{})]})})]}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[g.jsx(gs,{control:r.control,name:"phone",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Phone Number *"}),g.jsx(Tn,{children:g.jsx(li,{placeholder:"+233 509 626 446",...s})}),g.jsx(Pn,{})]})}),g.jsx(gs,{control:r.control,name:"serviceType",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Service Type *"}),g.jsxs(kj,{onValueChange:s.onChange,defaultValue:s.value,children:[g.jsx(Tn,{children:g.jsx(G_,{children:g.jsx(Ej,{placeholder:"Select a service"})})}),g.jsxs(Y_,{children:[g.jsx(No,{value:"express-road",children:"Express Road"}),g.jsx(No,{value:"air-freight",children:"Air Freight"}),g.jsx(No,{value:"ocean-freight",children:"Ocean Freight"}),g.jsx(No,{value:"insured-secure",children:"Insured & Secure"})]})]}),g.jsx(Pn,{})]})})]}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[g.jsx(gs,{control:r.control,name:"origin",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Origin *"}),g.jsx(Tn,{children:g.jsx(li,{placeholder:"Tema, Ghana",...s})}),g.jsx(Pn,{})]})}),g.jsx(gs,{control:r.control,name:"destination",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Destination *"}),g.jsx(Tn,{children:g.jsx(li,{placeholder:"Accra, Ghana",...s})}),g.jsx(Pn,{})]})})]}),g.jsx(gs,{control:r.control,name:"description",render:({field:s})=>g.jsxs(En,{children:[g.jsx(Cn,{children:"Shipment Details *"}),g.jsx(Tn,{children:g.jsx(e_,{placeholder:"Please describe your shipment (dimensions, weight, special handling requirements, etc.)",className:"min-h-32",...s})}),g.jsx(Pn,{})]})}),g.jsx(zs,{type:"submit",size:"lg",className:"w-full bg-primary hover:bg-primary/90",disabled:t,children:t?"Processing...":"Submit Quote Request"})]})})})]})})})},X2=()=>{const t=()=>{window.open(`https://wa.me/233509626446?text=${encodeURIComponent("Hello! I would like to schedule a pickup for my shipment.")}`,"_blank")};return g.jsx("section",{id:"schedule",className:"py-24 bg-primary/5",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"text-center mb-16",children:[g.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 text-foreground",children:"Schedule a Pickup"}),g.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto",children:"Request a courier to your door. We'll confirm via SMS/email."})]}),g.jsxs("div",{className:"grid md:grid-cols-3 gap-8 mb-12",children:[g.jsx(Bo,{className:"border-border",children:g.jsxs(Wo,{className:"p-8 text-center",children:[g.jsx("div",{className:"bg-primary/10 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:g.jsx(Yh,{className:"text-primary",size:32})}),g.jsx("h3",{className:"text-xl font-bold mb-2",children:"200+ Cities"}),g.jsx("p",{className:"text-muted-foreground",children:"Service in 200+ cities with real time courier ETAs"})]})}),g.jsx(Bo,{className:"border-border",children:g.jsxs(Wo,{className:"p-8 text-center",children:[g.jsx("div",{className:"bg-primary/10 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:g.jsx(EE,{className:"text-primary",size:32})}),g.jsx("h3",{className:"text-xl font-bold mb-2",children:"Flexible Windows"}),g.jsx("p",{className:"text-muted-foreground",children:"9am–12pm, 12pm–3pm scheduling options available"})]})}),g.jsx(Bo,{className:"border-border",children:g.jsxs(Wo,{className:"p-8 text-center",children:[g.jsx("div",{className:"bg-primary/10 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:g.jsx(kE,{className:"text-primary",size:32})}),g.jsx("h3",{className:"text-xl font-bold mb-2",children:"ID-Verified"}),g.jsx("p",{className:"text-muted-foreground",children:"ID-verified couriers, proof of pickup on arrival"})]})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"flex items-center justify-center gap-2 mb-6",children:[g.jsx("div",{className:"flex",children:[...Array(5)].map((e,r)=>g.jsx(NE,{className:"text-secondary fill-secondary",size:24},r))}),g.jsx("span",{className:"text-lg font-semibold",children:"4.9/5 by 10,000+ shippers"})]}),g.jsx(zs,{onClick:t,size:"lg",className:"bg-primary hover:bg-primary/90 text-lg px-8",children:"Schedule Pickup Now"})]})]})})},eI=()=>g.jsx("section",{id:"location",className:"py-24 bg-background",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"text-center mb-16",children:[g.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 text-foreground",children:"Visit Our Office"}),g.jsx("p",{className:"text-xl text-muted-foreground",children:"Find us in Tema, Ghana"})]}),g.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-start",children:[g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-3 rounded-lg",children:g.jsx(Yh,{className:"text-primary",size:24})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-bold mb-2",children:"Our Location"}),g.jsxs("p",{className:"text-muted-foreground",children:["KRAKUE OFFICE NO. 6",g.jsx("br",{}),"Greater Accra, TEMA, 233",g.jsx("br",{}),"Ghana"]})]})]}),g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-3 rounded-lg",children:g.jsx(Nw,{className:"text-primary",size:24})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-bold mb-2",children:"Phone"}),g.jsx("a",{href:"tel:+233509626446",className:"text-muted-foreground hover:text-primary transition-colors",children:"+233 509 626 446"})]})]}),g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-3 rounded-lg",children:g.jsx(Rw,{className:"text-primary",size:24})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-bold mb-2",children:"Email"}),g.jsx("a",{href:"mailto:info@casageoshippingltd.com",className:"text-muted-foreground hover:text-primary transition-colors",children:"info@casageoshippingltd.com"})]})]})]}),g.jsx("div",{className:"rounded-lg overflow-hidden shadow-lg h-96",children:g.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3970.8073842574674!2d-0.0042!3d5.6397!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNcKwMzgnMjMuOSJOIDDCsDAwJzE1LjEiVw!5e0!3m2!1sen!2sgh!4v1234567890",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Casageo Shipping Location"})})]})]})});var mu="Collapsible",[tI,Cb]=Gs(mu),[rI,Cp]=tI(mu),Tb=w.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[l,c]=Gi({prop:n,defaultProp:s??!1,onChange:o,caller:mu});return g.jsx(rI,{scope:r,disabled:i,contentId:Ra(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:g.jsx(xe.div,{"data-state":Pp(l),"data-disabled":i?"":void 0,...a,ref:e})})});Tb.displayName=mu;var Pb="CollapsibleTrigger",Ab=w.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=Cp(Pb,r);return g.jsx(xe.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Pp(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:fe(t.onClick,s.onOpenToggle)})});Ab.displayName=Pb;var Tp="CollapsibleContent",Rb=w.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=Cp(Tp,t.__scopeCollapsible);return g.jsx(zc,{present:r||s.open,children:({present:i})=>g.jsx(nI,{...n,ref:e,present:i})})});Rb.displayName=Tp;var nI=w.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=Cp(Tp,r),[a,l]=w.useState(n),c=w.useRef(null),u=ze(e,c),d=w.useRef(0),f=d.current,p=w.useRef(0),_=p.current,m=o.open||a,x=w.useRef(m),y=w.useRef(void 0);return w.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),at(()=>{const h=c.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const v=h.getBoundingClientRect();d.current=v.height,p.current=v.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),l(n)}},[o.open,n]),g.jsx(xe.div,{"data-state":Pp(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...t.style},children:m&&s})});function Pp(t){return t?"open":"closed"}var sI=Tb,iI=Ab,oI=Rb,kr="Accordion",aI=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ap,lI,cI]=Wh(kr),[gu,WI]=Gs(kr,[cI,Cb]),Rp=Cb(),Nb=P.forwardRef((t,e)=>{const{type:r,...n}=t,s=n,i=n;return g.jsx(Ap.Provider,{scope:t.__scopeAccordion,children:r==="multiple"?g.jsx(hI,{...i,ref:e}):g.jsx(fI,{...s,ref:e})})});Nb.displayName=kr;var[jb,uI]=gu(kr),[Ob,dI]=gu(kr,{collapsible:!1}),fI=P.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:i=!1,...o}=t,[a,l]=Gi({prop:r,defaultProp:n??"",onChange:s,caller:kr});return g.jsx(jb,{scope:t.__scopeAccordion,value:P.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:P.useCallback(()=>i&&l(""),[i,l]),children:g.jsx(Ob,{scope:t.__scopeAccordion,collapsible:i,children:g.jsx(Ib,{...o,ref:e})})})}),hI=P.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...i}=t,[o,a]=Gi({prop:r,defaultProp:n??[],onChange:s,caller:kr}),l=P.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=P.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return g.jsx(jb,{scope:t.__scopeAccordion,value:o,onItemOpen:l,onItemClose:c,children:g.jsx(Ob,{scope:t.__scopeAccordion,collapsible:!0,children:g.jsx(Ib,{...i,ref:e})})})}),[pI,vu]=gu(kr),Ib=P.forwardRef((t,e)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:i="vertical",...o}=t,a=P.useRef(null),l=ze(a,e),c=lI(r),d=t_(s)==="ltr",f=fe(t.onKeyDown,p=>{var j;if(!aI.includes(p.key))return;const _=p.target,m=c().filter(M=>{var D;return!((D=M.ref.current)!=null&&D.disabled)}),x=m.findIndex(M=>M.ref.current===_),y=m.length;if(x===-1)return;p.preventDefault();let h=x;const v=0,b=y-1,S=()=>{h=x+1,h>b&&(h=v)},C=()=>{h=x-1,h<v&&(h=b)};switch(p.key){case"Home":h=v;break;case"End":h=b;break;case"ArrowRight":i==="horizontal"&&(d?S():C());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(d?C():S());break;case"ArrowUp":i==="vertical"&&C();break}const E=h%y;(j=m[E].ref.current)==null||j.focus()});return g.jsx(pI,{scope:r,disabled:n,direction:s,orientation:i,children:g.jsx(Ap.Slot,{scope:r,children:g.jsx(xe.div,{...o,"data-orientation":i,ref:l,onKeyDown:n?void 0:f})})})}),Sc="AccordionItem",[mI,Np]=gu(Sc),Lb=P.forwardRef((t,e)=>{const{__scopeAccordion:r,value:n,...s}=t,i=vu(Sc,r),o=uI(Sc,r),a=Rp(r),l=Ra(),c=n&&o.value.includes(n)||!1,u=i.disabled||t.disabled;return g.jsx(mI,{scope:r,open:c,disabled:u,triggerId:l,children:g.jsx(sI,{"data-orientation":i.orientation,"data-state":zb(c),...a,...s,ref:e,disabled:u,open:c,onOpenChange:d=>{d?o.onItemOpen(n):o.onItemClose(n)}})})});Lb.displayName=Sc;var Mb="AccordionHeader",Db=P.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,s=vu(kr,r),i=Np(Mb,r);return g.jsx(xe.h3,{"data-orientation":s.orientation,"data-state":zb(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:e})});Db.displayName=Mb;var Gf="AccordionTrigger",$b=P.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,s=vu(kr,r),i=Np(Gf,r),o=dI(Gf,r),a=Rp(r);return g.jsx(Ap.ItemSlot,{scope:r,children:g.jsx(iI,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...n,ref:e})})});$b.displayName=Gf;var Fb="AccordionContent",Ub=P.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,s=vu(kr,r),i=Np(Fb,r),o=Rp(r);return g.jsx(oI,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...n,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});Ub.displayName=Fb;function zb(t){return t?"open":"closed"}var gI=Nb,vI=Lb,yI=Db,Vb=$b,Bb=Ub;const wI=gI,Wb=w.forwardRef(({className:t,...e},r)=>g.jsx(vI,{ref:r,className:Ce("border-b",t),...e}));Wb.displayName="AccordionItem";const Hb=w.forwardRef(({className:t,children:e,...r},n)=>g.jsx(yI,{className:"flex",children:g.jsxs(Vb,{ref:n,className:Ce("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...r,children:[e,g.jsx(Zh,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Hb.displayName=Vb.displayName;const qb=w.forwardRef(({className:t,children:e,...r},n)=>g.jsx(Bb,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:g.jsx("div",{className:Ce("pb-4 pt-0",t),children:e})}));qb.displayName=Bb.displayName;const xI=[{question:"How can I track my shipment with CASAGEO Shipping?",answer:"You can track your shipment easily using your tracking number. Visit https://casageoshippingltd.com/track/ and enter your number to get real-time updates on your package status. If you need help, our support team is available 24/7."},{question:"How do I request a shipping quote?",answer:"To get a shipping quote, click on 'Get a Quote' on our website and fill in the details of your shipment. Our system will instantly generate a competitive rate. For custom shipping needs, our team can prepare a tailored quote."},{question:"Can I schedule a pickup for my package?",answer:"Yes! CASAGEO Shipping offers pickup services. Simply request a pickup through our online form or chat with an agent, and we'll arrange for your package to be collected at your convenience."},{question:"What services does CASAGEO Shipping provide?",answer:"We provide a wide range of logistics solutions including: International freight forwarding, Door-to-door delivery, Customs clearance, Express courier services, and Warehousing and distribution."},{question:"How do I contact CASAGEO Shipping customer support?",answer:"Our customer support team is available through live chat, phone, and email. Simply start a chat on our website or call our helpline. We are here to assist you with tracking, rates, and all enquiries. Email: info@casageoshippingltd.com | Phone: +233 509 626 446"}],_I=()=>g.jsx("section",{id:"faq",className:"py-24 bg-muted/30",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"text-center mb-16",children:[g.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 text-foreground",children:"Frequently Asked Questions"}),g.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto",children:"Get answers to common questions about our shipping services"})]}),g.jsx("div",{className:"max-w-3xl mx-auto",children:g.jsx(wI,{type:"single",collapsible:!0,className:"space-y-4",children:xI.map((t,e)=>g.jsxs(Wb,{value:`item-${e}`,className:"bg-card border border-border rounded-lg px-6",children:[g.jsx(Hb,{className:"text-left text-lg font-semibold hover:text-primary",children:t.question}),g.jsx(qb,{className:"text-muted-foreground leading-relaxed",children:t.answer})]},e))})})]})}),bI=()=>g.jsx("footer",{className:"bg-foreground text-background py-12",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[g.jsx("img",{src:Dx,alt:"Casageo",className:"h-10 w-10"}),g.jsx("span",{className:"text-xl font-bold",children:"CASAGEO"})]}),g.jsx("p",{className:"text-background/80",children:"Fast, reliable delivery for every shipment. Your trusted logistics partner in Ghana."})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-bold mb-4",children:"Services"}),g.jsxs("ul",{className:"space-y-2 text-background/80",children:[g.jsx("li",{children:"Express Road"}),g.jsx("li",{children:"Air Freight"}),g.jsx("li",{children:"Ocean Freight"}),g.jsx("li",{children:"Insured & Secure"})]})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-bold mb-4",children:"Quick Links"}),g.jsxs("ul",{className:"space-y-2 text-background/80",children:[g.jsx("li",{children:g.jsx("a",{href:"#services",className:"hover:text-background transition-colors",children:"Services"})}),g.jsx("li",{children:g.jsx("a",{href:"#schedule",className:"hover:text-background transition-colors",children:"Schedule Pickup"})}),g.jsx("li",{children:g.jsx("a",{href:"#quote",className:"hover:text-background transition-colors",children:"Get a Quote"})}),g.jsx("li",{children:g.jsx("a",{href:"https://casageoshippingltd.com/track/",target:"_blank",rel:"noopener noreferrer",className:"hover:text-background transition-colors",children:"Track Shipment"})})]})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-bold mb-4",children:"Contact Us"}),g.jsxs("ul",{className:"space-y-3 text-background/80",children:[g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(Nw,{size:18,className:"mt-1 flex-shrink-0"}),g.jsx("a",{href:"tel:+233509626446",className:"hover:text-background transition-colors",children:"+233 509 626 446"})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(Rw,{size:18,className:"mt-1 flex-shrink-0"}),g.jsx("a",{href:"mailto:info@casageoshippingltd.com",className:"hover:text-background transition-colors",children:"info@casageoshippingltd.com"})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(Yh,{size:18,className:"mt-1 flex-shrink-0"}),g.jsx("span",{children:"KRAKUE OFFICE NO. 6, Greater Accra, TEMA, 233, Ghana"})]})]})]})]}),g.jsx("div",{className:"border-t border-background/20 pt-8 text-center text-background/60",children:g.jsxs("p",{children:["© ",new Date().getFullYear()," CASAGEO Shipping Ltd. All rights reserved."]})})]})}),SI=()=>{const t=()=>{window.open("https://wa.me/233509626446","_blank")};return g.jsxs("button",{onClick:t,className:"fixed bottom-6 right-6 bg-[#25D366] hover:bg-[#128C7E] text-white p-4 rounded-full shadow-lg transition-all duration-300 hover:scale-110 z-50 group","aria-label":"Chat on WhatsApp",children:[g.jsx(TE,{size:28}),g.jsx("span",{className:"absolute right-full mr-3 top-1/2 -translate-y-1/2 bg-gray-900 text-white px-3 py-2 rounded-lg text-sm whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Chat with us"})]})},kI=()=>g.jsxs("div",{className:"min-h-screen",children:[g.jsx(HA,{}),g.jsx(QA,{}),g.jsx(tR,{}),g.jsx(J2,{}),g.jsx(X2,{}),g.jsx(eI,{}),g.jsx(_I,{}),g.jsx(bI,{}),g.jsx(SI,{})]}),EI=()=>{const t=Mx();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-100",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),g.jsx("p",{className:"mb-4 text-xl text-gray-600",children:"Oops! Page not found"}),g.jsx("a",{href:"/",className:"text-blue-500 underline hover:text-blue-700",children:"Return to Home"})]})})},CI=new rA,TI=()=>g.jsx(sA,{client:CI,children:g.jsxs(jP,{children:[g.jsx(pC,{}),g.jsx(qC,{}),g.jsx(BA,{children:g.jsxs(UA,{children:[g.jsx(Sf,{path:"/",element:g.jsx(kI,{})}),g.jsx(Sf,{path:"*",element:g.jsx(EI,{})})]})})]})});X0(document.getElementById("root")).render(g.jsx(TI,{}));