var Bp=e=>{throw TypeError(e)};var Xc=(e,t,n)=>t.has(e)||Bp("Cannot "+n);var P=(e,t,n)=>(Xc(e,t,"read from private field"),n?n.call(e):t.get(e)),ne=(e,t,n)=>t.has(e)?Bp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),G=(e,t,n,r)=>(Xc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),We=(e,t,n)=>(Xc(e,t,"access private method"),n);var Ea=(e,t,n,r)=>({set _(s){G(e,t,s,n)},get _(){return P(e,t,r)}});function q1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function jv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nv={exports:{}},fc={},Iv={exports:{}},Z={};/**
 * @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 aa=Symbol.for("react.element"),G1=Symbol.for("react.portal"),Y1=Symbol.for("react.fragment"),Q1=Symbol.for("react.strict_mode"),J1=Symbol.for("react.profiler"),X1=Symbol.for("react.provider"),Z1=Symbol.for("react.context"),e_=Symbol.for("react.forward_ref"),t_=Symbol.for("react.suspense"),n_=Symbol.for("react.memo"),r_=Symbol.for("react.lazy"),Vp=Symbol.iterator;function s_(e){return e===null||typeof e!="object"?null:(e=Vp&&e[Vp]||e["@@iterator"],typeof e=="function"?e:null)}var Lv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dv=Object.assign,Mv={};function Ai(e,t,n){this.props=e,this.context=t,this.refs=Mv,this.updater=n||Lv}Ai.prototype.isReactComponent={};Ai.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ai.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $v(){}$v.prototype=Ai.prototype;function Wh(e,t,n){this.props=e,this.context=t,this.refs=Mv,this.updater=n||Lv}var Hh=Wh.prototype=new $v;Hh.constructor=Wh;Dv(Hh,Ai.prototype);Hh.isPureReactComponent=!0;var zp=Array.isArray,Fv=Object.prototype.hasOwnProperty,Kh={current:null},Uv={key:!0,ref:!0,__self:!0,__source:!0};function Bv(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Fv.call(t,r)&&!Uv.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:aa,type:e,key:i,ref:o,props:s,_owner:Kh.current}}function i_(e,t){return{$$typeof:aa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function qh(e){return typeof e=="object"&&e!==null&&e.$$typeof===aa}function o_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wp=/\/+/g;function Zc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?o_(""+e.key):t.toString(36)}function sl(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case aa:case G1:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Zc(o,0):r,zp(s)?(n="",e!=null&&(n=e.replace(Wp,"$&/")+"/"),sl(s,t,n,"",function(c){return c})):s!=null&&(qh(s)&&(s=i_(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Wp,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",zp(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Zc(i,a);o+=sl(i,t,n,l,s)}else if(l=s_(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Zc(i,a++),o+=sl(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ka(e,t,n){if(e==null)return e;var r=[],s=0;return sl(e,r,"","",function(i){return t.call(n,i,s++)}),r}function a_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rt={current:null},il={transition:null},l_={ReactCurrentDispatcher:rt,ReactCurrentBatchConfig:il,ReactCurrentOwner:Kh};function Vv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:ka,forEach:function(e,t,n){ka(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ka(e,function(){t++}),t},toArray:function(e){return ka(e,function(t){return t})||[]},only:function(e){if(!qh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ai;Z.Fragment=Y1;Z.Profiler=J1;Z.PureComponent=Wh;Z.StrictMode=Q1;Z.Suspense=t_;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=l_;Z.act=Vv;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dv({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Kh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Fv.call(t,l)&&!Uv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:aa,type:e.type,key:s,ref:i,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:Z1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:X1,_context:e},e.Consumer=e};Z.createElement=Bv;Z.createFactory=function(e){var t=Bv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:e_,render:e}};Z.isValidElement=qh;Z.lazy=function(e){return{$$typeof:r_,_payload:{_status:-1,_result:e},_init:a_}};Z.memo=function(e,t){return{$$typeof:n_,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=il.transition;il.transition={};try{e()}finally{il.transition=t}};Z.unstable_act=Vv;Z.useCallback=function(e,t){return rt.current.useCallback(e,t)};Z.useContext=function(e){return rt.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return rt.current.useDeferredValue(e)};Z.useEffect=function(e,t){return rt.current.useEffect(e,t)};Z.useId=function(){return rt.current.useId()};Z.useImperativeHandle=function(e,t,n){return rt.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return rt.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return rt.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return rt.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return rt.current.useReducer(e,t,n)};Z.useRef=function(e){return rt.current.useRef(e)};Z.useState=function(e){return rt.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return rt.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return rt.current.useTransition()};Z.version="18.3.1";Iv.exports=Z;var b=Iv.exports;const N=jv(b),zv=q1({__proto__:null,default:N},[b]);/**
 * @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 c_=b,u_=Symbol.for("react.element"),d_=Symbol.for("react.fragment"),h_=Object.prototype.hasOwnProperty,f_=c_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p_={key:!0,ref:!0,__self:!0,__source:!0};function Wv(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)h_.call(t,r)&&!p_.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:u_,type:e,key:i,ref:o,props:s,_owner:f_.current}}fc.Fragment=d_;fc.jsx=Wv;fc.jsxs=Wv;Nv.exports=fc;var w=Nv.exports,Hv={exports:{}},xt={},Kv={exports:{}},qv={};/**
 * @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(e){function t(C,A){var L=C.length;C.push(A);e:for(;0<L;){var K=L-1>>>1,V=C[K];if(0<s(V,A))C[K]=A,C[L]=V,L=K;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var A=C[0],L=C.pop();if(L!==A){C[0]=L;e:for(var K=0,V=C.length,X=V>>>1;K<X;){var ee=2*(K+1)-1,Ee=C[ee],ze=ee+1,se=C[ze];if(0>s(Ee,L))ze<V&&0>s(se,Ee)?(C[K]=se,C[ze]=L,K=ze):(C[K]=Ee,C[ee]=L,K=ee);else if(ze<V&&0>s(se,L))C[K]=se,C[ze]=L,K=ze;else break e}}return A}function s(C,A){var L=C.sortIndex-A.sortIndex;return L!==0?L:C.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,y=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=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(C){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=C)r(c),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(c)}}function S(C){if(g=!1,v(C),!y)if(n(l)!==null)y=!0,H(_);else{var A=n(c);A!==null&&F(S,A.startTime-C)}}function _(C,A){y=!1,g&&(g=!1,p(T),T=-1),f=!0;var L=h;try{for(v(A),d=n(l);d!==null&&(!(d.expirationTime>A)||C&&!B());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var V=K(d.expirationTime<=A);A=e.unstable_now(),typeof V=="function"?d.callback=V:d===n(l)&&r(l),v(A)}else r(l);d=n(l)}if(d!==null)var X=!0;else{var ee=n(c);ee!==null&&F(S,ee.startTime-A),X=!1}return X}finally{d=null,h=L,f=!1}}var E=!1,k=null,T=-1,R=5,j=-1;function B(){return!(e.unstable_now()-j<R)}function D(){if(k!==null){var C=e.unstable_now();j=C;var A=!0;try{A=k(!0,C)}finally{A?Q():(E=!1,k=null)}}else E=!1}var Q;if(typeof m=="function")Q=function(){m(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,J=I.port2;I.port1.onmessage=D,Q=function(){J.postMessage(null)}}else Q=function(){x(D,0)};function H(C){k=C,E||(E=!0,Q())}function F(C,A){T=x(function(){C(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){y||f||(y=!0,H(_))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var A=3;break;default:A=h}var L=h;h=A;try{return C()}finally{h=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,A){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var L=h;h=C;try{return A()}finally{h=L}},e.unstable_scheduleCallback=function(C,A,L){var K=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?K+L:K):L=K,C){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=L+V,C={id:u++,callback:A,priorityLevel:C,startTime:L,expirationTime:V,sortIndex:-1},L>K?(C.sortIndex=L,t(c,C),n(l)===null&&C===n(c)&&(g?(p(T),T=-1):g=!0,F(S,L-K))):(C.sortIndex=V,t(l,C),y||f||(y=!0,H(_))),C},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(C){var A=h;return function(){var L=h;h=A;try{return C.apply(this,arguments)}finally{h=L}}}})(qv);Kv.exports=qv;var m_=Kv.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 g_=b,wt=m_;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gv=new Set,Eo={};function ms(e,t){vi(e,t),vi(e+"Capture",t)}function vi(e,t){for(Eo[e]=t,e=0;e<t.length;e++)Gv.add(t[e])}var Cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rd=Object.prototype.hasOwnProperty,y_=/^[: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]*$/,Hp={},Kp={};function v_(e){return rd.call(Kp,e)?!0:rd.call(Hp,e)?!1:y_.test(e)?Kp[e]=!0:(Hp[e]=!0,!1)}function w_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function x_(e,t,n,r){if(t===null||typeof t>"u"||w_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gh=/[\-:]([a-z])/g;function Yh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Gh,Yh);Ve[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Gh,Yh);Ve[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Gh,Yh);Ve[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qh(e,t,n,r){var s=Ve.hasOwnProperty(t)?Ve[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(x_(t,n,s,r)&&(n=null),r||s===null?v_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var In=g_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ta=Symbol.for("react.element"),Ds=Symbol.for("react.portal"),Ms=Symbol.for("react.fragment"),Jh=Symbol.for("react.strict_mode"),sd=Symbol.for("react.profiler"),Yv=Symbol.for("react.provider"),Qv=Symbol.for("react.context"),Xh=Symbol.for("react.forward_ref"),id=Symbol.for("react.suspense"),od=Symbol.for("react.suspense_list"),Zh=Symbol.for("react.memo"),Qn=Symbol.for("react.lazy"),Jv=Symbol.for("react.offscreen"),qp=Symbol.iterator;function Vi(e){return e===null||typeof e!="object"?null:(e=qp&&e[qp]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,eu;function eo(e){if(eu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);eu=t&&t[1]||""}return`
`+eu+e}var tu=!1;function nu(e,t){if(!e||tu)return"";tu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),i=r.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 e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{tu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eo(e):""}function b_(e){switch(e.tag){case 5:return eo(e.type);case 16:return eo("Lazy");case 13:return eo("Suspense");case 19:return eo("SuspenseList");case 0:case 2:case 15:return e=nu(e.type,!1),e;case 11:return e=nu(e.type.render,!1),e;case 1:return e=nu(e.type,!0),e;default:return""}}function ad(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ms:return"Fragment";case Ds:return"Portal";case sd:return"Profiler";case Jh:return"StrictMode";case id:return"Suspense";case od:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qv:return(e.displayName||"Context")+".Consumer";case Yv:return(e._context.displayName||"Context")+".Provider";case Xh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zh:return t=e.displayName||null,t!==null?t:ad(e.type)||"Memo";case Qn:t=e._payload,e=e._init;try{return ad(e(t))}catch{}}return null}function S_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ad(t);case 8:return t===Jh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function __(e){var t=Xv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ca(e){e._valueTracker||(e._valueTracker=__(e))}function Zv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Xv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ld(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function e0(e,t){t=t.checked,t!=null&&Qh(e,"checked",t,!1)}function cd(e,t){e0(e,t);var n=xr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ud(e,t.type,n):t.hasOwnProperty("defaultValue")&&ud(e,t.type,xr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ud(e,t,n){(t!=="number"||kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var to=Array.isArray;function ei(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+xr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function dd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(to(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:xr(n)}}function t0(e,t){var n=xr(t.value),r=xr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Jp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function n0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?n0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Pa,r0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Pa=Pa||document.createElement("div"),Pa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Pa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ko(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ao={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},E_=["Webkit","ms","Moz","O"];Object.keys(ao).forEach(function(e){E_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ao[t]=ao[e]})});function s0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ao.hasOwnProperty(e)&&ao[e]?(""+t).trim():t+"px"}function i0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=s0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var k_=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 fd(e,t){if(t){if(k_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function pd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var md=null;function ef(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gd=null,ti=null,ni=null;function Xp(e){if(e=ua(e)){if(typeof gd!="function")throw Error(O(280));var t=e.stateNode;t&&(t=vc(t),gd(e.stateNode,e.type,t))}}function o0(e){ti?ni?ni.push(e):ni=[e]:ti=e}function a0(){if(ti){var e=ti,t=ni;if(ni=ti=null,Xp(e),t)for(e=0;e<t.length;e++)Xp(t[e])}}function l0(e,t){return e(t)}function c0(){}var ru=!1;function u0(e,t,n){if(ru)return e(t,n);ru=!0;try{return l0(e,t,n)}finally{ru=!1,(ti!==null||ni!==null)&&(c0(),a0())}}function To(e,t){var n=e.stateNode;if(n===null)return null;var r=vc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var yd=!1;if(Cn)try{var zi={};Object.defineProperty(zi,"passive",{get:function(){yd=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{yd=!1}function T_(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var lo=!1,Tl=null,Cl=!1,vd=null,C_={onError:function(e){lo=!0,Tl=e}};function P_(e,t,n,r,s,i,o,a,l){lo=!1,Tl=null,T_.apply(C_,arguments)}function A_(e,t,n,r,s,i,o,a,l){if(P_.apply(this,arguments),lo){if(lo){var c=Tl;lo=!1,Tl=null}else throw Error(O(198));Cl||(Cl=!0,vd=c)}}function gs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function d0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Zp(e){if(gs(e)!==e)throw Error(O(188))}function R_(e){var t=e.alternate;if(!t){if(t=gs(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Zp(s),e;if(i===r)return Zp(s),t;i=i.sibling}throw Error(O(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function h0(e){return e=R_(e),e!==null?f0(e):null}function f0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=f0(e);if(t!==null)return t;e=e.sibling}return null}var p0=wt.unstable_scheduleCallback,em=wt.unstable_cancelCallback,O_=wt.unstable_shouldYield,j_=wt.unstable_requestPaint,_e=wt.unstable_now,N_=wt.unstable_getCurrentPriorityLevel,tf=wt.unstable_ImmediatePriority,m0=wt.unstable_UserBlockingPriority,Pl=wt.unstable_NormalPriority,I_=wt.unstable_LowPriority,g0=wt.unstable_IdlePriority,pc=null,dn=null;function L_(e){if(dn&&typeof dn.onCommitFiberRoot=="function")try{dn.onCommitFiberRoot(pc,e,void 0,(e.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:$_,D_=Math.log,M_=Math.LN2;function $_(e){return e>>>=0,e===0?32:31-(D_(e)/M_|0)|0}var Aa=64,Ra=4194304;function no(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Al(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=no(a):(i&=o,i!==0&&(r=no(i)))}else o=n&~s,o!==0?r=no(o):i!==0&&(r=no(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Yt(t),s=1<<n,r|=e[n],t&=~s;return r}function F_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Yt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=F_(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function wd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function y0(){var e=Aa;return Aa<<=1,!(Aa&4194240)&&(Aa=64),e}function su(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function la(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=n}function B_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Yt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function nf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ie=0;function v0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var w0,rf,x0,b0,S0,xd=!1,Oa=[],dr=null,hr=null,fr=null,Co=new Map,Po=new Map,Zn=[],V_="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 tm(e,t){switch(e){case"focusin":case"focusout":dr=null;break;case"dragenter":case"dragleave":hr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":Co.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Po.delete(t.pointerId)}}function Wi(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ua(t),t!==null&&rf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function z_(e,t,n,r,s){switch(t){case"focusin":return dr=Wi(dr,e,t,n,r,s),!0;case"dragenter":return hr=Wi(hr,e,t,n,r,s),!0;case"mouseover":return fr=Wi(fr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Co.set(i,Wi(Co.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Po.set(i,Wi(Po.get(i)||null,e,t,n,r,s)),!0}return!1}function _0(e){var t=Hr(e.target);if(t!==null){var n=gs(t);if(n!==null){if(t=n.tag,t===13){if(t=d0(n),t!==null){e.blockedOn=t,S0(e.priority,function(){x0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ol(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);md=r,n.target.dispatchEvent(r),md=null}else return t=ua(n),t!==null&&rf(t),e.blockedOn=n,!1;t.shift()}return!0}function nm(e,t,n){ol(e)&&n.delete(t)}function W_(){xd=!1,dr!==null&&ol(dr)&&(dr=null),hr!==null&&ol(hr)&&(hr=null),fr!==null&&ol(fr)&&(fr=null),Co.forEach(nm),Po.forEach(nm)}function Hi(e,t){e.blockedOn===t&&(e.blockedOn=null,xd||(xd=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,W_)))}function Ao(e){function t(s){return Hi(s,e)}if(0<Oa.length){Hi(Oa[0],e);for(var n=1;n<Oa.length;n++){var r=Oa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(dr!==null&&Hi(dr,e),hr!==null&&Hi(hr,e),fr!==null&&Hi(fr,e),Co.forEach(t),Po.forEach(t),n=0;n<Zn.length;n++)r=Zn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Zn.length&&(n=Zn[0],n.blockedOn===null);)_0(n),n.blockedOn===null&&Zn.shift()}var ri=In.ReactCurrentBatchConfig,Rl=!0;function H_(e,t,n,r){var s=ie,i=ri.transition;ri.transition=null;try{ie=1,sf(e,t,n,r)}finally{ie=s,ri.transition=i}}function K_(e,t,n,r){var s=ie,i=ri.transition;ri.transition=null;try{ie=4,sf(e,t,n,r)}finally{ie=s,ri.transition=i}}function sf(e,t,n,r){if(Rl){var s=bd(e,t,n,r);if(s===null)pu(e,t,r,Ol,n),tm(e,r);else if(z_(s,e,t,n,r))r.stopPropagation();else if(tm(e,r),t&4&&-1<V_.indexOf(e)){for(;s!==null;){var i=ua(s);if(i!==null&&w0(i),i=bd(e,t,n,r),i===null&&pu(e,t,r,Ol,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else pu(e,t,r,null,n)}}var Ol=null;function bd(e,t,n,r){if(Ol=null,e=ef(r),e=Hr(e),e!==null)if(t=gs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=d0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ol=e,null}function E0(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(N_()){case tf:return 1;case m0:return 4;case Pl:case I_:return 16;case g0:return 536870912;default:return 16}default:return 16}}var ar=null,of=null,al=null;function k0(){if(al)return al;var e,t=of,n=t.length,r,s="value"in ar?ar.value:ar.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return al=s.slice(e,1<r?1-r:void 0)}function ll(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ja(){return!0}function rm(){return!1}function bt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ja:rm,this.isPropagationStopped=rm,this}return we(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ja)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ja)},persist:function(){},isPersistent:ja}),t}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},af=bt(Ri),ca=we({},Ri,{view:0,detail:0}),q_=bt(ca),iu,ou,Ki,mc=we({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ki&&(Ki&&e.type==="mousemove"?(iu=e.screenX-Ki.screenX,ou=e.screenY-Ki.screenY):ou=iu=0,Ki=e),iu)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),sm=bt(mc),G_=we({},mc,{dataTransfer:0}),Y_=bt(G_),Q_=we({},ca,{relatedTarget:0}),au=bt(Q_),J_=we({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),X_=bt(J_),Z_=we({},Ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eE=bt(Z_),tE=we({},Ri,{data:0}),im=bt(tE),nE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rE={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"},sE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sE[e])?!!t[e]:!1}function lf(){return iE}var oE=we({},ca,{key:function(e){if(e.key){var t=nE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lf,charCode:function(e){return e.type==="keypress"?ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),aE=bt(oE),lE=we({},mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),om=bt(lE),cE=we({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lf}),uE=bt(cE),dE=we({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),hE=bt(dE),fE=we({},mc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),pE=bt(fE),mE=[9,13,27,32],cf=Cn&&"CompositionEvent"in window,co=null;Cn&&"documentMode"in document&&(co=document.documentMode);var gE=Cn&&"TextEvent"in window&&!co,T0=Cn&&(!cf||co&&8<co&&11>=co),am=" ",lm=!1;function C0(e,t){switch(e){case"keyup":return mE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function P0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $s=!1;function yE(e,t){switch(e){case"compositionend":return P0(t);case"keypress":return t.which!==32?null:(lm=!0,am);case"textInput":return e=t.data,e===am&&lm?null:e;default:return null}}function vE(e,t){if($s)return e==="compositionend"||!cf&&C0(e,t)?(e=k0(),al=of=ar=null,$s=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return T0&&t.locale!=="ko"?null:t.data;default:return null}}var wE={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 cm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wE[e.type]:t==="textarea"}function A0(e,t,n,r){o0(r),t=jl(t,"onChange"),0<t.length&&(n=new af("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var uo=null,Ro=null;function xE(e){U0(e,0)}function gc(e){var t=Bs(e);if(Zv(t))return e}function bE(e,t){if(e==="change")return t}var R0=!1;if(Cn){var lu;if(Cn){var cu="oninput"in document;if(!cu){var um=document.createElement("div");um.setAttribute("oninput","return;"),cu=typeof um.oninput=="function"}lu=cu}else lu=!1;R0=lu&&(!document.documentMode||9<document.documentMode)}function dm(){uo&&(uo.detachEvent("onpropertychange",O0),Ro=uo=null)}function O0(e){if(e.propertyName==="value"&&gc(Ro)){var t=[];A0(t,Ro,e,ef(e)),u0(xE,t)}}function SE(e,t,n){e==="focusin"?(dm(),uo=t,Ro=n,uo.attachEvent("onpropertychange",O0)):e==="focusout"&&dm()}function _E(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gc(Ro)}function EE(e,t){if(e==="click")return gc(t)}function kE(e,t){if(e==="input"||e==="change")return gc(t)}function TE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:TE;function Oo(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!rd.call(t,s)||!Xt(e[s],t[s]))return!1}return!0}function hm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fm(e,t){var n=hm(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hm(n)}}function j0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?j0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function N0(){for(var e=window,t=kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kl(e.document)}return t}function uf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CE(e){var t=N0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&j0(n.ownerDocument.documentElement,n)){if(r!==null&&uf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=fm(n,i);var o=fm(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var PE=Cn&&"documentMode"in document&&11>=document.documentMode,Fs=null,Sd=null,ho=null,_d=!1;function pm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_d||Fs==null||Fs!==kl(r)||(r=Fs,"selectionStart"in r&&uf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ho&&Oo(ho,r)||(ho=r,r=jl(Sd,"onSelect"),0<r.length&&(t=new af("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Fs)))}function Na(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Us={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionend:Na("Transition","TransitionEnd")},uu={},I0={};Cn&&(I0=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function yc(e){if(uu[e])return uu[e];if(!Us[e])return e;var t=Us[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in I0)return uu[e]=t[n];return e}var L0=yc("animationend"),D0=yc("animationiteration"),M0=yc("animationstart"),$0=yc("transitionend"),F0=new Map,mm="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 Cr(e,t){F0.set(e,t),ms(t,[e])}for(var du=0;du<mm.length;du++){var hu=mm[du],AE=hu.toLowerCase(),RE=hu[0].toUpperCase()+hu.slice(1);Cr(AE,"on"+RE)}Cr(L0,"onAnimationEnd");Cr(D0,"onAnimationIteration");Cr(M0,"onAnimationStart");Cr("dblclick","onDoubleClick");Cr("focusin","onFocus");Cr("focusout","onBlur");Cr($0,"onTransitionEnd");vi("onMouseEnter",["mouseout","mouseover"]);vi("onMouseLeave",["mouseout","mouseover"]);vi("onPointerEnter",["pointerout","pointerover"]);vi("onPointerLeave",["pointerout","pointerover"]);ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ro="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(" "),OE=new Set("cancel close invalid load scroll toggle".split(" ").concat(ro));function gm(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,A_(r,t,void 0,e),e.currentTarget=null}function U0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;gm(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;gm(s,a,c),i=l}}}if(Cl)throw e=vd,Cl=!1,vd=null,e}function de(e,t){var n=t[Pd];n===void 0&&(n=t[Pd]=new Set);var r=e+"__bubble";n.has(r)||(B0(t,e,2,!1),n.add(r))}function fu(e,t,n){var r=0;t&&(r|=4),B0(n,e,r,t)}var Ia="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[Ia]){e[Ia]=!0,Gv.forEach(function(n){n!=="selectionchange"&&(OE.has(n)||fu(n,!1,e),fu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ia]||(t[Ia]=!0,fu("selectionchange",!1,t))}}function B0(e,t,n,r){switch(E0(t)){case 1:var s=H_;break;case 4:s=K_;break;default:s=sf}n=s.bind(null,t,n,e),s=void 0,!yd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function pu(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Hr(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}u0(function(){var c=i,u=ef(n),d=[];e:{var h=F0.get(e);if(h!==void 0){var f=af,y=e;switch(e){case"keypress":if(ll(n)===0)break e;case"keydown":case"keyup":f=aE;break;case"focusin":y="focus",f=au;break;case"focusout":y="blur",f=au;break;case"beforeblur":case"afterblur":f=au;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=sm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Y_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=uE;break;case L0:case D0:case M0:f=X_;break;case $0:f=hE;break;case"scroll":f=q_;break;case"wheel":f=pE;break;case"copy":case"cut":case"paste":f=eE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=om}var g=(t&4)!==0,x=!g&&e==="scroll",p=g?h!==null?h+"Capture":null:h;g=[];for(var m=c,v;m!==null;){v=m;var S=v.stateNode;if(v.tag===5&&S!==null&&(v=S,p!==null&&(S=To(m,p),S!=null&&g.push(No(m,S,v)))),x)break;m=m.return}0<g.length&&(h=new f(h,y,null,n,u),d.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==md&&(y=n.relatedTarget||n.fromElement)&&(Hr(y)||y[Pn]))break e;if((f||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,f?(y=n.relatedTarget||n.toElement,f=c,y=y?Hr(y):null,y!==null&&(x=gs(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(f=null,y=c),f!==y)){if(g=sm,S="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(g=om,S="onPointerLeave",p="onPointerEnter",m="pointer"),x=f==null?h:Bs(f),v=y==null?h:Bs(y),h=new g(S,m+"leave",f,n,u),h.target=x,h.relatedTarget=v,S=null,Hr(u)===c&&(g=new g(p,m+"enter",y,n,u),g.target=v,g.relatedTarget=x,S=g),x=S,f&&y)t:{for(g=f,p=y,m=0,v=g;v;v=ks(v))m++;for(v=0,S=p;S;S=ks(S))v++;for(;0<m-v;)g=ks(g),m--;for(;0<v-m;)p=ks(p),v--;for(;m--;){if(g===p||p!==null&&g===p.alternate)break t;g=ks(g),p=ks(p)}g=null}else g=null;f!==null&&ym(d,h,f,g,!1),y!==null&&x!==null&&ym(d,x,y,g,!0)}}e:{if(h=c?Bs(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var _=bE;else if(cm(h))if(R0)_=kE;else{_=_E;var E=SE}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=EE);if(_&&(_=_(e,c))){A0(d,_,n,u);break e}E&&E(e,h,c),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&ud(h,"number",h.value)}switch(E=c?Bs(c):window,e){case"focusin":(cm(E)||E.contentEditable==="true")&&(Fs=E,Sd=c,ho=null);break;case"focusout":ho=Sd=Fs=null;break;case"mousedown":_d=!0;break;case"contextmenu":case"mouseup":case"dragend":_d=!1,pm(d,n,u);break;case"selectionchange":if(PE)break;case"keydown":case"keyup":pm(d,n,u)}var k;if(cf)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else $s?C0(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(T0&&n.locale!=="ko"&&($s||T!=="onCompositionStart"?T==="onCompositionEnd"&&$s&&(k=k0()):(ar=u,of="value"in ar?ar.value:ar.textContent,$s=!0)),E=jl(c,T),0<E.length&&(T=new im(T,e,null,n,u),d.push({event:T,listeners:E}),k?T.data=k:(k=P0(n),k!==null&&(T.data=k)))),(k=gE?yE(e,n):vE(e,n))&&(c=jl(c,"onBeforeInput"),0<c.length&&(u=new im("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=k))}U0(d,t)})}function No(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jl(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=To(e,n),i!=null&&r.unshift(No(e,i,s)),i=To(e,t),i!=null&&r.push(No(e,i,s))),e=e.return}return r}function ks(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ym(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=To(n,i),l!=null&&o.unshift(No(n,l,a))):s||(l=To(n,i),l!=null&&o.push(No(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jE=/\r\n?/g,NE=/\u0000|\uFFFD/g;function vm(e){return(typeof e=="string"?e:""+e).replace(jE,`
`).replace(NE,"")}function La(e,t,n){if(t=vm(t),vm(e)!==t&&n)throw Error(O(425))}function Nl(){}var Ed=null,kd=null;function Td(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Cd=typeof setTimeout=="function"?setTimeout:void 0,IE=typeof clearTimeout=="function"?clearTimeout:void 0,wm=typeof Promise=="function"?Promise:void 0,LE=typeof queueMicrotask=="function"?queueMicrotask:typeof wm<"u"?function(e){return wm.resolve(null).then(e).catch(DE)}:Cd;function DE(e){setTimeout(function(){throw e})}function mu(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ao(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ao(t)}function pr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Oi=Math.random().toString(36).slice(2),cn="__reactFiber$"+Oi,Io="__reactProps$"+Oi,Pn="__reactContainer$"+Oi,Pd="__reactEvents$"+Oi,ME="__reactListeners$"+Oi,$E="__reactHandles$"+Oi;function Hr(e){var t=e[cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xm(e);e!==null;){if(n=e[cn])return n;e=xm(e)}return t}e=n,n=e.parentNode}return null}function ua(e){return e=e[cn]||e[Pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function vc(e){return e[Io]||null}var Ad=[],Vs=-1;function Pr(e){return{current:e}}function he(e){0>Vs||(e.current=Ad[Vs],Ad[Vs]=null,Vs--)}function le(e,t){Vs++,Ad[Vs]=e.current,e.current=t}var br={},Qe=Pr(br),lt=Pr(!1),as=br;function wi(e,t){var n=e.type.contextTypes;if(!n)return br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ct(e){return e=e.childContextTypes,e!=null}function Il(){he(lt),he(Qe)}function bm(e,t,n){if(Qe.current!==br)throw Error(O(168));le(Qe,t),le(lt,n)}function V0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(O(108,S_(e)||"Unknown",s));return we({},n,r)}function Ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||br,as=Qe.current,le(Qe,e),le(lt,lt.current),!0}function Sm(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=V0(e,t,as),r.__reactInternalMemoizedMergedChildContext=e,he(lt),he(Qe),le(Qe,e)):he(lt),le(lt,n)}var Sn=null,wc=!1,gu=!1;function z0(e){Sn===null?Sn=[e]:Sn.push(e)}function FE(e){wc=!0,z0(e)}function Ar(){if(!gu&&Sn!==null){gu=!0;var e=0,t=ie;try{var n=Sn;for(ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sn=null,wc=!1}catch(s){throw Sn!==null&&(Sn=Sn.slice(e+1)),p0(tf,Ar),s}finally{ie=t,gu=!1}}return null}var zs=[],Ws=0,Dl=null,Ml=0,Et=[],kt=0,ls=null,En=1,kn="";function Fr(e,t){zs[Ws++]=Ml,zs[Ws++]=Dl,Dl=e,Ml=t}function W0(e,t,n){Et[kt++]=En,Et[kt++]=kn,Et[kt++]=ls,ls=e;var r=En;e=kn;var s=32-Yt(r)-1;r&=~(1<<s),n+=1;var i=32-Yt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,En=1<<32-Yt(t)+s|n<<s|r,kn=i+e}else En=1<<i|n<<s|r,kn=e}function df(e){e.return!==null&&(Fr(e,1),W0(e,1,0))}function hf(e){for(;e===Dl;)Dl=zs[--Ws],zs[Ws]=null,Ml=zs[--Ws],zs[Ws]=null;for(;e===ls;)ls=Et[--kt],Et[kt]=null,kn=Et[--kt],Et[kt]=null,En=Et[--kt],Et[kt]=null}var yt=null,gt=null,pe=!1,Gt=null;function H0(e,t){var n=Tt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _m(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yt=e,gt=pr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yt=e,gt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ls!==null?{id:En,overflow:kn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Tt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yt=e,gt=null,!0):!1;default:return!1}}function Rd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Od(e){if(pe){var t=gt;if(t){var n=t;if(!_m(e,t)){if(Rd(e))throw Error(O(418));t=pr(n.nextSibling);var r=yt;t&&_m(e,t)?H0(r,n):(e.flags=e.flags&-4097|2,pe=!1,yt=e)}}else{if(Rd(e))throw Error(O(418));e.flags=e.flags&-4097|2,pe=!1,yt=e}}}function Em(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yt=e}function Da(e){if(e!==yt)return!1;if(!pe)return Em(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Td(e.type,e.memoizedProps)),t&&(t=gt)){if(Rd(e))throw K0(),Error(O(418));for(;t;)H0(e,t),t=pr(t.nextSibling)}if(Em(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gt=pr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gt=null}}else gt=yt?pr(e.stateNode.nextSibling):null;return!0}function K0(){for(var e=gt;e;)e=pr(e.nextSibling)}function xi(){gt=yt=null,pe=!1}function ff(e){Gt===null?Gt=[e]:Gt.push(e)}var UE=In.ReactCurrentBatchConfig;function qi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Ma(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function km(e){var t=e._init;return t(e._payload)}function q0(e){function t(p,m){if(e){var v=p.deletions;v===null?(p.deletions=[m],p.flags|=16):v.push(m)}}function n(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function r(p,m){for(p=new Map;m!==null;)m.key!==null?p.set(m.key,m):p.set(m.index,m),m=m.sibling;return p}function s(p,m){return p=vr(p,m),p.index=0,p.sibling=null,p}function i(p,m,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<m?(p.flags|=2,m):v):(p.flags|=2,m)):(p.flags|=1048576,m)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,m,v,S){return m===null||m.tag!==6?(m=_u(v,p.mode,S),m.return=p,m):(m=s(m,v),m.return=p,m)}function l(p,m,v,S){var _=v.type;return _===Ms?u(p,m,v.props.children,S,v.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Qn&&km(_)===m.type)?(S=s(m,v.props),S.ref=qi(p,m,v),S.return=p,S):(S=ml(v.type,v.key,v.props,null,p.mode,S),S.ref=qi(p,m,v),S.return=p,S)}function c(p,m,v,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=Eu(v,p.mode,S),m.return=p,m):(m=s(m,v.children||[]),m.return=p,m)}function u(p,m,v,S,_){return m===null||m.tag!==7?(m=ss(v,p.mode,S,_),m.return=p,m):(m=s(m,v),m.return=p,m)}function d(p,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=_u(""+m,p.mode,v),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ta:return v=ml(m.type,m.key,m.props,null,p.mode,v),v.ref=qi(p,null,m),v.return=p,v;case Ds:return m=Eu(m,p.mode,v),m.return=p,m;case Qn:var S=m._init;return d(p,S(m._payload),v)}if(to(m)||Vi(m))return m=ss(m,p.mode,v,null),m.return=p,m;Ma(p,m)}return null}function h(p,m,v,S){var _=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return _!==null?null:a(p,m,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ta:return v.key===_?l(p,m,v,S):null;case Ds:return v.key===_?c(p,m,v,S):null;case Qn:return _=v._init,h(p,m,_(v._payload),S)}if(to(v)||Vi(v))return _!==null?null:u(p,m,v,S,null);Ma(p,v)}return null}function f(p,m,v,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return p=p.get(v)||null,a(m,p,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ta:return p=p.get(S.key===null?v:S.key)||null,l(m,p,S,_);case Ds:return p=p.get(S.key===null?v:S.key)||null,c(m,p,S,_);case Qn:var E=S._init;return f(p,m,v,E(S._payload),_)}if(to(S)||Vi(S))return p=p.get(v)||null,u(m,p,S,_,null);Ma(m,S)}return null}function y(p,m,v,S){for(var _=null,E=null,k=m,T=m=0,R=null;k!==null&&T<v.length;T++){k.index>T?(R=k,k=null):R=k.sibling;var j=h(p,k,v[T],S);if(j===null){k===null&&(k=R);break}e&&k&&j.alternate===null&&t(p,k),m=i(j,m,T),E===null?_=j:E.sibling=j,E=j,k=R}if(T===v.length)return n(p,k),pe&&Fr(p,T),_;if(k===null){for(;T<v.length;T++)k=d(p,v[T],S),k!==null&&(m=i(k,m,T),E===null?_=k:E.sibling=k,E=k);return pe&&Fr(p,T),_}for(k=r(p,k);T<v.length;T++)R=f(k,p,T,v[T],S),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?T:R.key),m=i(R,m,T),E===null?_=R:E.sibling=R,E=R);return e&&k.forEach(function(B){return t(p,B)}),pe&&Fr(p,T),_}function g(p,m,v,S){var _=Vi(v);if(typeof _!="function")throw Error(O(150));if(v=_.call(v),v==null)throw Error(O(151));for(var E=_=null,k=m,T=m=0,R=null,j=v.next();k!==null&&!j.done;T++,j=v.next()){k.index>T?(R=k,k=null):R=k.sibling;var B=h(p,k,j.value,S);if(B===null){k===null&&(k=R);break}e&&k&&B.alternate===null&&t(p,k),m=i(B,m,T),E===null?_=B:E.sibling=B,E=B,k=R}if(j.done)return n(p,k),pe&&Fr(p,T),_;if(k===null){for(;!j.done;T++,j=v.next())j=d(p,j.value,S),j!==null&&(m=i(j,m,T),E===null?_=j:E.sibling=j,E=j);return pe&&Fr(p,T),_}for(k=r(p,k);!j.done;T++,j=v.next())j=f(k,p,T,j.value,S),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?T:j.key),m=i(j,m,T),E===null?_=j:E.sibling=j,E=j);return e&&k.forEach(function(D){return t(p,D)}),pe&&Fr(p,T),_}function x(p,m,v,S){if(typeof v=="object"&&v!==null&&v.type===Ms&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ta:e:{for(var _=v.key,E=m;E!==null;){if(E.key===_){if(_=v.type,_===Ms){if(E.tag===7){n(p,E.sibling),m=s(E,v.props.children),m.return=p,p=m;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Qn&&km(_)===E.type){n(p,E.sibling),m=s(E,v.props),m.ref=qi(p,E,v),m.return=p,p=m;break e}n(p,E);break}else t(p,E);E=E.sibling}v.type===Ms?(m=ss(v.props.children,p.mode,S,v.key),m.return=p,p=m):(S=ml(v.type,v.key,v.props,null,p.mode,S),S.ref=qi(p,m,v),S.return=p,p=S)}return o(p);case Ds:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(p,m.sibling),m=s(m,v.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=Eu(v,p.mode,S),m.return=p,p=m}return o(p);case Qn:return E=v._init,x(p,m,E(v._payload),S)}if(to(v))return y(p,m,v,S);if(Vi(v))return g(p,m,v,S);Ma(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(p,m.sibling),m=s(m,v),m.return=p,p=m):(n(p,m),m=_u(v,p.mode,S),m.return=p,p=m),o(p)):n(p,m)}return x}var bi=q0(!0),G0=q0(!1),$l=Pr(null),Fl=null,Hs=null,pf=null;function mf(){pf=Hs=Fl=null}function gf(e){var t=$l.current;he($l),e._currentValue=t}function jd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function si(e,t){Fl=e,pf=Hs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function Ot(e){var t=e._currentValue;if(pf!==e)if(e={context:e,memoizedValue:t,next:null},Hs===null){if(Fl===null)throw Error(O(308));Hs=e,Fl.dependencies={lanes:0,firstContext:e}}else Hs=Hs.next=e;return t}var Kr=null;function yf(e){Kr===null?Kr=[e]:Kr.push(e)}function Y0(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,yf(t)):(n.next=s.next,s.next=n),t.interleaved=n,An(e,r)}function An(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Jn=!1;function vf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Q0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,An(e,n)}return s=r.interleaved,s===null?(t.next=t,yf(r)):(t.next=s.next,s.next=t),r.interleaved=t,An(e,n)}function cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nf(e,n)}}function Tm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ul(e,t,n,r){var s=e.updateQueue;Jn=!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=e.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 h=a.lane,f=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,g=a;switch(h=t,f=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){d=y.call(f,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,h=typeof y=="function"?y.call(f,d,h):y,h==null)break e;d=we({},d,h);break e;case 2:Jn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);us|=o,e.lanes=o,e.memoizedState=d}}function Cm(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(O(191,s));s.call(r)}}}var da={},hn=Pr(da),Lo=Pr(da),Do=Pr(da);function qr(e){if(e===da)throw Error(O(174));return e}function wf(e,t){switch(le(Do,t),le(Lo,e),le(hn,da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hd(t,e)}he(hn),le(hn,t)}function Si(){he(hn),he(Lo),he(Do)}function J0(e){qr(Do.current);var t=qr(hn.current),n=hd(t,e.type);t!==n&&(le(Lo,e),le(hn,n))}function xf(e){Lo.current===e&&(he(hn),he(Lo))}var ge=Pr(0);function Bl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yu=[];function bf(){for(var e=0;e<yu.length;e++)yu[e]._workInProgressVersionPrimary=null;yu.length=0}var ul=In.ReactCurrentDispatcher,vu=In.ReactCurrentBatchConfig,cs=0,ve=null,Oe=null,Ie=null,Vl=!1,fo=!1,Mo=0,BE=0;function He(){throw Error(O(321))}function Sf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xt(e[n],t[n]))return!1;return!0}function _f(e,t,n,r,s,i){if(cs=i,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ul.current=e===null||e.memoizedState===null?HE:KE,e=n(r,s),fo){i=0;do{if(fo=!1,Mo=0,25<=i)throw Error(O(301));i+=1,Ie=Oe=null,t.updateQueue=null,ul.current=qE,e=n(r,s)}while(fo)}if(ul.current=zl,t=Oe!==null&&Oe.next!==null,cs=0,Ie=Oe=ve=null,Vl=!1,t)throw Error(O(300));return e}function Ef(){var e=Mo!==0;return Mo=0,e}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ve.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function jt(){if(Oe===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Ie===null?ve.memoizedState:Ie.next;if(t!==null)Ie=t,Oe=e;else{if(e===null)throw Error(O(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Ie===null?ve.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function $o(e,t){return typeof t=="function"?t(e):t}function wu(e){var t=jt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Oe,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((cs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ve.lanes|=u,us|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,Xt(r,t.memoizedState)||(at=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,ve.lanes|=i,us|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xu(e){var t=jt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Xt(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function X0(){}function Z0(e,t){var n=ve,r=jt(),s=t(),i=!Xt(r.memoizedState,s);if(i&&(r.memoizedState=s,at=!0),r=r.queue,kf(nw.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,Fo(9,tw.bind(null,n,r,s,t),void 0,null),Le===null)throw Error(O(349));cs&30||ew(n,t,s)}return s}function ew(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tw(e,t,n,r){t.value=n,t.getSnapshot=r,rw(t)&&sw(e)}function nw(e,t,n){return n(function(){rw(t)&&sw(e)})}function rw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xt(e,n)}catch{return!0}}function sw(e){var t=An(e,1);t!==null&&Qt(t,e,1,-1)}function Pm(e){var t=rn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=WE.bind(null,ve,e),[t.memoizedState,e]}function Fo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function iw(){return jt().memoizedState}function dl(e,t,n,r){var s=rn();ve.flags|=e,s.memoizedState=Fo(1|t,n,void 0,r===void 0?null:r)}function xc(e,t,n,r){var s=jt();r=r===void 0?null:r;var i=void 0;if(Oe!==null){var o=Oe.memoizedState;if(i=o.destroy,r!==null&&Sf(r,o.deps)){s.memoizedState=Fo(t,n,i,r);return}}ve.flags|=e,s.memoizedState=Fo(1|t,n,i,r)}function Am(e,t){return dl(8390656,8,e,t)}function kf(e,t){return xc(2048,8,e,t)}function ow(e,t){return xc(4,2,e,t)}function aw(e,t){return xc(4,4,e,t)}function lw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cw(e,t,n){return n=n!=null?n.concat([e]):null,xc(4,4,lw.bind(null,t,e),n)}function Tf(){}function uw(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dw(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hw(e,t,n){return cs&21?(Xt(n,t)||(n=y0(),ve.lanes|=n,us|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=n)}function VE(e,t){var n=ie;ie=n!==0&&4>n?n:4,e(!0);var r=vu.transition;vu.transition={};try{e(!1),t()}finally{ie=n,vu.transition=r}}function fw(){return jt().memoizedState}function zE(e,t,n){var r=yr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pw(e))mw(t,n);else if(n=Y0(e,t,n,r),n!==null){var s=nt();Qt(n,e,r,s),gw(n,t,r)}}function WE(e,t,n){var r=yr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pw(e))mw(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Xt(a,o)){var l=t.interleaved;l===null?(s.next=s,yf(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Y0(e,t,s,r),n!==null&&(s=nt(),Qt(n,e,r,s),gw(n,t,r))}}function pw(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function mw(e,t){fo=Vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nf(e,n)}}var zl={readContext:Ot,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},HE={readContext:Ot,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Am,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dl(4194308,4,lw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return dl(4,2,e,t)},useMemo:function(e,t){var n=rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zE.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:Pm,useDebugValue:Tf,useDeferredValue:function(e){return rn().memoizedState=e},useTransition:function(){var e=Pm(!1),t=e[0];return e=VE.bind(null,e[1]),rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,s=rn();if(pe){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Le===null)throw Error(O(349));cs&30||ew(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Am(nw.bind(null,r,i,e),[e]),r.flags|=2048,Fo(9,tw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=rn(),t=Le.identifierPrefix;if(pe){var n=kn,r=En;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Mo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=BE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},KE={readContext:Ot,useCallback:uw,useContext:Ot,useEffect:kf,useImperativeHandle:cw,useInsertionEffect:ow,useLayoutEffect:aw,useMemo:dw,useReducer:wu,useRef:iw,useState:function(){return wu($o)},useDebugValue:Tf,useDeferredValue:function(e){var t=jt();return hw(t,Oe.memoizedState,e)},useTransition:function(){var e=wu($o)[0],t=jt().memoizedState;return[e,t]},useMutableSource:X0,useSyncExternalStore:Z0,useId:fw,unstable_isNewReconciler:!1},qE={readContext:Ot,useCallback:uw,useContext:Ot,useEffect:kf,useImperativeHandle:cw,useInsertionEffect:ow,useLayoutEffect:aw,useMemo:dw,useReducer:xu,useRef:iw,useState:function(){return xu($o)},useDebugValue:Tf,useDeferredValue:function(e){var t=jt();return Oe===null?t.memoizedState=e:hw(t,Oe.memoizedState,e)},useTransition:function(){var e=xu($o)[0],t=jt().memoizedState;return[e,t]},useMutableSource:X0,useSyncExternalStore:Z0,useId:fw,unstable_isNewReconciler:!1};function Bt(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Nd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bc={isMounted:function(e){return(e=e._reactInternals)?gs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),s=yr(e),i=Tn(r,s);i.payload=t,n!=null&&(i.callback=n),t=mr(e,i,s),t!==null&&(Qt(t,e,s,r),cl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),s=yr(e),i=Tn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mr(e,i,s),t!==null&&(Qt(t,e,s,r),cl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=yr(e),s=Tn(n,r);s.tag=2,t!=null&&(s.callback=t),t=mr(e,s,r),t!==null&&(Qt(t,e,r,n),cl(t,e,r))}};function Rm(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Oo(n,r)||!Oo(s,i):!0}function yw(e,t,n){var r=!1,s=br,i=t.contextType;return typeof i=="object"&&i!==null?i=Ot(i):(s=ct(t)?as:Qe.current,r=t.contextTypes,i=(r=r!=null)?wi(e,s):br),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Om(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bc.enqueueReplaceState(t,t.state,null)}function Id(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},vf(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Ot(i):(i=ct(t)?as:Qe.current,s.context=wi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Nd(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&bc.enqueueReplaceState(s,s.state,null),Ul(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function _i(e,t){try{var n="",r=t;do n+=b_(r),r=r.return;while(r);var s=n}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function bu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ld(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var GE=typeof WeakMap=="function"?WeakMap:Map;function vw(e,t,n){n=Tn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Hd=r),Ld(e,t)},n}function ww(e,t,n){n=Tn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ld(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ld(e,t),typeof r!="function"&&(gr===null?gr=new Set([this]):gr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function jm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new GE;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=lk.bind(null,e,t,n),t.then(e,e))}function Nm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Im(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Tn(-1,1),t.tag=2,mr(n,t,1))),n.lanes|=1),e)}var YE=In.ReactCurrentOwner,at=!1;function Xe(e,t,n,r){t.child=e===null?G0(t,null,n,r):bi(t,e.child,n,r)}function Lm(e,t,n,r,s){n=n.render;var i=t.ref;return si(t,s),r=_f(e,t,n,r,i,s),n=Ef(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Rn(e,t,s)):(pe&&n&&df(t),t.flags|=1,Xe(e,t,r,s),t.child)}function Dm(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!If(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,xw(e,t,i,r,s)):(e=ml(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Oo,n(o,r)&&e.ref===t.ref)return Rn(e,t,s)}return t.flags|=1,e=vr(i,r),e.ref=t.ref,e.return=t,t.child=e}function xw(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Oo(i,r)&&e.ref===t.ref)if(at=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,Rn(e,t,s)}return Dd(e,t,n,r,s)}function bw(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(qs,ft),ft|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(qs,ft),ft|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,le(qs,ft),ft|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,le(qs,ft),ft|=r;return Xe(e,t,s,n),t.child}function Sw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dd(e,t,n,r,s){var i=ct(n)?as:Qe.current;return i=wi(t,i),si(t,s),n=_f(e,t,n,r,i,s),r=Ef(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Rn(e,t,s)):(pe&&r&&df(t),t.flags|=1,Xe(e,t,n,s),t.child)}function Mm(e,t,n,r,s){if(ct(n)){var i=!0;Ll(t)}else i=!1;if(si(t,s),t.stateNode===null)hl(e,t),yw(t,n,r),Id(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ot(c):(c=ct(n)?as:Qe.current,c=wi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Om(t,o,r,c),Jn=!1;var h=t.memoizedState;o.state=h,Ul(t,r,o,s),l=t.memoizedState,a!==r||h!==l||lt.current||Jn?(typeof u=="function"&&(Nd(t,n,u,r),l=t.memoizedState),(a=Jn||Rm(t,n,a,r,h,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"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Q0(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Bt(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ot(l):(l=ct(n)?as:Qe.current,l=wi(t,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Om(t,o,r,l),Jn=!1,h=t.memoizedState,o.state=h,Ul(t,r,o,s);var y=t.memoizedState;a!==d||h!==y||lt.current||Jn?(typeof f=="function"&&(Nd(t,n,f,r),y=t.memoizedState),(c=Jn||Rm(t,n,c,r,h,y,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Md(e,t,n,r,i,s)}function Md(e,t,n,r,s,i){Sw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Sm(t,n,!1),Rn(e,t,i);r=t.stateNode,YE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=bi(t,e.child,null,i),t.child=bi(t,null,a,i)):Xe(e,t,a,i),t.memoizedState=r.state,s&&Sm(t,n,!0),t.child}function _w(e){var t=e.stateNode;t.pendingContext?bm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bm(e,t.context,!1),wf(e,t.containerInfo)}function $m(e,t,n,r,s){return xi(),ff(s),t.flags|=256,Xe(e,t,n,r),t.child}var $d={dehydrated:null,treeContext:null,retryLane:0};function Fd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ew(e,t,n){var r=t.pendingProps,s=ge.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),le(ge,s&1),e===null)return Od(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Ec(o,r,0,null),e=ss(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Fd(n),t.memoizedState=$d,e):Cf(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return QE(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=vr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=vr(a,i):(i=ss(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Fd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=$d,r}return i=e.child,e=i.sibling,r=vr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Cf(e,t){return t=Ec({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $a(e,t,n,r){return r!==null&&ff(r),bi(t,e.child,null,n),e=Cf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function QE(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=bu(Error(O(422))),$a(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Ec({mode:"visible",children:r.children},s,0,null),i=ss(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&bi(t,e.child,null,o),t.child.memoizedState=Fd(o),t.memoizedState=$d,i);if(!(t.mode&1))return $a(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(O(419)),r=bu(i,r,void 0),$a(e,t,o,r)}if(a=(o&e.childLanes)!==0,at||a){if(r=Le,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,An(e,s),Qt(r,e,s,-1))}return Nf(),r=bu(Error(O(421))),$a(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=ck.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,gt=pr(s.nextSibling),yt=t,pe=!0,Gt=null,e!==null&&(Et[kt++]=En,Et[kt++]=kn,Et[kt++]=ls,En=e.id,kn=e.overflow,ls=t),t=Cf(t,r.children),t.flags|=4096,t)}function Fm(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),jd(e.return,t,n)}function Su(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function kw(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Xe(e,t,r.children,n),r=ge.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fm(e,n,t);else if(e.tag===19)Fm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(le(ge,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Bl(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Su(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Bl(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Su(t,!0,n,null,i);break;case"together":Su(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),us|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=vr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JE(e,t,n){switch(t.tag){case 3:_w(t),xi();break;case 5:J0(t);break;case 1:ct(t.type)&&Ll(t);break;case 4:wf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;le($l,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(le(ge,ge.current&1),t.flags|=128,null):n&t.child.childLanes?Ew(e,t,n):(le(ge,ge.current&1),e=Rn(e,t,n),e!==null?e.sibling:null);le(ge,ge.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kw(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),le(ge,ge.current),r)break;return null;case 22:case 23:return t.lanes=0,bw(e,t,n)}return Rn(e,t,n)}var Tw,Ud,Cw,Pw;Tw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ud=function(){};Cw=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,qr(hn.current);var i=null;switch(n){case"input":s=ld(e,s),r=ld(e,r),i=[];break;case"select":s=we({},s,{value:void 0}),r=we({},r,{value:void 0}),i=[];break;case"textarea":s=dd(e,s),r=dd(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Nl)}fd(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Eo.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=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"&&(Eo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&de("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Pw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gi(e,t){if(!pe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function XE(e,t,n){var r=t.pendingProps;switch(hf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return ct(t.type)&&Il(),Ke(t),null;case 3:return r=t.stateNode,Si(),he(lt),he(Qe),bf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Da(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gt!==null&&(Gd(Gt),Gt=null))),Ud(e,t),Ke(t),null;case 5:xf(t);var s=qr(Do.current);if(n=t.type,e!==null&&t.stateNode!=null)Cw(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ke(t),null}if(e=qr(hn.current),Da(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[cn]=t,r[Io]=i,e=(t.mode&1)!==0,n){case"dialog":de("cancel",r),de("close",r);break;case"iframe":case"object":case"embed":de("load",r);break;case"video":case"audio":for(s=0;s<ro.length;s++)de(ro[s],r);break;case"source":de("error",r);break;case"img":case"image":case"link":de("error",r),de("load",r);break;case"details":de("toggle",r);break;case"input":Gp(r,i),de("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},de("invalid",r);break;case"textarea":Qp(r,i),de("invalid",r)}fd(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&La(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&La(r.textContent,a,e),s=["children",""+a]):Eo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&de("scroll",r)}switch(n){case"input":Ca(r),Yp(r,i,!0);break;case"textarea":Ca(r),Jp(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Nl)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=n0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[cn]=t,e[Io]=r,Tw(e,t,!1,!1),t.stateNode=e;e:{switch(o=pd(n,r),n){case"dialog":de("cancel",e),de("close",e),s=r;break;case"iframe":case"object":case"embed":de("load",e),s=r;break;case"video":case"audio":for(s=0;s<ro.length;s++)de(ro[s],e);s=r;break;case"source":de("error",e),s=r;break;case"img":case"image":case"link":de("error",e),de("load",e),s=r;break;case"details":de("toggle",e),s=r;break;case"input":Gp(e,r),s=ld(e,r),de("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=we({},r,{value:void 0}),de("invalid",e);break;case"textarea":Qp(e,r),s=dd(e,r),de("invalid",e);break;default:s=r}fd(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?i0(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&r0(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ko(e,l):typeof l=="number"&&ko(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Eo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&de("scroll",e):l!=null&&Qh(e,i,l,o))}switch(n){case"input":Ca(e),Yp(e,r,!1);break;case"textarea":Ca(e),Jp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+xr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ei(e,!!r.multiple,i,!1):r.defaultValue!=null&&ei(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Nl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ke(t),null;case 6:if(e&&t.stateNode!=null)Pw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=qr(Do.current),qr(hn.current),Da(t)){if(r=t.stateNode,n=t.memoizedProps,r[cn]=t,(i=r.nodeValue!==n)&&(e=yt,e!==null))switch(e.tag){case 3:La(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&La(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cn]=t,t.stateNode=r}return Ke(t),null;case 13:if(he(ge),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&gt!==null&&t.mode&1&&!(t.flags&128))K0(),xi(),t.flags|=98560,i=!1;else if(i=Da(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(O(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[cn]=t}else xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),i=!1}else Gt!==null&&(Gd(Gt),Gt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ge.current&1?Ne===0&&(Ne=3):Nf())),t.updateQueue!==null&&(t.flags|=4),Ke(t),null);case 4:return Si(),Ud(e,t),e===null&&jo(t.stateNode.containerInfo),Ke(t),null;case 10:return gf(t.type._context),Ke(t),null;case 17:return ct(t.type)&&Il(),Ke(t),null;case 19:if(he(ge),i=t.memoizedState,i===null)return Ke(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Gi(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bl(e),o!==null){for(t.flags|=128,Gi(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return le(ge,ge.current&1|2),t.child}e=e.sibling}i.tail!==null&&_e()>Ei&&(t.flags|=128,r=!0,Gi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Bl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!pe)return Ke(t),null}else 2*_e()-i.renderingStartTime>Ei&&n!==1073741824&&(t.flags|=128,r=!0,Gi(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_e(),t.sibling=null,n=ge.current,le(ge,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return jf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ft&1073741824&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function ZE(e,t){switch(hf(t),t.tag){case 1:return ct(t.type)&&Il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),he(lt),he(Qe),bf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xf(t),null;case 13:if(he(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(ge),null;case 4:return Si(),null;case 10:return gf(t.type._context),null;case 22:case 23:return jf(),null;case 24:return null;default:return null}}var Fa=!1,Ge=!1,ek=typeof WeakSet=="function"?WeakSet:Set,M=null;function Ks(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function Bd(e,t,n){try{n()}catch(r){Se(e,t,r)}}var Um=!1;function tk(e,t){if(Ed=Rl,e=N0(),uf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++u===r&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kd={focusedElem:e,selectionRange:n},Rl=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,x=y.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:Bt(t.type,g),x);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(S){Se(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return y=Um,Um=!1,y}function po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Bd(t,n,i)}s=s.next}while(s!==r)}}function Sc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Aw(e){var t=e.alternate;t!==null&&(e.alternate=null,Aw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cn],delete t[Io],delete t[Pd],delete t[ME],delete t[$E])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rw(e){return e.tag===5||e.tag===3||e.tag===4}function Bm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nl));else if(r!==4&&(e=e.child,e!==null))for(zd(e,t,n),e=e.sibling;e!==null;)zd(e,t,n),e=e.sibling}function Wd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wd(e,t,n),e=e.sibling;e!==null;)Wd(e,t,n),e=e.sibling}var Fe=null,Kt=!1;function Vn(e,t,n){for(n=n.child;n!==null;)Ow(e,t,n),n=n.sibling}function Ow(e,t,n){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(pc,n)}catch{}switch(n.tag){case 5:Ge||Ks(n,t);case 6:var r=Fe,s=Kt;Fe=null,Vn(e,t,n),Fe=r,Kt=s,Fe!==null&&(Kt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Kt?(e=Fe,n=n.stateNode,e.nodeType===8?mu(e.parentNode,n):e.nodeType===1&&mu(e,n),Ao(e)):mu(Fe,n.stateNode));break;case 4:r=Fe,s=Kt,Fe=n.stateNode.containerInfo,Kt=!0,Vn(e,t,n),Fe=r,Kt=s;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Bd(n,t,o),s=s.next}while(s!==r)}Vn(e,t,n);break;case 1:if(!Ge&&(Ks(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Se(n,t,a)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,Vn(e,t,n),Ge=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function Vm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ek),t.forEach(function(r){var s=uk.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Dt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Fe=a.stateNode,Kt=!1;break e;case 3:Fe=a.stateNode.containerInfo,Kt=!0;break e;case 4:Fe=a.stateNode.containerInfo,Kt=!0;break e}a=a.return}if(Fe===null)throw Error(O(160));Ow(i,o,s),Fe=null,Kt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Se(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jw(t,e),t=t.sibling}function jw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Dt(t,e),nn(e),r&4){try{po(3,e,e.return),Sc(3,e)}catch(g){Se(e,e.return,g)}try{po(5,e,e.return)}catch(g){Se(e,e.return,g)}}break;case 1:Dt(t,e),nn(e),r&512&&n!==null&&Ks(n,n.return);break;case 5:if(Dt(t,e),nn(e),r&512&&n!==null&&Ks(n,n.return),e.flags&32){var s=e.stateNode;try{ko(s,"")}catch(g){Se(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&e0(s,i),pd(a,o);var c=pd(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?i0(s,d):u==="dangerouslySetInnerHTML"?r0(s,d):u==="children"?ko(s,d):Qh(s,u,d,c)}switch(a){case"input":cd(s,i);break;case"textarea":t0(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ei(s,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?ei(s,!!i.multiple,i.defaultValue,!0):ei(s,!!i.multiple,i.multiple?[]:"",!1))}s[Io]=i}catch(g){Se(e,e.return,g)}}break;case 6:if(Dt(t,e),nn(e),r&4){if(e.stateNode===null)throw Error(O(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){Se(e,e.return,g)}}break;case 3:if(Dt(t,e),nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ao(t.containerInfo)}catch(g){Se(e,e.return,g)}break;case 4:Dt(t,e),nn(e);break;case 13:Dt(t,e),nn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Rf=_e())),r&4&&Vm(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Ge=(c=Ge)||u,Dt(t,e),Ge=c):Dt(t,e),nn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(M=e,u=e.child;u!==null;){for(d=M=u;M!==null;){switch(h=M,f=h.child,h.tag){case 0:case 11:case 14:case 15:po(4,h,h.return);break;case 1:Ks(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){Se(r,n,g)}}break;case 5:Ks(h,h.return);break;case 22:if(h.memoizedState!==null){Wm(d);continue}}f!==null?(f.return=h,M=f):Wm(d)}u=u.sibling}e:for(u=null,d=e;;){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=s0("display",o))}catch(g){Se(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Se(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Dt(t,e),nn(e),r&4&&Vm(e);break;case 21:break;default:Dt(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rw(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ko(s,""),r.flags&=-33);var i=Bm(e);Wd(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Bm(e);zd(e,a,o);break;default:throw Error(O(161))}}catch(l){Se(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nk(e,t,n){M=e,Nw(e)}function Nw(e,t,n){for(var r=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Fa;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ge;a=Fa;var c=Ge;if(Fa=o,(Ge=l)&&!c)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?Hm(s):l!==null?(l.return=o,M=l):Hm(s);for(;i!==null;)M=i,Nw(i),i=i.sibling;M=s,Fa=a,Ge=c}zm(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):zm(e)}}function zm(e){for(;M!==null;){var t=M;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ge||Sc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ge)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Bt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Cm(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Cm(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Ao(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ge||t.flags&512&&Vd(t)}catch(h){Se(t,t.return,h)}}if(t===e){M=null;break}if(n=t.sibling,n!==null){n.return=t.return,M=n;break}M=t.return}}function Wm(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var n=t.sibling;if(n!==null){n.return=t.return,M=n;break}M=t.return}}function Hm(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Sc(4,t)}catch(l){Se(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Se(t,s,l)}}var i=t.return;try{Vd(t)}catch(l){Se(t,i,l)}break;case 5:var o=t.return;try{Vd(t)}catch(l){Se(t,o,l)}}}catch(l){Se(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var rk=Math.ceil,Wl=In.ReactCurrentDispatcher,Pf=In.ReactCurrentOwner,Pt=In.ReactCurrentBatchConfig,te=0,Le=null,Ce=null,Be=0,ft=0,qs=Pr(0),Ne=0,Uo=null,us=0,_c=0,Af=0,mo=null,ot=null,Rf=0,Ei=1/0,xn=null,Hl=!1,Hd=null,gr=null,Ua=!1,lr=null,Kl=0,go=0,Kd=null,fl=-1,pl=0;function nt(){return te&6?_e():fl!==-1?fl:fl=_e()}function yr(e){return e.mode&1?te&2&&Be!==0?Be&-Be:UE.transition!==null?(pl===0&&(pl=y0()),pl):(e=ie,e!==0||(e=window.event,e=e===void 0?16:E0(e.type)),e):1}function Qt(e,t,n,r){if(50<go)throw go=0,Kd=null,Error(O(185));la(e,n,r),(!(te&2)||e!==Le)&&(e===Le&&(!(te&2)&&(_c|=n),Ne===4&&er(e,Be)),ut(e,r),n===1&&te===0&&!(t.mode&1)&&(Ei=_e()+500,wc&&Ar()))}function ut(e,t){var n=e.callbackNode;U_(e,t);var r=Al(e,e===Le?Be:0);if(r===0)n!==null&&em(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&em(n),t===1)e.tag===0?FE(Km.bind(null,e)):z0(Km.bind(null,e)),LE(function(){!(te&6)&&Ar()}),n=null;else{switch(v0(r)){case 1:n=tf;break;case 4:n=m0;break;case 16:n=Pl;break;case 536870912:n=g0;break;default:n=Pl}n=Bw(n,Iw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Iw(e,t){if(fl=-1,pl=0,te&6)throw Error(O(327));var n=e.callbackNode;if(ii()&&e.callbackNode!==n)return null;var r=Al(e,e===Le?Be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ql(e,r);else{t=r;var s=te;te|=2;var i=Dw();(Le!==e||Be!==t)&&(xn=null,Ei=_e()+500,rs(e,t));do try{ok();break}catch(a){Lw(e,a)}while(!0);mf(),Wl.current=i,te=s,Ce!==null?t=0:(Le=null,Be=0,t=Ne)}if(t!==0){if(t===2&&(s=wd(e),s!==0&&(r=s,t=qd(e,s))),t===1)throw n=Uo,rs(e,0),er(e,r),ut(e,_e()),n;if(t===6)er(e,r);else{if(s=e.current.alternate,!(r&30)&&!sk(s)&&(t=ql(e,r),t===2&&(i=wd(e),i!==0&&(r=i,t=qd(e,i))),t===1))throw n=Uo,rs(e,0),er(e,r),ut(e,_e()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:Ur(e,ot,xn);break;case 3:if(er(e,r),(r&130023424)===r&&(t=Rf+500-_e(),10<t)){if(Al(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){nt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Cd(Ur.bind(null,e,ot,xn),t);break}Ur(e,ot,xn);break;case 4:if(er(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Yt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rk(r/1960))-r,10<r){e.timeoutHandle=Cd(Ur.bind(null,e,ot,xn),r);break}Ur(e,ot,xn);break;case 5:Ur(e,ot,xn);break;default:throw Error(O(329))}}}return ut(e,_e()),e.callbackNode===n?Iw.bind(null,e):null}function qd(e,t){var n=mo;return e.current.memoizedState.isDehydrated&&(rs(e,t).flags|=256),e=ql(e,t),e!==2&&(t=ot,ot=n,t!==null&&Gd(t)),e}function Gd(e){ot===null?ot=e:ot.push.apply(ot,e)}function sk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Xt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function er(e,t){for(t&=~Af,t&=~_c,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yt(t),r=1<<n;e[n]=-1,t&=~r}}function Km(e){if(te&6)throw Error(O(327));ii();var t=Al(e,0);if(!(t&1))return ut(e,_e()),null;var n=ql(e,t);if(e.tag!==0&&n===2){var r=wd(e);r!==0&&(t=r,n=qd(e,r))}if(n===1)throw n=Uo,rs(e,0),er(e,t),ut(e,_e()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ur(e,ot,xn),ut(e,_e()),null}function Of(e,t){var n=te;te|=1;try{return e(t)}finally{te=n,te===0&&(Ei=_e()+500,wc&&Ar())}}function ds(e){lr!==null&&lr.tag===0&&!(te&6)&&ii();var t=te;te|=1;var n=Pt.transition,r=ie;try{if(Pt.transition=null,ie=1,e)return e()}finally{ie=r,Pt.transition=n,te=t,!(te&6)&&Ar()}}function jf(){ft=qs.current,he(qs)}function rs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,IE(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(hf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Il();break;case 3:Si(),he(lt),he(Qe),bf();break;case 5:xf(r);break;case 4:Si();break;case 13:he(ge);break;case 19:he(ge);break;case 10:gf(r.type._context);break;case 22:case 23:jf()}n=n.return}if(Le=e,Ce=e=vr(e.current,null),Be=ft=t,Ne=0,Uo=null,Af=_c=us=0,ot=mo=null,Kr!==null){for(t=0;t<Kr.length;t++)if(n=Kr[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Kr=null}return e}function Lw(e,t){do{var n=Ce;try{if(mf(),ul.current=zl,Vl){for(var r=ve.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Vl=!1}if(cs=0,Ie=Oe=ve=null,fo=!1,Mo=0,Pf.current=null,n===null||n.return===null){Ne=1,Uo=t,Ce=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Be,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 h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Nm(o);if(f!==null){f.flags&=-257,Im(f,o,a,i,t),f.mode&1&&jm(i,c,t),t=f,l=c;var y=t.updateQueue;if(y===null){var g=new Set;g.add(l),t.updateQueue=g}else y.add(l);break e}else{if(!(t&1)){jm(i,c,t),Nf();break e}l=Error(O(426))}}else if(pe&&a.mode&1){var x=Nm(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Im(x,o,a,i,t),ff(_i(l,a));break e}}i=l=_i(l,a),Ne!==4&&(Ne=2),mo===null?mo=[i]:mo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=vw(i,l,t);Tm(i,p);break e;case 1:a=l;var m=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(gr===null||!gr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=ww(i,a,t);Tm(i,S);break e}}i=i.return}while(i!==null)}$w(n)}catch(_){t=_,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function Dw(){var e=Wl.current;return Wl.current=zl,e===null?zl:e}function Nf(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Le===null||!(us&268435455)&&!(_c&268435455)||er(Le,Be)}function ql(e,t){var n=te;te|=2;var r=Dw();(Le!==e||Be!==t)&&(xn=null,rs(e,t));do try{ik();break}catch(s){Lw(e,s)}while(!0);if(mf(),te=n,Wl.current=r,Ce!==null)throw Error(O(261));return Le=null,Be=0,Ne}function ik(){for(;Ce!==null;)Mw(Ce)}function ok(){for(;Ce!==null&&!O_();)Mw(Ce)}function Mw(e){var t=Uw(e.alternate,e,ft);e.memoizedProps=e.pendingProps,t===null?$w(e):Ce=t,Pf.current=null}function $w(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ZE(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,Ce=null;return}}else if(n=XE(n,t,ft),n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Ne===0&&(Ne=5)}function Ur(e,t,n){var r=ie,s=Pt.transition;try{Pt.transition=null,ie=1,ak(e,t,n,r)}finally{Pt.transition=s,ie=r}return null}function ak(e,t,n,r){do ii();while(lr!==null);if(te&6)throw Error(O(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(B_(e,i),e===Le&&(Ce=Le=null,Be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ua||(Ua=!0,Bw(Pl,function(){return ii(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Pt.transition,Pt.transition=null;var o=ie;ie=1;var a=te;te|=4,Pf.current=null,tk(e,n),jw(n,e),CE(kd),Rl=!!Ed,kd=Ed=null,e.current=n,nk(n),j_(),te=a,ie=o,Pt.transition=i}else e.current=n;if(Ua&&(Ua=!1,lr=e,Kl=s),i=e.pendingLanes,i===0&&(gr=null),L_(n.stateNode),ut(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Hl)throw Hl=!1,e=Hd,Hd=null,e;return Kl&1&&e.tag!==0&&ii(),i=e.pendingLanes,i&1?e===Kd?go++:(go=0,Kd=e):go=0,Ar(),null}function ii(){if(lr!==null){var e=v0(Kl),t=Pt.transition,n=ie;try{if(Pt.transition=null,ie=16>e?16:e,lr===null)var r=!1;else{if(e=lr,lr=null,Kl=0,te&6)throw Error(O(331));var s=te;for(te|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(M=c;M!==null;){var u=M;switch(u.tag){case 0:case 11:case 15:po(8,u,i)}var d=u.child;if(d!==null)d.return=u,M=d;else for(;M!==null;){u=M;var h=u.sibling,f=u.return;if(Aw(u),u===c){M=null;break}if(h!==null){h.return=f,M=h;break}M=f}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:po(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,M=p;break e}M=i.return}}var m=e.current;for(M=m;M!==null;){o=M;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,M=v;else e:for(o=m;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Sc(9,a)}}catch(_){Se(a,a.return,_)}if(a===o){M=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,M=S;break e}M=a.return}}if(te=s,Ar(),dn&&typeof dn.onPostCommitFiberRoot=="function")try{dn.onPostCommitFiberRoot(pc,e)}catch{}r=!0}return r}finally{ie=n,Pt.transition=t}}return!1}function qm(e,t,n){t=_i(n,t),t=vw(e,t,1),e=mr(e,t,1),t=nt(),e!==null&&(la(e,1,t),ut(e,t))}function Se(e,t,n){if(e.tag===3)qm(e,e,n);else for(;t!==null;){if(t.tag===3){qm(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(gr===null||!gr.has(r))){e=_i(n,e),e=ww(t,e,1),t=mr(t,e,1),e=nt(),t!==null&&(la(t,1,e),ut(t,e));break}}t=t.return}}function lk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Le===e&&(Be&n)===n&&(Ne===4||Ne===3&&(Be&130023424)===Be&&500>_e()-Rf?rs(e,0):Af|=n),ut(e,t)}function Fw(e,t){t===0&&(e.mode&1?(t=Ra,Ra<<=1,!(Ra&130023424)&&(Ra=4194304)):t=1);var n=nt();e=An(e,t),e!==null&&(la(e,t,n),ut(e,n))}function ck(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fw(e,n)}function uk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Fw(e,n)}var Uw;Uw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,JE(e,t,n);at=!!(e.flags&131072)}else at=!1,pe&&t.flags&1048576&&W0(t,Ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hl(e,t),e=t.pendingProps;var s=wi(t,Qe.current);si(t,n),s=_f(null,t,r,e,s,n);var i=Ef();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(i=!0,Ll(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,vf(t),s.updater=bc,t.stateNode=s,s._reactInternals=t,Id(t,r,e,n),t=Md(null,t,r,!0,i,n)):(t.tag=0,pe&&i&&df(t),Xe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=hk(r),e=Bt(r,e),s){case 0:t=Dd(null,t,r,e,n);break e;case 1:t=Mm(null,t,r,e,n);break e;case 11:t=Lm(null,t,r,e,n);break e;case 14:t=Dm(null,t,r,Bt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Bt(r,s),Dd(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Bt(r,s),Mm(e,t,r,s,n);case 3:e:{if(_w(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Q0(e,t),Ul(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=_i(Error(O(423)),t),t=$m(e,t,r,n,s);break e}else if(r!==s){s=_i(Error(O(424)),t),t=$m(e,t,r,n,s);break e}else for(gt=pr(t.stateNode.containerInfo.firstChild),yt=t,pe=!0,Gt=null,n=G0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xi(),r===s){t=Rn(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return J0(t),e===null&&Od(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Td(r,s)?o=null:i!==null&&Td(r,i)&&(t.flags|=32),Sw(e,t),Xe(e,t,o,n),t.child;case 6:return e===null&&Od(t),null;case 13:return Ew(e,t,n);case 4:return wf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bi(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Bt(r,s),Lm(e,t,r,s,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,le($l,r._currentValue),r._currentValue=o,i!==null)if(Xt(i.value,o)){if(i.children===s.children&&!lt.current){t=Rn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Tn(-1,n&-n),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|=n,l=i.alternate,l!==null&&(l.lanes|=n),jd(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(O(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),jd(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Xe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,si(t,n),s=Ot(s),r=r(s),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,s=Bt(r,t.pendingProps),s=Bt(r.type,s),Dm(e,t,r,s,n);case 15:return xw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Bt(r,s),hl(e,t),t.tag=1,ct(r)?(e=!0,Ll(t)):e=!1,si(t,n),yw(t,r,s),Id(t,r,s,n),Md(null,t,r,!0,e,n);case 19:return kw(e,t,n);case 22:return bw(e,t,n)}throw Error(O(156,t.tag))};function Bw(e,t){return p0(e,t)}function dk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(e,t,n,r){return new dk(e,t,n,r)}function If(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hk(e){if(typeof e=="function")return If(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xh)return 11;if(e===Zh)return 14}return 2}function vr(e,t){var n=e.alternate;return n===null?(n=Tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ml(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")If(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ms:return ss(n.children,s,i,t);case Jh:o=8,s|=8;break;case sd:return e=Tt(12,n,t,s|2),e.elementType=sd,e.lanes=i,e;case id:return e=Tt(13,n,t,s),e.elementType=id,e.lanes=i,e;case od:return e=Tt(19,n,t,s),e.elementType=od,e.lanes=i,e;case Jv:return Ec(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yv:o=10;break e;case Qv:o=9;break e;case Xh:o=11;break e;case Zh:o=14;break e;case Qn:o=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=Tt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ss(e,t,n,r){return e=Tt(7,e,r,t),e.lanes=n,e}function Ec(e,t,n,r){return e=Tt(22,e,r,t),e.elementType=Jv,e.lanes=n,e.stateNode={isHidden:!1},e}function _u(e,t,n){return e=Tt(6,e,null,t),e.lanes=n,e}function Eu(e,t,n){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fk(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=su(0),this.expirationTimes=su(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=su(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Lf(e,t,n,r,s,i,o,a,l){return e=new fk(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Tt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vf(i),e}function pk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ds,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vw(e){if(!e)return br;e=e._reactInternals;e:{if(gs(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(ct(n))return V0(e,n,t)}return t}function zw(e,t,n,r,s,i,o,a,l){return e=Lf(n,r,!0,e,s,i,o,a,l),e.context=Vw(null),n=e.current,r=nt(),s=yr(n),i=Tn(r,s),i.callback=t??null,mr(n,i,s),e.current.lanes=s,la(e,s,r),ut(e,r),e}function kc(e,t,n,r){var s=t.current,i=nt(),o=yr(s);return n=Vw(n),t.context===null?t.context=n:t.pendingContext=n,t=Tn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mr(s,t,o),e!==null&&(Qt(e,s,o,i),cl(e,s,o)),o}function Gl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Gm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Df(e,t){Gm(e,t),(e=e.alternate)&&Gm(e,t)}function mk(){return null}var Ww=typeof reportError=="function"?reportError:function(e){console.error(e)};function Mf(e){this._internalRoot=e}Tc.prototype.render=Mf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));kc(e,t,null,null)};Tc.prototype.unmount=Mf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ds(function(){kc(null,e,null,null)}),t[Pn]=null}};function Tc(e){this._internalRoot=e}Tc.prototype.unstable_scheduleHydration=function(e){if(e){var t=b0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zn.length&&t!==0&&t<Zn[n].priority;n++);Zn.splice(n,0,e),n===0&&_0(e)}};function $f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ym(){}function gk(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Gl(o);i.call(c)}}var o=zw(t,r,e,0,null,!1,!1,"",Ym);return e._reactRootContainer=o,e[Pn]=o.current,jo(e.nodeType===8?e.parentNode:e),ds(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Gl(l);a.call(c)}}var l=Lf(e,0,!1,null,null,!1,!1,"",Ym);return e._reactRootContainer=l,e[Pn]=l.current,jo(e.nodeType===8?e.parentNode:e),ds(function(){kc(t,l,n,r)}),l}function Pc(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Gl(o);a.call(l)}}kc(t,o,e,s)}else o=gk(n,t,e,s,r);return Gl(o)}w0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=no(t.pendingLanes);n!==0&&(nf(t,n|1),ut(t,_e()),!(te&6)&&(Ei=_e()+500,Ar()))}break;case 13:ds(function(){var r=An(e,1);if(r!==null){var s=nt();Qt(r,e,1,s)}}),Df(e,1)}};rf=function(e){if(e.tag===13){var t=An(e,134217728);if(t!==null){var n=nt();Qt(t,e,134217728,n)}Df(e,134217728)}};x0=function(e){if(e.tag===13){var t=yr(e),n=An(e,t);if(n!==null){var r=nt();Qt(n,e,t,r)}Df(e,t)}};b0=function(){return ie};S0=function(e,t){var n=ie;try{return ie=e,t()}finally{ie=n}};gd=function(e,t,n){switch(t){case"input":if(cd(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=vc(r);if(!s)throw Error(O(90));Zv(r),cd(r,s)}}}break;case"textarea":t0(e,n);break;case"select":t=n.value,t!=null&&ei(e,!!n.multiple,t,!1)}};l0=Of;c0=ds;var yk={usingClientEntryPoint:!1,Events:[ua,Bs,vc,o0,a0,Of]},Yi={findFiberByHostInstance:Hr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vk={bundleType:Yi.bundleType,version:Yi.version,rendererPackageName:Yi.rendererPackageName,rendererConfig:Yi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:In.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=h0(e),e===null?null:e.stateNode},findFiberByHostInstance:Yi.findFiberByHostInstance||mk,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 Ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ba.isDisabled&&Ba.supportsFiber)try{pc=Ba.inject(vk),dn=Ba}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yk;xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$f(t))throw Error(O(200));return pk(e,t,null,n)};xt.createRoot=function(e,t){if(!$f(e))throw Error(O(299));var n=!1,r="",s=Ww;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Lf(e,1,!1,null,null,n,!1,r,s),e[Pn]=t.current,jo(e.nodeType===8?e.parentNode:e),new Mf(t)};xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=h0(t),e=e===null?null:e.stateNode,e};xt.flushSync=function(e){return ds(e)};xt.hydrate=function(e,t,n){if(!Cc(t))throw Error(O(200));return Pc(null,e,t,!0,n)};xt.hydrateRoot=function(e,t,n){if(!$f(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Ww;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=zw(t,null,e,1,n??null,s,!1,i,o),e[Pn]=t.current,jo(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Tc(t)};xt.render=function(e,t,n){if(!Cc(t))throw Error(O(200));return Pc(null,e,t,!1,n)};xt.unmountComponentAtNode=function(e){if(!Cc(e))throw Error(O(40));return e._reactRootContainer?(ds(function(){Pc(null,null,e,!1,function(){e._reactRootContainer=null,e[Pn]=null})}),!0):!1};xt.unstable_batchedUpdates=Of;xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cc(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return Pc(e,t,n,!1,r)};xt.version="18.3.1-next-f1338f8080-20240426";function Hw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hw)}catch(e){console.error(e)}}Hw(),Hv.exports=xt;var ha=Hv.exports;const Kw=jv(ha);var qw,Qm=ha;qw=Qm.createRoot,Qm.hydrateRoot;const wk=1,xk=1e6;let ku=0;function bk(){return ku=(ku+1)%Number.MAX_SAFE_INTEGER,ku.toString()}const Tu=new Map,Jm=e=>{if(Tu.has(e))return;const t=setTimeout(()=>{Tu.delete(e),yo({type:"REMOVE_TOAST",toastId:e})},xk);Tu.set(e,t)},Sk=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,wk)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Jm(n):e.toasts.forEach(r=>{Jm(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},gl=[];let yl={toasts:[]};function yo(e){yl=Sk(yl,e),gl.forEach(t=>{t(yl)})}function _k({...e}){const t=bk(),n=s=>yo({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>yo({type:"DISMISS_TOAST",toastId:t});return yo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Ek(){const[e,t]=b.useState(yl);return b.useEffect(()=>(gl.push(t),()=>{const n=gl.indexOf(t);n>-1&&gl.splice(n,1)}),[e]),{...e,toast:_k,dismiss:n=>yo({type:"DISMISS_TOAST",toastId:n})}}function je(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Xm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gw(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Xm(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Xm(e[s],null)}}}}function Zt(...e){return b.useCallback(Gw(...e),e)}function Ac(e,t=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const c=d=>{var p;const{scope:h,children:f,...y}=d,g=((p=h==null?void 0:h[e])==null?void 0:p[l])||a,x=b.useMemo(()=>y,Object.values(y));return w.jsx(g.Provider,{value:x,children:f})};c.displayName=i+"Provider";function u(d,h){var g;const f=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=b.useContext(f);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,kk(s,...t)]}function kk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Yd(e){const t=Tk(e),n=b.forwardRef((r,s)=>{const{children:i,...o}=r,a=b.Children.toArray(i),l=a.find(Pk);if(l){const c=l.props.children,u=a.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return w.jsx(t,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return w.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}function Tk(e){const t=b.forwardRef((n,r)=>{const{children:s,...i}=n;if(b.isValidElement(s)){const o=Rk(s),a=Ak(i,s.props);return s.type!==b.Fragment&&(a.ref=r?Gw(r,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yw=Symbol("radix.slottable");function Ck(e){const t=({children:n})=>w.jsx(w.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Yw,t}function Pk(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yw}function Ak(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function Rk(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ok(e){const t=e+"CollectionProvider",[n,r]=Ac(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:x,children:p}=g,m=N.useRef(null),v=N.useRef(new Map).current;return w.jsx(s,{scope:x,itemMap:v,collectionRef:m,children:p})};o.displayName=t;const a=e+"CollectionSlot",l=Yd(a),c=N.forwardRef((g,x)=>{const{scope:p,children:m}=g,v=i(a,p),S=Zt(x,v.collectionRef);return w.jsx(l,{ref:S,children:m})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=Yd(u),f=N.forwardRef((g,x)=>{const{scope:p,children:m,...v}=g,S=N.useRef(null),_=Zt(x,S),E=i(u,p);return N.useEffect(()=>(E.itemMap.set(S,{ref:S,...v}),()=>void E.itemMap.delete(S))),w.jsx(h,{[d]:"",ref:_,children:m})});f.displayName=u;function y(g){const x=i(e+"CollectionConsumer",g);return N.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((E,k)=>v.indexOf(E.ref.current)-v.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},y,r]}var jk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=jk.reduce((e,t)=>{const n=Yd(`Primitive.${t}`),r=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qw(e,t){e&&ha.flushSync(()=>e.dispatchEvent(t))}function Sr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Nk(e,t=globalThis==null?void 0:globalThis.document){const n=Sr(e);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ik="DismissableLayer",Qd="dismissableLayer.update",Lk="dismissableLayer.pointerDownOutside",Dk="dismissableLayer.focusOutside",Zm,Jw=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ff=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=b.useContext(Jw),[u,d]=b.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),y=Zt(t,k=>d(k)),g=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(x),m=u?g.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,S=m>=p,_=$k(k=>{const T=k.target,R=[...c.branches].some(j=>j.contains(T));!S||R||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},h),E=Fk(k=>{const T=k.target;[...c.branches].some(j=>j.contains(T))||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},h);return Nk(k=>{m===c.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},h),b.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Zm=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),eg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Zm)}},[u,h,n,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),eg())},[u,c]),b.useEffect(()=>{const k=()=>f({});return document.addEventListener(Qd,k),()=>document.removeEventListener(Qd,k)},[]),w.jsx(dt.div,{...l,ref:y,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:je(e.onFocusCapture,E.onFocusCapture),onBlurCapture:je(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:je(e.onPointerDownCapture,_.onPointerDownCapture)})});Ff.displayName=Ik;var Mk="DismissableLayerBranch",Xw=b.forwardRef((e,t)=>{const n=b.useContext(Jw),r=b.useRef(null),s=Zt(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(dt.div,{...e,ref:s})});Xw.displayName=Mk;function $k(e,t=globalThis==null?void 0:globalThis.document){const n=Sr(e),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Zw(Lk,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Fk(e,t=globalThis==null?void 0:globalThis.document){const n=Sr(e),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&Zw(Dk,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eg(){const e=new CustomEvent(Qd);document.dispatchEvent(e)}function Zw(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Qw(s,i):s.dispatchEvent(i)}var Uk=Ff,Bk=Xw,_r=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Vk="Portal",ex=b.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=b.useState(!1);_r(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Kw.createPortal(w.jsx(dt.div,{...r,ref:t}),o):null});ex.displayName=Vk;function zk(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Uf=e=>{const{present:t,children:n}=e,r=Wk(t),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Zt(r.ref,Hk(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};Uf.displayName="Presence";function Wk(e){const[t,n]=b.useState(),r=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=zk(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Va(r.current);i.current=a==="mounted"?c:"none"},[a]),_r(()=>{const c=r.current,u=s.current;if(u!==e){const h=i.current,f=Va(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),_r(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=Va(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=f=>{f.target===t&&(i.current=Va(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Va(e){return(e==null?void 0:e.animationName)||"none"}function Hk(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kk=zv[" useInsertionEffect ".trim().toString()]||_r;function qk({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=Gk({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const u=b.useRef(e!==void 0);b.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} 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,r])}const c=b.useCallback(u=>{var d;if(a){const h=Yk(u)?u(e):u;h!==e&&((d=o.current)==null||d.call(o,h))}else i(u)},[a,e,i,o]);return[l,c]}function Gk({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),s=b.useRef(n),i=b.useRef(t);return Kk(()=>{i.current=t},[t]),b.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function Yk(e){return typeof e=="function"}var Qk=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"}),Jk="VisuallyHidden",Rc=b.forwardRef((e,t)=>w.jsx(dt.span,{...e,ref:t,style:{...Qk,...e.style}}));Rc.displayName=Jk;var Xk=Rc,Bf="ToastProvider",[Vf,Zk,eT]=Ok("Toast"),[tx,n$]=Ac("Toast",[eT]),[tT,Oc]=tx(Bf),nx=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bf}\`. Expected non-empty \`string\`.`),w.jsx(Vf.Provider,{scope:t,children:w.jsx(tT,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(f=>f+1),[]),onToastRemove:b.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:o})})};nx.displayName=Bf;var rx="ToastViewport",nT=["F8"],Jd="toast.viewportPause",Xd="toast.viewportResume",sx=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=nT,label:s="Notifications ({hotkey})",...i}=e,o=Oc(rx,n),a=Zk(n),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),h=Zt(t,d,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;b.useEffect(()=>{const x=p=>{var v;r.length!==0&&r.every(S=>p[S]||p.code===S)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),b.useEffect(()=>{const x=l.current,p=d.current;if(y&&x&&p){const m=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Jd);p.dispatchEvent(E),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Xd);p.dispatchEvent(E),o.isClosePausedRef.current=!1}},S=E=>{!x.contains(E.relatedTarget)&&v()},_=()=>{x.contains(document.activeElement)||v()};return x.addEventListener("focusin",m),x.addEventListener("focusout",S),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",_),window.addEventListener("blur",m),window.addEventListener("focus",v),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",_),window.removeEventListener("blur",m),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const g=b.useCallback(({tabbingDirection:x})=>{const m=a().map(v=>{const S=v.ref.current,_=[S,...mT(S)];return x==="forwards"?_:_.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return b.useEffect(()=>{const x=d.current;if(x){const p=m=>{var _,E,k;const v=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!v){const T=document.activeElement,R=m.shiftKey;if(m.target===x&&R){(_=c.current)==null||_.focus();return}const D=g({tabbingDirection:R?"backwards":"forwards"}),Q=D.findIndex(I=>I===T);Cu(D.slice(Q+1))?m.preventDefault():R?(E=c.current)==null||E.focus():(k=u.current)==null||k.focus()}};return x.addEventListener("keydown",p),()=>x.removeEventListener("keydown",p)}},[a,g]),w.jsxs(Bk,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&w.jsx(Zd,{ref:c,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});Cu(x)}}),w.jsx(Vf.Slot,{scope:n,children:w.jsx(dt.ol,{tabIndex:-1,...i,ref:h})}),y&&w.jsx(Zd,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});Cu(x)}})]})});sx.displayName=rx;var ix="ToastFocusProxy",Zd=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=Oc(ix,n);return w.jsx(Rc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});Zd.displayName=ix;var fa="Toast",rT="toast.swipeStart",sT="toast.swipeMove",iT="toast.swipeCancel",oT="toast.swipeEnd",ox=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=qk({prop:r,defaultProp:s??!0,onChange:i,caller:fa});return w.jsx(Uf,{present:n||a,children:w.jsx(cT,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Sr(e.onPause),onResume:Sr(e.onResume),onSwipeStart:je(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:je(e.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:je(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:je(e.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)})})})});ox.displayName=fa;var[aT,lT]=tx(fa,{onClose(){}}),cT=b.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...y}=e,g=Oc(fa,n),[x,p]=b.useState(null),m=Zt(t,I=>p(I)),v=b.useRef(null),S=b.useRef(null),_=s||g.duration,E=b.useRef(0),k=b.useRef(_),T=b.useRef(0),{onToastAdd:R,onToastRemove:j}=g,B=Sr(()=>{var J;(x==null?void 0:x.contains(document.activeElement))&&((J=g.viewport)==null||J.focus()),o()}),D=b.useCallback(I=>{!I||I===1/0||(window.clearTimeout(T.current),E.current=new Date().getTime(),T.current=window.setTimeout(B,I))},[B]);b.useEffect(()=>{const I=g.viewport;if(I){const J=()=>{D(k.current),c==null||c()},H=()=>{const F=new Date().getTime()-E.current;k.current=k.current-F,window.clearTimeout(T.current),l==null||l()};return I.addEventListener(Jd,H),I.addEventListener(Xd,J),()=>{I.removeEventListener(Jd,H),I.removeEventListener(Xd,J)}}},[g.viewport,_,l,c,D]),b.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(_)},[i,_,g.isClosePausedRef,D]),b.useEffect(()=>(R(),()=>j()),[R,j]);const Q=b.useMemo(()=>x?fx(x):null,[x]);return g.viewport?w.jsxs(w.Fragment,{children:[Q&&w.jsx(uT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),w.jsx(aT,{scope:n,onClose:B,children:ha.createPortal(w.jsx(Vf.ItemSlot,{scope:n,children:w.jsx(Uk,{asChild:!0,onEscapeKeyDown:je(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||B(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(dt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:je(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:je(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:je(e.onPointerMove,I=>{if(!v.current)return;const J=I.clientX-v.current.x,H=I.clientY-v.current.y,F=!!S.current,C=["left","right"].includes(g.swipeDirection),A=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,L=C?A(0,J):0,K=C?0:A(0,H),V=I.pointerType==="touch"?10:2,X={x:L,y:K},ee={originalEvent:I,delta:X};F?(S.current=X,za(sT,d,ee,{discrete:!1})):tg(X,g.swipeDirection,V)?(S.current=X,za(rT,u,ee,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(J)>V||Math.abs(H)>V)&&(v.current=null)}),onPointerUp:je(e.onPointerUp,I=>{const J=S.current,H=I.target;if(H.hasPointerCapture(I.pointerId)&&H.releasePointerCapture(I.pointerId),S.current=null,v.current=null,J){const F=I.currentTarget,C={originalEvent:I,delta:J};tg(J,g.swipeDirection,g.swipeThreshold)?za(oT,f,C,{discrete:!0}):za(iT,h,C,{discrete:!0}),F.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),uT=e=>{const{__scopeToast:t,children:n,...r}=e,s=Oc(fa,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return fT(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(ex,{asChild:!0,children:w.jsx(Rc,{...r,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},dT="ToastTitle",ax=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(dt.div,{...r,ref:t})});ax.displayName=dT;var hT="ToastDescription",lx=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(dt.div,{...r,ref:t})});lx.displayName=hT;var cx="ToastAction",ux=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(hx,{altText:n,asChild:!0,children:w.jsx(zf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${cx}\`. Expected non-empty \`string\`.`),null)});ux.displayName=cx;var dx="ToastClose",zf=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=lT(dx,n);return w.jsx(hx,{asChild:!0,children:w.jsx(dt.button,{type:"button",...r,ref:t,onClick:je(e.onClick,s.onClose)})})});zf.displayName=dx;var hx=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return w.jsx(dt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function fx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),pT(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...fx(r))}}),t}function za(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Qw(s,i):s.dispatchEvent(i)}var tg=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function fT(e=()=>{}){const t=Sr(e);_r(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function pT(e){return e.nodeType===e.ELEMENT_NODE}function mT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gT=nx,px=sx,mx=ox,gx=ax,yx=lx,vx=ux,wx=zf;function xx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=xx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bx(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=xx(e))&&(r&&(r+=" "),r+=t);return r}const ng=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rg=bx,yT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const h=ng(u)||ng(d);return s[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(y=>{let[g,x]=y;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...c,d,h]:c},[]);return rg(e,o,l,n==null?void 0:n.class,n==null?void 0:n.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 vT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sx=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).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 wT={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 xT=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...wT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Sx("lucide",s),...a},[...o.map(([c,u])=>b.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 De=(e,t)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(xT,{ref:i,iconNode:t,className:Sx(`lucide-${vT(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
 * @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 sg=De("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @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 Wf=De("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @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 bT=De("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
 * @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 _x=De("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
 * @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 ST=De("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
 * @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 _T=De("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
 * @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 ET=De("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
 * @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 kT=De("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
 * @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 TT=De("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
 * @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 Ex=De("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
 * @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 CT=De("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 kx=De("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @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 PT=De("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
 * @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 Tx=De("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @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 AT=De("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
 * @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 Cx=De("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
 * @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 Px=De("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
 * @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 RT=De("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Hf="-",OT=e=>{const t=NT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Hf);return a[0]===""&&a.length!==1&&a.shift(),Ax(a,t)||jT(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Ax=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ax(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Hf);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ig=/^\[(.+)\]$/,jT=e=>{if(ig.test(e)){const t=ig.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},NT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return LT(Object.entries(e.classGroups),n).forEach(([i,o])=>{eh(o,r,i,t)}),r},eh=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:og(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(IT(s)){eh(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{eh(o,og(t,i),n,r)})})},og=(e,t)=>{let n=e;return t.split(Hf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},IT=e=>e.isThemeGetter,LT=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,DT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Rx="!",MT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let x=0;x<a.length;x++){let p=a[x];if(c===0){if(p===s&&(r||a.slice(x,x+i)===t)){l.push(a.slice(u,x)),u=x+i;continue}if(p==="/"){d=x;continue}}p==="["?c++:p==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(Rx),y=f?h.substring(1):h,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},$T=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},FT=e=>({cache:DT(e.cacheSize),parseClassName:MT(e),...OT(e)}),UT=/\s+/,BT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(UT);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let y=!!f,g=r(y?h.substring(0,f):h);if(!g){if(!y){a=c+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=c+(a.length>0?" "+a:a);continue}y=!1}const x=$T(u).join(":"),p=d?x+Rx:x,m=p+g;if(i.includes(m))continue;i.push(m);const v=s(g,y);for(let S=0;S<v.length;++S){const _=v[S];i.push(p+_)}a=c+(a.length>0?" "+a:a)}return a};function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ox(t))&&(r&&(r+=" "),r+=n);return r}const Ox=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ox(e[r]))&&(n&&(n+=" "),n+=t);return n};function zT(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=FT(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=BT(l,n);return s(l,u),u}return function(){return i(VT.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jx=/^\[(?:([a-z-]+):)?(.+)\]$/i,WT=/^\d+\/\d+$/,HT=new Set(["px","full","screen"]),KT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qT=/\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$/,GT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,YT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vn=e=>oi(e)||HT.has(e)||WT.test(e),zn=e=>ji(e,"length",sC),oi=e=>!!e&&!Number.isNaN(Number(e)),Pu=e=>ji(e,"number",oi),Qi=e=>!!e&&Number.isInteger(Number(e)),JT=e=>e.endsWith("%")&&oi(e.slice(0,-1)),Y=e=>jx.test(e),Wn=e=>KT.test(e),XT=new Set(["length","size","percentage"]),ZT=e=>ji(e,XT,Nx),eC=e=>ji(e,"position",Nx),tC=new Set(["image","url"]),nC=e=>ji(e,tC,oC),rC=e=>ji(e,"",iC),Ji=()=>!0,ji=(e,t,n)=>{const r=jx.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},sC=e=>qT.test(e)&&!GT.test(e),Nx=()=>!1,iC=e=>YT.test(e),oC=e=>QT.test(e),aC=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),s=ue("borderColor"),i=ue("borderRadius"),o=ue("borderSpacing"),a=ue("borderWidth"),l=ue("contrast"),c=ue("grayscale"),u=ue("hueRotate"),d=ue("invert"),h=ue("gap"),f=ue("gradientColorStops"),y=ue("gradientColorStopPositions"),g=ue("inset"),x=ue("margin"),p=ue("opacity"),m=ue("padding"),v=ue("saturate"),S=ue("scale"),_=ue("sepia"),E=ue("skew"),k=ue("space"),T=ue("translate"),R=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",Y,t],D=()=>[Y,t],Q=()=>["",vn,zn],I=()=>["auto",oi,Y],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Y],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[oi,Y];return{cacheSize:500,separator:":",theme:{colors:[Ji],spacing:[vn,zn],blur:["none","",Wn,Y],brightness:K(),borderColor:[e],borderRadius:["none","","full",Wn,Y],borderSpacing:D(),borderWidth:Q(),contrast:K(),grayscale:A(),hueRotate:K(),invert:A(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[JT,zn],inset:B(),margin:B(),opacity:K(),padding:D(),saturate:K(),scale:K(),sepia:A(),skew:K(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[Wn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...J(),Y]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qi,Y]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Qi,Y]}],"grid-cols":[{"grid-cols":[Ji]}],"col-start-end":[{col:["auto",{span:["full",Qi,Y]},Y]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Ji]}],"row-start-end":[{row:["auto",{span:[Qi,Y]},Y]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],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":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[Wn]},Wn]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wn,zn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pu]}],"font-family":[{font:[Ji]}],"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",Y]}],"line-clamp":[{"line-clamp":["none",oi,Pu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vn,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vn,zn]}],"underline-offset":[{"underline-offset":["auto",vn,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],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",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),eC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ZT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...H(),"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":[p]}],"divide-style":[{divide:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[vn,Y]}],"outline-w":[{outline:[vn,zn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[vn,zn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wn,rC]}],"shadow-color":[{shadow:[Ji]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wn,Y]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"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":[p]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",Y]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Qi,Y]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vn,zn,Pu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},lC=zT(aC);function ys(...e){return lC(bx(e))}const cC=gT,Ix=b.forwardRef(({className:e,...t},n)=>w.jsx(px,{ref:n,className:ys("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Ix.displayName=px.displayName;const uC=yT("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"}}),Lx=b.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(mx,{ref:r,className:ys(uC({variant:t}),e),...n}));Lx.displayName=mx.displayName;const dC=b.forwardRef(({className:e,...t},n)=>w.jsx(vx,{ref:n,className:ys("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));dC.displayName=vx.displayName;const Dx=b.forwardRef(({className:e,...t},n)=>w.jsx(wx,{ref:n,className:ys("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:w.jsx(Px,{className:"h-4 w-4"})}));Dx.displayName=wx.displayName;const Mx=b.forwardRef(({className:e,...t},n)=>w.jsx(gx,{ref:n,className:ys("text-sm font-semibold",e),...t}));Mx.displayName=gx.displayName;const $x=b.forwardRef(({className:e,...t},n)=>w.jsx(yx,{ref:n,className:ys("text-sm opacity-90",e),...t}));$x.displayName=yx.displayName;function hC(){const{toasts:e}=Ek();return w.jsxs(cC,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return w.jsxs(Lx,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Mx,{children:n}),r&&w.jsx($x,{children:r})]}),s,w.jsx(Dx,{})]},t)}),w.jsx(Ix,{})]})}var ag=["light","dark"],fC="(prefers-color-scheme: dark)",pC=b.createContext(void 0),mC={setTheme:e=>{},themes:[]},gC=()=>{var e;return(e=b.useContext(pC))!=null?e:mC};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?ag.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(y,g=!1,x=!0)=>{let p=o?o[y]:y,m=g?y+"|| ''":`'${p}'`,v="";return s&&x&&!g&&ag.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),n==="class"?g||p?v+=`c.add(${m})`:v+="null":p&&(v+=`d[s](n,${m})`),v},f=e?`!function(){${u}${h(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${fC}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${c?"":"else{"+h(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var yC=e=>{switch(e){case"success":return xC;case"info":return SC;case"warning":return bC;case"error":return _C;default:return null}},vC=Array(12).fill(0),wC=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},vC.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),xC=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),bC=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),SC=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),_C=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),EC=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kC=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},th=1,TC=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:th++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],N.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(PC(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||th++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},it=new TC,CC=(e,t)=>{let n=(t==null?void 0:t.id)||th++;return it.addToast({title:e,...t,id:n}),n},PC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",AC=CC,RC=()=>it.toasts,OC=()=>it.getActiveToasts(),Wa=Object.assign(AC,{success:it.success,info:it.info,warning:it.warning,error:it.error,custom:it.custom,message:it.message,promise:it.promise,dismiss:it.dismiss,loading:it.loading},{getHistory:RC,getToasts:OC});function jC(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}jC(`: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 Ha(e){return e.label!==void 0}var NC=3,IC="32px",LC="16px",lg=4e3,DC=356,MC=14,$C=20,FC=200;function Mt(...e){return e.filter(Boolean).join(" ")}function UC(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var BC=e=>{var t,n,r,s,i,o,a,l,c,u,d;let{invert:h,toast:f,unstyled:y,interacting:g,setHeights:x,visibleToasts:p,heights:m,index:v,toasts:S,expanded:_,removeToast:E,defaultRichColors:k,closeButton:T,style:R,cancelButtonStyle:j,actionButtonStyle:B,className:D="",descriptionClassName:Q="",duration:I,position:J,gap:H,loadingIcon:F,expandByDefault:C,classNames:A,icons:L,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:V}=e,[X,ee]=N.useState(null),[Ee,ze]=N.useState(null),[se,ws]=N.useState(!1),[Dn,Nr]=N.useState(!1),[Mn,xs]=N.useState(!1),[$n,ba]=N.useState(!1),[Gc,Sa]=N.useState(!1),[Yc,Ui]=N.useState(0),[bs,Lp]=N.useState(0),Bi=N.useRef(f.duration||I||lg),Dp=N.useRef(null),Ir=N.useRef(null),$1=v===0,F1=v+1<=p,St=f.type,Ss=f.dismissible!==!1,U1=f.className||"",B1=f.descriptionClassName||"",_a=N.useMemo(()=>m.findIndex(q=>q.toastId===f.id)||0,[m,f.id]),V1=N.useMemo(()=>{var q;return(q=f.closeButton)!=null?q:T},[f.closeButton,T]),Mp=N.useMemo(()=>f.duration||I||lg,[f.duration,I]),Qc=N.useRef(0),_s=N.useRef(0),$p=N.useRef(0),Es=N.useRef(null),[z1,W1]=J.split("-"),Fp=N.useMemo(()=>m.reduce((q,oe,fe)=>fe>=_a?q:q+oe.height,0),[m,_a]),Up=kC(),H1=f.invert||h,Jc=St==="loading";_s.current=N.useMemo(()=>_a*H+Fp,[_a,Fp]),N.useEffect(()=>{Bi.current=Mp},[Mp]),N.useEffect(()=>{ws(!0)},[]),N.useEffect(()=>{let q=Ir.current;if(q){let oe=q.getBoundingClientRect().height;return Lp(oe),x(fe=>[{toastId:f.id,height:oe,position:f.position},...fe]),()=>x(fe=>fe.filter(Nt=>Nt.toastId!==f.id))}},[x,f.id]),N.useLayoutEffect(()=>{if(!se)return;let q=Ir.current,oe=q.style.height;q.style.height="auto";let fe=q.getBoundingClientRect().height;q.style.height=oe,Lp(fe),x(Nt=>Nt.find(It=>It.toastId===f.id)?Nt.map(It=>It.toastId===f.id?{...It,height:fe}:It):[{toastId:f.id,height:fe,position:f.position},...Nt])},[se,f.title,f.description,x,f.id]);let Fn=N.useCallback(()=>{Nr(!0),Ui(_s.current),x(q=>q.filter(oe=>oe.toastId!==f.id)),setTimeout(()=>{E(f)},FC)},[f,E,x,_s]);N.useEffect(()=>{if(f.promise&&St==="loading"||f.duration===1/0||f.type==="loading")return;let q;return _||g||V&&Up?(()=>{if($p.current<Qc.current){let oe=new Date().getTime()-Qc.current;Bi.current=Bi.current-oe}$p.current=new Date().getTime()})():Bi.current!==1/0&&(Qc.current=new Date().getTime(),q=setTimeout(()=>{var oe;(oe=f.onAutoClose)==null||oe.call(f,f),Fn()},Bi.current)),()=>clearTimeout(q)},[_,g,f,St,V,Up,Fn]),N.useEffect(()=>{f.delete&&Fn()},[Fn,f.delete]);function K1(){var q,oe,fe;return L!=null&&L.loading?N.createElement("div",{className:Mt(A==null?void 0:A.loader,(q=f==null?void 0:f.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":St==="loading"},L.loading):F?N.createElement("div",{className:Mt(A==null?void 0:A.loader,(oe=f==null?void 0:f.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":St==="loading"},F):N.createElement(wC,{className:Mt(A==null?void 0:A.loader,(fe=f==null?void 0:f.classNames)==null?void 0:fe.loader),visible:St==="loading"})}return N.createElement("li",{tabIndex:0,ref:Ir,className:Mt(D,U1,A==null?void 0:A.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[St],(n=f==null?void 0:f.classNames)==null?void 0:n[St]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:k,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":se,"data-promise":!!f.promise,"data-swiped":Gc,"data-removed":Dn,"data-visible":F1,"data-y-position":z1,"data-x-position":W1,"data-index":v,"data-front":$1,"data-swiping":Mn,"data-dismissible":Ss,"data-type":St,"data-invert":H1,"data-swipe-out":$n,"data-swipe-direction":Ee,"data-expanded":!!(_||C&&se),style:{"--index":v,"--toasts-before":v,"--z-index":S.length-v,"--offset":`${Dn?Yc:_s.current}px`,"--initial-height":C?"auto":`${bs}px`,...R,...f.style},onDragEnd:()=>{xs(!1),ee(null),Es.current=null},onPointerDown:q=>{Jc||!Ss||(Dp.current=new Date,Ui(_s.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(xs(!0),Es.current={x:q.clientX,y:q.clientY}))},onPointerUp:()=>{var q,oe,fe,Nt;if($n||!Ss)return;Es.current=null;let It=Number(((q=Ir.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Un=Number(((oe=Ir.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Lr=new Date().getTime()-((fe=Dp.current)==null?void 0:fe.getTime()),Lt=X==="x"?It:Un,Bn=Math.abs(Lt)/Lr;if(Math.abs(Lt)>=$C||Bn>.11){Ui(_s.current),(Nt=f.onDismiss)==null||Nt.call(f,f),ze(X==="x"?It>0?"right":"left":Un>0?"down":"up"),Fn(),ba(!0),Sa(!1);return}xs(!1),ee(null)},onPointerMove:q=>{var oe,fe,Nt,It;if(!Es.current||!Ss||((oe=window.getSelection())==null?void 0:oe.toString().length)>0)return;let Un=q.clientY-Es.current.y,Lr=q.clientX-Es.current.x,Lt=(fe=e.swipeDirections)!=null?fe:UC(J);!X&&(Math.abs(Lr)>1||Math.abs(Un)>1)&&ee(Math.abs(Lr)>Math.abs(Un)?"x":"y");let Bn={x:0,y:0};X==="y"?(Lt.includes("top")||Lt.includes("bottom"))&&(Lt.includes("top")&&Un<0||Lt.includes("bottom")&&Un>0)&&(Bn.y=Un):X==="x"&&(Lt.includes("left")||Lt.includes("right"))&&(Lt.includes("left")&&Lr<0||Lt.includes("right")&&Lr>0)&&(Bn.x=Lr),(Math.abs(Bn.x)>0||Math.abs(Bn.y)>0)&&Sa(!0),(Nt=Ir.current)==null||Nt.style.setProperty("--swipe-amount-x",`${Bn.x}px`),(It=Ir.current)==null||It.style.setProperty("--swipe-amount-y",`${Bn.y}px`)}},V1&&!f.jsx?N.createElement("button",{"aria-label":K,"data-disabled":Jc,"data-close-button":!0,onClick:Jc||!Ss?()=>{}:()=>{var q;Fn(),(q=f.onDismiss)==null||q.call(f,f)},className:Mt(A==null?void 0:A.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=L==null?void 0:L.close)!=null?i:EC):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:N.createElement(N.Fragment,null,St||f.icon||f.promise?N.createElement("div",{"data-icon":"",className:Mt(A==null?void 0:A.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||K1():null,f.type!=="loading"?f.icon||(L==null?void 0:L[St])||yC(St):null):null,N.createElement("div",{"data-content":"",className:Mt(A==null?void 0:A.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:Mt(A==null?void 0:A.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?N.createElement("div",{"data-description":"",className:Mt(Q,B1,A==null?void 0:A.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&Ha(f.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||j,onClick:q=>{var oe,fe;Ha(f.cancel)&&Ss&&((fe=(oe=f.cancel).onClick)==null||fe.call(oe,q),Fn())},className:Mt(A==null?void 0:A.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&Ha(f.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||B,onClick:q=>{var oe,fe;Ha(f.action)&&((fe=(oe=f.action).onClick)==null||fe.call(oe,q),!q.defaultPrevented&&Fn())},className:Mt(A==null?void 0:A.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function cg(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function VC(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?LC:IC;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var zC=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:f,visibleToasts:y=NC,toastOptions:g,dir:x=cg(),gap:p=MC,loadingIcon:m,icons:v,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=e,[E,k]=N.useState([]),T=N.useMemo(()=>Array.from(new Set([r].concat(E.filter(V=>V.position).map(V=>V.position)))),[E,r]),[R,j]=N.useState([]),[B,D]=N.useState(!1),[Q,I]=N.useState(!1),[J,H]=N.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=N.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=N.useRef(null),L=N.useRef(!1),K=N.useCallback(V=>{k(X=>{var ee;return(ee=X.find(Ee=>Ee.id===V.id))!=null&&ee.delete||it.dismiss(V.id),X.filter(({id:Ee})=>Ee!==V.id)})},[]);return N.useEffect(()=>it.subscribe(V=>{if(V.dismiss){k(X=>X.map(ee=>ee.id===V.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{Kw.flushSync(()=>{k(X=>{let ee=X.findIndex(Ee=>Ee.id===V.id);return ee!==-1?[...X.slice(0,ee),{...X[ee],...V},...X.slice(ee+1)]:[V,...X]})})})}),[]),N.useEffect(()=>{if(u!=="system"){H(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:X})=>{H(X?"dark":"light")})}catch{V.addListener(({matches:ee})=>{try{H(ee?"dark":"light")}catch(Ee){console.error(Ee)}})}},[u]),N.useEffect(()=>{E.length<=1&&D(!1)},[E]),N.useEffect(()=>{let V=X=>{var ee,Ee;s.every(ze=>X[ze]||X.code===ze)&&(D(!0),(ee=F.current)==null||ee.focus()),X.code==="Escape"&&(document.activeElement===F.current||(Ee=F.current)!=null&&Ee.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),N.useEffect(()=>{if(F.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,L.current=!1)}},[F.current]),N.createElement("section",{ref:t,"aria-label":`${S} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((V,X)=>{var ee;let[Ee,ze]=V.split("-");return E.length?N.createElement("ol",{key:V,dir:x==="auto"?cg():x,tabIndex:-1,ref:F,className:a,"data-sonner-toaster":!0,"data-theme":J,"data-y-position":Ee,"data-lifted":B&&E.length>1&&!i,"data-x-position":ze,style:{"--front-toast-height":`${((ee=R[0])==null?void 0:ee.height)||0}px`,"--width":`${DC}px`,"--gap":`${p}px`,...f,...VC(l,c)},onBlur:se=>{L.current&&!se.currentTarget.contains(se.relatedTarget)&&(L.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||L.current||(L.current=!0,A.current=se.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Q||D(!1)},onDragEnd:()=>D(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},E.filter(se=>!se.position&&X===0||se.position===V).map((se,ws)=>{var Dn,Nr;return N.createElement(BC,{key:se.id,icons:v,index:ws,toast:se,defaultRichColors:d,duration:(Dn=g==null?void 0:g.duration)!=null?Dn:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:y,closeButton:(Nr=g==null?void 0:g.closeButton)!=null?Nr:o,interacting:Q,position:V,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:K,toasts:E.filter(Mn=>Mn.position==se.position),heights:R.filter(Mn=>Mn.position==se.position),setHeights:j,expandByDefault:i,gap:p,loadingIcon:m,expanded:B,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const WC=({...e})=>{const{theme:t="system"}=gC();return w.jsx(zC,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},HC=["top","right","bottom","left"],Er=Math.min,pt=Math.max,Yl=Math.round,Ka=Math.floor,fn=e=>({x:e,y:e}),KC={left:"right",right:"left",bottom:"top",top:"bottom"},qC={start:"end",end:"start"};function nh(e,t,n){return pt(e,Er(t,n))}function On(e,t){return typeof e=="function"?e(t):e}function jn(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function Kf(e){return e==="x"?"y":"x"}function qf(e){return e==="y"?"height":"width"}const GC=new Set(["top","bottom"]);function un(e){return GC.has(jn(e))?"y":"x"}function Gf(e){return Kf(un(e))}function YC(e,t,n){n===void 0&&(n=!1);const r=Ni(e),s=Gf(e),i=qf(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ql(o)),[o,Ql(o)]}function QC(e){const t=Ql(e);return[rh(e),t,rh(t)]}function rh(e){return e.replace(/start|end/g,t=>qC[t])}const ug=["left","right"],dg=["right","left"],JC=["top","bottom"],XC=["bottom","top"];function ZC(e,t,n){switch(e){case"top":case"bottom":return n?t?dg:ug:t?ug:dg;case"left":case"right":return t?JC:XC;default:return[]}}function eP(e,t,n,r){const s=Ni(e);let i=ZC(jn(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(rh)))),i}function Ql(e){return e.replace(/left|right|bottom|top/g,t=>KC[t])}function tP(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fx(e){return typeof e!="number"?tP(e):{top:e,right:e,bottom:e,left:e}}function Jl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function hg(e,t,n){let{reference:r,floating:s}=e;const i=un(t),o=Gf(t),a=qf(o),l=jn(t),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-s.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Ni(t)){case"start":f[o]-=h*(n&&c?-1:1);break;case"end":f[o]+=h*(n&&c?-1:1);break}return f}const nP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=hg(c,r,l),h=r,f={},y=0;for(let g=0;g<a.length;g++){const{name:x,fn:p}=a[g],{x:m,y:v,data:S,reset:_}=await p({x:u,y:d,initialPlacement:r,placement:h,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});u=m??u,d=v??d,f={...f,[x]:{...f[x],...S}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:d}=hg(c,h,l)),g=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function Bo(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=On(t,e),y=Fx(f),x=a[h?d==="floating"?"reference":"floating":d],p=Jl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),m=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=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},_=Jl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(p.top-_.top+y.top)/S.y,bottom:(_.bottom-p.bottom+y.bottom)/S.y,left:(p.left-_.left+y.left)/S.x,right:(_.right-p.right+y.right)/S.x}}const rP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=On(e,t)||{};if(c==null)return{};const d=Fx(u),h={x:n,y:r},f=Gf(s),y=qf(f),g=await o.getDimensions(c),x=f==="y",p=x?"top":"left",m=x?"bottom":"right",v=x?"clientHeight":"clientWidth",S=i.reference[y]+i.reference[f]-h[f]-i.floating[y],_=h[f]-i.reference[f],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let k=E?E[v]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=a.floating[v]||i.floating[y]);const T=S/2-_/2,R=k/2-g[y]/2-1,j=Er(d[p],R),B=Er(d[m],R),D=j,Q=k-g[y]-B,I=k/2-g[y]/2+T,J=nh(D,I,Q),H=!l.arrow&&Ni(s)!=null&&I!==J&&i.reference[y]/2-(I<D?j:B)-g[y]/2<0,F=H?I<D?I-D:I-Q:0;return{[f]:h[f]+F,data:{[f]:J,centerOffset:I-J-F,...H&&{alignmentOffset:F}},reset:H}}}),sP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...x}=On(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const p=jn(s),m=un(a),v=jn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=h||(v||!g?[Ql(a)]:QC(a)),E=y!=="none";!h&&E&&_.push(...eP(a,g,y,S));const k=[a,..._],T=await Bo(t,x),R=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&R.push(T[p]),d){const I=YC(s,o,S);R.push(T[I[0]],T[I[1]])}if(j=[...j,{placement:s,overflows:R}],!R.every(I=>I<=0)){var B,D;const I=(((B=i.flip)==null?void 0:B.index)||0)+1,J=k[I];if(J&&(!(d==="alignment"?m!==un(J):!1)||j.every(C=>C.overflows[0]>0&&un(C.placement)===m)))return{data:{index:I,overflows:j},reset:{placement:J}};let H=(D=j.filter(F=>F.overflows[0]<=0).sort((F,C)=>F.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!H)switch(f){case"bestFit":{var Q;const F=(Q=j.filter(C=>{if(E){const A=un(C.placement);return A===m||A==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(A=>A>0).reduce((A,L)=>A+L,0)]).sort((C,A)=>C[1]-A[1])[0])==null?void 0:Q[0];F&&(H=F);break}case"initialPlacement":H=a;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function fg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pg(e){return HC.some(t=>e[t]>=0)}const iP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=On(e,t);switch(r){case"referenceHidden":{const i=await Bo(t,{...s,elementContext:"reference"}),o=fg(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:pg(o)}}}case"escaped":{const i=await Bo(t,{...s,altBoundary:!0}),o=fg(i,n.floating);return{data:{escapedOffsets:o,escaped:pg(o)}}}default:return{}}}}},Ux=new Set(["left","top"]);async function oP(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=jn(n),a=Ni(n),l=un(n)==="y",c=Ux.has(o)?-1:1,u=i&&l?-1:1,d=On(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(f=a==="end"?y*-1:y),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const aP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await oP(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},lP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:p,y:m}=x;return{x:p,y:m}}},...l}=On(e,t),c={x:n,y:r},u=await Bo(t,l),d=un(jn(s)),h=Kf(d);let f=c[h],y=c[d];if(i){const x=h==="y"?"top":"left",p=h==="y"?"bottom":"right",m=f+u[x],v=f-u[p];f=nh(m,f,v)}if(o){const x=d==="y"?"top":"left",p=d==="y"?"bottom":"right",m=y+u[x],v=y-u[p];y=nh(m,y,v)}const g=a.fn({...t,[h]:f,[d]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[d]:o}}}}}},cP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=On(e,t),u={x:n,y:r},d=un(s),h=Kf(d);let f=u[h],y=u[d];const g=On(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const v=h==="y"?"height":"width",S=i.reference[h]-i.floating[v]+x.mainAxis,_=i.reference[h]+i.reference[v]-x.mainAxis;f<S?f=S:f>_&&(f=_)}if(c){var p,m;const v=h==="y"?"width":"height",S=Ux.has(jn(s)),_=i.reference[d]-i.floating[v]+(S&&((p=o.offset)==null?void 0:p[d])||0)+(S?0:x.crossAxis),E=i.reference[d]+i.reference[v]+(S?0:((m=o.offset)==null?void 0:m[d])||0)-(S?x.crossAxis:0);y<_?y=_:y>E&&(y=E)}return{[h]:f,[d]:y}}}},uP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=On(e,t),u=await Bo(t,c),d=jn(s),h=Ni(s),f=un(s)==="y",{width:y,height:g}=i.floating;let x,p;d==="top"||d==="bottom"?(x=d,p=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=d,x=h==="end"?"top":"bottom");const m=g-u.top-u.bottom,v=y-u.left-u.right,S=Er(g-u[x],m),_=Er(y-u[p],v),E=!t.middlewareData.shift;let k=S,T=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=m),E&&!h){const j=pt(u.left,0),B=pt(u.right,0),D=pt(u.top,0),Q=pt(u.bottom,0);f?T=y-2*(j!==0||B!==0?j+B:pt(u.left,u.right)):k=g-2*(D!==0||Q!==0?D+Q:pt(u.top,u.bottom))}await l({...t,availableWidth:T,availableHeight:k});const R=await o.getDimensions(a.floating);return y!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function jc(){return typeof window<"u"}function Ii(e){return Bx(e)?(e.nodeName||"").toLowerCase():"#document"}function vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yn(e){var t;return(t=(Bx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bx(e){return jc()?e instanceof Node||e instanceof vt(e).Node:!1}function en(e){return jc()?e instanceof Element||e instanceof vt(e).Element:!1}function mn(e){return jc()?e instanceof HTMLElement||e instanceof vt(e).HTMLElement:!1}function mg(e){return!jc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vt(e).ShadowRoot}const dP=new Set(["inline","contents"]);function pa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!dP.has(s)}const hP=new Set(["table","td","th"]);function fP(e){return hP.has(Ii(e))}const pP=[":popover-open",":modal"];function Nc(e){return pP.some(t=>{try{return e.matches(t)}catch{return!1}})}const mP=["transform","translate","scale","rotate","perspective"],gP=["transform","translate","scale","rotate","perspective","filter"],yP=["paint","layout","strict","content"];function Yf(e){const t=Qf(),n=en(e)?tn(e):e;return mP.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||gP.some(r=>(n.willChange||"").includes(r))||yP.some(r=>(n.contain||"").includes(r))}function vP(e){let t=kr(e);for(;mn(t)&&!ki(t);){if(Yf(t))return t;if(Nc(t))return null;t=kr(t)}return null}function Qf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wP=new Set(["html","body","#document"]);function ki(e){return wP.has(Ii(e))}function tn(e){return vt(e).getComputedStyle(e)}function Ic(e){return en(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kr(e){if(Ii(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mg(e)&&e.host||yn(e);return mg(t)?t.host:t}function Vx(e){const t=kr(e);return ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:mn(t)&&pa(t)?t:Vx(t)}function Vo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Vx(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=vt(s);if(i){const a=sh(o);return t.concat(o,o.visualViewport||[],pa(s)?s:[],a&&n?Vo(a):[])}return t.concat(s,Vo(s,[],n))}function sh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zx(e){const t=tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=mn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Yl(n)!==i||Yl(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Jf(e){return en(e)?e:e.contextElement}function ai(e){const t=Jf(e);if(!mn(t))return fn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=zx(t);let o=(i?Yl(n.width):n.width)/r,a=(i?Yl(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const xP=fn(0);function Wx(e){const t=vt(e);return!Qf()||!t.visualViewport?xP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vt(e)?!1:t}function hs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Jf(e);let o=fn(1);t&&(r?en(r)&&(o=ai(r)):o=ai(e));const a=bP(i,n,r)?Wx(i):fn(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 h=vt(i),f=r&&en(r)?vt(r):r;let y=h,g=sh(y);for(;g&&r&&f!==y;){const x=ai(g),p=g.getBoundingClientRect(),m=tn(g),v=p.left+(g.clientLeft+parseFloat(m.paddingLeft))*x.x,S=p.top+(g.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=v,c+=S,y=vt(g),g=sh(y)}}return Jl({width:u,height:d,x:l,y:c})}function Xf(e,t){const n=Ic(e).scrollLeft;return t?t.left+n:hs(yn(e)).left+n}function Hx(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Xf(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function SP(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=yn(r),a=t?Nc(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=fn(1);const u=fn(0),d=mn(r);if((d||!d&&!i)&&((Ii(r)!=="body"||pa(o))&&(l=Ic(r)),mn(r))){const f=hs(r);c=ai(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=o&&!d&&!i?Hx(o,l,!0):fn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function _P(e){return Array.from(e.getClientRects())}function EP(e){const t=yn(e),n=Ic(e),r=e.ownerDocument.body,s=pt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Xf(e);const a=-n.scrollTop;return tn(r).direction==="rtl"&&(o+=pt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function kP(e,t){const n=vt(e),r=yn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Qf();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const TP=new Set(["absolute","fixed"]);function CP(e,t){const n=hs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=mn(e)?ai(e):fn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function gg(e,t,n){let r;if(t==="viewport")r=kP(e,n);else if(t==="document")r=EP(yn(e));else if(en(t))r=CP(t,n);else{const s=Wx(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Jl(r)}function Kx(e,t){const n=kr(e);return n===t||!en(n)||ki(n)?!1:tn(n).position==="fixed"||Kx(n,t)}function PP(e,t){const n=t.get(e);if(n)return n;let r=Vo(e,[],!1).filter(a=>en(a)&&Ii(a)!=="body"),s=null;const i=tn(e).position==="fixed";let o=i?kr(e):e;for(;en(o)&&!ki(o);){const a=tn(o),l=Yf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&TP.has(s.position)||pa(o)&&!l&&Kx(e,o))?r=r.filter(u=>u!==o):s=a,o=kr(o)}return t.set(e,r),r}function AP(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Nc(t)?[]:PP(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=gg(t,u,s);return c.top=pt(d.top,c.top),c.right=Er(d.right,c.right),c.bottom=Er(d.bottom,c.bottom),c.left=pt(d.left,c.left),c},gg(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function RP(e){const{width:t,height:n}=zx(e);return{width:t,height:n}}function OP(e,t,n){const r=mn(t),s=yn(t),i=n==="fixed",o=hs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=fn(0);function c(){l.x=Xf(s)}if(r||!r&&!i)if((Ii(t)!=="body"||pa(s))&&(a=Ic(t)),r){const f=hs(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?Hx(s,a):fn(0),d=o.left+a.scrollLeft-l.x-u.x,h=o.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function Au(e){return tn(e).position==="static"}function yg(e,t){if(!mn(e)||tn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return yn(e)===n&&(n=n.ownerDocument.body),n}function qx(e,t){const n=vt(e);if(Nc(e))return n;if(!mn(e)){let s=kr(e);for(;s&&!ki(s);){if(en(s)&&!Au(s))return s;s=kr(s)}return n}let r=yg(e,t);for(;r&&fP(r)&&Au(r);)r=yg(r,t);return r&&ki(r)&&Au(r)&&!Yf(r)?n:r||vP(e)||n}const jP=async function(e){const t=this.getOffsetParent||qx,n=this.getDimensions,r=await n(e.floating);return{reference:OP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NP(e){return tn(e).direction==="rtl"}const IP={convertOffsetParentRelativeRectToViewportRelativeRect:SP,getDocumentElement:yn,getClippingRect:AP,getOffsetParent:qx,getElementRects:jP,getClientRects:_P,getDimensions:RP,getScale:ai,isElement:en,isRTL:NP};function Gx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LP(e,t){let n=null,r;const s=yn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||t(),!h||!f)return;const y=Ka(d),g=Ka(s.clientWidth-(u+h)),x=Ka(s.clientHeight-(d+f)),p=Ka(u),v={rootMargin:-y+"px "+-g+"px "+-x+"px "+-p+"px",threshold:pt(0,Er(1,l))||1};let S=!0;function _(E){const k=E[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Gx(c,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return o(!0),i}function DP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Jf(e),u=s||i?[...c?Vo(c):[],...Vo(t)]:[];u.forEach(p=>{s&&p.addEventListener("scroll",n,{passive:!0}),i&&p.addEventListener("resize",n)});const d=c&&a?LP(c,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(p=>{let[m]=p;m&&m.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let y,g=l?hs(e):null;l&&x();function x(){const p=hs(e);g&&!Gx(g,p)&&n(),g=p,y=requestAnimationFrame(x)}return n(),()=>{var p;u.forEach(m=>{s&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),d==null||d(),(p=f)==null||p.disconnect(),f=null,l&&cancelAnimationFrame(y)}}const MP=aP,$P=lP,FP=sP,UP=uP,BP=iP,vg=rP,VP=cP,zP=(e,t,n)=>{const r=new Map,s={platform:IP,...n},i={...s.platform,_c:r};return nP(e,t,{...s,platform:i})};var WP=typeof document<"u",HP=function(){},vl=WP?b.useLayoutEffect:HP;function Xl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xl(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!Xl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Yx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wg(e,t){const n=Yx(e);return Math.round(t*n)/n}function Ru(e){const t=b.useRef(e);return vl(()=>{t.current=e}),t}function KP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);Xl(h,r)||f(r);const[y,g]=b.useState(null),[x,p]=b.useState(null),m=b.useCallback(C=>{C!==E.current&&(E.current=C,g(C))},[]),v=b.useCallback(C=>{C!==k.current&&(k.current=C,p(C))},[]),S=i||y,_=o||x,E=b.useRef(null),k=b.useRef(null),T=b.useRef(u),R=l!=null,j=Ru(l),B=Ru(s),D=Ru(c),Q=b.useCallback(()=>{if(!E.current||!k.current)return;const C={placement:t,strategy:n,middleware:h};B.current&&(C.platform=B.current),zP(E.current,k.current,C).then(A=>{const L={...A,isPositioned:D.current!==!1};I.current&&!Xl(T.current,L)&&(T.current=L,ha.flushSync(()=>{d(L)}))})},[h,t,n,B,D]);vl(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const I=b.useRef(!1);vl(()=>(I.current=!0,()=>{I.current=!1}),[]),vl(()=>{if(S&&(E.current=S),_&&(k.current=_),S&&_){if(j.current)return j.current(S,_,Q);Q()}},[S,_,Q,j,R]);const J=b.useMemo(()=>({reference:E,floating:k,setReference:m,setFloating:v}),[m,v]),H=b.useMemo(()=>({reference:S,floating:_}),[S,_]),F=b.useMemo(()=>{const C={position:n,left:0,top:0};if(!H.floating)return C;const A=wg(H.floating,u.x),L=wg(H.floating,u.y);return a?{...C,transform:"translate("+A+"px, "+L+"px)",...Yx(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:L}},[n,a,H.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:Q,refs:J,elements:H,floatingStyles:F}),[u,Q,J,H,F])}const qP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vg({element:r.current,padding:s}).fn(n):{}:r?vg({element:r,padding:s}).fn(n):{}}}},GP=(e,t)=>({...MP(e),options:[e,t]}),YP=(e,t)=>({...$P(e),options:[e,t]}),QP=(e,t)=>({...VP(e),options:[e,t]}),JP=(e,t)=>({...FP(e),options:[e,t]}),XP=(e,t)=>({...UP(e),options:[e,t]}),ZP=(e,t)=>({...BP(e),options:[e,t]}),eA=(e,t)=>({...qP(e),options:[e,t]});var tA="Arrow",Qx=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return w.jsx(dt.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qx.displayName=tA;var nA=Qx;function rA(e){const[t,n]=b.useState(void 0);return _r(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Jx="Popper",[Xx,Zx]=Ac(Jx),[r$,eb]=Xx(Jx),tb="PopperAnchor",nb=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=eb(tb,n),o=b.useRef(null),a=Zt(t,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:w.jsx(dt.div,{...s,ref:a})});nb.displayName=tb;var Zf="PopperContent",[sA,iA]=Xx(Zf),rb=b.forwardRef((e,t)=>{var se,ws,Dn,Nr,Mn,xs;const{__scopePopper:n,side:r="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:h=!1,updatePositionStrategy:f="optimized",onPlaced:y,...g}=e,x=eb(Zf,n),[p,m]=b.useState(null),v=Zt(t,$n=>m($n)),[S,_]=b.useState(null),E=rA(S),k=(E==null?void 0:E.width)??0,T=(E==null?void 0:E.height)??0,R=r+(i!=="center"?"-"+i:""),j=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},B=Array.isArray(c)?c:[c],D=B.length>0,Q={padding:j,boundary:B.filter(aA),altBoundary:D},{refs:I,floatingStyles:J,placement:H,isPositioned:F,middlewareData:C}=KP({strategy:"fixed",placement:R,whileElementsMounted:(...$n)=>DP(...$n,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[GP({mainAxis:s+T,alignmentAxis:o}),l&&YP({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?QP():void 0,...Q}),l&&JP({...Q}),XP({...Q,apply:({elements:$n,rects:ba,availableWidth:Gc,availableHeight:Sa})=>{const{width:Yc,height:Ui}=ba.reference,bs=$n.floating.style;bs.setProperty("--radix-popper-available-width",`${Gc}px`),bs.setProperty("--radix-popper-available-height",`${Sa}px`),bs.setProperty("--radix-popper-anchor-width",`${Yc}px`),bs.setProperty("--radix-popper-anchor-height",`${Ui}px`)}}),S&&eA({element:S,padding:a}),lA({arrowWidth:k,arrowHeight:T}),h&&ZP({strategy:"referenceHidden",...Q})]}),[A,L]=ob(H),K=Sr(y);_r(()=>{F&&(K==null||K())},[F,K]);const V=(se=C.arrow)==null?void 0:se.x,X=(ws=C.arrow)==null?void 0:ws.y,ee=((Dn=C.arrow)==null?void 0:Dn.centerOffset)!==0,[Ee,ze]=b.useState();return _r(()=>{p&&ze(window.getComputedStyle(p).zIndex)},[p]),w.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:F?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[(Nr=C.transformOrigin)==null?void 0:Nr.x,(Mn=C.transformOrigin)==null?void 0:Mn.y].join(" "),...((xs=C.hide)==null?void 0:xs.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(sA,{scope:n,placedSide:A,onArrowChange:_,arrowX:V,arrowY:X,shouldHideArrow:ee,children:w.jsx(dt.div,{"data-side":A,"data-align":L,...g,ref:v,style:{...g.style,animation:F?void 0:"none"}})})})});rb.displayName=Zf;var sb="PopperArrow",oA={top:"bottom",right:"left",bottom:"top",left:"right"},ib=b.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=iA(sb,r),o=oA[i.placedSide];return w.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:w.jsx(nA,{...s,ref:n,style:{...s.style,display:"block"}})})});ib.displayName=sb;function aA(e){return e!==null}var lA=e=>({name:"transformOrigin",options:e,fn(t){var x,p,m;const{placement:n,rects:r,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=ob(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((p=s.arrow)==null?void 0:p.x)??0)+a/2,f=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let y="",g="";return c==="bottom"?(y=o?d:`${h}px`,g=`${-l}px`):c==="top"?(y=o?d:`${h}px`,g=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,g=o?d:`${f}px`):c==="left"&&(y=`${r.floating.width+l}px`,g=o?d:`${f}px`),{data:{x:y,y:g}}}});function ob(e){const[t,n="center"]=e.split("-");return[t,n]}var cA=nb,uA=rb,dA=ib,[Lc,s$]=Ac("Tooltip",[Zx]),ep=Zx(),ab="TooltipProvider",hA=700,xg="tooltip.open",[fA,lb]=Lc(ab),cb=e=>{const{__scopeTooltip:t,delayDuration:n=hA,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),w.jsx(fA,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};cb.displayName=ab;var ub="Tooltip",[i$,Dc]=Lc(ub),ih="TooltipTrigger",pA=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Dc(ih,n),i=lb(ih,n),o=ep(n),a=b.useRef(null),l=Zt(t,a,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(cA,{asChild:!0,...o,children:w.jsx(dt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:je(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:je(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:je(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:je(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:je(e.onBlur,s.onClose),onClick:je(e.onClick,s.onClose)})})});pA.displayName=ih;var mA="TooltipPortal",[o$,gA]=Lc(mA,{forceMount:void 0}),Ti="TooltipContent",db=b.forwardRef((e,t)=>{const n=gA(Ti,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Dc(Ti,e.__scopeTooltip);return w.jsx(Uf,{present:r||o.open,children:o.disableHoverableContent?w.jsx(hb,{side:s,...i,ref:t}):w.jsx(yA,{side:s,...i,ref:t})})}),yA=b.forwardRef((e,t)=>{const n=Dc(Ti,e.__scopeTooltip),r=lb(Ti,e.__scopeTooltip),s=b.useRef(null),i=Zt(t,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{a(null),d(!1)},[d]),f=b.useCallback((y,g)=>{const x=y.currentTarget,p={x:y.clientX,y:y.clientY},m=SA(p,x.getBoundingClientRect()),v=_A(p,m),S=EA(g.getBoundingClientRect()),_=TA([...v,...S]);a(_),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&u){const y=x=>f(x,u),g=x=>f(x,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",g)}}},[l,u,f,h]),b.useEffect(()=>{if(o){const y=g=>{const x=g.target,p={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),v=!kA(p,o);m?h():v&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,o,c,h]),w.jsx(hb,{...e,ref:i})}),[vA,wA]=Lc(ub,{isInside:!1}),xA=Ck("TooltipContent"),hb=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Dc(Ti,n),c=ep(n),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(xg,u),()=>document.removeEventListener(xg,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=h=>{const f=h.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),w.jsx(Ff,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:w.jsxs(uA,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(xA,{children:r}),w.jsx(vA,{scope:n,isInside:!0,children:w.jsx(Xk,{id:l.contentId,role:"tooltip",children:s||r})})]})})});db.displayName=Ti;var fb="TooltipArrow",bA=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ep(n);return wA(fb,n).isInside?null:w.jsx(dA,{...s,...r,ref:t})});bA.displayName=fb;function SA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function _A(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function EA(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function kA(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,u=a.y,d=l.x,h=l.y;u>r!=h>r&&n<(d-c)*(r-u)/(h-u)+c&&(s=!s)}return s}function TA(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),CA(t)}function CA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var PA=cb,pb=db;const AA=PA,RA=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(pb,{ref:r,sideOffset:t,className:ys("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));RA.displayName=pb.displayName;var Mc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$c=typeof window>"u"||"Deno"in globalThis;function Vt(){}function OA(e,t){return typeof e=="function"?e(t):e}function jA(e){return typeof e=="number"&&e>=0&&e!==1/0}function NA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oh(e,t){return typeof e=="function"?e(t):e}function IA(e,t){return typeof e=="function"?e(t):e}function bg(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==tp(o,t.options))return!1}else if(!Wo(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Sg(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(zo(t.options.mutationKey)!==zo(i))return!1}else if(!Wo(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function tp(e,t){return((t==null?void 0:t.queryKeyHashFn)||zo)(e)}function zo(e){return JSON.stringify(e,(t,n)=>ah(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Wo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Wo(e[n],t[n])):!1}function mb(e,t){if(e===t)return e;const n=_g(e)&&_g(t);if(n||ah(e)&&ah(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=mb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function _g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ah(e){if(!Eg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Eg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Eg(e){return Object.prototype.toString.call(e)==="[object Object]"}function LA(e){return new Promise(t=>{setTimeout(t,e)})}function DA(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?mb(e,t):t}function MA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $A(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var np=Symbol();function gb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===np?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Jr,nr,ui,Ev,FA=(Ev=class extends Mc{constructor(){super();ne(this,Jr);ne(this,nr);ne(this,ui);G(this,ui,t=>{if(!$c&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,nr)||this.setEventListener(P(this,ui))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,nr))==null||t.call(this),G(this,nr,void 0))}setEventListener(t){var n;G(this,ui,t),(n=P(this,nr))==null||n.call(this),G(this,nr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Jr)!==t&&(G(this,Jr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Jr)=="boolean"?P(this,Jr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Jr=new WeakMap,nr=new WeakMap,ui=new WeakMap,Ev),yb=new FA,di,rr,hi,kv,UA=(kv=class extends Mc{constructor(){super();ne(this,di,!0);ne(this,rr);ne(this,hi);G(this,hi,t=>{if(!$c&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,rr)||this.setEventListener(P(this,hi))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,rr))==null||t.call(this),G(this,rr,void 0))}setEventListener(t){var n;G(this,hi,t),(n=P(this,rr))==null||n.call(this),G(this,rr,t(this.setOnline.bind(this)))}setOnline(t){P(this,di)!==t&&(G(this,di,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,di)}},di=new WeakMap,rr=new WeakMap,hi=new WeakMap,kv),Zl=new UA;function BA(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function VA(e){return Math.min(1e3*2**e,3e4)}function vb(e){return(e??"online")==="online"?Zl.isOnline():!0}var wb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ou(e){return e instanceof wb}function xb(e){let t=!1,n=0,r=!1,s;const i=BA(),o=g=>{var x;r||(h(new wb(g)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>yb.isFocused()&&(e.networkMode==="always"||Zl.isOnline())&&e.canRun(),u=()=>vb(e.networkMode)&&e.canRun(),d=g=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,g),s==null||s(),i.resolve(g))},h=g=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,g),s==null||s(),i.reject(g))},f=()=>new Promise(g=>{var x;s=p=>{(r||c())&&g(p)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(p){g=Promise.reject(p)}Promise.resolve(g).then(d).catch(p=>{var E;if(r)return;const m=e.retry??($c?0:3),v=e.retryDelay??VA,S=typeof v=="function"?v(n,p):v,_=m===!0||typeof m=="number"&&n<m||typeof m=="function"&&m(n,p);if(t||!_){h(p);return}n++,(E=e.onFail)==null||E.call(e,n,p),LA(S).then(()=>c()?void 0:f()).then(()=>{t?h(p):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?y():f().then(y),i)}}var zA=e=>setTimeout(e,0);function WA(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=zA;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Ze=WA(),Xr,Tv,bb=(Tv=class{constructor(){ne(this,Xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jA(this.gcTime)&&G(this,Xr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($c?1/0:5*60*1e3))}clearGcTimeout(){P(this,Xr)&&(clearTimeout(P(this,Xr)),G(this,Xr,void 0))}},Xr=new WeakMap,Tv),fi,Zr,_t,es,qe,ia,ts,Wt,wn,Cv,HA=(Cv=class extends bb{constructor(t){super();ne(this,Wt);ne(this,fi);ne(this,Zr);ne(this,_t);ne(this,es);ne(this,qe);ne(this,ia);ne(this,ts);G(this,ts,!1),G(this,ia,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,es,t.client),G(this,_t,P(this,es).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,fi,qA(this.options)),this.state=t.state??P(this,fi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,qe))==null?void 0:t.promise}setOptions(t){this.options={...P(this,ia),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,_t).remove(this)}setData(t,n){const r=DA(this.state.data,t,this.options);return We(this,Wt,wn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){We(this,Wt,wn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=P(this,qe))==null?void 0:r.promise;return(s=P(this,qe))==null||s.cancel(t),n?n.then(Vt).catch(Vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,fi))}isActive(){return this.observers.some(t=>IA(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===np||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>oh(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!NA(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,qe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,qe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,_t).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,qe)&&(P(this,ts)?P(this,qe).cancel({revert:!0}):P(this,qe).cancelRetry()),this.scheduleGc()),P(this,_t).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,Wt,wn).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,qe))return P(this,qe).continueRetry(),P(this,qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(G(this,ts,!0),r.signal)})},i=()=>{const h=gb(this.options,n),y=(()=>{const g={client:P(this,es),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return G(this,ts,!1),this.options.persister?this.options.persister(h,y,this):h(y)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,es),state:this.state,fetchFn:i};return s(h),h})();(c=this.options.behavior)==null||c.onFetch(a,this),G(this,Zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&We(this,Wt,wn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var f,y,g,x;Ou(h)&&h.silent||We(this,Wt,wn).call(this,{type:"error",error:h}),Ou(h)||((y=(f=P(this,_t).config).onError)==null||y.call(f,h,this),(x=(g=P(this,_t).config).onSettled)==null||x.call(g,this.state.data,h,this)),this.scheduleGc()};return G(this,qe,xb({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,y,g,x;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(p){l(p);return}(y=(f=P(this,_t).config).onSuccess)==null||y.call(f,h,this),(x=(g=P(this,_t).config).onSettled)==null||x.call(g,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,f)=>{We(this,Wt,wn).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{We(this,Wt,wn).call(this,{type:"pause"})},onContinue:()=>{We(this,Wt,wn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),P(this,qe).start()}},fi=new WeakMap,Zr=new WeakMap,_t=new WeakMap,es=new WeakMap,qe=new WeakMap,ia=new WeakMap,ts=new WeakMap,Wt=new WeakSet,wn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...KA(r.data,this.options),fetchMeta:t.meta??null};case"success":return G(this,Zr,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ou(s)&&s.revert&&P(this,Zr)?{...P(this,Zr),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,_t).notify({query:this,type:"updated",action:t})})},Cv);function KA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qA(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var on,Pv,GA=(Pv=class extends Mc{constructor(t={}){super();ne(this,on);this.config=t,G(this,on,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??tp(s,n);let o=this.get(i);return o||(o=new HA({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){P(this,on).has(t.queryHash)||(P(this,on).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,on).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,on).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,on).get(t)}getAll(){return[...P(this,on).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>bg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>bg(t,r)):n}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},on=new WeakMap,Pv),an,Je,ns,ln,Kn,Av,YA=(Av=class extends bb{constructor(t){super();ne(this,ln);ne(this,an);ne(this,Je);ne(this,ns);this.mutationId=t.mutationId,G(this,Je,t.mutationCache),G(this,an,[]),this.state=t.state||QA(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,an).includes(t)||(P(this,an).push(t),this.clearGcTimeout(),P(this,Je).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,an,P(this,an).filter(n=>n!==t)),this.scheduleGc(),P(this,Je).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,an).length||(this.state.status==="pending"?this.scheduleGc():P(this,Je).remove(this))}continue(){var t;return((t=P(this,ns))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,h,f,y,g,x,p,m,v,S,_,E,k,T;const n=()=>{We(this,ln,Kn).call(this,{type:"continue"})};G(this,ns,xb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,j)=>{We(this,ln,Kn).call(this,{type:"failed",failureCount:R,error:j})},onPause:()=>{We(this,ln,Kn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Je).canRun(this)}));const r=this.state.status==="pending",s=!P(this,ns).canStart();try{if(r)n();else{We(this,ln,Kn).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=P(this,Je).config).onMutate)==null?void 0:o.call(i,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&We(this,ln,Kn).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const R=await P(this,ns).start();return await((u=(c=P(this,Je).config).onSuccess)==null?void 0:u.call(c,R,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,R,t,this.state.context)),await((y=(f=P(this,Je).config).onSettled)==null?void 0:y.call(f,R,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,R,null,t,this.state.context)),We(this,ln,Kn).call(this,{type:"success",data:R}),R}catch(R){try{throw await((m=(p=P(this,Je).config).onError)==null?void 0:m.call(p,R,t,this.state.context,this)),await((S=(v=this.options).onError)==null?void 0:S.call(v,R,t,this.state.context)),await((E=(_=P(this,Je).config).onSettled)==null?void 0:E.call(_,void 0,R,this.state.variables,this.state.context,this)),await((T=(k=this.options).onSettled)==null?void 0:T.call(k,void 0,R,t,this.state.context)),R}finally{We(this,ln,Kn).call(this,{type:"error",error:R})}}finally{P(this,Je).runNext(this)}}},an=new WeakMap,Je=new WeakMap,ns=new WeakMap,ln=new WeakSet,Kn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ze.batch(()=>{P(this,an).forEach(r=>{r.onMutationUpdate(t)}),P(this,Je).notify({mutation:this,type:"updated",action:t})})},Av);function QA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _n,Ht,oa,Rv,JA=(Rv=class extends Mc{constructor(t={}){super();ne(this,_n);ne(this,Ht);ne(this,oa);this.config=t,G(this,_n,new Set),G(this,Ht,new Map),G(this,oa,0)}build(t,n,r){const s=new YA({mutationCache:this,mutationId:++Ea(this,oa)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){P(this,_n).add(t);const n=qa(t);if(typeof n=="string"){const r=P(this,Ht).get(n);r?r.push(t):P(this,Ht).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,_n).delete(t)){const n=qa(t);if(typeof n=="string"){const r=P(this,Ht).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&P(this,Ht).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qa(t);if(typeof n=="string"){const r=P(this,Ht).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=qa(t);if(typeof n=="string"){const s=(r=P(this,Ht).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{P(this,_n).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,_n).clear(),P(this,Ht).clear()})}getAll(){return Array.from(P(this,_n))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sg(n,r))}findAll(t={}){return this.getAll().filter(n=>Sg(t,n))}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(Vt))))}},_n=new WeakMap,Ht=new WeakMap,oa=new WeakMap,Rv);function qa(e){var t;return(t=e.options.scope)==null?void 0:t.id}function kg(e){return{onFetch:(t,n)=>{var u,d,h,f,y;const r=t.options,s=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const x=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},p=gb(t.options,t.fetchOptions),m=async(v,S,_)=>{if(g)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const k=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return x(B),B})(),T=await p(k),{maxPages:R}=t.options,j=_?$A:MA;return{pages:j(v.pages,T,R),pageParams:j(v.pageParams,S,R)}};if(s&&i.length){const v=s==="backward",S=v?XA:Tg,_={pages:i,pageParams:o},E=S(r,_);a=await m(_,E,v)}else{const v=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:Tg(r,a);if(l>0&&S==null)break;a=await m(a,S),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Tg(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function XA(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var xe,sr,ir,pi,mi,or,gi,yi,Ov,ZA=(Ov=class{constructor(e={}){ne(this,xe);ne(this,sr);ne(this,ir);ne(this,pi);ne(this,mi);ne(this,or);ne(this,gi);ne(this,yi);G(this,xe,e.queryCache||new GA),G(this,sr,e.mutationCache||new JA),G(this,ir,e.defaultOptions||{}),G(this,pi,new Map),G(this,mi,new Map),G(this,or,0)}mount(){Ea(this,or)._++,P(this,or)===1&&(G(this,gi,yb.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,xe).onFocus())})),G(this,yi,Zl.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,xe).onOnline())})))}unmount(){var e,t;Ea(this,or)._--,P(this,or)===0&&((e=P(this,gi))==null||e.call(this),G(this,gi,void 0),(t=P(this,yi))==null||t.call(this),G(this,yi,void 0))}isFetching(e){return P(this,xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,sr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,xe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(oh(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,xe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=P(this,xe).get(r.queryHash),i=s==null?void 0:s.state.data,o=OA(t,i);if(o!==void 0)return P(this,xe).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ze.batch(()=>P(this,xe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,xe);Ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,xe);return Ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ze.batch(()=>P(this,xe).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Vt).catch(Vt)}invalidateQueries(e,t={}){return Ze.batch(()=>(P(this,xe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ze.batch(()=>P(this,xe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Vt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Vt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,xe).build(this,t);return n.isStaleByTime(oh(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vt).catch(Vt)}fetchInfiniteQuery(e){return e.behavior=kg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vt).catch(Vt)}ensureInfiniteQueryData(e){return e.behavior=kg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Zl.isOnline()?P(this,sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,xe)}getMutationCache(){return P(this,sr)}getDefaultOptions(){return P(this,ir)}setDefaultOptions(e){G(this,ir,e)}setQueryDefaults(e,t){P(this,pi).set(zo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,pi).values()],n={};return t.forEach(r=>{Wo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,mi).set(zo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,mi).values()],n={};return t.forEach(r=>{Wo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,ir).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===np&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,ir).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,xe).clear(),P(this,sr).clear()}},xe=new WeakMap,sr=new WeakMap,ir=new WeakMap,pi=new WeakMap,mi=new WeakMap,or=new WeakMap,gi=new WeakMap,yi=new WeakMap,Ov),eR=b.createContext(void 0),tR=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(eR.Provider,{value:e,children:t}));/**
 * @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 Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho.apply(this,arguments)}var cr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(cr||(cr={}));const Cg="popstate";function nR(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return lh("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:ec(s)}return sR(t,n,null,e)}function Pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Sb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rR(){return Math.random().toString(36).substr(2,8)}function Pg(e,t){return{usr:e.state,key:e.key,idx:t}}function lh(e,t,n,r){return n===void 0&&(n=null),Ho({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Li(t):t,{state:n,key:t&&t.key||r||rR()})}function ec(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function sR(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=cr.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Ho({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=cr.Pop;let x=u(),p=x==null?null:x-c;c=x,l&&l({action:a,location:g.location,delta:p})}function h(x,p){a=cr.Push;let m=lh(g.location,x,p);c=u()+1;let v=Pg(m,c),S=g.createHref(m);try{o.pushState(v,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(S)}i&&l&&l({action:a,location:g.location,delta:1})}function f(x,p){a=cr.Replace;let m=lh(g.location,x,p);c=u();let v=Pg(m,c),S=g.createHref(m);o.replaceState(v,"",S),i&&l&&l({action:a,location:g.location,delta:0})}function y(x){let p=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof x=="string"?x:ec(x);return m=m.replace(/ $/,"%20"),Pe(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let g={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Cg,d),l=x,()=>{s.removeEventListener(Cg,d),l=null}},createHref(x){return t(s,x)},createURL:y,encodeLocation(x){let p=y(x);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:f,go(x){return o.go(x)}};return g}var Ag;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ag||(Ag={}));function iR(e,t,n){return n===void 0&&(n="/"),oR(e,t,n,!1)}function oR(e,t,n,r){let s=typeof t=="string"?Li(t):t,i=rp(s.pathname||"/",n);if(i==null)return null;let o=_b(e);aR(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=vR(i);a=gR(o[l],c,r)}return a}function _b(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Pe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=wr([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Pe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),_b(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:pR(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Eb(i.path))s(i,o,l)}),t}function Eb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Eb(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function aR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lR=/^:[\w-]+$/,cR=3,uR=2,dR=1,hR=10,fR=-2,Rg=e=>e==="*";function pR(e,t){let n=e.split("/"),r=n.length;return n.some(Rg)&&(r+=fR),t&&(r+=uR),n.filter(s=>!Rg(s)).reduce((s,i)=>s+(lR.test(i)?cR:i===""?dR:hR),r)}function mR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function gR(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=Og({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Og({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(s,d.params),o.push({params:s,pathname:wr([i,d.pathname]),pathnameBase:SR(wr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=wr([i,d.pathnameBase]))}return o}function Og(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yR(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:f}=u;if(h==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[d];return f&&!y?c[h]=void 0:c[h]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function yR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Sb(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function vR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Sb(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function rp(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function wR(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Li(e):e;return{pathname:n?n.startsWith("/")?n:xR(n,t):t,search:_R(r),hash:ER(s)}}function xR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ju(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function bR(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function kb(e,t){let n=bR(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tb(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Li(e):(s=Ho({},e),Pe(!s.pathname||!s.pathname.includes("?"),ju("?","pathname","search",s)),Pe(!s.pathname||!s.pathname.includes("#"),ju("#","pathname","hash",s)),Pe(!s.search||!s.search.includes("#"),ju("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=wR(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const wr=e=>e.join("/").replace(/\/\/+/g,"/"),SR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_R=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ER=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function kR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Cb=["post","put","patch","delete"];new Set(Cb);const TR=["get",...Cb];new Set(TR);/**
 * 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 Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(this,arguments)}const sp=b.createContext(null),CR=b.createContext(null),vs=b.createContext(null),Fc=b.createContext(null),Rr=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Pb=b.createContext(null);function PR(e,t){let{relative:n}=t===void 0?{}:t;ma()||Pe(!1);let{basename:r,navigator:s}=b.useContext(vs),{hash:i,pathname:o,search:a}=Rb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:wr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function ma(){return b.useContext(Fc)!=null}function Or(){return ma()||Pe(!1),b.useContext(Fc).location}function Ab(e){b.useContext(vs).static||b.useLayoutEffect(e)}function AR(){let{isDataRoute:e}=b.useContext(Rr);return e?zR():RR()}function RR(){ma()||Pe(!1);let e=b.useContext(sp),{basename:t,future:n,navigator:r}=b.useContext(vs),{matches:s}=b.useContext(Rr),{pathname:i}=Or(),o=JSON.stringify(kb(s,n.v7_relativeSplatPath)),a=b.useRef(!1);return Ab(()=>{a.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Tb(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:wr([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,i,e])}function OR(){let{matches:e}=b.useContext(Rr),t=e[e.length-1];return t?t.params:{}}function Rb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(vs),{matches:s}=b.useContext(Rr),{pathname:i}=Or(),o=JSON.stringify(kb(s,r.v7_relativeSplatPath));return b.useMemo(()=>Tb(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function jR(e,t){return NR(e,t)}function NR(e,t,n,r){ma()||Pe(!1);let{navigator:s}=b.useContext(vs),{matches:i}=b.useContext(Rr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Or(),u;if(t){var d;let x=typeof t=="string"?Li(t):t;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||Pe(!1),u=x}else u=c;let h=u.pathname||"/",f=h;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let y=iR(e,{pathname:f}),g=$R(y&&y.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:wr([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:wr([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&g?b.createElement(Fc.Provider,{value:{location:Ko({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cr.Pop}},g):g}function IR(){let e=VR(),t=kR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:s},n):null,null)}const LR=b.createElement(IR,null);class DR extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(Rr.Provider,{value:this.props.routeContext},b.createElement(Pb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function MR(e){let{routeContext:t,match:n,children:r}=e,s=b.useContext(sp);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Rr.Provider,{value:t},r)}function $R(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==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||Pe(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.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:h,errors:f}=n,y=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||y){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,h)=>{let f,y=!1,g=null,x=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||LR,l&&(c<0&&h===0?(y=!0,x=null):c===h&&(y=!0,x=d.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,h+1)),m=()=>{let v;return f?v=g:y?v=x:d.route.Component?v=b.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=u,b.createElement(MR,{match:d,routeContext:{outlet:u,matches:p,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?b.createElement(DR,{location:n.location,revalidation:n.revalidation,component:g,error:f,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Ob=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ob||{}),tc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tc||{});function FR(e){let t=b.useContext(sp);return t||Pe(!1),t}function UR(e){let t=b.useContext(CR);return t||Pe(!1),t}function BR(e){let t=b.useContext(Rr);return t||Pe(!1),t}function jb(e){let t=BR(),n=t.matches[t.matches.length-1];return n.route.id||Pe(!1),n.route.id}function VR(){var e;let t=b.useContext(Pb),n=UR(tc.UseRouteError),r=jb(tc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function zR(){let{router:e}=FR(Ob.UseNavigateStable),t=jb(tc.UseNavigateStable),n=b.useRef(!1);return Ab(()=>{n.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ko({fromRouteId:t},i)))},[e,t])}function WR(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function qn(e){Pe(!1)}function HR(e){let{basename:t="/",children:n=null,location:r,navigationType:s=cr.Pop,navigator:i,static:o=!1,future:a}=e;ma()&&Pe(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Ko({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Li(r));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:y="default"}=r,g=b.useMemo(()=>{let x=rp(u,l);return x==null?null:{location:{pathname:x,search:d,hash:h,state:f,key:y},navigationType:s}},[l,u,d,h,f,y,s]);return g==null?null:b.createElement(vs.Provider,{value:c},b.createElement(Fc.Provider,{children:n,value:g}))}function KR(e){let{children:t,location:n}=e;return jR(ch(t),n)}new Promise(()=>{});function ch(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,s)=>{if(!b.isValidElement(r))return;let i=[...t,s];if(r.type===b.Fragment){n.push.apply(n,ch(r.props.children,i));return}r.type!==qn&&Pe(!1),!r.props.index||!r.props.children||Pe(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ch(r.props.children,i)),n.push(o)}),n}/**
 * 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
 */function uh(){return uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uh.apply(this,arguments)}function qR(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function GR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function YR(e,t){return e.button===0&&(!t||t==="_self")&&!GR(e)}const QR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],JR="6";try{window.__reactRouterVersion=JR}catch{}const XR="startTransition",jg=zv[XR];function ZR(e){let{basename:t,children:n,future:r,window:s}=e,i=b.useRef();i.current==null&&(i.current=nR({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=b.useCallback(d=>{c&&jg?jg(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>WR(r),[r]),b.createElement(HR,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const eO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,is=b.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=qR(t,QR),{basename:f}=b.useContext(vs),y,g=!1;if(typeof c=="string"&&tO.test(c)&&(y=c,eO))try{let v=new URL(window.location.href),S=c.startsWith("//")?new URL(v.protocol+c):new URL(c),_=rp(S.pathname,f);S.origin===v.origin&&_!=null?c=_+S.search+S.hash:g=!0}catch{}let x=PR(c,{relative:s}),p=nO(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function m(v){r&&r(v),v.defaultPrevented||p(v)}return b.createElement("a",uh({},h,{href:y||x,onClick:g||i?r:m,ref:n,target:l}))});var Ng;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ng||(Ng={}));var Ig;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ig||(Ig={}));function nO(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=AR(),c=Or(),u=Rb(e,{relative:o});return b.useCallback(d=>{if(YR(d,n)){d.preventDefault();let h=r!==void 0?r:ec(c)===ec(u);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}const rO="https://hasansaleem.com";function sO(){const{pathname:e}=Or();b.useEffect(()=>{const t=e==="/"?"":e.replace(/\/+$/,""),n=`${rO}${t}`;let r=document.querySelector("link[rel='canonical']");r?r.href=n:(r=document.createElement("link"),r.rel="canonical",r.href=n,document.head.appendChild(r))},[e])}const Nb=b.createContext({});function iO(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ib=typeof window<"u",oO=Ib?b.useLayoutEffect:b.useEffect,ip=b.createContext(null);function op(e,t){e.indexOf(t)===-1&&e.push(t)}function nc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const gn=(e,t,n)=>n>t?t:n<e?e:n;let Uc=()=>{},Ci=()=>{};const Nn={},Lb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Db(e){return typeof e=="object"&&e!==null}const Mb=e=>/^0[^.\s]+$/u.test(e);function $b(e){let t;return()=>(t===void 0&&(t=e()),t)}const At=e=>e,aO=(e,t)=>n=>t(e(n)),ga=(...e)=>e.reduce(aO),qo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ap{constructor(){this.subscriptions=[]}add(t){return op(this.subscriptions,t),()=>nc(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rt=e=>e*1e3,Ct=e=>e/1e3;function Fb(e,t){return t?e*(1e3/t):0}const Ub=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lO=1e-7,cO=12;function uO(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Ub(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>lO&&++a<cO);return o}function ya(e,t,n,r){if(e===t&&n===r)return At;const s=i=>uO(i,0,1,e,n);return i=>i===0||i===1?i:Ub(s(i),t,r)}const Bb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vb=e=>t=>1-e(1-t),zb=ya(.33,1.53,.69,.99),lp=Vb(zb),Wb=Bb(lp),Hb=e=>(e*=2)<1?.5*lp(e):.5*(2-Math.pow(2,-10*(e-1))),cp=e=>1-Math.sin(Math.acos(e)),Kb=Vb(cp),qb=Bb(cp),dO=ya(.42,0,1,1),hO=ya(0,0,.58,1),Gb=ya(.42,0,.58,1),fO=e=>Array.isArray(e)&&typeof e[0]!="number",Yb=e=>Array.isArray(e)&&typeof e[0]=="number",Lg={linear:At,easeIn:dO,easeInOut:Gb,easeOut:hO,circIn:cp,circInOut:qb,circOut:Kb,backIn:lp,backInOut:Wb,backOut:zb,anticipate:Hb},pO=e=>typeof e=="string",Dg=e=>{if(Yb(e)){Ci(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return ya(t,n,r,s)}else if(pO(e))return Ci(Lg[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Lg[e];return e},Ga=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Mg={value:null,addProjectionMetrics:null};function mO(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,h=!1,f=!1)=>{const g=f&&s?n:r;return h&&o.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&Mg.value&&Mg.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const gO=40;function Qb(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Ga.reduce((v,S)=>(v[S]=mO(i,t?S:void 0),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:y}=o,g=()=>{const v=Nn.useManualTiming?s.timestamp:performance.now();n=!1,Nn.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,gO),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Ga.reduce((v,S)=>{const _=o[S];return v[S]=(E,k=!1,T=!1)=>(n||x(),_.schedule(E,k,T)),v},{}),cancel:v=>{for(let S=0;S<Ga.length;S++)o[Ga[S]].cancel(v)},state:s,steps:o}}const{schedule:ce,cancel:Tr,state:Ue,steps:Nu}=Qb(typeof requestAnimationFrame<"u"?requestAnimationFrame:At,!0);let wl;function yO(){wl=void 0}const et={now:()=>(wl===void 0&&et.set(Ue.isProcessing||Nn.useManualTiming?Ue.timestamp:performance.now()),wl),set:e=>{wl=e,queueMicrotask(yO)}},Jb=e=>t=>typeof t=="string"&&t.startsWith(e),Xb=Jb("--"),vO=Jb("var(--"),up=e=>vO(e)?wO.test(e.split("/*")[0].trim()):!1,wO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $g(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Di={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Go={...Di,transform:e=>gn(0,1,e)},Ya={...Di,default:1},vo=e=>Math.round(e*1e5)/1e5,dp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xO(e){return e==null}const bO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hp=(e,t)=>n=>!!(typeof n=="string"&&bO.test(n)&&n.startsWith(e)||t&&!xO(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(dp);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},SO=e=>gn(0,255,e),Iu={...Di,transform:e=>Math.round(SO(e))},Gr={test:hp("rgb","red"),parse:Zb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Iu.transform(e)+", "+Iu.transform(t)+", "+Iu.transform(n)+", "+vo(Go.transform(r))+")"};function _O(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const dh={test:hp("#"),parse:_O,transform:Gr.transform},va=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Gn=va("deg"),pn=va("%"),$=va("px"),EO=va("vh"),kO=va("vw"),Fg={...pn,parse:e=>pn.parse(e)/100,transform:e=>pn.transform(e*100)},Gs={test:hp("hsl","hue"),parse:Zb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+pn.transform(vo(t))+", "+pn.transform(vo(n))+", "+vo(Go.transform(r))+")"},Te={test:e=>Gr.test(e)||dh.test(e)||Gs.test(e),parse:e=>Gr.test(e)?Gr.parse(e):Gs.test(e)?Gs.parse(e):dh.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gr.transform(e):Gs.transform(e),getAnimatableNone:e=>{const t=Te.parse(e);return t.alpha=0,Te.transform(t)}},TO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CO(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(dp))==null?void 0:t.length)||0)+(((n=e.match(TO))==null?void 0:n.length)||0)>0}const eS="number",tS="color",PO="var",AO="var(",Ug="${}",RO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(RO,l=>(Te.test(l)?(r.color.push(i),s.push(tS),n.push(Te.parse(l))):l.startsWith(AO)?(r.var.push(i),s.push(PO),n.push(l)):(r.number.push(i),s.push(eS),n.push(parseFloat(l))),++i,Ug)).split(Ug);return{values:n,split:a,indexes:r,types:s}}function nS(e){return Yo(e).values}function rS(e){const{split:t,types:n}=Yo(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===eS?i+=vo(s[o]):a===tS?i+=Te.transform(s[o]):i+=s[o]}return i}}const OO=e=>typeof e=="number"?0:Te.test(e)?Te.getAnimatableNone(e):e;function jO(e){const t=nS(e);return rS(e)(t.map(OO))}const Jt={test:CO,parse:nS,createTransformer:rS,getAnimatableNone:jO};function Lu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function NO({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Lu(l,a,e+1/3),i=Lu(l,a,e),o=Lu(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function rc(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,Du=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},IO=[dh,Gr,Gs],LO=e=>IO.find(t=>t.test(e));function Bg(e){const t=LO(e);if(Uc(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Gs&&(n=NO(n)),n}const Vg=(e,t)=>{const n=Bg(e),r=Bg(t);if(!n||!r)return rc(e,t);const s={...n};return i=>(s.red=Du(n.red,r.red,i),s.green=Du(n.green,r.green,i),s.blue=Du(n.blue,r.blue,i),s.alpha=ye(n.alpha,r.alpha,i),Gr.transform(s))},hh=new Set(["none","hidden"]);function DO(e,t){return hh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function MO(e,t){return n=>ye(e,t,n)}function fp(e){return typeof e=="number"?MO:typeof e=="string"?up(e)?rc:Te.test(e)?Vg:UO:Array.isArray(e)?sS:typeof e=="object"?Te.test(e)?Vg:$O:rc}function sS(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>fp(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function $O(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=fp(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function FO(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const UO=(e,t)=>{const n=Jt.createTransformer(t),r=Yo(e),s=Yo(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?hh.has(e)&&!s.values.length||hh.has(t)&&!r.values.length?DO(e,t):ga(sS(FO(r,s),s.values),n):(Uc(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),rc(e,t))};function iS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):fp(e)(e,t)}const BO=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ce.update(t,n),stop:()=>Tr(t),now:()=>Ue.isProcessing?Ue.timestamp:et.now()}},oS=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},sc=2e4;function pp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<sc;)t+=n,r=e.next(t);return t>=sc?1/0:t}function VO(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(pp(r),sc);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Ct(s)}}const zO=5;function aS(e,t,n){const r=Math.max(t-zO,0);return Fb(n-e(r),t-r)}const me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Mu=.001;function WO({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let s,i;Uc(e<=Rt(me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=gn(me.minDamping,me.maxDamping,o),e=gn(me.minDuration,me.maxDuration,Ct(e)),o<1?(s=c=>{const u=c*o,d=u*e,h=u-n,f=fh(c,o),y=Math.exp(-d);return Mu-h/f*y},i=c=>{const d=c*o*e,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*e,y=Math.exp(-d),g=fh(Math.pow(c,2),o);return(-s(c)+Mu>0?-1:1)*((h-f)*y)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Mu+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=KO(s,i,a);if(e=Rt(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const HO=12;function KO(e,t,n){let r=n;for(let s=1;s<HO;s++)r=r-e(r)/t(r);return r}function fh(e,t){return e*Math.sqrt(1-t*t)}const qO=["duration","bounce"],GO=["stiffness","damping","mass"];function zg(e,t){return t.some(n=>e[n]!==void 0)}function YO(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!zg(e,GO)&&zg(e,qO))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*gn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:me.mass,stiffness:s,damping:i}}else{const n=WO({...e,velocity:0});t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function ic(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=YO({...n,velocity:-Ct(n.velocity||0)}),y=h||0,g=c/(2*Math.sqrt(l*u)),x=o-i,p=Ct(Math.sqrt(l/u)),m=Math.abs(x)<5;r||(r=m?me.restSpeed.granular:me.restSpeed.default),s||(s=m?me.restDelta.granular:me.restDelta.default);let v;if(g<1){const _=fh(p,g);v=E=>{const k=Math.exp(-g*p*E);return o-k*((y+g*p*x)/_*Math.sin(_*E)+x*Math.cos(_*E))}}else if(g===1)v=_=>o-Math.exp(-p*_)*(x+(y+p*x)*_);else{const _=p*Math.sqrt(g*g-1);v=E=>{const k=Math.exp(-g*p*E),T=Math.min(_*E,300);return o-k*((y+g*p*x)*Math.sinh(T)+_*x*Math.cosh(T))/_}}const S={calculatedDuration:f&&d||null,next:_=>{const E=v(_);if(f)a.done=_>=d;else{let k=_===0?y:0;g<1&&(k=_===0?Rt(y):aS(v,_,E));const T=Math.abs(k)<=r,R=Math.abs(o-E)<=s;a.done=T&&R}return a.value=a.done?o:E,a},toString:()=>{const _=Math.min(pp(S),sc),E=oS(k=>S.next(_*k).value,_,30);return _+"ms "+E},toTransition:()=>{}};return S}ic.applyToOptions=e=>{const t=VO(e,100,ic);return e.ease=t.ease,e.duration=Rt(t.duration),e.type="keyframes",e};function ph({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,y=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let g=n*t;const x=d+g,p=o===void 0?x:o(x);p!==x&&(g=p-d);const m=T=>-g*Math.exp(-T/r),v=T=>p+m(T),S=T=>{const R=m(T),j=v(T);h.done=Math.abs(R)<=c,h.value=h.done?p:j};let _,E;const k=T=>{f(h.value)&&(_=T,E=ic({keyframes:[h.value,y(h.value)],velocity:aS(v,T,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:T=>{let R=!1;return!E&&_===void 0&&(R=!0,S(T),k(T)),_!==void 0&&T>=_?E.next(T-_):(!R&&S(T),h)}}}function QO(e,t,n){const r=[],s=n||Nn.mix||iS,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||At:t;a=ga(l,a)}r.push(a)}return r}function JO(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Ci(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=QO(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=qo(e[d],e[d+1],u);return a[d](h)};return n?u=>c(gn(e[0],e[i-1],u)):c}function XO(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=qo(0,t,r);e.push(ye(n,1,s))}}function ZO(e){const t=[0];return XO(t,e.length-1),t}function ej(e,t){return e.map(n=>n*t)}function tj(e,t){return e.map(()=>t||Gb).splice(0,e.length-1)}function wo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=fO(r)?r.map(Dg):Dg(r),i={done:!1,value:t[0]},o=ej(n&&n.length===t.length?n:ZO(t),e),a=JO(o,t,{ease:Array.isArray(s)?s:tj(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const nj=e=>e!==null;function mp(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(nj),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const rj={decay:ph,inertia:ph,tween:wo,keyframes:wo,spring:ic};function lS(e){typeof e.type=="string"&&(e.type=rj[e.type])}class gp{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const sj=e=>e/100;class yp extends gp{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==et.now()&&this.tick(et.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;lS(t);const{type:n=wo,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||wo;l!==wo&&typeof a[0]!="number"&&(this.mixKeyframes=ga(sj,iS(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=pp(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:y,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,S=r;if(d){const T=Math.min(this.currentTime,s)/a;let R=Math.floor(T),j=T%1;!j&&T>=1&&(j=1),j===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(h==="reverse"?(j=1-j,f&&(j-=f/a)):h==="mirror"&&(S=o)),v=gn(0,1,j)*a}const _=m?{done:!1,value:u[0]}:S.next(v);i&&(_.value=i(_.value));let{done:E}=_;!m&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&y!==ph&&(_.value=mp(u,this.options,x,this.speed)),g&&g(_.value),k&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Ct(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ct(t)}get time(){return Ct(this.currentTime)}set time(t){var n;t=Rt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(et.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ct(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=BO,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(et.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function ij(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yr=e=>e*180/Math.PI,mh=e=>{const t=Yr(Math.atan2(e[1],e[0]));return gh(t)},oj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:mh,rotateZ:mh,skewX:e=>Yr(Math.atan(e[1])),skewY:e=>Yr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},gh=e=>(e=e%360,e<0&&(e+=360),e),Wg=mh,Hg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Kg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),aj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hg,scaleY:Kg,scale:e=>(Hg(e)+Kg(e))/2,rotateX:e=>gh(Yr(Math.atan2(e[6],e[5]))),rotateY:e=>gh(Yr(Math.atan2(-e[2],e[0]))),rotateZ:Wg,rotate:Wg,skewX:e=>Yr(Math.atan(e[4])),skewY:e=>Yr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yh(e){return e.includes("scale")?1:0}function vh(e,t){if(!e||e==="none")return yh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=aj,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=oj,s=a}if(!s)return yh(t);const i=r[t],o=s[1].split(",").map(cj);return typeof i=="function"?i(o):o[i]}const lj=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return vh(n,t)};function cj(e){return parseFloat(e.trim())}const Mi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Mi),qg=e=>e===Di||e===$,uj=new Set(["x","y","z"]),dj=Mi.filter(e=>!uj.has(e));function hj(e){const t=[];return dj.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ur={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>vh(t,"x"),y:(e,{transform:t})=>vh(t,"y")};ur.translateX=ur.x;ur.translateY=ur.y;const os=new Set;let wh=!1,xh=!1,bh=!1;function cS(){if(xh){const e=Array.from(os).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=hj(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}xh=!1,wh=!1,os.forEach(e=>e.complete(bh)),os.clear()}function uS(){os.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xh=!0)})}function fj(){bh=!0,uS(),cS(),bh=!1}class vp{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(os.add(this),wh||(wh=!0,ce.read(uS),ce.resolveKeyframes(cS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}ij(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),os.delete(this)}cancel(){this.state==="scheduled"&&(os.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const pj=e=>e.startsWith("--");function mj(e,t,n){pj(t)?e.style.setProperty(t,n):e.style[t]=n}const gj={};function dS(e,t){const n=$b(e);return()=>gj[t]??n()}const yj=dS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),hS=dS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),so=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:so([0,.65,.55,1]),circOut:so([.55,0,1,.45]),backIn:so([.31,.01,.66,-.59]),backOut:so([.33,1.53,.69,.99])};function fS(e,t){if(e)return typeof e=="function"?hS()?oS(e,t):"ease-out":Yb(e)?so(e):Array.isArray(e)?e.map(n=>fS(n,t)||Gg.easeOut):Gg[e]}function vj(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=fS(a,s);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function pS(e){return typeof e=="function"&&"applyToOptions"in e}function wj({type:e,...t}){return pS(e)&&hS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class mS extends gp{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Ci(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=wj(t);this.animation=vj(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=mp(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):mj(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ct(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ct(t)}get time(){return Ct(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Rt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&yj()?(this.animation.timeline=t,At):n(this)}}const gS={anticipate:Hb,backInOut:Wb,circInOut:qb};function xj(e){return e in gS}function bj(e){typeof e.ease=="string"&&xj(e.ease)&&(e.ease=gS[e.ease])}const $u=10;class Sj extends mS{constructor(t){bj(t),lS(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new yp({...o,autoplay:!1}),l=Math.max($u,et.now()-this.startTime),c=gn(0,$u,l-$u);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Yg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jt.test(e)||e==="0")&&!e.startsWith("url("));function _j(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Ej(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Yg(s,t),a=Yg(i,t);return Uc(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:_j(e)||(n==="spring"||pS(n))&&r}function Sh(e){e.duration=0,e.type="keyframes"}const kj=new Set(["opacity","clipPath","filter","transform"]),Tj=$b(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cj(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Tj()&&n&&kj.has(n)&&(n!=="transform"||!c)&&!l&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const Pj=40;class Aj extends gp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var y;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=et.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...d},f=(u==null?void 0:u.KeyframeResolver)||vp;this.keyframeResolver=new f(a,(g,x,p)=>this.onKeyframesResolved(g,x,h,!p),l,c,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,p;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=et.now(),Ej(t,i,o,a)||((Nn.instantAnimations||!l)&&(u==null||u(mp(t,r,n))),t[0]=t[t.length-1],Sh(r),r.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Pj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&Cj(h),y=(p=(x=h.motionValue)==null?void 0:x.owner)==null?void 0:p.current,g=f?new Sj({...h,element:y}):new yp(h);g.finished.then(()=>{this.notifyFinished()}).catch(At),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),fj()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function yS(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Rj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Oj(e){const t=Rj.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const jj=4;function vS(e,t,n=1){Ci(n<=jj,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=Oj(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Lb(o)?parseFloat(o):o}return up(s)?vS(s,t,n+1):s}const Nj={type:"spring",stiffness:500,damping:25,restSpeed:10},Ij=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Lj={type:"keyframes",duration:.8},Dj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mj=(e,{keyframes:t})=>t.length>2?Lj:$i.has(e)?e.startsWith("scale")?Ij(t[1]):Nj:Dj,$j=e=>e!==null;function Fj(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter($j),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function wS(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function wp(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?wS(n,e):n}function Uj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const xp=(e,t,n,r={},s,i)=>o=>{const a=wp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Rt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};Uj(a)||Object.assign(u,Mj(e,u)),u.duration&&(u.duration=Rt(u.duration)),u.repeatDelay&&(u.repeatDelay=Rt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Sh(u),u.delay===0&&(d=!0)),(Nn.instantAnimations||Nn.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,Sh(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const h=Fj(u.keyframes,a);if(h!==void 0){ce.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new yp(u):new Aj(u)};function Qg(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function bp(e,t,n,r){if(typeof t=="function"){const[s,i]=Qg(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Qg(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function li(e,t,n){const r=e.getProps();return bp(r,t,n!==void 0?n:r.custom,e)}const xS=new Set(["width","height","top","left","right","bottom",...Mi]),Jg=30,Bj=e=>!isNaN(parseFloat(e));class Vj{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=et.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=et.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Bj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ap);const r=this.events[t].add(n);return t==="change"?()=>{r(),ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=et.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Jg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Jg);return Fb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pi(e,t){return new Vj(e,t)}const _h=e=>Array.isArray(e);function zj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pi(n))}function Wj(e){return _h(e)?e[e.length-1]||0:e}function Hj(e,t){const n=li(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Wj(i[o]);zj(e,o,a)}}const Ye=e=>!!(e&&e.getVelocity);function Kj(e){return!!(Ye(e)&&e.add)}function Eh(e,t){const n=e.getValue("willChange");if(Kj(n))return n.add(t);if(!n&&Nn.WillChange){const r=new Nn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Sp(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const qj="framerAppearId",bS="data-"+Sp(qj);function SS(e){return e.props[bS]}function Gj({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _S(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?wS(i,l):l;const c=i==null?void 0:i.reduceMotion;r&&(i=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const f=e.getValue(h,e.latestValues[h]??null),y=a[h];if(y===void 0||d&&Gj(d,h))continue;const g={delay:n,...wp(i||{},h)},x=f.get();if(x!==void 0&&!f.isAnimating&&!Array.isArray(y)&&y===x&&!g.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const S=SS(e);if(S){const _=window.MotionHandoffAnimation(S,h,ce);_!==null&&(g.startTime=_,p=!0)}}Eh(e,h);const m=c??e.shouldReduceMotion;f.start(xp(h,f,y,m&&xS.has(h)?{type:!1}:g,e,p));const v=f.animation;v&&u.push(v)}if(o){const h=()=>ce.update(()=>{o&&Hj(e,o)});u.length?Promise.all(u).then(h):h()}return u}function kh(e,t,n={}){var l;const r=li(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(_S(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return Yj(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function Yj(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(kh(l,t,{...o,delay:n+(typeof r=="function"?0:r)+yS(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Qj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>kh(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=kh(e,t,n);else{const s=typeof t=="function"?li(e,t,n.custom):t;r=Promise.all(_S(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Jj={test:e=>e==="auto",parse:e=>e},ES=e=>t=>t.test(e),kS=[Di,$,pn,Gn,kO,EO,Jj],Xg=e=>kS.find(ES(e));function Xj(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Mb(e):!0}const Zj=new Set(["brightness","contrast","saturate","opacity"]);function eN(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(dp)||[];if(!r)return e;const s=n.replace(r,"");let i=Zj.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const tN=/\b([a-z-]*)\(.*?\)/gu,Th={...Jt,getAnimatableNone:e=>{const t=e.match(tN);return t?t.map(eN).join(" "):e}},Ch={...Jt,getAnimatableNone:e=>{const t=Jt.parse(e);return Jt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Zg={...Di,transform:Math.round},nN={rotate:Gn,rotateX:Gn,rotateY:Gn,rotateZ:Gn,scale:Ya,scaleX:Ya,scaleY:Ya,scaleZ:Ya,skew:Gn,skewX:Gn,skewY:Gn,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:Go,originX:Fg,originY:Fg,originZ:$},_p={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,...nN,zIndex:Zg,fillOpacity:Go,strokeOpacity:Go,numOctaves:Zg},rN={..._p,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:Th,WebkitFilter:Th,mask:Ch,WebkitMask:Ch},TS=e=>rN[e],sN=new Set([Th,Ch]);function CS(e,t){let n=TS(e);return sN.has(n)||(n=Jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const iN=new Set(["auto","none","0"]);function oN(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!iN.has(i)&&Yo(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=CS(n,s)}class aN extends vp{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),up(d))){const h=vS(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!xS.has(r)||t.length!==2)return;const[s,i]=t,o=Xg(s),a=Xg(i),l=$g(s),c=$g(i);if(l!==c&&ur[r]){this.needsMeasurement=!0;return}if(o!==a)if(qg(o)&&qg(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else ur[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Xj(t[s]))&&r.push(s);r.length&&oN(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ur[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=ur[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const lN=new Set(["opacity","clipPath","filter","transform"]);function PS(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const AS=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function cN(e){return Db(e)&&"offsetHeight"in e}const{schedule:Ep,cancel:a$}=Qb(queueMicrotask,!1),Ut={x:!1,y:!1};function RS(){return Ut.x||Ut.y}function uN(e){return e==="x"||e==="y"?Ut[e]?null:(Ut[e]=!0,()=>{Ut[e]=!1}):Ut.x||Ut.y?null:(Ut.x=Ut.y=!0,()=>{Ut.x=Ut.y=!1})}function OS(e,t){const n=PS(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function dN(e){return!(e.pointerType==="touch"||RS())}function hN(e,t,n={}){const[r,s,i]=OS(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",y)},d=x=>{c&&(c(x),c=void 0),u()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(x))},f=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},y=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},g=x=>{if(!dN(x))return;l=!1;const p=t(o,x);typeof p=="function"&&(c=p,o.addEventListener("pointerleave",y,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",f,s)}),i}const jS=(e,t)=>t?e===t?!0:jS(e,t.parentElement):!1,kp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,fN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pN(e){return fN.has(e.tagName)||e.isContentEditable===!0}const mN=new Set(["INPUT","SELECT","TEXTAREA"]);function gN(e){return mN.has(e.tagName)||e.isContentEditable===!0}const xl=new WeakSet;function ey(e){return t=>{t.key==="Enter"&&e(t)}}function Fu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const yN=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ey(()=>{if(xl.has(n))return;Fu(n,"down");const s=ey(()=>{Fu(n,"up")}),i=()=>Fu(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ty(e){return kp(e)&&!RS()}const ny=new WeakSet;function vN(e,t,n={}){const[r,s,i]=OS(e,n),o=a=>{const l=a.currentTarget;if(!ty(a)||ny.has(a))return;xl.add(l),n.stopPropagation&&ny.add(a);const c=t(l,a),u=(f,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),xl.has(l)&&xl.delete(l),ty(f)&&typeof c=="function"&&c(f,{success:y})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||jS(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),cN(a)&&(a.addEventListener("focus",c=>yN(c,s)),!pN(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Tp(e){return Db(e)&&"ownerSVGElement"in e}const bl=new WeakMap;let Yn;const NS=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Tp(r)&&"getBBox"in r?r.getBBox()[t]:r[n],wN=NS("inline","width","offsetWidth"),xN=NS("block","height","offsetHeight");function bN({target:e,borderBoxSize:t}){var n;(n=bl.get(e))==null||n.forEach(r=>{r(e,{get width(){return wN(e,t)},get height(){return xN(e,t)}})})}function SN(e){e.forEach(bN)}function _N(){typeof ResizeObserver>"u"||(Yn=new ResizeObserver(SN))}function EN(e,t){Yn||_N();const n=PS(e);return n.forEach(r=>{let s=bl.get(r);s||(s=new Set,bl.set(r,s)),s.add(t),Yn==null||Yn.observe(r)}),()=>{n.forEach(r=>{const s=bl.get(r);s==null||s.delete(t),s!=null&&s.size||Yn==null||Yn.unobserve(r)})}}const Sl=new Set;let Ys;function kN(){Ys=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Sl.forEach(t=>t(e))},window.addEventListener("resize",Ys)}function TN(e){return Sl.add(e),Ys||kN(),()=>{Sl.delete(e),!Sl.size&&typeof Ys=="function"&&(window.removeEventListener("resize",Ys),Ys=void 0)}}function ry(e,t){return typeof e=="function"?TN(e):EN(e,t)}function CN(e){return Tp(e)&&e.tagName==="svg"}const PN=[...kS,Te,Jt],AN=e=>PN.find(ES(e)),sy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qs=()=>({x:sy(),y:sy()}),iy=()=>({min:0,max:0}),Re=()=>({x:iy(),y:iy()}),RN=new WeakMap;function Bc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qo(e){return typeof e=="string"||Array.isArray(e)}const Cp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pp=["initial",...Cp];function Vc(e){return Bc(e.animate)||Pp.some(t=>Qo(e[t]))}function IS(e){return!!(Vc(e)||e.variants)}function ON(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Ye(s))e.addValue(r,s);else if(Ye(i))e.addValue(r,Pi(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Pi(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ph={current:null},LS={current:!1},jN=typeof window<"u";function NN(){if(LS.current=!0,!!jN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ph.current=e.matches;e.addEventListener("change",t),t()}else Ph.current=!1}const oy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let oc={};function DS(e){oc=e}function IN(){return oc}class LN{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=vp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=et.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ce.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Vc(n),this.isVariantNode=IS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const y=h[f];c[f]!==void 0&&Ye(y)&&y.set(c[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,RN.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(LS.current||NN(),this.shouldReduceMotion=Ph.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Tr(this.notifyUpdate),Tr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&lN.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new mS({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Rt(u)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=$i.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in oc){const n=oc[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Re()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<oy.length;r++){const s=oy[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=ON(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Pi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Lb(r)||Mb(r))?r=parseFloat(r):!AN(r)&&Jt.test(n)&&(r=CS(t,n)),this.setBaseTarget(t,Ye(r)?r.get():r)),Ye(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=bp(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ye(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ap),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ep.render(this.render)}}class MS extends LN{constructor(){super(...arguments),this.KeyframeResolver=aN}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ye(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function $S({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function DN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function MN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Uu(e){return e===void 0||e===1}function Ah({scale:e,scaleX:t,scaleY:n}){return!Uu(e)||!Uu(t)||!Uu(n)}function Br(e){return Ah(e)||FS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function FS(e){return ay(e.x)||ay(e.y)}function ay(e){return e&&e!=="0%"}function ac(e,t,n){const r=e-n,s=t*r;return n+s}function ly(e,t,n,r,s){return s!==void 0&&(e=ac(e,s,r)),ac(e,n,r)+t}function Rh(e,t=0,n=1,r,s){e.min=ly(e.min,t,n,r,s),e.max=ly(e.max,t,n,r,s)}function US(e,{x:t,y:n}){Rh(e.x,t.translate,t.scale,t.originPoint),Rh(e.y,n.translate,n.scale,n.originPoint)}const cy=.999999999999,uy=1.0000000000001;function $N(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Xs(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,US(e,o)),r&&Br(i.latestValues)&&Xs(e,i.latestValues))}t.x<uy&&t.x>cy&&(t.x=1),t.y<uy&&t.y>cy&&(t.y=1)}function Js(e,t){e.min=e.min+t,e.max=e.max+t}function dy(e,t,n,r,s=.5){const i=ye(e.min,e.max,s);Rh(e,t,n,i,r)}function Xs(e,t){dy(e.x,t.x,t.scaleX,t.scale,t.originX),dy(e.y,t.y,t.scaleY,t.scale,t.originY)}function BS(e,t){return $S(MN(e.getBoundingClientRect(),t))}function FN(e,t,n){const r=BS(e,n),{scroll:s}=t;return s&&(Js(r.x,s.offset.x),Js(r.y,s.offset.y)),r}const UN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BN=Mi.length;function VN(e,t,n){let r="",s=!0;for(let i=0;i<BN;i++){const o=Mi[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=AS(a,_p[o]);if(!l){s=!1;const u=UN[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Ap(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if($i.has(l)){o=!0;continue}else if(Xb(l)){s[l]=c;continue}else{const u=AS(c,_p[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=VN(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function VS(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function hy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if($.test(e))e=parseFloat(e);else return e;const n=hy(e,t.target.x),r=hy(e,t.target.y);return`${n}% ${r}%`}},zN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Jt.parse(e);if(s.length>5)return r;const i=Jt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=ye(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},Oh={borderRadius:{...Xi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xi,borderTopRightRadius:Xi,borderBottomLeftRadius:Xi,borderBottomRightRadius:Xi,boxShadow:zN};function zS(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Oh[e]||e==="opacity")}function Rp(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Ye(r[a])||s&&Ye(s[a])||zS(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function WN(e){return window.getComputedStyle(e)}class HN extends MS{constructor(){super(...arguments),this.type="html",this.renderInstance=VS}readValueFromInstance(t,n){var r;if($i.has(n))return(r=this.projection)!=null&&r.isProjecting?yh(n):lj(t,n);{const s=WN(t),i=(Xb(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return BS(t,n)}build(t,n,r){Ap(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Rp(t,n,r)}}const KN={offset:"stroke-dashoffset",array:"stroke-dasharray"},qN={offset:"strokeDashoffset",array:"strokeDasharray"};function GN(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?KN:qN;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const YN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function WS(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(Ap(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const f of YN)d[f]!==void 0&&(h[f]=d[f],delete d[f]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&GN(d,s,i,o,!1)}const HS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),KS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function QN(e,t,n,r){VS(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(HS.has(s)?s:Sp(s),t.attrs[s])}function qS(e,t,n){const r=Rp(e,t,n);for(const s in e)if(Ye(e[s])||Ye(t[s])){const i=Mi.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class JN extends MS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Re}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=TS(n);return r&&r.default||0}return n=HS.has(n)?n:Sp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return qS(t,n,r)}build(t,n,r){WS(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){QN(t,n,r,s)}mount(t){this.isSVGTag=KS(t.tagName),super.mount(t)}}const XN=Pp.length;function GS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?GS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<XN;n++){const r=Pp[n],s=e.props[r];(Qo(s)||s===!1)&&(t[r]=s)}return t}function YS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ZN=[...Cp].reverse(),eI=Cp.length;function tI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Qj(e,n,r)))}function nI(e){let t=tI(e),n=fy(),r=!0;const s=l=>(c,u)=>{var h;const d=li(e,u,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(d){const{transition:f,transitionEnd:y,...g}=d;c={...c,...g,...y}}return c};function i(l){t=l(e)}function o(l){const{props:c}=e,u=GS(e.parent)||{},d=[],h=new Set;let f={},y=1/0;for(let x=0;x<eI;x++){const p=ZN[x],m=n[p],v=c[p]!==void 0?c[p]:u[p],S=Qo(v),_=p===l?m.isActive:null;_===!1&&(y=x);let E=v===u[p]&&v!==c[p]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),m.protectedKeys={...f},!m.isActive&&_===null||!v&&!m.prevProp||Bc(v)||typeof v=="boolean")continue;if(p==="exit"&&m.isActive&&_!==!0){m.prevResolvedValues&&(f={...f,...m.prevResolvedValues});continue}const k=rI(m.prevProp,v);let T=k||p===l&&m.isActive&&!E&&S||x>y&&S,R=!1;const j=Array.isArray(v)?v:[v];let B=j.reduce(s(p),{});_===!1&&(B={});const{prevResolvedValues:D={}}=m,Q={...D,...B},I=F=>{T=!0,h.has(F)&&(R=!0,h.delete(F)),m.needsAnimating[F]=!0;const C=e.getValue(F);C&&(C.liveStyle=!1)};for(const F in Q){const C=B[F],A=D[F];if(f.hasOwnProperty(F))continue;let L=!1;_h(C)&&_h(A)?L=!YS(C,A):L=C!==A,L?C!=null?I(F):h.add(F):C!==void 0&&h.has(F)?I(F):m.protectedKeys[F]=!0}m.prevProp=v,m.prevResolvedValues=B,m.isActive&&(f={...f,...B}),r&&e.blockInitialAnimation&&(T=!1);const J=E&&k;T&&(!J||R)&&d.push(...j.map(F=>{const C={type:p};if(typeof F=="string"&&r&&!J&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,L=li(A,F);if(A.enteringChildren&&L){const{delayChildren:K}=L.transition||{};C.delay=yS(A.enteringChildren,e,K)}}return{animation:F,options:C}}))}if(h.size){const x={};if(typeof c.initial!="boolean"){const p=li(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(x.transition=p.transition)}h.forEach(p=>{const m=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),x[p]=m??null}),d.push({animation:x})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(h=>{var f;return(f=h.animationState)==null?void 0:f.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=fy()}}}function rI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!YS(t,e):!1}function Dr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fy(){return{animate:Dr(!0),whileInView:Dr(),whileHover:Dr(),whileTap:Dr(),whileDrag:Dr(),whileFocus:Dr(),exit:Dr()}}function py(e,t){e.min=t.min,e.max=t.max}function $t(e,t){py(e.x,t.x),py(e.y,t.y)}function my(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const QS=1e-4,sI=1-QS,iI=1+QS,JS=.01,oI=0-JS,aI=0+JS;function tt(e){return e.max-e.min}function lI(e,t,n){return Math.abs(e-t)<=n}function gy(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=tt(n)/tt(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sI&&e.scale<=iI||isNaN(e.scale))&&(e.scale=1),(e.translate>=oI&&e.translate<=aI||isNaN(e.translate))&&(e.translate=0)}function xo(e,t,n,r){gy(e.x,t.x,n.x,r?r.originX:void 0),gy(e.y,t.y,n.y,r?r.originY:void 0)}function yy(e,t,n){e.min=n.min+t.min,e.max=e.min+tt(t)}function cI(e,t,n){yy(e.x,t.x,n.x),yy(e.y,t.y,n.y)}function vy(e,t,n){e.min=t.min-n.min,e.max=e.min+tt(t)}function lc(e,t,n){vy(e.x,t.x,n.x),vy(e.y,t.y,n.y)}function wy(e,t,n,r,s){return e-=t,e=ac(e,1/n,r),s!==void 0&&(e=ac(e,1/s,r)),e}function uI(e,t=0,n=1,r=.5,s,i=e,o=e){if(pn.test(t)&&(t=parseFloat(t),t=ye(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ye(i.min,i.max,r);e===i&&(a-=t),e.min=wy(e.min,t,n,a,s),e.max=wy(e.max,t,n,a,s)}function xy(e,t,[n,r,s],i,o){uI(e,t[n],t[r],t[s],t.scale,i,o)}const dI=["x","scaleX","originX"],hI=["y","scaleY","originY"];function by(e,t,n,r){xy(e.x,t,dI,n?n.x:void 0,r?r.x:void 0),xy(e.y,t,hI,n?n.y:void 0,r?r.y:void 0)}function Sy(e){return e.translate===0&&e.scale===1}function XS(e){return Sy(e.x)&&Sy(e.y)}function _y(e,t){return e.min===t.min&&e.max===t.max}function fI(e,t){return _y(e.x,t.x)&&_y(e.y,t.y)}function Ey(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ZS(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function ky(e){return tt(e.x)/tt(e.y)}function Ty(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function sn(e){return[e("x"),e("y")]}function pI(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const e1=["TopLeft","TopRight","BottomLeft","BottomRight"],mI=e1.length,Cy=e=>typeof e=="string"?parseFloat(e):e,Py=e=>typeof e=="number"||$.test(e);function gI(e,t,n,r,s,i){s?(e.opacity=ye(0,n.opacity??1,yI(r)),e.opacityExit=ye(t.opacity??1,0,vI(r))):i&&(e.opacity=ye(t.opacity??1,n.opacity??1,r));for(let o=0;o<mI;o++){const a=`border${e1[o]}Radius`;let l=Ay(t,a),c=Ay(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Py(l)===Py(c)?(e[a]=Math.max(ye(Cy(l),Cy(c),r),0),(pn.test(c)||pn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function Ay(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yI=t1(0,.5,Kb),vI=t1(.5,.95,At);function t1(e,t,n){return r=>r<e?0:r>t?1:n(qo(e,t,r))}function wI(e,t,n){const r=Ye(e)?e:Pi(e);return r.start(xp("",r,t,n)),r.animation}function Jo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const xI=(e,t)=>e.depth-t.depth;class bI{constructor(){this.children=[],this.isDirty=!1}add(t){op(this.children,t),this.isDirty=!0}remove(t){nc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xI),this.isDirty=!1,this.children.forEach(t)}}function SI(e,t){const n=et.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Tr(r),e(i-t))};return ce.setup(r,!0),()=>Tr(r)}function _l(e){return Ye(e)?e.get():e}class _I{constructor(){this.members=[]}add(t){op(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;s&&s.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&nc(this.members,r)}t.scheduleRender()}remove(t){if(nc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s],o=i.instance;if(i.isPresent!==!1&&(!o||o.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const s=r.options.layoutDependency,i=t.options.layoutDependency;if(!(s!==void 0&&i!==void 0&&s===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const El={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bu=["","X","Y","Z"],EI=1e3;let kI=0;function Vu(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function n1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=SS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ce,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&n1(r)}function r1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kI++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(PI),this.nodes.forEach(jI),this.nodes.forEach(NI),this.nodes.forEach(AI)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new bI)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ap),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Tp(o)&&!CN(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;ce.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=SI(h,250),El.hasAnimatedSinceResize&&(El.hasAnimatedSinceResize=!1,this.nodes.forEach(jy)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||$I,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),p=!this.targetLayout||!ZS(this.targetLayout,f),m=!d&&h;if(this.options.layoutRoot||this.resumeFrom||m||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...wp(y,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,m)}else d||jy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Tr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(II),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&n1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ry);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Oy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(OI),this.nodes.forEach(TI),this.nodes.forEach(CI)):this.nodes.forEach(Oy),this.clearAllSnapshots();const a=et.now();Ue.delta=gn(0,1e3/60,a-Ue.timestamp),Ue.timestamp=a,Ue.isProcessing=!0,Nu.update.process(Ue),Nu.preRender.process(Ue),Nu.render.process(Ue),Ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ep.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(RI),this.sharedNodes.forEach(LI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tt(this.snapshot.measuredBox.x)&&!tt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Re(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!XS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Br(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),FI(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Re();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(UI))){const{scroll:u}=this.root;u&&(Js(a.x,u.offset.x),Js(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Re();if($t(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&$t(a,o),Js(a.x,d.offset.x),Js(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Re();$t(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Xs(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Br(u.latestValues)&&Xs(l,u.latestValues)}return Br(this.latestValues)&&Xs(l,this.latestValues),l}removeTransform(o){const a=Re();$t(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Br(c.latestValues))continue;Ah(c.latestValues)&&c.updateSnapshot();const u=Re(),d=c.measurePageBox();$t(u,d),by(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Br(this.latestValues)&&by(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ue.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Ue.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Re(),this.targetWithTransforms=Re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cI(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),US(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ah(this.parent.latestValues)||FS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Re(),this.relativeTargetOrigin=Re(),lc(this.relativeTargetOrigin,a,l),$t(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ue.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;$t(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;$N(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Re());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(my(this.prevProjectionDelta.x,this.projectionDelta.x),my(this.prevProjectionDelta.y,this.projectionDelta.y)),xo(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Ty(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ty(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qs(),this.projectionDelta=Qs(),this.projectionDeltaWithTransform=Qs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Qs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Re(),f=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=f!==y,x=this.getStack(),p=!x||x.members.length<=1,m=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(MI));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const _=S/1e3;Ny(d.x,o.x,_),Ny(d.y,o.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lc(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),DI(this.relativeTarget,this.relativeTargetOrigin,h,_),v&&fI(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Re()),$t(v,this.relativeTarget)),g&&(this.animationValues=u,gI(u,c,this.latestValues,_,m,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Tr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ce.update(()=>{El.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pi(0)),this.motionValue.jump(0,!1),this.currentAnimation=wI(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(EI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&s1(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Re();const d=tt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=tt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}$t(a,l),Xs(a,u),xo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new _I),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Vu("z",o,c,this.animationValues);for(let u=0;u<Bu.length;u++)Vu(`rotate${Bu[u]}`,o,c,this.animationValues),Vu(`skew${Bu[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=_l(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=_l(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Br(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=pI(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:f}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in Oh){if(u[y]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:p}=Oh[y],m=d==="none"?u[y]:g(u[y],c);if(x){const v=x.length;for(let S=0;S<v;S++)o[x[S]]=m}else p?this.options.visualElement.renderState.vars[y]=m:o[y]=m}this.options.layoutId&&(o.pointerEvents=c===this?_l(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ry),this.root.sharedNodes.clear()}}}function TI(e){e.updateLayout()}function CI(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?sn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=tt(h);h.min=r[d].min,h.max=h.min+f}):s1(i,t.layoutBox,r)&&sn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=tt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Qs();xo(a,r,t.layoutBox);const l=Qs();o?xo(l,e.applyTransform(s,!0),t.measuredBox):xo(l,r,t.layoutBox);const c=!XS(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const y=Re();lc(y,t.layoutBox,h.layoutBox);const g=Re();lc(g,r,f.layoutBox),ZS(y,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function PI(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function AI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function RI(e){e.clearSnapshot()}function Ry(e){e.clearMeasurements()}function Oy(e){e.isLayoutDirty=!1}function OI(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jI(e){e.resolveTargetDelta()}function NI(e){e.calcProjection()}function II(e){e.resetSkewAndRotation()}function LI(e){e.removeLeadSnapshot()}function Ny(e,t,n){e.translate=ye(t.translate,0,n),e.scale=ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Iy(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function DI(e,t,n,r){Iy(e.x,t.x,n.x,r),Iy(e.y,t.y,n.y,r)}function MI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $I={duration:.45,ease:[.4,0,.1,1]},Ly=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Dy=Ly("applewebkit/")&&!Ly("chrome/")?Math.round:At;function My(e){e.min=Dy(e.min),e.max=Dy(e.max)}function FI(e){My(e.x),My(e.y)}function s1(e,t,n){return e==="position"||e==="preserve-aspect"&&!lI(ky(t),ky(n),.2)}function UI(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const BI=r1({attachResizeListener:(e,t)=>Jo(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),zu={current:void 0},i1=r1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zu.current){const e=new BI({});e.mount(window),e.setOptions({layoutScroll:!0}),zu.current=e}return zu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),o1=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function VI(e=!0){const t=b.useContext(ip);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=b.useId();b.useEffect(()=>{if(e)return s(i)},[e]);const o=b.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const a1=b.createContext({strict:!1}),$y={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Fy=!1;function zI(){if(Fy)return;const e={};for(const t in $y)e[t]={isEnabled:n=>$y[t].some(r=>!!n[r])};DS(e),Fy=!0}function l1(){return zI(),IN()}function WI(e){const t=l1();for(const n in e)t[n]={...t[n],...e[n]};DS(t)}const HI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function cc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||HI.has(e)}let c1=e=>!cc(e);function KI(e){typeof e=="function"&&(c1=t=>t.startsWith("on")?!cc(t):e(t))}try{KI(require("@emotion/is-prop-valid").default)}catch{}function qI(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(c1(s)||n===!0&&cc(s)||!t&&!cc(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const zc=b.createContext({});function GI(e,t){if(Vc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Qo(n)?n:void 0,animate:Qo(r)?r:void 0}}return e.inherit!==!1?t:{}}function YI(e){const{initial:t,animate:n}=GI(e,b.useContext(zc));return b.useMemo(()=>({initial:t,animate:n}),[Uy(t),Uy(n)])}function Uy(e){return Array.isArray(e)?e.join(" "):e}const Op=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function u1(e,t,n){for(const r in t)!Ye(t[r])&&!zS(r,n)&&(e[r]=t[r])}function QI({transformTemplate:e},t){return b.useMemo(()=>{const n=Op();return Ap(n,t,e),Object.assign({},n.vars,n.style)},[t])}function JI(e,t){const n=e.style||{},r={};return u1(r,n,e),Object.assign(r,QI(e,t)),r}function XI(e,t){const n={},r=JI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const d1=()=>({...Op(),attrs:{}});function ZI(e,t,n,r){const s=b.useMemo(()=>{const i=d1();return WS(i,t,KS(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};u1(i,e.style,e),s.style={...i,...s.style}}return s}const e2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function jp(e){return typeof e!="string"||e.includes("-")?!1:!!(e2.indexOf(e)>-1||/[A-Z]/u.test(e))}function t2(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??jp(e)?ZI:XI)(t,r,s,e),c=qI(t,typeof e=="string",i),u=e!==b.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=b.useMemo(()=>Ye(d)?d.get():d,[d]);return b.createElement(e,{...u,children:h})}function n2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:r2(n,r,s,e),renderState:t()}}function r2(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=_l(i[h]);let{initial:o,animate:a}=e;const l=Vc(e),c=IS(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Bc(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const y=bp(e,h[f]);if(y){const{transitionEnd:g,transition:x,...p}=y;for(const m in p){let v=p[m];if(Array.isArray(v)){const S=u?v.length-1:0;v=v[S]}v!==null&&(s[m]=v)}for(const m in g)s[m]=g[m]}}}return s}const h1=e=>(t,n)=>{const r=b.useContext(zc),s=b.useContext(ip),i=()=>n2(e,t,r,s);return n?i():iO(i)},s2=h1({scrapeMotionValuesFromProps:Rp,createRenderState:Op}),i2=h1({scrapeMotionValuesFromProps:qS,createRenderState:d1}),o2=Symbol.for("motionComponentSymbol");function a2(e,t,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i)),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const f1=b.createContext({});function js(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function l2(e,t,n,r,s,i){var v,S;const{visualElement:o}=b.useContext(zc),a=b.useContext(a1),l=b.useContext(ip),c=b.useContext(o1),u=c.reducedMotion,d=c.skipAnimations,h=b.useRef(null),f=b.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const y=h.current,g=b.useContext(f1);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&c2(h.current,n,s,g);const x=b.useRef(!1);b.useInsertionEffect(()=>{y&&x.current&&y.update(n,l)});const p=n[bS],m=b.useRef(!!p&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,p)));return oO(()=>{f.current=!0,y&&(x.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),m.current&&y.animationState&&y.animationState.animateChanges())}),b.useEffect(()=>{y&&(!m.current&&y.animationState&&y.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,p)}),m.current=!1),y.enteringChildren=void 0)}),y}function c2(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:p1(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&js(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function p1(e){if(e)return e.options.allowProjection!==!1?e.projection:p1(e.parent)}function Wu(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&WI(r);const i=n?n==="svg":jp(e),o=i?i2:s2;function a(c,u){let d;const h={...b.useContext(o1),...c,layoutId:u2(c)},{isStatic:f}=h,y=YI(c),g=o(c,f);if(!f&&Ib){d2();const x=h2(h);d=x.MeasureLayout,y.visualElement=l2(e,g,h,s,x.ProjectionNode,i)}return w.jsxs(zc.Provider,{value:y,children:[d&&y.visualElement?w.jsx(d,{visualElement:y.visualElement,...h}):null,t2(e,c,a2(g,y.visualElement,u),g,f,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=b.forwardRef(a);return l[o2]=e,l}function u2({layoutId:e}){const t=b.useContext(Nb).id;return t&&e!==void 0?t+"-"+e:e}function d2(e,t){b.useContext(a1).strict}function h2(e){const t=l1(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function f2(e,t){if(typeof Proxy>"u")return Wu;const n=new Map,r=(i,o)=>Wu(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Wu(o,void 0,e,t)),n.get(o))})}const p2=(e,t)=>t.isSVG??jp(e)?new JN(t):new HN(t,{allowProjection:e!==b.Fragment});class m2 extends jr{constructor(t){super(t),t.animationState||(t.animationState=nI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let g2=0;class y2 extends jr{constructor(){super(...arguments),this.id=g2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const v2={animation:{Feature:m2},exit:{Feature:y2}};function wa(e){return{point:{x:e.pageX,y:e.pageY}}}const w2=e=>t=>kp(t)&&e(t,wa(t));function bo(e,t,n,r){return Jo(e,t,w2(n),r)}const m1=({current:e})=>e?e.ownerDocument.defaultView:null,By=(e,t)=>Math.abs(e-t);function x2(e,t){const n=By(e.x,t.x),r=By(e.y,t.y);return Math.sqrt(n**2+r**2)}const Vy=new Set(["auto","scroll"]);class g1{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Ku(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,g=x2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!g)return;const{point:x}=f,{timestamp:p}=Ue;this.history.push({...x,timestamp:p});const{onStart:m,onMove:v}=this.handlers;y||(m&&m(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,y)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Hu(y,this.transformPagePoint),ce.update(this.updatePoint,!0)},this.handlePointerUp=(f,y)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:p}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Ku(f.type==="pointercancel"?this.lastMoveEventInfo:Hu(y,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,m),x&&x(f,m)},!kp(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=wa(t),c=Hu(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Ue;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Ku(c,this.history)),this.removeListeners=ga(bo(this.contextWindow,"pointermove",this.handlePointerMove),bo(this.contextWindow,"pointerup",this.handlePointerUp),bo(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Vy.has(r.overflowX)||Vy.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ce.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Tr(this.updatePoint)}}function Hu(e,t){return t?{point:t(e.point)}:e}function zy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ku({point:e},t){return{point:e,delta:zy(e,y1(t)),offset:zy(e,b2(t)),velocity:S2(t,.1)}}function b2(e){return e[0]}function y1(e){return e[e.length-1]}function S2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=y1(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Rt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Rt(t)*2&&(r=e[1]);const i=Ct(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function _2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Wy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function E2(e,{top:t,left:n,bottom:r,right:s}){return{x:Wy(e.x,n,s),y:Wy(e.y,t,r)}}function Hy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function k2(e,t){return{x:Hy(e.x,t.x),y:Hy(e.y,t.y)}}function T2(e,t){let n=.5;const r=tt(e),s=tt(t);return s>r?n=qo(t.min,t.max-r,e.min):r>s&&(n=qo(e.min,e.max-s,t.min)),gn(0,1,n)}function C2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jh=.35;function P2(e=jh){return e===!1?e=0:e===!0&&(e=jh),{x:Ky(e,"left","right"),y:Ky(e,"top","bottom")}}function Ky(e,t,n){return{min:qy(e,t),max:qy(e,n)}}function qy(e,t){return typeof e=="number"?e:e[t]||0}const A2=new WeakMap;class R2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Re(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(wa(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:y,onDragStart:g}=this.getProps();if(f&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uN(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(p=>{let m=this.getAxisMotionValue(p).get()||0;if(pn.test(m)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[p];S&&(m=tt(S)*(parseFloat(m)/100))}}this.originPoint[p]=m}),g&&ce.update(()=>g(d,h),!1,!0),Eh(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:y,onDirectionLock:g,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:p}=h;if(y&&this.currentDirection===null){this.currentDirection=j2(p),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),x&&ce.update(()=>x(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new g1(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:m1(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ce.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Qa(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=_2(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&js(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=E2(r.layoutBox,t):this.constraints=!1,this.elastic=P2(n),s!==this.constraints&&!js(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&sn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=C2(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!js(t))return!1;const r=t.current;Ci(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=FN(r,s.root,this.visualElement.getTransformPagePoint());let o=k2(s.layout.layoutBox,i);if(n){const a=n(DN(o));this.hasMutatedConstraints=!!a,a&&(o=$S(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=sn(u=>{if(!Qa(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Eh(this.visualElement,t),r.start(xp(t,r,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){sn(n=>{const{drag:r}=this.getProps();if(!Qa(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ye(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!js(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};sn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=T2({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),sn(o=>{if(!Qa(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ye(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;A2.set(this.visualElement,this);const t=this.visualElement.current,n=bo(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,f=h!==t&&gN(h);u&&d&&!f&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();js(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=O2(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ce.read(s);const a=Jo(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(sn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=jh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Gy(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function O2(e,t,n){const r=ry(e,Gy(n)),s=ry(t,Gy(n));return()=>{r(),s()}}function Qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function j2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class N2 extends jr{constructor(t){super(t),this.removeGroupControls=At,this.removeListeners=At,this.controls=new R2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||At}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const qu=e=>(t,n)=>{e&&ce.update(()=>e(t,n),!1,!0)};class I2 extends jr{constructor(){super(...arguments),this.removePointerDownListener=At}onPointerDown(t){this.session=new g1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:m1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:qu(t),onStart:qu(n),onMove:qu(r),onEnd:(i,o)=>{delete this.session,s&&ce.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=bo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Gu=!1;class L2 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Gu&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),El.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Gu=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ce.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ep.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Gu=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function v1(e){const[t,n]=VI(),r=b.useContext(Nb);return w.jsx(L2,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(f1),isPresent:t,safeToRemove:n})}const D2={pan:{Feature:I2},drag:{Feature:N2,ProjectionNode:i1,MeasureLayout:v1}};function Yy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ce.postRender(()=>i(t,wa(t)))}class M2 extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=hN(t,(n,r)=>(Yy(this.node,r,"Start"),s=>Yy(this.node,s,"End"))))}unmount(){}}class $2 extends jr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ga(Jo(this.node.current,"focus",()=>this.onFocus()),Jo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Qy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ce.postRender(()=>i(t,wa(t)))}class F2 extends jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=vN(t,(s,i)=>(Qy(this.node,i,"Start"),(o,{success:a})=>Qy(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Nh=new WeakMap,Yu=new WeakMap,U2=e=>{const t=Nh.get(e.target);t&&t(e)},B2=e=>{e.forEach(U2)};function V2({root:e,...t}){const n=e||document;Yu.has(n)||Yu.set(n,{});const r=Yu.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(B2,{root:e,...t})),r[s]}function z2(e,t,n){const r=V2(t);return Nh.set(e,n),r.observe(e),()=>{Nh.delete(e),r.unobserve(e)}}const W2={some:0,all:1};class H2 extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:W2[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return z2(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(K2(t,n))&&this.startObserver()}unmount(){}}function K2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q2={inView:{Feature:H2},tap:{Feature:F2},focus:{Feature:$2},hover:{Feature:M2}},G2={layout:{ProjectionNode:i1,MeasureLayout:v1}},Y2={...v2,...q2,...D2,...G2},re=f2(Y2,p2),Jy=[{label:"Home",href:"/"},{label:"About",href:"/about"},{label:"Blog",href:"/blog"},{label:"Domains",href:"/domains"},{label:"Contact",href:"/contact"}],fs=()=>{const[e,t]=b.useState(!1),n=Or();return w.jsxs(re.header,{initial:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5},className:"fixed top-0 left-0 right-0 z-50 bg-background/90 backdrop-blur-sm border-b border-border",children:[w.jsxs("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex items-center justify-between",children:[w.jsxs(is,{to:"/",className:"flex items-center gap-2",children:[w.jsx("span",{className:"font-serif text-2xl tracking-tight text-foreground",children:"Hasan Saleem"}),w.jsx("span",{className:"w-2 h-2 rounded-full bg-primary inline-block"})]}),w.jsx("ul",{className:"hidden md:flex items-center gap-8",children:Jy.map(r=>w.jsx("li",{children:w.jsx(is,{to:r.href,className:`text-sm font-medium transition-colors relative ${n.pathname===r.href?"text-foreground after:absolute after:-bottom-1 after:left-0 after:w-full after:h-[2px] after:bg-primary":"text-muted-foreground hover:text-foreground"}`,children:r.label})},r.label))}),w.jsx("button",{onClick:()=>t(!e),className:"md:hidden text-foreground","aria-label":"Toggle menu",children:e?w.jsx(Px,{size:24}):w.jsx(CT,{size:24})})]}),e&&w.jsx(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"md:hidden bg-background border-t border-border px-6 py-6",children:w.jsx("ul",{className:"flex flex-col gap-5",children:Jy.map(r=>w.jsx("li",{children:w.jsx(is,{to:r.href,onClick:()=>t(!1),className:"text-lg font-serif text-foreground hover:text-primary transition-colors",children:r.label})},r.label))})})]})},Q2=()=>w.jsxs("section",{className:"relative min-h-[75vh] flex items-end pb-12 overflow-hidden",children:[w.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 select-none pointer-events-none",children:w.jsx("span",{className:"font-serif text-[20vw] leading-none text-foreground/[0.03] italic whitespace-nowrap",children:"Saleem"})}),w.jsx("div",{className:"relative z-10 section-container w-full",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 items-end",children:[w.jsxs("div",{className:"lg:col-span-8",children:[w.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:"flex items-center gap-3 mb-8",children:[w.jsx("div",{className:"editorial-rule"}),w.jsx("span",{className:"editorial-label",children:"AI SEO Pioneer"})]}),w.jsxs(re.h1,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.3,duration:.8},className:"font-serif text-6xl sm:text-8xl lg:text-[7rem] xl:text-[8.5rem] leading-[0.9] text-foreground mb-8",children:["Hasan",w.jsx("br",{}),w.jsx("span",{className:"italic text-primary",children:"Saleem"})]}),w.jsx(re.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"max-w-lg text-lg text-muted-foreground leading-relaxed mb-10",children:"Helping brands navigate the zero-click era through tactical AI integration, entity-based SEO, and Answer Engine Optimization."}),w.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8},className:"flex flex-wrap items-center gap-4",children:[w.jsxs(is,{to:"/about",className:"group inline-flex items-center gap-3 px-8 py-4 bg-foreground text-background font-medium text-sm hover:bg-primary transition-colors",children:["Learn More",w.jsx(Wf,{size:16,className:"group-hover:translate-x-1 transition-transform"})]}),w.jsx("a",{href:"#contact",className:"inline-flex items-center gap-2 px-8 py-4 border-2 border-foreground text-foreground font-medium text-sm hover:bg-foreground hover:text-background transition-colors",children:"Get in Touch"})]})]}),w.jsx(re.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{delay:.9},className:"lg:col-span-4 border-l-2 border-foreground pl-8 space-y-8 hidden lg:block",children:[{number:"18+",label:"Years in Digital Strategy"},{number:"100M+",label:"Impressions Generated"},{number:"100+",label:"Clients Served"}].map(e=>w.jsxs("div",{children:[w.jsx("p",{className:"font-serif text-4xl text-primary italic",children:e.number}),w.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e.label})]},e.label))})]})})]}),J2=[{name:"Forbes",url:"https://www.forbes.com/councils/forbesagencycouncil/people/hasansaleem/"},{name:"Entrepreneur",url:"https://www.entrepreneur.com/author/hasan-saleem"},{name:"Fast Company",url:"https://www.fastcompany.com/user/hasan-saleem"},{name:"Benzinga",url:"https://www.benzinga.com/author/hasan-saleem"}],X2=()=>w.jsx("section",{className:"border-y border-border",children:w.jsx("div",{className:"section-container py-16",children:w.jsxs(re.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},className:"flex flex-col md:flex-row items-center gap-8 md:gap-16",children:[w.jsx("p",{className:"text-xs font-medium tracking-[0.25em] uppercase text-muted-foreground whitespace-nowrap",children:"As Featured In"}),w.jsx("div",{className:"w-px h-8 bg-border hidden md:block"}),w.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 md:gap-14",children:J2.map((e,t)=>w.jsx(re.a,{href:e.url,target:"_blank",rel:"me noopener noreferrer",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.08},className:"text-2xl md:text-3xl font-serif italic text-foreground/30 hover:text-primary transition-colors duration-300",children:e.name},e.name))})]})})}),Z2=[{icon:bT,title:"AI SEO",description:"Leveraging artificial intelligence to dominate search rankings and drive organic traffic at scale.",number:"01"},{icon:kx,title:"Answer Engine Optimization",description:"Positioning brands as the definitive answer in AI-powered search results and zero-click environments.",number:"02"},{icon:RT,title:"Entity-Based SEO",description:"Building authoritative digital entities that search engines recognize, trust, and surface prominently.",number:"03"},{icon:ST,title:"Growth Frameworks",description:"Scalable, data-driven strategies that compound organic visibility and revenue over time.",number:"04"}],eL=()=>w.jsxs("section",{className:"section-container",children:[w.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"flex flex-col md:flex-row md:items-end justify-between gap-6 mb-16",children:[w.jsxs("div",{children:[w.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[w.jsx("div",{className:"editorial-rule"}),w.jsx("span",{className:"editorial-label",children:"What I Do"})]}),w.jsxs("h2",{className:"font-serif text-5xl md:text-6xl lg:text-7xl text-foreground leading-[0.95]",children:["Core",w.jsx("br",{}),w.jsx("span",{className:"italic text-primary",children:"Expertise"})]})]}),w.jsx("p",{className:"text-muted-foreground max-w-sm text-sm leading-relaxed md:pb-2",children:"Specialized in the convergence of AI and search, transforming how brands are discovered online."})]}),w.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-0 border border-border",children:Z2.map((e,t)=>{const n=e.icon;return w.jsxs(re.article,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.1},className:"p-10 border border-border group hover:bg-card transition-colors relative",children:[w.jsxs("div",{className:"flex items-start justify-between mb-6",children:[w.jsx(n,{size:28,className:"text-primary"}),w.jsx("span",{className:"font-serif text-5xl text-foreground/[0.06] italic leading-none",children:e.number})]}),w.jsx("h3",{className:"font-serif text-2xl md:text-3xl text-foreground mb-3 group-hover:text-primary transition-colors",children:e.title}),w.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.description})]},e.title)})})]}),tL=[{year:"2005",title:"MBA Completed",description:"University of Management and Technology — Marketing & Management",icon:kT},{year:"2007",title:"Founded DirJournal",description:"Launched DirJournal, building the foundation for a portfolio of high-traffic digital properties.",icon:_x},{year:"2010",title:"Scaling Digital Properties",description:"Scaled multiple high-traffic digital properties including DSS Media and NAP.biz to millions of users.",icon:AT},{year:"2023",title:"AI SEO Pioneer",description:"Pioneering Answer Engine Optimization (AEO) and AI-driven search frameworks for the zero-click era.",icon:Tx}],nL=()=>w.jsx("section",{className:"bg-foreground text-background",children:w.jsxs("div",{className:"section-container",children:[w.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mb-16",children:[w.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[w.jsx("div",{className:"w-16 h-[3px] bg-primary"}),w.jsx("span",{className:"text-xs font-medium tracking-[0.25em] uppercase text-primary",children:"Career Arc"})]}),w.jsxs("h2",{className:"font-serif text-5xl md:text-6xl lg:text-7xl leading-[0.95]",children:["The ",w.jsx("span",{className:"italic text-primary",children:"Journey"})]})]}),w.jsx("div",{className:"space-y-0 border-l-2 border-primary/30 ml-4",children:tL.map((e,t)=>{const n=e.icon;return w.jsxs(re.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:t*.1},className:"relative pl-12 pb-16 last:pb-0",children:[w.jsx("div",{className:"absolute left-0 top-1 w-3 h-3 rounded-full bg-primary -translate-x-[7px]"}),w.jsxs("div",{className:"flex items-baseline gap-4 mb-2",children:[w.jsx("span",{className:"font-serif text-4xl italic text-primary",children:e.year}),w.jsx(n,{size:18,className:"text-primary/60"})]}),w.jsx("h3",{className:"font-serif text-2xl mb-2",children:e.title}),w.jsx("p",{className:"text-sm text-background/60 max-w-md leading-relaxed",children:e.description})]},e.year)})})]})});function Wc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function rL(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const sL=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Np extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class iL extends Np{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Xy extends Np{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Zy extends Np{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ih;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ih||(Ih={}));class oL{constructor(t,{headers:n={},customFetch:r,region:s=Ih.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=sL(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return rL(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=r;let h={},{region:f}=r;f||(f=this.region);const y=new URL(`${this.url}/${n}`);f&&f!=="any"&&(h["x-region"]=f,y.searchParams.set("forceFunctionRegion",f));let g;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",g=c):typeof c=="string"?(h["Content-Type"]="text/plain",g=c):typeof FormData<"u"&&c instanceof FormData?g=c:(h["Content-Type"]="application/json",g=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?g=JSON.stringify(c):g=c;let x=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(x=o.signal,u.addEventListener("abort",()=>o.abort())):x=o.signal);const p=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:g,signal:x}).catch(_=>{throw new iL(_)}),m=p.headers.get("x-relay-error");if(m&&m==="true")throw new Xy(p);if(!p.ok)throw new Zy(p);let v=((s=p.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return v==="application/json"?S=yield p.json():v==="application/octet-stream"||v==="application/pdf"?S=yield p.blob():v==="text/event-stream"?S=p:v==="multipart/form-data"?S=yield p.formData():S=yield p.text(),{data:S,error:null,response:p}}catch(a){return{data:null,error:a,response:a instanceof Zy||a instanceof Xy?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var aL=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},lL=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,c=i.status,u=i.statusText;if(i.ok){var d,h;if(n.method!=="HEAD"){var f;const p=await i.text();p===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((f=n.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?a=p:a=JSON.parse(p))}const g=(d=n.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),x=(h=i.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");g&&x&&x.length>1&&(l=parseInt(x[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var y;const g=await i.text();try{o=JSON.parse(g),Array.isArray(o)&&i.status===404&&(a=[],o=null,c=200,u="OK")}catch{i.status===404&&g===""?(c=204,u="No Content"):o={message:g}}if(o&&n.isMaybeSingle&&(!(o==null||(y=o.details)===null||y===void 0)&&y.includes("0 rows"))&&(o=null,c=200,u="OK"),o&&n.shouldThrowOnError)throw new aL(o)}return{error:o,data:a,count:l,status:c,statusText:u}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",c="";const u=i==null?void 0:i.cause;if(u){var d,h,f,y;const p=(d=u==null?void 0:u.message)!==null&&d!==void 0?d:"",m=(h=u==null?void 0:u.code)!==null&&h!==void 0?h:"";a=`${(f=i==null?void 0:i.name)!==null&&f!==void 0?f:"FetchError"}: ${i==null?void 0:i.message}`,a+=`

Caused by: ${(y=u==null?void 0:u.name)!==null&&y!==void 0?y:"Error"}: ${p}`,m&&(a+=` (${m})`),u!=null&&u.stack&&(a+=`
${u.stack}`)}else{var g;a=(g=i==null?void 0:i.stack)!==null&&g!==void 0?g:""}const x=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${x} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((u==null?void 0:u.name)==="HeadersOverflowError"||(u==null?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(l+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:c},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},cL=class extends lL{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const ev=new RegExp("[,()]");var Ns=class extends cL{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&ev.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&ev.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},uL=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new Ns({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Ns({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new Ns({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Ns({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Ns({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Xo(e){"@babel/helpers - typeof";return Xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(e)}function dL(e,t){if(Xo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hL(e){var t=dL(e,"string");return Xo(t)=="symbol"?t:t+""}function fL(e,t,n){return(t=hL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tv(Object(n),!0).forEach(function(r){fL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var pL=class w1{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,c)=>{const u=new AbortController,d=setTimeout(()=>u.abort(),i),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(d),a(l,c);const f=()=>{clearTimeout(d),u.abort()};return h.addEventListener("abort",f,{once:!0}),a(l,Ja(Ja({},c),{},{signal:u.signal})).finally(()=>{clearTimeout(d),h.removeEventListener("abort",f)})}return a(l,Ja(Ja({},c),{},{signal:u.signal})).finally(()=>clearTimeout(d))}:this.fetch=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new uL(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new w1(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),d=r&&Object.values(n).some(u);d?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,y])=>y!==void 0).map(([f,y])=>[f,Array.isArray(y)?`{${y.join(",")}}`:`${y}`]).forEach(([f,y])=>{l.searchParams.append(f,y)})):(a="POST",c=n);const h=new Headers(this.headers);return d?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new Ns({method:a,url:l,headers:h,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class mL{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
import ws from "ws"
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`

Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const gL="2.97.0",yL=`realtime-js/${gL}`,vL="1.0.0",x1="2.0.0",nv=x1,Lh=1e4,wL=1e3,xL=100;var Xn;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Xn||(Xn={}));var Ae;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ae||(Ae={}));var qt;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(qt||(qt={}));var Dh;(function(e){e.websocket="websocket"})(Dh||(Dh={}));var zr;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(zr||(zr={}));class bL{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,f=new ArrayBuffer(this.HEADER_LENGTH+h);let y=new DataView(f),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,o.length),y.setUint8(g++,c.length),y.setUint8(g++,d.length),y.setUint8(g++,n),Array.from(l,p=>y.setUint8(g++,p.charCodeAt(0))),Array.from(a,p=>y.setUint8(g++,p.charCodeAt(0))),Array.from(o,p=>y.setUint8(g++,p.charCodeAt(0))),Array.from(c,p=>y.setUint8(g++,p.charCodeAt(0))),Array.from(d,p=>y.setUint8(g++,p.charCodeAt(0)));var x=new Uint8Array(f.byteLength+r.byteLength);return x.set(new Uint8Array(f),0),x.set(new Uint8Array(r),f.byteLength),x.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,y={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class b1{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var ae;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ae||(ae={}));const rv=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=SL(o,e,t,s),i),{}):{}},SL=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?S1(i,o):Mh(o)},S1=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return TL(t,n)}switch(e){case ae.bool:return _L(t);case ae.float4:case ae.float8:case ae.int2:case ae.int4:case ae.int8:case ae.numeric:case ae.oid:return EL(t);case ae.json:case ae.jsonb:return kL(t);case ae.timestamp:return CL(t);case ae.abstime:case ae.date:case ae.daterange:case ae.int4range:case ae.int8range:case ae.money:case ae.reltime:case ae.text:case ae.time:case ae.timestamptz:case ae.timetz:case ae.tsrange:case ae.tstzrange:return Mh(t);default:return Mh(t)}},Mh=e=>e,_L=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},EL=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},kL=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},TL=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>S1(t,a))}return e},CL=e=>typeof e=="string"?e.replace(" ","T"):e,_1=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Qu{constructor(t,n,r={},s=Lh){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var sv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(sv||(sv={}));class So{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=So.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=So.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=So.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const i=this.cloneDeep(t),o=this.transformState(n),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 h=u.map(x=>x.presence_ref),f=d.map(x=>x.presence_ref),y=u.filter(x=>f.indexOf(x.presence_ref)<0),g=d.filter(x=>h.indexOf(x.presence_ref)<0);y.length>0&&(a[c]=y),g.length>0&&(l[c]=g)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),u.length>0){const d=t[a].map(f=>f.presence_ref),h=u.filter(f=>d.indexOf(f.presence_ref)<0);t[a].unshift(...h)}r(a,u,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;const u=l.map(d=>d.presence_ref);c=c.filter(d=>u.indexOf(d.presence_ref)<0),t[a]=c,s(a,c,l),c.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var iv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(iv||(iv={}));var _o;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(_o||(_o={}));var bn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(bn||(bn={}));class Zs{constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Ae.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Qu(this,qt.join,this.params,this.timeout),this.rejoinTimer=new b1(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ae.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ae.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ae.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ae.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ae.errored,this.rejoinTimer.scheduleTimeout())}),this._on(qt.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new So(this),this.broadcastEndpointURL=_1(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Ae.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[_o.PRESENCE]&&this.bindings[_o.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(f=>t==null?void 0:t(bn.CHANNEL_ERROR,f)),this._onClose(()=>t==null?void 0:t(bn.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:f})=>{var y;if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(bn.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,x=(y=g==null?void 0:g.length)!==null&&y!==void 0?y:0,p=[];for(let m=0;m<x;m++){const v=g[m],{filter:{event:S,schema:_,table:E,filter:k}}=v,T=f&&f[m];if(T&&T.event===S&&Zs.isFilterValueEqual(T.schema,_)&&Zs.isFilterValueEqual(T.table,E)&&Zs.isFilterValueEqual(T.filter,k))p.push(Object.assign(Object.assign({},v),{id:T.id}));else{this.unsubscribe(),this.state=Ae.errored,t==null||t(bn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=p,t&&t(bn.SUBSCRIBED);return}}).receive("error",f=>{this.state=Ae.errored,t==null||t(bn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(bn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===Ae.joined&&t===_o.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r: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(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ae.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(qt.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new Qu(this,qt.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ae.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Qu(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>xL){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=qt;if(r&&[a,l,c,u].indexOf(o)>=0&&r!==this._joinRef())return;let h=this._onMessage(o,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(f=>{var y,g,x;return((y=f.filter)===null||y===void 0?void 0:y.event)==="*"||((x=(g=f.filter)===null||g===void 0?void 0:g.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(f=>f.callback(h,r)):(i=this.bindings[o])===null||i===void 0||i.filter(f=>{var y,g,x,p,m,v;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const S=f.id,_=(y=f.filter)===null||y===void 0?void 0:y.event;return S&&((g=n.ids)===null||g===void 0?void 0:g.includes(S))&&(_==="*"||(_==null?void 0:_.toLocaleLowerCase())===((x=n.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const S=(m=(p=f==null?void 0:f.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return S==="*"||S===((v=n==null?void 0:n.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof h=="object"&&"ids"in h){const y=h.data,{schema:g,table:x,commit_timestamp:p,type:m,errors:v}=y;h=Object.assign(Object.assign({},{schema:g,table:x,commit_timestamp:p,eventType:m,new:{},old:{},errors:v}),this._getPayloadRecords(y))}f.callback(h,r)})}_isClosed(){return this.state===Ae.closed}_isJoined(){return this.state===Ae.joined}_isJoining(){return this.state===Ae.joining}_isLeaving(){return this.state===Ae.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&Zs.isEqual(s.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(qt.close,{},t)}_onError(t){this._on(qt.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ae.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=rv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=rv(t.columns,t.old_record)),n}}const Ju=()=>{},Xa={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},PL=[1e3,2e3,5e3,1e4],AL=1e4,RL=`
  addEventListener("message", (e) => {
    if (e.data.event === "start") {
      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
    }
  });`;class OL{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Lh,this.transport=null,this.heartbeatIntervalMs=Xa.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Ju,this.ref=0,this.reconnectTimer=null,this.vsn=nv,this.logger=Ju,this.conn=null,this.sendBuffer=[],this.serializer=new bL,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${Dh.websocket}`,this.httpEndpoint=_1(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=mL.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}

To use Realtime in Node.js, you need to provide a WebSocket implementation:

Option 1: Use Node.js 22+ which has native WebSocket support
Option 2: Install and provide the "ws" package:

  npm install ws

  import ws from "ws"
  const client = new RealtimeClient(url, {
    ...options,
    transport: ws
  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Xn.connecting:return zr.Connecting;case Xn.open:return zr.Open;case Xn.closing:return zr.Closing;default:return zr.Closed}}isConnected(){return this.connectionState()===zr.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Zs(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){const{topic:n,event:r,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(wL,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},Xa.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",c)}catch(u){this.log("error","error in heartbeat callback",u)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:s,payload:i,ref:o}=n,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${r} ${s} ${a}`.trim(),i),this.channels.filter(c=>c._isMember(r)).forEach(c=>c._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Xn.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Xn.open||this.conn.readyState===Xn.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(qt.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([RL],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:yL};n&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(qt.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new b1(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Xa.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,i,o,a,l,c,u,d,h,f;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Lh,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Xa.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Ju,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:nv,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:y=>PL[y-1]||AL,this.vsn){case vL:this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(y,g)=>g(JSON.stringify(y)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:(y,g)=>g(JSON.parse(y));break;case x1:this.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:this.serializer.encode.bind(this.serializer),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Zo=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function jL(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function NL(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function IL(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=jL(e.baseUrl,r,s),l=await NL(e.auth),c=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),h=d&&u?JSON.parse(u):u;if(!c.ok){const f=d?h:void 0,y=f==null?void 0:f.error;throw new Zo((y==null?void 0:y.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:f})}return{status:c.status,headers:c.headers,data:h}}}}function Za(e){return e.join("")}var LL=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Za(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Za(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Za(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Za(e.namespace)}`}),!0}catch(t){if(t instanceof Zo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Zo&&n.status===409)return;throw n}}};function Ts(e){return e.join("")}var DL=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ts(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ts(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ts(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ts(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ts(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ts(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Zo&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Zo&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},ML=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=IL({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new LL(this.client,t),this.tableOps=new DL(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Hc=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function Kc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var el=class extends Hc{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},E1=class extends Hc{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const $L=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),FL=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$h=e=>{if(Array.isArray(e))return e.map(n=>$h(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=$h(r)}),t},UL=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function BL(e,t){if(ea(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ea(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VL(e){var t=BL(e,"string");return ea(t)=="symbol"?t:t+""}function zL(e,t,n){return(t=VL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ov(Object(n),!0).forEach(function(r){zL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const av=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},WL=async(e,t,n,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const s=e,i=s.status||500;if(typeof s.json=="function")s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new el(av(o),i,a,r))}).catch(()=>{if(r==="vectors"){const o=i+"";t(new el(s.statusText||`HTTP ${i} error`,i,o,r))}else{const o=i+"";t(new el(s.statusText||`HTTP ${i} error`,i,o,r))}});else{const o=i+"";t(new el(s.statusText||`HTTP ${i} error`,i,o,r))}}else t(new E1(av(e),e,r))},HL=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?z(z({},s),n):(FL(r)?(s.headers=z({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),z(z({},s),n))};async function Zi(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,HL(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>WL(c,l,r,o))})}function k1(e="storage"){return{get:async(t,n,r,s)=>Zi(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>Zi(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>Zi(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>Zi(t,"HEAD",n,z(z({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>Zi(t,"DELETE",n,s,i,r,e)}}const KL=k1("storage"),{get:ta,post:zt,put:Fh,head:qL,remove:Ip}=KL,mt=k1("vectors");var Fi=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=$L(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=z(z({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Kc(n))return{data:null,error:n};throw n}}},GL=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Kc(t))return{data:null,error:t};throw t}}};let T1;T1=Symbol.toStringTag;var YL=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[T1]="BlobDownloadBuilder",this.promise=null}asStream(){return new GL(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Kc(t))return{data:null,error:t};throw t}}};const QL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},lv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var JL=class extends Fi{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=z(z({},lv),r);let a=z(z({},s.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",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(a=z(z({},a),r.headers));const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),d=await(e=="PUT"?Fh:zt)(s.fetch,`${s.url}/object/${u}`,i,z({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=z({upsert:lv.upsert},r),u=z(z({},s.headers),{"x-upsert":String(c.upsert)});return 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),{path:i,fullPath:(await Fh(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=z({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await zt(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Hc("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await zt(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await zt(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e),i=await zt(r.fetch,`${r.url}/object/sign/${s}`,z({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${i.signedURL}${o}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await zt(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(o=>z(z({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${i}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>ta(this.fetch,`${this.url}/${r}/${o}${i}`,{headers:this.headers,noResolveJson:!0},n);return new YL(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>$h(await ta(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await qL(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Kc(r)&&r instanceof E1){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Ip(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=z(z(z({},QL),t),{},{prefix:e||""});return await zt(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=z({},e);return await zt(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const XL="2.97.0",xa={"X-Client-Info":`storage-js/${XL}`};var ZL=class extends Fi{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=z(z({},xa),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await ta(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ta(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await zt(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Fh(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await zt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ip(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},eD=class extends Fi{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},xa),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await zt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await ta(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ip(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!UL(e))throw new Hc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new ML({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},tD=class extends Fi{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},xa),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await mt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await mt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},nD=class extends Fi{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},xa),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},rD=class extends Fi{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},xa),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await mt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},sD=class extends rD{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new iD(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},iD=class extends tD{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new oD(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},oD=class extends nD{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},aD=class extends ZL{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new JL(this.url,this.headers,e,this.fetch)}get vectors(){return new sD(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new eD(this.url+"/iceberg",this.headers,this.fetch)}};const C1="2.97.0",Is=30*1e3,Uh=3,Xu=Uh*Is,lD="http://localhost:9999",cD="supabase.auth.token",uD={"X-Client-Info":`gotrue-js/${C1}`},Bh="X-Supabase-Api-Version",P1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},dD=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,hD=10*60*1e3;class na extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function U(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class fD extends na{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function pD(e){return U(e)&&e.name==="AuthApiError"}class Wr extends na{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ln extends na{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class ht extends Ln{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Zu(e){return U(e)&&e.name==="AuthSessionMissingError"}class Cs extends Ln{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class tl extends Ln{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class nl extends Ln{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function mD(e){return U(e)&&e.name==="AuthImplicitGrantRedirectError"}class cv extends Ln{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class gD extends Ln{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Vh extends Ln{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function ed(e){return U(e)&&e.name==="AuthRetryableFetchError"}class uv extends Ln{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class zh extends Ln{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const uc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),dv=` 	
\r=`.split(""),yD=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<dv.length;t+=1)e[dv[t].charCodeAt(0)]=-2;for(let t=0;t<uc.length;t+=1)e[uc[t].charCodeAt(0)]=t;return e})();function hv(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(uc[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(uc[r]),t.queuedBits-=6}}function A1(e,t,n){const r=yD[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function fv(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{xD(o,r,n)};for(let o=0;o<e.length;o+=1)A1(e.charCodeAt(o),s,i);return t.join("")}function vD(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function wD(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}vD(r,t)}}function xD(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function ci(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)A1(e.charCodeAt(s),n,r);return new Uint8Array(t)}function bD(e){const t=[];return wD(e,n=>t.push(n)),new Uint8Array(t)}function Qr(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>hv(s,n,r)),hv(null,n,r),t.join("")}function SD(e){return Math.round(Date.now()/1e3)+e}function _D(){return Symbol("auth-callback")}const $e=()=>typeof window<"u"&&typeof document<"u",Mr={tested:!1,writable:!1},R1=()=>{if(!$e())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Mr.tested)return Mr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Mr.tested=!0,Mr.writable=!0}catch{Mr.tested=!0,Mr.writable=!1}return Mr.writable};function ED(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const O1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),kD=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ls=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},$r=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Me=async(e,t)=>{await e.removeItem(t)};class qc{constructor(){this.promise=new qc.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}qc.promiseConstructor=Promise;function rl(e){const t=e.split(".");if(t.length!==3)throw new zh("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!dD.test(t[r]))throw new zh("JWT not in base64url format");return{header:JSON.parse(fv(t[0])),payload:JSON.parse(fv(t[1])),signature:ci(t[2]),raw:{header:t[0],payload:t[1]}}}async function TD(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function CD(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function PD(e){return("0"+e.toString(16)).substr(-2)}function AD(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,PD).join("")}async function RD(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function OD(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await RD(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ps(e,t,n=!1){const r=AD();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Ls(e,`${t}-code-verifier`,s);const i=await OD(r);return[i,r===i?"plain":"s256"]}const jD=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function ND(e){const t=e.headers.get(Bh);if(!t||!t.match(jD))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function ID(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function LD(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const DD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function As(e){if(!DD.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function td(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function MD(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function pv(e){return JSON.parse(JSON.stringify(e))}const Vr=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),$D=[502,503,504];async function mv(e){var t;if(!kD(e))throw new Vh(Vr(e),0);if($D.includes(e.status))throw new Vh(Vr(e),e.status);let n;try{n=await e.json()}catch(i){throw new Wr(Vr(i),i)}let r;const s=ND(e);if(s&&s.getTime()>=P1["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new uv(Vr(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new ht}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new uv(Vr(n),e.status,n.weak_password.reasons);throw new fD(Vr(n),e.status||500,r)}const FD=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function W(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Bh]||(i[Bh]=P1["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await UD(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function UD(e,t,n,r,s,i){const o=FD(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new Vh(Vr(l),0)}if(a.ok||await mv(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await mv(l)}}function Ft(e){var t;let n=null;zD(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=SD(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function gv(e){const t=Ft(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function tr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function BD(e){return{data:e,error:null}}function VD(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Wc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function yv(e){return e}function zD(e){return e.access_token&&e.refresh_token&&e.expires_in}const nd=["global","local","others"];class WD{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=O1(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,n=nd[0]){if(nd.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${nd.join(", ")}`);try{return await W(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await W(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:tr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Wc(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await W(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:VD,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(U(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await W(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:tr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await W(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:yv});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(y.split(";")[1].split("=")[1]);c[`${x}Page`]=g}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(U(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){As(t);try{return await W(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:tr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){As(t);try{return await W(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:tr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){As(t);try{return await W(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:tr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){As(t.userId);try{const{data:n,error:r}=await W(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteFactor(t){As(t.userId),As(t.id);try{return{data:await W(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await W(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:yv});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(y.split(";")[1].split("=")[1]);c[`${x}Page`]=g}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(U(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await W(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await W(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await W(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}}function vv(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Rs={debug:!!(globalThis&&R1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class j1 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class wv extends j1{}async function HD(e,t,n){Rs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;t>0&&setTimeout(()=>{r.abort(),Rs.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){Rs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Rs.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Rs.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new wv(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Rs.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null,"  "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}catch(s){throw(s==null?void 0:s.name)==="AbortError"?new wv(`Acquiring an exclusive Navigator LockManager lock "${e}" timed out waiting ${t}ms`):s}}function KD(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function N1(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function qD(e){return parseInt(e,16)}function GD(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function YD(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:h}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=N1(e.address),y=u?`${u}://${r}`:r,g=e.statement?`${e.statement}
`:"",x=`${y} wants you to sign in with your Ethereum account:
${f}

${g}`;let p=`URI: ${d}
Version: ${h}
Chain ID: ${n}${o?`
Nonce: ${o}`:""}
Issued At: ${i.toISOString()}`;if(s&&(p+=`
Expiration Time: ${s.toISOString()}`),a&&(p+=`
Not Before: ${a.toISOString()}`),l&&(p+=`
Request ID: ${l}`),c){let m=`
Resources:`;for(const v of c){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);m+=`
- ${v}`}p+=m}return`${x}
${p}`}class ke extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class dc extends ke{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function QD({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ke({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new ke({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new ke({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new ke({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new ke({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ke({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new ke({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ke({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(I1(o)){if(i.rp.id!==o)return new ke({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new ke({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new ke({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function JD({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ke({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ke({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(I1(r)){if(n.rpId!==r)return new ke({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ke({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class XD{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const ZD=new XD;function eM(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Wc(e,["challenge","user","excludeCredentials"]),i=ci(t).buffer,o=Object.assign(Object.assign({},n),{id:ci(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:ci(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function tM(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Wc(e,["challenge","allowCredentials"]),s=ci(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:ci(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function nM(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Qr(new Uint8Array(e.response.attestationObject)),clientDataJSON:Qr(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function rM(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Qr(new Uint8Array(s.authenticatorData)),clientDataJSON:Qr(new Uint8Array(s.clientDataJSON)),signature:Qr(new Uint8Array(s.signature)),userHandle:s.userHandle?Qr(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function I1(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function xv(){var e,t;return!!($e()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function sM(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dc("Browser returned unexpected credential type",t)}:{data:null,error:new dc("Empty credential response",t)}}catch(t){return{data:null,error:QD({error:t,options:e})}}}async function iM(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dc("Browser returned unexpected credential type",t)}:{data:null,error:new dc("Empty credential response",t)}}catch(t){return{data:null,error:JD({error:t,options:e})}}}const oM={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},aM={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function hc(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=hc(a,o):r[i]=hc(o)}else r[i]=o}return r}function lM(e,t){return hc(oM,e,t||{})}function cM(e,t){return hc(aM,e,t||{})}class uM{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const c=s??ZD.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const f=(await this.client.getUser()).data.user,y=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=lM(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await sM({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=cM(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await iM(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return U(a)?{data:null,error:a}:{data:null,error:new Wr("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new na("rpId is required for WebAuthn authentication")};try{if(!xv())return{data:null,error:new Wr("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new Wr("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new na("rpId is required for WebAuthn registration")};try{if(!xv())return{data:null,error:new Wr("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new Wr("Unexpected error in register",o)}}}}KD();const dM={url:lD,storageKey:cD,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:uD,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4,skipAutoInitialize:!1};async function bv(e,t,n){return await n()}const Os={};class ra{get jwks(){var t,n;return(n=(t=Os[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Os[this.storageKey]=Object.assign(Object.assign({},Os[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Os[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Os[this.storageKey]=Object.assign(Object.assign({},Os[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},dM),t);if(this.storageKey=i.storageKey,this.instanceID=(n=ra.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,ra.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&$e()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new WD({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=O1(i.fetch),this.lock=i.lock||bv,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&$e()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=HD:this.lock=bv,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new uM(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:R1()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=vv(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=vv(this.memoryStorage)),$e()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${C1}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if($e()&&(n=ED(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),$e()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),mD(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return U(n)?this._returnResult({error:n}):this._returnResult({error:new Wr("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Ft}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:d,options:h}=t;let f=null,y=null;this.flowType==="pkce"&&([f,y]=await Ps(this.storage,this.storageKey)),i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:u,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:f,code_challenge_method:y},xform:Ft})}else if("phone"in t){const{phone:u,password:d,options:h}=t;i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Ft})}else throw new tl("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Me(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await W(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:gv})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await W(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:gv})}else throw new tl("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new Cs;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,c,u,d,h;let f,y;if("message"in t)f=t.message,y=t.signature;else{const{chain:g,wallet:x,statement:p,options:m}=t;let v;if($e())if(typeof x=="object")v=x;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")v=R.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=x}const S=new URL((n=m==null?void 0:m.url)!==null&&n!==void 0?n:window.location.href),_=await v.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=N1(_[0]);let k=(r=m==null?void 0:m.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!k){const R=await v.request({method:"eth_chainId"});k=qD(R)}const T={domain:S.host,address:E,statement:p,uri:S.href,version:"1",chainId:k,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=YD(T),y=await v.request({method:"personal_sign",params:[GD(f),E]})}try{const{data:g,error:x}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:y},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Ft});if(x)throw x;if(!g||!g.session||!g.user){const p=new Cs;return this._returnResult({data:{user:null,session:null},error:p})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:x})}catch(g){if(U(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,a,l,c,u,d,h,f;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:x,wallet:p,statement:m,options:v}=t;let S;if($e())if(typeof p=="object")S=p;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))S=E.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 p!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=p}const _=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const E=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),m?{statement:m}:null));let k;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")k=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)k=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)y=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),g=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(r=v==null?void 0:v.signInWithSolana)===null||r===void 0?void 0:r.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(k=>`- ${k}`)]:[]].join(`
`);const E=await S.signMessage(new TextEncoder().encode(y),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=E}}try{const{data:x,error:p}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Qr(g)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ft});if(p)throw p;if(!x||!x.session||!x.user){const m=new Cs;return this._returnResult({data:{user:null,session:null},error:m})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:p})}catch(x){if(U(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await $r(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new gD;const{data:i,error:o}=await W(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Ft});if(await Me(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Cs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Ft}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Cs;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Ps(this.storage,this.storageKey));const{error:d}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new tl("You must provide either an email or phone number.")}catch(a){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await W(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Ft});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Ps(this.storage,this.storageKey));const c=await W(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:BD});return!((i=c.data)===null||i===void 0)&&i.url&&$e()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new ht;const{error:s}=await W(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(U(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await W(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await W(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new tl("You must provide either an email or phone number and a type")}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await $r(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Xu:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await $r(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=td()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=MD(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:tr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ht}:await W(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:tr})})}catch(n){if(U(n))return Zu(n)&&(await this._removeSession(),await Me(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new ht;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Ps(this.storage,this.storageKey));const{data:c,error:u}=await W(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:tr});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ht;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=rl(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(U(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new ht;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!$e())throw new nl("No browser detected.");if(t.error||t.error_description||t.error_code)throw new nl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new cv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new nl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new cv("No code detected.");const{data:m,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new nl("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let h=u+d;l&&(h=parseInt(l));const f=h-u;f*1e3<=Is&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${d}s`);const y=h-d;u-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,h,u):u-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,h,u);const{data:g,error:x}=await this._getUser(i);if(x)throw x;const p={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:h,refresh_token:o,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:p,redirectType:t.type},error:null})}catch(r){if(U(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await $r(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!Zu(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(pD(a)&&(a.status===404||a.status===401||a.status===403)||Zu(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Me(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=_D(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Ps(this.storage,this.storageKey,!0));try{return await W(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:h}=i;if(h)throw h;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await W(this.fetch,"GET",f,{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 $e()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(U(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=t,d=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Ft}),{data:h,error:f}=d;return f?this._returnResult({data:{user:null,session:null},error:f}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new Cs}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:f}))}catch(s){if(await Me(this.storage,`${this.storageKey}-code-verifier`),U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await W(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await CD(async s=>(s>0&&await TD(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await W(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ft})),(s,i)=>{const o=200*Math.pow(2,s);return i&&ed(i)&&Date.now()+o-r<Is})}catch(r){if(this._debug(n,"error",r),U(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),$e()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await $r(this.storage,this.storageKey);if(s&&this.userStorage){let o=await $r(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ls(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:td()}else if(s&&!s.user&&!s.user){const o=await $r(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Me(this.storage,this.storageKey+"-user"),await Ls(this.storage,this.storageKey,s)):s.user=td()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Xu;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Xu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),ed(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new ht;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new qc;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new ht;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),U(i)){const o={data:null,error:i};return ed(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Me(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Ls(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=pv(s);await Ls(this.storage,this.storageKey,i)}else{const s=pv(n);await Ls(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Me(this.storage,this.storageKey),await Me(this.storage,this.storageKey+"-code-verifier"),await Me(this.storage,this.storageKey+"-user"),this.userStorage&&await Me(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&$e()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Is);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/Is);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Is}ms, refresh threshold is ${Uh} ticks`),s<=Uh&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof j1)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!$e()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Ps(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await W(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await W(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?nM(t.webauthn.credential_response):rM(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await W(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await W(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:eM(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:tM(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:f}=rl(t);let y=null;f.aal&&(y=f.aal);let g=y;const{data:{user:x},error:p}=await this.getUser(t);if(p)return this._returnResult({data:null,error:p});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(g="aal2");const v=f.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:v},error:null}}catch(f){if(U(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=rl(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const h=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await W(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ht})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ht});const o=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&$e()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ht});const o=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&$e()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await W(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ht})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await W(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ht})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+hD>s)return r;const{data:i,error:o}=await W(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:y}=await this.getSession();if(y||!f.session)return this._returnResult({data:null,error:y});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=rl(r);n!=null&&n.allowExpired||ID(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,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=LD(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,bD(`${a}.${l}`)))throw new zh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}}ra.nextInstanceID={};const hM=ra,fM="2.97.0";let io="";typeof Deno<"u"?io="deno":typeof document<"u"?io="web":typeof navigator<"u"&&navigator.product==="ReactNative"?io="react-native":io="node";const pM={"X-Client-Info":`supabase-js-${io}/${fM}`},mM={headers:pM},gM={schema:"public"},yM={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},vM={};function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}function wM(e,t){if(sa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(sa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xM(e){var t=wM(e,"string");return sa(t)=="symbol"?t:t+""}function bM(e,t,n){return(t=xM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sv(Object(n),!0).forEach(function(r){bM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const SM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),_M=()=>Headers,EM=(e,t,n)=>{const r=SM(n),s=_M();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,be(be({},o),{},{headers:c}))}};function kM(e){return e.endsWith("/")?e:e+"/"}function TM(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,h={db:be(be({},l),s),auth:be(be({},c),i),realtime:be(be({},u),o),storage:{},global:be(be(be({},d),a),{},{headers:be(be({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function CM(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(kM(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var PM=class extends hM{constructor(e){super(e)}},AM=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=CM(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:gM,realtime:vM,auth:be(be({},yM),{},{storageKey:o}),global:mM},l=TM(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=EM(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(be({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new pL(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new aD(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new oL(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},u,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new PM({url:this.authUrl.href,headers:be(be({},h),u),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new OL(this.realtimeUrl.href,be(be({},e),{},{params:be(be({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const RM=(e,t,n)=>new AM(e,t,n);function OM(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}OM()&&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 jM="https://awdsqweahltqoskvpxzr.supabase.co",NM="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImF3ZHNxd2VhaGx0cW9za3ZweHpyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIwODg2MzIsImV4cCI6MjA4NzY2NDYzMn0.uHiT12NdqskIaBjtqRBxXFNv0lx3dPPWe67LFlvtZxk",IM=RM(jM,NM,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),L1=()=>{const[e,t]=b.useState(!1),n=async r=>{var u,d,h;r.preventDefault(),t(!0);const s=r.target,i=new FormData(s),o=(u=i.get("name"))==null?void 0:u.trim(),a=(d=i.get("email"))==null?void 0:d.trim(),l=(h=i.get("message"))==null?void 0:h.trim(),c=i.get("website")||"";if(!o||!a||!l){Wa.error("Please fill out all fields."),t(!1);return}try{const{data:f,error:y}=await IM.functions.invoke("send-contact-email",{body:{name:o,email:a,message:l,website:c}});if(y)throw y;f!=null&&f.error?Wa.error(f.error):(Wa.success("Message sent! I'll get back to you soon."),s.reset())}catch(f){console.error("Contact form error:",f),Wa.error("Something went wrong. Please try again.")}finally{t(!1)}};return w.jsx("section",{id:"contact",className:"section-container",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16",children:[w.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:[w.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[w.jsx("div",{className:"editorial-rule"}),w.jsx("span",{className:"editorial-label",children:"Get in Touch"})]}),w.jsxs("h2",{className:"font-serif text-5xl md:text-6xl text-foreground leading-[0.95] mb-6",children:["Let's",w.jsx("br",{}),w.jsx("span",{className:"italic text-primary",children:"Connect"})]}),w.jsx("p",{className:"text-muted-foreground leading-relaxed max-w-sm",children:"Have a project in mind or want to discuss AI-powered growth strategies? Fill out the form and I'll get back to you promptly."})]}),w.jsxs(re.form,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},onSubmit:n,className:"space-y-6",children:[w.jsxs("div",{className:"absolute opacity-0 -z-10","aria-hidden":"true",children:[w.jsx("label",{htmlFor:"website",children:"Website"}),w.jsx("input",{type:"text",id:"website",name:"website",tabIndex:-1,autoComplete:"off"})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"name",className:"block text-xs font-medium text-muted-foreground mb-2 tracking-wider uppercase",children:"Name"}),w.jsx("input",{type:"text",id:"name",name:"name",required:!0,maxLength:100,className:"w-full px-0 py-3 bg-transparent border-b-2 border-border text-foreground text-base placeholder:text-muted-foreground/40 focus:outline-none focus:border-primary transition-colors",placeholder:"Your name"})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"email",className:"block text-xs font-medium text-muted-foreground mb-2 tracking-wider uppercase",children:"Email"}),w.jsx("input",{type:"email",id:"email",name:"email",required:!0,maxLength:255,className:"w-full px-0 py-3 bg-transparent border-b-2 border-border text-foreground text-base placeholder:text-muted-foreground/40 focus:outline-none focus:border-primary transition-colors",placeholder:"you@example.com"})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"message",className:"block text-xs font-medium text-muted-foreground mb-2 tracking-wider uppercase",children:"Message"}),w.jsx("textarea",{id:"message",name:"message",required:!0,rows:4,maxLength:1e3,className:"w-full px-0 py-3 bg-transparent border-b-2 border-border text-foreground text-base placeholder:text-muted-foreground/40 focus:outline-none focus:border-primary transition-colors resize-none",placeholder:"Tell me about your project..."})]}),w.jsxs("button",{type:"submit",disabled:e,className:"inline-flex items-center gap-3 px-10 py-4 bg-foreground text-background font-medium text-sm hover:bg-primary transition-colors disabled:opacity-50",children:[e?"Sending...":"Send Message",w.jsx(PT,{size:16})]})]})]})})},LM=[{href:"https://x.com/hsaleem",icon:Cx,label:"X / Twitter"},{href:"https://www.facebook.com/hasansplace",icon:ET,label:"Facebook"},{href:"https://instagram.com/hsaleem",icon:TT,label:"Instagram"},{href:"https://www.linkedin.com/in/hasansaleem",icon:Ex,label:"LinkedIn"}],ps=()=>w.jsx("footer",{className:"border-t border-border",children:w.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-16",children:[w.jsxs("div",{className:"flex flex-col md:flex-row items-start justify-between gap-10",children:[w.jsxs("div",{children:[w.jsxs("p",{className:"font-serif text-3xl text-foreground mb-1",children:["Hasan Saleem",w.jsx("span",{className:"text-primary",children:"."})]}),w.jsx("p",{className:"text-sm text-muted-foreground",children:"AI SEO Pioneer & Digital Growth Strategist"})]}),w.jsxs("div",{className:"flex flex-col items-start md:items-end gap-6",children:[w.jsx("div",{className:"flex items-center gap-4",children:LM.map(({href:e,icon:t,label:n})=>w.jsx("a",{href:e,target:"_blank",rel:"me noopener noreferrer",className:"w-9 h-9 rounded-full border border-border flex items-center justify-center text-muted-foreground hover:text-primary hover:border-primary transition-colors","aria-label":n,children:w.jsx(t,{size:16})},n))}),w.jsxs("div",{className:"flex items-center gap-6",children:[w.jsx("a",{href:"https://www.forbes.com/councils/forbesagencycouncil/people/hasansaleem/",target:"_blank",rel:"me noopener noreferrer",className:"text-sm font-serif italic text-muted-foreground hover:text-primary transition-colors",children:"Forbes"}),w.jsx("a",{href:"https://www.entrepreneur.com/author/hasan-saleem",target:"_blank",rel:"me noopener noreferrer",className:"text-sm font-serif italic text-muted-foreground hover:text-primary transition-colors",children:"Entrepreneur"}),w.jsx("a",{href:"https://www.fastcompany.com/user/hasan-saleem",target:"_blank",rel:"me noopener noreferrer",className:"text-sm font-serif italic text-muted-foreground hover:text-primary transition-colors",children:"Fast Company"}),w.jsx("a",{href:"https://www.benzinga.com/author/hasan-saleem",target:"_blank",rel:"me noopener noreferrer",className:"text-sm font-serif italic text-muted-foreground hover:text-primary transition-colors",children:"Benzinga"})]})]})]}),w.jsx("div",{className:"border-t border-border mt-10 pt-6",children:w.jsxs("p",{className:"text-xs text-muted-foreground",children:["© ",new Date().getFullYear()," Hasan Saleem. All rights reserved."]})})]})}),DM=()=>w.jsxs("main",{children:[w.jsx(fs,{}),w.jsx(Q2,{}),w.jsx(X2,{}),w.jsx(eL,{}),w.jsx(nL,{}),w.jsx(L1,{}),w.jsx(ps,{})]}),MM="https://hasansaleem.com";function D1(e){const{pathname:t}=Or();b.useEffect(()=>{const n=t==="/"?"":t.replace(/\/+$/,""),r=`${MM}${n}`;let s=document.querySelector("link[rel='canonical']");s?s.href=r:(s=document.createElement("link"),s.rel="canonical",s.href=r,document.head.appendChild(s));let i=document.querySelector("meta[property='og:url']");if(i?i.content=r:(i=document.createElement("meta"),i.setAttribute("property","og:url"),i.content=r,document.head.appendChild(i)),e!=null&&e.title){document.title=e.title;const a=document.querySelector("meta[property='og:title']");a&&(a.content=e.title);const l=document.querySelector("meta[name='twitter:title']");l&&(l.content=e.title)}if(e!=null&&e.description){const a=document.querySelector("meta[name='description']");a&&(a.content=e.description);const l=document.querySelector("meta[property='og:description']");l&&(l.content=e.description);const c=document.querySelector("meta[name='twitter:description']");c&&(c.content=e.description)}let o=document.querySelector("script[data-page-jsonld]");return e!=null&&e.jsonLd?(o||(o=document.createElement("script"),o.type="application/ld+json",o.setAttribute("data-page-jsonld","true"),document.head.appendChild(o)),o.textContent=JSON.stringify(e.jsonLd)):o&&o.remove(),()=>{const a=document.querySelector("script[data-page-jsonld]");a&&a.remove()}},[t,e==null?void 0:e.title,e==null?void 0:e.description])}const $M=["Pioneering Answer Engine Optimization (AEO)","Strategic Entity Building & E-E-A-T","Tactical AI Integration for Business","High-Value Digital Asset Management","Data-Driven Growth Architecture","Future-Proofing Brand Visibility"],FM=[{year:"2017",title:"Digital Marketing Consultant",description:"Spearheading comprehensive digital marketing operations, driving web traffic and enhancing business development for enterprise clients."},{year:"2013",title:"Senior Digital Marketing",description:"Leading advanced digital marketing strategies, overseeing multi-channel campaigns and team coordination at scale."},{year:"2010",title:"Social Media Manager",description:"Managing social media presence and community growth, building brand awareness and engagement across platforms."},{year:"2008",title:"Freelance Marketing",description:"Launching a career in digital marketing, working with early-stage businesses on content creation and online visibility."}],UM=[{quote:'After just a few months of working with Hasan – I was supremely impressed. Not just by his results, but also by his relentless work ethic and ability to "get it." I would confidently say that Hasan is one of the top online marketers out there. He is a force to be reckoned with – especially when it comes to content creation, promotion and distribution.',name:"Gaetano Nino DiNardi",title:"Growth Advisor"},{quote:"Knowing Hasan for 15 years and having worked with him, I've seen his work in the digital marketing space first hand. If you're looking for someone familiar with online publishing, internet marketing, and content creation + promotion, then Hasan is your guy. His skills and knowledge don't come solely from working with clients, but also as a serial online entrepreneur himself.",name:"Syed Moiz Balkhi",title:"Founder and CEO of Awesome Motive"},{quote:"Hasan has a deep understanding of how digital content works for brand building and social media awareness. He is one of the few people I know who have always understood the power of connections and the value of content.",name:"Ann Smarty",title:"Founder at ViralContentBee.com"},{quote:"I have worked with Hasan on various projects over the years and I can vouch for Hasan's excellent content promotion skills and his adaptability in this ever-changing market. He's an experienced online business owner with a history in internet marketing specialties like content marketing and link building.",name:"Recommendation",title:"Industry Colleague"}],Hn={initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0}},BM=()=>(D1({title:"About Hasan Saleem | AI SEO Pioneer & Digital Growth Strategist",description:"Learn about Hasan Saleem — a veteran tech entrepreneur and AI SEO pioneer with 20+ years in digital strategy, entity-based SEO, and tactical AI integration.",jsonLd:{"@context":"https://schema.org","@type":"ProfilePage","@id":"https://hasansaleem.com/about",url:"https://hasansaleem.com/about",name:"About Hasan Saleem",mainEntity:{"@id":"https://hasansaleem.com/#person"}}}),w.jsxs("main",{children:[w.jsx(fs,{}),w.jsx("section",{className:"pt-32 pb-16 section-container",children:w.jsxs(re.div,{...Hn,transition:{duration:.6},className:"max-w-3xl",children:[w.jsx("p",{className:"text-sm font-medium tracking-[0.2em] uppercase text-primary mb-4",children:"About"}),w.jsxs("h1",{className:"font-serif text-5xl md:text-6xl text-foreground mb-6 leading-tight",children:["Hey! I'm ",w.jsx("span",{className:"italic glow-text",children:"Hasan Saleem."})]}),w.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:"Hasan Saleem is a veteran tech entrepreneur and AI SEO pioneer with over 20 years of experience in digital strategy. He is the founder of DSS Media, a performance-driven marketing agency, and NAP.biz, a specialized platform focused on business data verification and local search authority."}),w.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Since launching DirJournal in 2007, Hasan has built and scaled multiple high-traffic digital properties, generating over 100 million impressions. Today, he focuses on helping brands navigate the zero-click era through tactical AI integration, Entity-Based SEO, and Answer Engine Optimization (AEO)."})]})}),w.jsxs("section",{className:"section-container pt-0",children:[w.jsx(re.div,{...Hn,className:"mb-10",children:w.jsxs("h2",{className:"font-serif text-3xl md:text-4xl text-foreground mb-4",children:["Core ",w.jsx("span",{className:"italic glow-text",children:"Expertise"})]})}),w.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:$M.map((e,t)=>w.jsxs(re.div,{...Hn,transition:{delay:t*.05},className:"glass p-5 flex items-center gap-3",children:[w.jsx(Tx,{size:16,className:"text-primary shrink-0"}),w.jsx("span",{className:"text-sm text-foreground",children:e})]},e))})]}),w.jsx("section",{className:"section-container pt-0",children:w.jsx(re.div,{...Hn,className:"glass p-10 glow-border",children:w.jsxs("p",{className:"text-muted-foreground text-lg text-center leading-relaxed max-w-2xl mx-auto",children:["I have been more than ",w.jsx("span",{className:"text-primary font-semibold",children:"20 years"})," in digital marketing industries, and have helped more than"," ",w.jsx("span",{className:"text-primary font-semibold",children:"240 companies"})," to grow their business."]})})}),w.jsxs("section",{className:"section-container",children:[w.jsx(re.div,{...Hn,className:"text-center mb-16",children:w.jsxs("h2",{className:"font-serif text-4xl md:text-5xl text-foreground mb-4",children:["My ",w.jsx("span",{className:"italic glow-text",children:"Experience"})]})}),w.jsxs("div",{className:"relative",children:[w.jsx("div",{className:"absolute left-8 md:left-1/2 top-0 bottom-0 w-px bg-border/50 -translate-x-1/2"}),w.jsx("div",{className:"space-y-12",children:FM.map((e,t)=>{const n=t%2===0;return w.jsxs(re.div,{...Hn,transition:{delay:t*.1},className:`relative flex items-start gap-6 md:gap-0 ${n?"md:flex-row":"md:flex-row-reverse"}`,children:[w.jsx("div",{className:"absolute left-8 md:left-1/2 w-4 h-4 rounded-full bg-primary border-4 border-background -translate-x-1/2 mt-1 z-10"}),w.jsx("div",{className:`ml-16 md:ml-0 md:w-1/2 ${n?"md:pr-16 md:text-right":"md:pl-16"}`,children:w.jsxs("div",{className:"glass p-6 glow-border",children:[w.jsxs("div",{className:`flex items-center gap-3 mb-2 ${n?"md:justify-end":""}`,children:[w.jsx(_x,{size:16,className:"text-primary"}),w.jsx("span",{className:"text-xs font-medium tracking-widest uppercase text-primary",children:e.year})]}),w.jsx("h3",{className:"font-serif text-xl text-foreground mb-1",children:e.title}),w.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})})]},e.year)})})]})]}),w.jsxs("section",{className:"section-container",children:[w.jsx(re.div,{...Hn,className:"text-center mb-16",children:w.jsxs("h2",{className:"font-serif text-4xl md:text-5xl text-foreground mb-4",children:["What People ",w.jsx("span",{className:"italic glow-text",children:"Say"})]})}),w.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:UM.map((e,t)=>w.jsxs(re.blockquote,{...Hn,transition:{delay:t*.1},className:"glass p-8 glow-border",children:[w.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed mb-5 italic",children:['"',e.quote,'"']}),w.jsxs("footer",{children:[w.jsx("p",{className:"text-sm font-medium text-foreground",children:e.name}),w.jsx("p",{className:"text-xs text-primary",children:e.title})]})]},t))})]}),w.jsx("section",{className:"border-y border-border/30 bg-secondary/30",children:w.jsxs("div",{className:"section-container py-12",children:[w.jsx("p",{className:"text-center text-xs font-medium tracking-[0.2em] uppercase text-muted-foreground mb-8",children:"As Featured In"}),w.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 md:gap-16",children:[{name:"Benzinga",url:"https://www.benzinga.com/author/hasan-saleem"},{name:"Forbes",url:"https://www.forbes.com/councils/forbesagencycouncil/people/hasansaleem/"},{name:"Entrepreneur",url:"https://www.entrepreneur.com/author/hasan-saleem"},{name:"Fast Company",url:"https://www.fastcompany.com/user/hasan-saleem"}].map(e=>w.jsx("a",{href:e.url,target:"_blank",rel:"me noopener noreferrer",className:"text-2xl md:text-3xl font-serif italic text-muted-foreground/60 hover:text-foreground transition-colors",children:e.name},e.name))})]})}),w.jsx(ps,{})]})),VM="/assets/blog-seo-frameworks-rYNZWa17.jpg",M1=[{slug:"beyond-the-core-update-how-to-future-proof-your-search-authority",title:"Beyond the Algorithm: 7 Frameworks to Future-Proof Your SEO",excerpt:'The Power of Clustered Authority: Moving away from disparate posts to Topic Clusters is no longer optional. The "Zero-Click" Opportunity lets you capture traffic via Featured Snippets.',category:"SEO",image:VM,externalUrl:"https://www.entrepreneur.com/growing-a-business/7-expert-strategies-to-beat-every-google-seo-update/480354",takeaways:{points:[{title:"The Power of Clustered Authority",description:`Moving away from disparate posts to Topic Clusters is no longer optional. By building "cornerstone" content supported by specific "satellite" posts, you demonstrate the deep expertise Google's Helpful Content guidelines demand.`},{title:'The "Zero-Click" Opportunity',description:`While Google increasingly answers queries directly on the SERP, you can still capture traffic by targeting Featured Snippets and the "People Also Ask" sections. This ensures your brand remains the primary source, even when users don't click through.`},{title:'Trim the "Dead Wood"',description:`Underperforming or outdated content acts as an anchor on your site's performance. Systematically eliminating or updating "low-value" pages reduces bounce rates and signals to the algorithm that your site is a high-quality resource.`}],ctaLabel:"View Full Insight on Entrepreneur"}},{slug:"the-efficiency-equation-balancing-cx-innovation-with-financial-resilience",title:"The Efficiency Equation: Balancing CX Innovation with Financial Resilience",excerpt:"Tech integration is no longer optional — it should simultaneously enhance the customer journey and streamline back-end financial operations.",category:"Business Strategy",externalUrl:"https://www.fastcompany.com/91140996/the-dual-impact-of-tech-innovations-on-customer-experience-and-financial-management-in-2024",takeaways:{points:[{title:"Strategic Imperative",description:"Tech integration is no longer an optional upgrade but a fundamental requirement for businesses to remain competitive in a landscape where both customer expectations and financial complexities are rising."},{title:"Unified Optimization",description:"Innovation must serve a dual purpose—it should simultaneously enhance the customer journey and streamline back-end financial operations to maximize ROI."},{title:"The CX-Finance Link",description:"By leveraging modern tech, companies can reduce operational overhead in financial management while reinvesting those resources into creating hyper-personalized customer interactions."},{title:"Adaptability as a Standard",description:"Success in 2024 requires a mindset of continuous iteration, ensuring that technology stacks evolve as quickly as market demands change."}],ctaLabel:"Read Full Insight at Fast Company"}},{slug:"mastering-the-core-pillars-of-sustainable-startup-growth",title:"Mastering the Core Pillars of Sustainable Startup Growth",excerpt:'Prioritize Skill Over Experience: In emerging industries, look for candidates with high "transferable skills" and a deep commitment to your mission rather than just a perfect resume.',category:"Startups"},{slug:"why-most-ai-customer-service-implementations-fail-and-how-to-fix-them",title:"Why Most AI Customer Service Implementations Fail (And How to Fix Them)",excerpt:'Avoid the "Uncanny Valley" of Automation — transparency builds trust. Kill Data Silos before they kill your UX.',category:"AI",externalUrl:"https://www.entrepreneur.com/science-technology/using-ai-in-customer-service-dont-make-these-4-mistakes/492487",takeaways:{intro:'Avoiding the "AI Pitfalls" in Customer Service',points:[{title:'Avoid the "Uncanny Valley" of Automation',description:`The biggest mistake isn't using AI; it's pretending the AI is human. Transparency builds trust. Ensure your strategy clearly identifies bots while providing a seamless, "one-click" path to a human agent when the conversation becomes complex.`},{title:"Kill Data Silos Before They Kill Your UX",description:`An AI is only as good as the data it can access. For automation to be effective, it must be integrated with your CRM and backend systems so it can provide personalized, real-time solutions rather than generic, frustrating "I don't know" responses.`},{title:'Prioritize Quality Over "Always-On" Quantity',description:"Being available 24/7 is useless if the quality of support is poor. Focus on automating the 80% of repetitive queries perfectly, and leave the high-stakes, nuanced problem-solving to your human team to maintain brand loyalty."}],ctaLabel:"Read the Complete Analysis on Entrepreneur"}},{slug:"the-ai-personalization-engine-advanced-growth-strategies-for-startups",title:"The AI Personalization Engine: Advanced Growth Strategies for Startups",excerpt:"Hyper-Personalization at Scale: AI-driven 1-to-1 personalization replaces traditional segmentation. Leverage predictive analytics to anticipate audience needs.",category:"AI & Growth",externalUrl:"https://www.fastcompany.com/91210110/advanced-digital-marketing-strategies-for-startups-leverage-ai-for-content-optimization-and-personalization",takeaways:{points:[{title:"Hyper-Personalization at Scale",description:"Traditional segmentation is being replaced by AI-driven 1-to-1 personalization. For startups, this means using machine learning to analyze user behavior in real-time, delivering content that is dynamically tailored to individual intent rather than broad demographics."},{title:"Predictive Optimization",description:'Leverage predictive analytics to stay ahead of consumer needs. By using AI to identify patterns in data, startups can anticipate what their audience will want next, allowing for "proactive" content creation that addresses questions before they are even asked.'},{title:"Balancing Data with Trust",description:'As AI-driven personalization becomes more precise, maintaining transparency is critical. High-authority brands succeed by clearly communicating how data is used to improve the user experience, building the essential "Trust" required for long-term loyalty in an AI-first world.'}],ctaLabel:"Read Full Article on FastCompany"}},{slug:"mindful-automation-leveraging-ai-for-an-enriching-customer-journey",title:"Mindful Automation: Leveraging AI for an Enriching Customer Journey",excerpt:"The true value of AI in customer experience isn't in replacing human interaction, but in removing friction. By automating routine inquiries, AI frees up human agents to handle complex, high-empathy situations.",category:"AI & CX"},{slug:"the-human-centric-ai-blueprint-5-hacks-to-scale-your-business-in-2024",title:"The Human-Centric AI Blueprint: 5 Hacks to Scale Your Business in 2024",excerpt:"AI-driven natural language processing is no longer just about voice-to-text; it's about automated synthesis. By using AI to distill meetings into actionable summaries and task lists, teams can shift focus to strategic execution.",category:"AI & Business"},{slug:"beyond-the-hype-5-strategic-safeguards-for-ai-powered-customer-experience",title:"Beyond the Hype: 5 Strategic Safeguards for AI-Powered Customer Experience",excerpt:'Avoid treating AI as a "magic wand." Mastery of the underlying data and model limitations is the only way to prevent technical debt and reputational damage.',category:"AI Strategy"},{slug:"tearing-down-the-10-biggest-barriers-to-seo-success",title:"Tearing Down the 10 Biggest Barriers to SEO Success",excerpt:`SEO is not a "one-and-done" checkbox; it is a continuous investment in your site's health, speed, and user experience that pays dividends over time. Quality above quantity.`,category:"SEO"},{slug:"scaling-smart-with-cloud-based-enterprise-resource-planning",title:"Scaling Smart with Cloud Based Enterprise Resource Planning",excerpt:'Use ERP as a central repository to replace confusing spreadsheets, ensuring every team member accesses the same "source of truth" for project management and accounting.',category:"Business Tech"},{slug:"foundation-first-5-critical-marketing-mistakes-that-stunt-startup-growth",title:"Foundation First: 5 Critical Marketing Mistakes That Stunt Startup Growth",excerpt:'The "Generalist" Trap: casting a wide net often leads to catching nothing. SEO is Not Optional. Bridge the Automation Gap from day one.',category:"Marketing",externalUrl:"https://www.entrepreneur.com/growing-a-business/avoid-these-5-pitfalls-in-your-digital-marketing/444665",takeaways:{points:[{title:'The "Generalist" Trap',description:"Casting a wide net often leads to catching nothing. Success in digital marketing begins with hyper-specific customer personas and addressing their unique pain points."},{title:"SEO is Not Optional",description:`Don't let flashy social trends distract you from your "digital home." A content-rich, SEO-optimized website remains the most reliable driver of long-term visibility.`},{title:"Bridge the Automation Gap",description:"Integration is key. Startups must bake personalization and automation into their strategy from day one to avoid siloed data and missed conversion opportunities."},{title:"Leverage the Trust Factor",description:"Without a track record, social proof is your most valuable currency. Testimonials and micro-influencer partnerships are essential to bridge the initial credibility gap."},{title:'The "Strategy" is a Living Document',description:"A static marketing plan is a failing one. Implement S.M.A.R.T. goals and periodic reviews to pivot based on real-world data and performance."}],ctaLabel:"Read Full Insight on Entrepreneur"}},{slug:"reclaiming-productivity-by-defeating-zoom-fatigue-and-meeting-bloat",title:"Reclaiming Productivity by Defeating Zoom Fatigue and Meeting Bloat",excerpt:"Enforce collaborative agendas, pre-assign tactical roles, normalize the hard stop, and master interruption rhetoric.",category:"Productivity",externalUrl:"https://www.entrepreneur.com/living/5-fail-safe-strategies-to-safeguard-your-time-during-online/446405",takeaways:{points:[{title:"Enforce Collaborative Agendas",description:"Circulate a shared document in advance for participants to log discussion points. If no agenda is set, politely request one to ensure the meeting respects everyone's schedule."},{title:"Pre-Assign Tactical Roles",description:"Designate a timekeeper, a technical host, and a note-taker before the call begins to eliminate awkward silences and administrative delays at the start."},{title:"Normalize the Hard Stop",description:"Announce your exit time immediately at the beginning of the call. This encourages the group to prioritize critical items and discourages unnecessary tangents."},{title:"Master Interruption Rhetoric",description:`Use professional verbal pivots—such as "Thanks for that point, let's hear another perspective"—to diplomatically regain control from participants who monopolize the conversation.`},{title:"Audit the Necessity of the Meeting",description:"Regularly assess if a live call is required. Asynchronous tools like Loom or a well-structured email can often replace non-essential meetings and free up hours of deep-work time."}],ctaLabel:"Read Full Insight on Entrepreneur"}},{slug:"maximizing-impact-with-vertical-video-avoiding-7-common-pitfalls",title:"Maximizing Impact with Vertical Video by Avoiding These 7 Common Pitfalls",excerpt:"View short-form video as a long-term consistency game. Hook viewers in 15 seconds. Relatability trumps trends.",category:"Video Marketing",externalUrl:"https://www.entrepreneur.com/science-technology/7-short-form-video-mistakes-to-avoid-in-your-marketing/449315",takeaways:{points:[{title:"Patience Over Viral Dreams",description:"View short-form video as a long-term consistency game rather than an overnight success tool."},{title:"The Power of the 15-Second Hook",description:"Modern attention spans favor zesty, high-energy clips under 34 seconds with an immediate visual or verbal hook."},{title:"Relatability Trumps Trends",description:`Skip generic dance challenges for "Day in the Life" or "How-To" content that actually showcases your brand's unique expertise.`},{title:"Accessibility is Non-Negotiable",description:"With 69% of users watching on mute, professional captions are essential for retention and engagement."},{title:"Humanize for Your Audience",description:"Since vertical video skew younger (Gen Z/Millennials), adjust your presentation style to be more authentic and less corporate."},{title:"Every Video Needs a Mission",description:`Never post without a clear Call to Action (CTA), whether it's a "Follow" or a "Check Bio," to ensure your views turn into value.`}],ctaLabel:"Read Full Insight on Entrepreneur"}},{slug:"streamlining-professional-workflows-with-ai-based-communication",title:"Streamlining Your Professional Workflows with AI Based Communication",excerpt:"Harness NLP for automatic call transcription. Deploy conversational chatbots for routine interactions.",category:"AI & Productivity",externalUrl:"https://www.entrepreneur.com/science-technology/using-ai-and-chatgpt-for-business-communications/452158",takeaways:{points:[{title:"Harness Natural Language Processing",description:"Use AI-driven phone services to automatically transcribe calls and generate summaries, saving hours of manual documentation."},{title:"Automate Routine Interactions",description:"Deploy conversational chatbots and AI routing to handle common customer inquiries like scheduling or shipment tracking, freeing up human agents for complex tasks."},{title:"Empower Your Team with AI Assistants",description:"Integrate AI tools with your CRM to provide agents with instant customer history and real-time sentiment analysis during difficult conversations."},{title:"Jumpstart Creative Output",description:'Leverage generative tools like ChatGPT and Midjourney to quickly draft newsletters, social media threads, and visual content, acting as a "back pocket" inspiration source.'},{title:"Unlock Predictive Analytics",description:"Utilize AI to identify trends and correlations in customer behavior, allowing for hyper-personalized marketing and more efficient resource allocation."}],ctaLabel:"Read Full Insight on Entrepreneur"}},{slug:"navigating-the-ethical-frontier-of-artificial-intelligence",title:"Navigating the Ethical Frontier of Artificial Intelligence",excerpt:"AI hallucinations create a liability gap. Widespread data collection creates massive targets for cyberattacks.",category:"AI Ethics",externalUrl:"https://www.entrepreneur.com/starting-a-business/elon-musk-and-other-leaders-are-worried-about-ai-heres-why/452872",takeaways:{points:[{title:"The Liability Gap",description:"AI systems can generate erroneous data (hallucinations), leaving businesses in a legal gray area regarding who is responsible for damages—the user or the provider."},{title:"Data Vulnerability",description:"Widespread data collection for AI training creates massive, centralized targets for cyberattacks and potential privacy violations."},{title:"Economic and Social Shifting",description:"The rapid automation of traditional roles could lead to significant workforce displacement and political instability if not managed with caution."},{title:"The Human Learning Crisis",description:"Over-reliance on generative tools may stunt critical thinking and deep domain mastery in the next generation of professionals."},{title:"The Case for Pause",description:"High-profile warnings from industry luminaries suggest that technical development is outpacing our ability to implement safety safeguards and ethical oversight."}],ctaLabel:"Read Full Insight on Entrepreneur"}}],zM=()=>w.jsxs("main",{children:[w.jsx(fs,{}),w.jsx("section",{className:"pt-32 pb-8 section-container",children:w.jsxs(re.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},className:"max-w-3xl",children:[w.jsx("p",{className:"text-sm font-medium tracking-[0.2em] uppercase text-primary mb-4",children:"Blog"}),w.jsxs("h1",{className:"font-serif text-5xl md:text-6xl text-foreground mb-6",children:["Insights & ",w.jsx("span",{className:"italic glow-text",children:"Strategy"})]}),w.jsx("p",{className:"text-lg text-muted-foreground",children:"Deep dives into AI SEO, Answer Engine Optimization, and the future of digital growth."})]})}),w.jsx("section",{className:"section-container pt-8",children:w.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:M1.map((e,t)=>{const n=!!e.takeaways,r=w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"w-full aspect-video rounded-lg bg-secondary/60 mb-5 overflow-hidden",children:e.image?w.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover",loading:"lazy"}):w.jsx("div",{className:"w-full h-full flex items-center justify-center",children:w.jsx("span",{className:"text-xs text-muted-foreground/40 uppercase tracking-widest",children:"Image coming soon"})})}),w.jsx("span",{className:"text-xs font-medium tracking-widest uppercase text-primary mb-3",children:e.category}),w.jsx("h2",{className:"font-serif text-xl text-foreground mb-3 leading-snug group-hover:text-primary transition-colors",children:e.title}),w.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-5 flex-1",children:e.excerpt}),w.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-medium text-primary",children:[n?"Read Takeaways":"Read More",w.jsx(Wf,{size:14,className:"group-hover:translate-x-1 transition-transform"})]})]});return w.jsx(re.article,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.05},className:"glass p-6 glow-border group flex flex-col",children:n?w.jsx(is,{to:`/blog/${e.slug}`,className:"flex flex-col flex-1",children:r}):e.externalUrl?w.jsx("a",{href:e.externalUrl,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col flex-1",children:r}):w.jsx("div",{className:"flex flex-col flex-1",children:r})},e.slug)})})}),w.jsx(ps,{})]}),WM=()=>{const{slug:e}=OR(),t=M1.find(n=>n.slug===e);return!t||!t.takeaways?w.jsxs("main",{children:[w.jsx(fs,{}),w.jsxs("section",{className:"pt-32 pb-20 section-container text-center",children:[w.jsx("h1",{className:"font-serif text-4xl text-foreground mb-4",children:"Post Not Found"}),w.jsx("p",{className:"text-muted-foreground mb-8",children:"This blog post doesn't exist or doesn't have content yet."}),w.jsxs(is,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline",children:[w.jsx(sg,{size:16})," Back to Blog"]})]}),w.jsx(ps,{})]}):w.jsxs("main",{children:[w.jsx(fs,{}),w.jsx("article",{className:"pt-32 pb-20 section-container",children:w.jsxs(re.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},className:"max-w-3xl mx-auto",children:[w.jsxs(is,{to:"/blog",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors mb-8",children:[w.jsx(sg,{size:14})," Back to Blog"]}),w.jsx("span",{className:"block text-xs font-medium tracking-[0.2em] uppercase text-primary mb-4",children:t.category}),w.jsx("h1",{className:"font-serif text-4xl md:text-5xl text-foreground mb-6 leading-tight",children:t.title}),t.image&&w.jsx("div",{className:"w-full aspect-video rounded-xl overflow-hidden mb-10",children:w.jsx("img",{src:t.image,alt:t.title,className:"w-full h-full object-cover"})}),t.takeaways.intro&&w.jsx("p",{className:"text-lg text-muted-foreground italic mb-10 border-l-2 border-primary pl-5",children:t.takeaways.intro}),w.jsx("h2",{className:"font-serif text-2xl text-foreground mb-8",children:"Key Takeaways"}),w.jsx("div",{className:"space-y-8",children:t.takeaways.points.map((n,r)=>w.jsxs(re.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:r*.05},className:"glass p-6 glow-border",children:[w.jsx("h3",{className:"font-serif text-lg text-foreground mb-2",children:n.title}),w.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n.description})]},r))}),t.externalUrl&&w.jsx(re.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mt-12 pt-8 border-t border-border",children:w.jsxs("a",{href:t.externalUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 px-6 py-3 bg-primary text-primary-foreground rounded-lg font-medium hover:opacity-90 transition-opacity",children:[t.takeaways.ctaLabel||"Read Full Article",w.jsx(_T,{size:16})]})})]})}),w.jsx(ps,{})]})},oo=[{name:"AdaptiveAI.net",price:2998,tld:"net",category:"AI"},{name:"AI-Tribune.com",price:4998,tld:"com",category:"AI"},{name:"AICabal.com",price:4998,tld:"com",category:"AI"},{name:"AIChamber.net",price:3998,tld:"net",category:"AI"},{name:"AIFutureNews.com",price:4998,tld:"com",category:"AI"},{name:"AIIconMaker.com",price:4998,tld:"com",category:"AI"},{name:"AIIndependent.com",price:4998,tld:"com",category:"AI"},{name:"AIMag.xyz",price:9998,tld:"xyz",category:"AI"},{name:"AIMediaBlog.com",price:7998,tld:"com",category:"AI"},{name:"AIPouch.com",price:14988,tld:"com",category:"AI"},{name:"AIProPrompt.com",price:4998,tld:"com",category:"AI"},{name:"AITarzan.com",price:14988,tld:"com",category:"AI"},{name:"AITomb.com",price:9998,tld:"com",category:"AI"},{name:"AIVirality.com",price:3998,tld:"com",category:"AI"},{name:"AIViralz.com",price:3998,tld:"com",category:"AI"},{name:"AIWorkForHire.com",price:4998,tld:"com",category:"AI"},{name:"AlulaZone.com",price:24998,tld:"com",category:"Other"},{name:"ArtistsUnited.com",price:19988,tld:"com",category:"Other"},{name:"BackBrave.com",price:2498,tld:"com",category:"Other"},{name:"BattleIgnorance.com",price:2988,tld:"com",category:"Other"},{name:"BCG.org",price:34988,tld:"org",category:"Business"},{name:"BestSwap.com",price:29988,tld:"com",category:"Crypto"},{name:"BipsAI.com",price:4998,tld:"com",category:"AI"},{name:"BitcoinMashup.com",price:7988,tld:"com",category:"Crypto"},{name:"BitcoinOnline.org",price:4998,tld:"org",category:"Crypto"},{name:"BitcoMedia.com",price:3999,tld:"com",category:"Crypto"},{name:"BountyMagazine.com",price:2498,tld:"com",category:"Other"},{name:"BTCAnalytics.com",price:9998,tld:"com",category:"Crypto"},{name:"BTCBash.com",price:3498,tld:"com",category:"Crypto"},{name:"BVOTD.com",price:3988,tld:"com",category:"Other"},{name:"CannabisSalad.com",price:1988,tld:"com",category:"Other"},{name:"ChapsPayment.com",price:4998,tld:"com",category:"Crypto"},{name:"CoinClad.com",price:4998,tld:"com",category:"Crypto"},{name:"CoinFora.com",price:7998,tld:"com",category:"Crypto"},{name:"CoinGlossary.com",price:4988,tld:"com",category:"Crypto"},{name:"CoinMashup.com",price:4999,tld:"com",category:"Crypto"},{name:"CoinOmni.com",price:4998,tld:"com",category:"Crypto"},{name:"CoinPotato.com",price:4998,tld:"com",category:"Crypto"},{name:"CoinSaint.com",price:9998,tld:"com",category:"Crypto"},{name:"ComputerSociety.com",price:9998,tld:"com",category:"Business"},{name:"ConfigVPN.com",price:4998,tld:"com",category:"Tech"},{name:"DeliverExpertise.com",price:1988,tld:"com",category:"Business"},{name:"DFKU.com",price:11988,tld:"com",category:"Other"},{name:"DRBP.com",price:34988,tld:"com",category:"Other"},{name:"DruGroup.com",price:1988,tld:"com",category:"Business"},{name:"DublinSEO.com",price:9988,tld:"com",category:"SEO"},{name:"DWYK.com",price:4998,tld:"com",category:"Other"},{name:"ECPGroup.com",price:14988,tld:"com",category:"Business"},{name:"EIND.com",price:24988,tld:"com",category:"Other"},{name:"EMEA.ai",price:34988,tld:"ai",category:"AI"},{name:"EnowaOnline.com",price:29988,tld:"com",category:"Other"},{name:"EnowaWeb.com",price:14998,tld:"com",category:"Other"},{name:"EverAmerica.com",price:4998,tld:"com",category:"Other"},{name:"FullOfAction.com",price:1998,tld:"com",category:"Other"},{name:"FunnelHome.com",price:1771,tld:"com",category:"SaaS"},{name:"GazetteAI.com",price:4998,tld:"com",category:"AI"},{name:"GBJG.com",price:4998,tld:"com",category:"Other"},{name:"GHZGroup.com",price:1988,tld:"com",category:"Business"},{name:"GifiAI.com",price:4998,tld:"com",category:"AI"},{name:"GoGoPet.com",price:14998,tld:"com",category:"Other"},{name:"GPTFellow.com",price:3998,tld:"com",category:"AI"},{name:"ImmunityTips.com",price:1499,tld:"com",category:"Other"},{name:"IncomeLaws.com",price:1499,tld:"com",category:"Business"},{name:"IrrigationAI.com",price:4998,tld:"com",category:"AI"},{name:"JamesWhiteaker.com",price:1495,tld:"com",category:"Other"},{name:"JBW.org",price:14988,tld:"org",category:"Business"},{name:"JITL.com",price:4998,tld:"com",category:"Other"},{name:"KWPN.com",price:29988,tld:"com",category:"Other"},{name:"LHE.ai",price:4998,tld:"ai",category:"AI"},{name:"LLFC.com",price:4998,tld:"com",category:"Other"},{name:"LoomingAI.com",price:7998,tld:"com",category:"AI"},{name:"MarketVariables.com",price:2498,tld:"com",category:"Business"},{name:"MarleyHotels.com",price:1483,tld:"com",category:"Other"},{name:"MediaWizards.com",price:14988,tld:"com",category:"Business"},{name:"MetaBrite.com",price:9998,tld:"com",category:"Tech"},{name:"MetaHorse.com",price:9998,tld:"com",category:"Crypto"},{name:"NameGum.com",price:2499,tld:"com",category:"Other"},{name:"NGEY.com",price:4998,tld:"com",category:"Other"},{name:"NXV.org",price:4998,tld:"org",category:"Other"},{name:"Pakistan.bz",price:9988,tld:"bz",category:"Other"},{name:"Pakistan.io",price:19988,tld:"io",category:"Other"},{name:"PKKV.com",price:4998,tld:"com",category:"Other"},{name:"PlayQiddiya.com",price:24998,tld:"com",category:"Other"},{name:"PNJE.com",price:998,tld:"com",category:"Other"},{name:"QiddiyaOnline.com",price:24998,tld:"com",category:"Other"},{name:"QiddiyaPost.com",price:14998,tld:"com",category:"Other"},{name:"RankPolice.com",price:1988,tld:"com",category:"SEO"},{name:"RWAPlatforms.com",price:4998,tld:"com",category:"Crypto"},{name:"SaaSAlpha.com",price:4988,tld:"com",category:"SaaS"},{name:"SaaSBasics.com",price:7998,tld:"com",category:"SaaS"},{name:"SaaSCallCenter.com",price:1988,tld:"com",category:"SaaS"},{name:"SaaSGem.com",price:5998,tld:"com",category:"SaaS"},{name:"SaaSHat.com",price:4998,tld:"com",category:"SaaS"},{name:"SaaSInsight.com",price:7998,tld:"com",category:"SaaS"},{name:"SaaSPhone.com",price:3998,tld:"com",category:"SaaS"},{name:"SaaSTip.com",price:7998,tld:"com",category:"SaaS"},{name:"SaaSZine.com",price:3998,tld:"com",category:"SaaS"},{name:"Saqlain.net",price:9998,tld:"net",category:"Other"},{name:"Security-Forces.com",price:2998,tld:"com",category:"Other"},{name:"SEO-Guide.com",price:1988,tld:"com",category:"SEO"},{name:"SEOArchives.com",price:1988,tld:"com",category:"SEO"},{name:"SEOGoliath.com",price:2998,tld:"com",category:"SEO"},{name:"SEOUSA.com",price:29988,tld:"com",category:"SEO"},{name:"SexyBoutique.com",price:9888,tld:"com",category:"Other"},{name:"SpecializedSolutions.com",price:7998,tld:"com",category:"Business"},{name:"StarsBio.com",price:7998,tld:"com",category:"Other"},{name:"StructureData.com",price:3499,tld:"com",category:"SEO"},{name:"TechnicalGold.com",price:2020,tld:"com",category:"Other"},{name:"TemplatesHome.com",price:2499,tld:"com",category:"Tech"},{name:"TheCoin.co",price:14988,tld:"co",category:"Crypto"},{name:"TRVN.com",price:11988,tld:"com",category:"Other"},{name:"TYNQ.com",price:11988,tld:"com",category:"Other"},{name:"USDTDubai.com",price:4998,tld:"com",category:"Crypto"},{name:"Utamo.app",price:24988,tld:"app",category:"Other"},{name:"Utamo.me",price:24998,tld:"me",category:"Other"},{name:"UtamoApp.com",price:24998,tld:"com",category:"Other"},{name:"UtamoNews.com",price:14998,tld:"com",category:"Other"},{name:"UtamoOnline.com",price:24998,tld:"com",category:"Other"},{name:"UtamoWorld.com",price:29988,tld:"com",category:"Other"},{name:"VideoGuides.com",price:8998,tld:"com",category:"Other"},{name:"VisitEnowa.com",price:29998,tld:"com",category:"Other"},{name:"WDFP.com",price:11988,tld:"com",category:"Other"},{name:"WeedAffiliates.com",price:4998,tld:"com",category:"Other"},{name:"WeedProjects.com",price:2499,tld:"com",category:"Other"},{name:"WFHTip.com",price:3499,tld:"com",category:"Other"},{name:"WPLuv.com",price:1744,tld:"com",category:"Tech"},{name:"XBT.ae",price:74988,tld:"ae",category:"Crypto"}],HM=["AI","Crypto","SaaS","SEO","Business","Tech","Other"],KM={initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0}},qM=[...new Set(oo.map(e=>e.tld))].sort(),GM=()=>{const[e,t]=b.useState(""),[n,r]=b.useState("price-desc"),[s,i]=b.useState(null),[o,a]=b.useState(null),l=b.useMemo(()=>{let c=oo.filter(u=>{const d=u.name.toLowerCase().includes(e.toLowerCase()),h=!s||u.tld===s,f=!o||u.category===o;return d&&h&&f});return n==="price-asc"?c.sort((u,d)=>u.price-d.price):n==="price-desc"?c.sort((u,d)=>d.price-u.price):c.sort((u,d)=>u.name.localeCompare(d.name)),c},[e,n,s,o]);return w.jsxs("main",{children:[w.jsx(fs,{}),w.jsxs("section",{className:"pt-32 pb-8 section-container",children:[w.jsxs(re.div,{...KM,transition:{duration:.6},className:"text-center mb-12",children:[w.jsx("p",{className:"text-sm font-medium tracking-[0.2em] uppercase text-primary mb-4",children:"Premium Domains"}),w.jsxs("h1",{className:"font-serif text-5xl md:text-6xl text-foreground mb-4",children:["Domains ",w.jsx("span",{className:"italic glow-text",children:"For Sale"})]}),w.jsxs("p",{className:"text-muted-foreground max-w-lg mx-auto mb-8",children:[oo.length," hand-picked premium domain names available for acquisition."]}),w.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 max-w-xl mx-auto",children:[w.jsxs("div",{className:"relative flex-1",children:[w.jsx(kx,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),w.jsx("input",{type:"text",placeholder:"Search domains...",value:e,onChange:c=>t(c.target.value),className:"w-full pl-9 pr-4 py-2.5 rounded-lg bg-secondary/60 border border-border/30 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),w.jsxs("select",{value:n,onChange:c=>r(c.target.value),className:"px-4 py-2.5 rounded-lg bg-secondary/60 border border-border/30 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-primary/50",children:[w.jsx("option",{value:"price-desc",children:"Price: High → Low"}),w.jsx("option",{value:"price-asc",children:"Price: Low → High"}),w.jsx("option",{value:"name",children:"Name: A → Z"})]})]}),w.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-6",children:[w.jsx("button",{onClick:()=>a(null),className:`px-3.5 py-1.5 rounded-full text-xs font-medium border transition-colors ${o?"bg-secondary/40 text-muted-foreground border-border/30 hover:text-foreground":"bg-primary text-primary-foreground border-primary"}`,children:"All Categories"}),HM.map(c=>{const u=oo.filter(d=>d.category===c).length;return w.jsxs("button",{onClick:()=>a(o===c?null:c),className:`px-3.5 py-1.5 rounded-full text-xs font-medium border transition-colors ${o===c?"bg-primary text-primary-foreground border-primary":"bg-secondary/40 text-muted-foreground border-border/30 hover:text-foreground"}`,children:[c," (",u,")"]},c)})]}),w.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-3",children:[w.jsx("button",{onClick:()=>i(null),className:`px-3 py-1 rounded-full text-[11px] font-medium border transition-colors ${s?"bg-secondary/20 text-muted-foreground border-border/20 hover:text-foreground":"bg-secondary text-foreground border-border/50"}`,children:"All TLDs"}),qM.map(c=>{const u=oo.filter(d=>d.tld===c).length;return w.jsxs("button",{onClick:()=>i(s===c?null:c),className:`px-3 py-1 rounded-full text-[11px] font-medium border transition-colors ${s===c?"bg-secondary text-foreground border-border/50":"bg-secondary/20 text-muted-foreground border-border/20 hover:text-foreground"}`,children:[".",c," (",u,")"]},c)})]})]}),w.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:l.map((c,u)=>w.jsxs(re.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:Math.min(u*.02,.3)},className:"glass p-6 glow-border group hover:border-primary/30 transition-all text-center",children:[w.jsxs("div",{className:"flex items-center justify-center gap-2 mb-3",children:[w.jsxs("span",{className:"inline-block px-2 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider bg-primary/10 text-primary",children:[".",c.tld]}),w.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-[10px] font-medium uppercase tracking-wider bg-secondary text-muted-foreground",children:c.category})]}),w.jsx("h2",{className:"font-serif text-lg text-foreground mb-2 truncate",children:c.name}),w.jsxs("p",{className:"text-xl font-semibold text-primary mb-4",children:["$",c.price.toLocaleString()]}),w.jsxs("a",{href:`https://${c.name.toLowerCase()}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:["Visit ",w.jsx(Wf,{size:12})]})]},c.name))}),l.length===0&&w.jsx("p",{className:"text-center text-muted-foreground mt-12",children:"No domains match your search."})]}),w.jsx(ps,{})]})},YM=[{icon:Cx,label:"X / Twitter",value:"@hsaleem",href:"https://x.com/hsaleem"},{icon:Ex,label:"LinkedIn",value:"hasansaleem",href:"https://www.linkedin.com/in/hasansaleem"}],_v={initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0}},QM=()=>(D1({title:"Contact Hasan Saleem | AI SEO & Digital Growth Consulting",description:"Get in touch with Hasan Saleem for AI-powered SEO strategy, digital growth consulting, and brand visibility optimization.",jsonLd:{"@context":"https://schema.org","@type":"ContactPage","@id":"https://hasansaleem.com/contact",url:"https://hasansaleem.com/contact",name:"Contact Hasan Saleem",mainEntity:{"@id":"https://hasansaleem.com/#person"}}}),w.jsxs("main",{children:[w.jsx(fs,{}),w.jsxs("section",{className:"pt-32 pb-0 section-container",children:[w.jsxs(re.div,{..._v,transition:{duration:.6},className:"text-center mb-12",children:[w.jsx("p",{className:"text-sm font-medium tracking-[0.2em] uppercase text-primary mb-4",children:"Get In Touch"}),w.jsxs("h1",{className:"font-serif text-5xl md:text-6xl text-foreground mb-4",children:["Let's ",w.jsx("span",{className:"italic glow-text",children:"Talk"})]}),w.jsx("p",{className:"text-muted-foreground max-w-lg mx-auto",children:"Whether you have a project in mind, want to discuss AI-powered growth strategies, or just want to connect — I'd love to hear from you."})]}),w.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 max-w-2xl mx-auto mb-16",children:YM.map((e,t)=>{const n=e.icon;return w.jsxs(re.a,{href:e.href,target:e.href.startsWith("mailto")?void 0:"_blank",rel:"me noopener noreferrer",..._v,transition:{delay:t*.1},className:"glass p-5 glow-border text-center hover:border-primary/30 transition-colors",children:[w.jsx(n,{size:20,className:"text-primary mx-auto mb-2"}),w.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:e.label}),w.jsx("p",{className:"text-sm font-medium text-foreground",children:e.value})]},e.label)})})]}),w.jsx(L1,{}),w.jsx(ps,{})]})),JM=()=>{const e=Or();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),w.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:w.jsxs("div",{className:"text-center",children:[w.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),w.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),w.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},XM=new ZA,ZM=()=>(sO(),w.jsxs(KR,{children:[w.jsx(qn,{path:"/",element:w.jsx(DM,{})}),w.jsx(qn,{path:"/about",element:w.jsx(BM,{})}),w.jsx(qn,{path:"/blog",element:w.jsx(zM,{})}),w.jsx(qn,{path:"/blog/:slug",element:w.jsx(WM,{})}),w.jsx(qn,{path:"/domains",element:w.jsx(GM,{})}),w.jsx(qn,{path:"/contact",element:w.jsx(QM,{})}),w.jsx(qn,{path:"*",element:w.jsx(JM,{})})]})),e$=()=>w.jsx(tR,{client:XM,children:w.jsxs(AA,{children:[w.jsx(hC,{}),w.jsx(WC,{}),w.jsx(ZR,{children:w.jsx(ZM,{})})]})});qw(document.getElementById("root")).render(w.jsx(e$,{}));