(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function l(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(u){if(u.ep)return;u.ep=!0;const d=l(u);fetch(u.href,d)}})();var cu={exports:{}},Ps={};/**
 * @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 j0;function lv(){if(j0)return Ps;j0=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(r,u,d){var f=null;if(d!==void 0&&(f=""+d),u.key!==void 0&&(f=""+u.key),"key"in u){d={};for(var p in u)p!=="key"&&(d[p]=u[p])}else d=u;return u=d.ref,{$$typeof:a,type:r,key:f,ref:u!==void 0?u:null,props:d}}return Ps.Fragment=i,Ps.jsx=l,Ps.jsxs=l,Ps}var C0;function rv(){return C0||(C0=1,cu.exports=lv()),cu.exports}var h=rv(),uu={exports:{}},St={};/**
 * @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 R0;function ov(){if(R0)return St;R0=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),T=Symbol.iterator;function w(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,H={};function Y(A,G,J){this.props=A,this.context=G,this.refs=H,this.updater=J||N}Y.prototype.isReactComponent={},Y.prototype.setState=function(A,G){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,G,"setState")},Y.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Z(){}Z.prototype=Y.prototype;function K(A,G,J){this.props=A,this.context=G,this.refs=H,this.updater=J||N}var I=K.prototype=new Z;I.constructor=K,B(I,Y.prototype),I.isPureReactComponent=!0;var $=Array.isArray;function st(){}var F={H:null,A:null,T:null,S:null},tt=Object.prototype.hasOwnProperty;function ct(A,G,J){var P=J.ref;return{$$typeof:a,type:A,key:G,ref:P!==void 0?P:null,props:J}}function rt(A,G){return ct(A.type,G,A.props)}function Tt(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function xt(A){var G={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(J){return G[J]})}var ce=/\/+/g;function Wt(A,G){return typeof A=="object"&&A!==null&&A.key!=null?xt(""+A.key):G.toString(36)}function Xt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(st,st):(A.status="pending",A.then(function(G){A.status==="pending"&&(A.status="fulfilled",A.value=G)},function(G){A.status==="pending"&&(A.status="rejected",A.reason=G)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function U(A,G,J,P,Q){var ft=typeof A;(ft==="undefined"||ft==="boolean")&&(A=null);var Nt=!1;if(A===null)Nt=!0;else switch(ft){case"bigint":case"string":case"number":Nt=!0;break;case"object":switch(A.$$typeof){case a:case i:Nt=!0;break;case b:return Nt=A._init,U(Nt(A._payload),G,J,P,Q)}}if(Nt)return Q=Q(A),Nt=P===""?"."+Wt(A,0):P,$(Q)?(J="",Nt!=null&&(J=Nt.replace(ce,"$&/")+"/"),U(Q,G,J,"",function(Ce){return Ce})):Q!=null&&(Tt(Q)&&(Q=rt(Q,J+(Q.key==null||A&&A.key===Q.key?"":(""+Q.key).replace(ce,"$&/")+"/")+Nt)),G.push(Q)),1;Nt=0;var $t=P===""?".":P+":";if($(A))for(var Ot=0;Ot<A.length;Ot++)P=A[Ot],ft=$t+Wt(P,Ot),Nt+=U(P,G,J,ft,Q);else if(Ot=w(A),typeof Ot=="function")for(A=Ot.call(A),Ot=0;!(P=A.next()).done;)P=P.value,ft=$t+Wt(P,Ot++),Nt+=U(P,G,J,ft,Q);else if(ft==="object"){if(typeof A.then=="function")return U(Xt(A),G,J,P,Q);throw G=String(A),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Nt}function W(A,G,J){if(A==null)return A;var P=[],Q=0;return U(A,P,"","",function(ft){return G.call(J,ft,Q++)}),P}function et(A){if(A._status===-1){var G=A._result;G=G(),G.then(function(J){(A._status===0||A._status===-1)&&(A._status=1,A._result=J)},function(J){(A._status===0||A._status===-1)&&(A._status=2,A._result=J)}),A._status===-1&&(A._status=0,A._result=G)}if(A._status===1)return A._result.default;throw A._result}var gt=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=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(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},Vt={map:W,forEach:function(A,G,J){W(A,function(){G.apply(this,arguments)},J)},count:function(A){var G=0;return W(A,function(){G++}),G},toArray:function(A){return W(A,function(G){return G})||[]},only:function(A){if(!Tt(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return St.Activity=S,St.Children=Vt,St.Component=Y,St.Fragment=l,St.Profiler=u,St.PureComponent=K,St.StrictMode=r,St.Suspense=x,St.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,St.__COMPILER_RUNTIME={__proto__:null,c:function(A){return F.H.useMemoCache(A)}},St.cache=function(A){return function(){return A.apply(null,arguments)}},St.cacheSignal=function(){return null},St.cloneElement=function(A,G,J){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var P=B({},A.props),Q=A.key;if(G!=null)for(ft in G.key!==void 0&&(Q=""+G.key),G)!tt.call(G,ft)||ft==="key"||ft==="__self"||ft==="__source"||ft==="ref"&&G.ref===void 0||(P[ft]=G[ft]);var ft=arguments.length-2;if(ft===1)P.children=J;else if(1<ft){for(var Nt=Array(ft),$t=0;$t<ft;$t++)Nt[$t]=arguments[$t+2];P.children=Nt}return ct(A.type,Q,P)},St.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},St.createElement=function(A,G,J){var P,Q={},ft=null;if(G!=null)for(P in G.key!==void 0&&(ft=""+G.key),G)tt.call(G,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(Q[P]=G[P]);var Nt=arguments.length-2;if(Nt===1)Q.children=J;else if(1<Nt){for(var $t=Array(Nt),Ot=0;Ot<Nt;Ot++)$t[Ot]=arguments[Ot+2];Q.children=$t}if(A&&A.defaultProps)for(P in Nt=A.defaultProps,Nt)Q[P]===void 0&&(Q[P]=Nt[P]);return ct(A,ft,Q)},St.createRef=function(){return{current:null}},St.forwardRef=function(A){return{$$typeof:p,render:A}},St.isValidElement=Tt,St.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:et}},St.memo=function(A,G){return{$$typeof:g,type:A,compare:G===void 0?null:G}},St.startTransition=function(A){var G=F.T,J={};F.T=J;try{var P=A(),Q=F.S;Q!==null&&Q(J,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(st,gt)}catch(ft){gt(ft)}finally{G!==null&&J.types!==null&&(G.types=J.types),F.T=G}},St.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},St.use=function(A){return F.H.use(A)},St.useActionState=function(A,G,J){return F.H.useActionState(A,G,J)},St.useCallback=function(A,G){return F.H.useCallback(A,G)},St.useContext=function(A){return F.H.useContext(A)},St.useDebugValue=function(){},St.useDeferredValue=function(A,G){return F.H.useDeferredValue(A,G)},St.useEffect=function(A,G){return F.H.useEffect(A,G)},St.useEffectEvent=function(A){return F.H.useEffectEvent(A)},St.useId=function(){return F.H.useId()},St.useImperativeHandle=function(A,G,J){return F.H.useImperativeHandle(A,G,J)},St.useInsertionEffect=function(A,G){return F.H.useInsertionEffect(A,G)},St.useLayoutEffect=function(A,G){return F.H.useLayoutEffect(A,G)},St.useMemo=function(A,G){return F.H.useMemo(A,G)},St.useOptimistic=function(A,G){return F.H.useOptimistic(A,G)},St.useReducer=function(A,G,J){return F.H.useReducer(A,G,J)},St.useRef=function(A){return F.H.useRef(A)},St.useState=function(A){return F.H.useState(A)},St.useSyncExternalStore=function(A,G,J){return F.H.useSyncExternalStore(A,G,J)},St.useTransition=function(){return F.H.useTransition()},St.version="19.2.7",St}var D0;function lf(){return D0||(D0=1,uu.exports=ov()),uu.exports}var D=lf(),fu={exports:{}},Fs={},du={exports:{}},hu={};/**
 * @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 O0;function cv(){return O0||(O0=1,(function(a){function i(U,W){var et=U.length;U.push(W);t:for(;0<et;){var gt=et-1>>>1,Vt=U[gt];if(0<u(Vt,W))U[gt]=W,U[et]=Vt,et=gt;else break t}}function l(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var W=U[0],et=U.pop();if(et!==W){U[0]=et;t:for(var gt=0,Vt=U.length,A=Vt>>>1;gt<A;){var G=2*(gt+1)-1,J=U[G],P=G+1,Q=U[P];if(0>u(J,et))P<Vt&&0>u(Q,J)?(U[gt]=Q,U[P]=et,gt=P):(U[gt]=J,U[G]=et,gt=G);else if(P<Vt&&0>u(Q,et))U[gt]=Q,U[P]=et,gt=P;else break t}}return W}function u(U,W){var et=U.sortIndex-W.sortIndex;return et!==0?et:U.id-W.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var x=[],g=[],b=1,S=null,T=3,w=!1,N=!1,B=!1,H=!1,Y=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function I(U){for(var W=l(g);W!==null;){if(W.callback===null)r(g);else if(W.startTime<=U)r(g),W.sortIndex=W.expirationTime,i(x,W);else break;W=l(g)}}function $(U){if(B=!1,I(U),!N)if(l(x)!==null)N=!0,st||(st=!0,xt());else{var W=l(g);W!==null&&Xt($,W.startTime-U)}}var st=!1,F=-1,tt=5,ct=-1;function rt(){return H?!0:!(a.unstable_now()-ct<tt)}function Tt(){if(H=!1,st){var U=a.unstable_now();ct=U;var W=!0;try{t:{N=!1,B&&(B=!1,Z(F),F=-1),w=!0;var et=T;try{e:{for(I(U),S=l(x);S!==null&&!(S.expirationTime>U&&rt());){var gt=S.callback;if(typeof gt=="function"){S.callback=null,T=S.priorityLevel;var Vt=gt(S.expirationTime<=U);if(U=a.unstable_now(),typeof Vt=="function"){S.callback=Vt,I(U),W=!0;break e}S===l(x)&&r(x),I(U)}else r(x);S=l(x)}if(S!==null)W=!0;else{var A=l(g);A!==null&&Xt($,A.startTime-U),W=!1}}break t}finally{S=null,T=et,w=!1}W=void 0}}finally{W?xt():st=!1}}}var xt;if(typeof K=="function")xt=function(){K(Tt)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,Wt=ce.port2;ce.port1.onmessage=Tt,xt=function(){Wt.postMessage(null)}}else xt=function(){Y(Tt,0)};function Xt(U,W){F=Y(function(){U(a.unstable_now())},W)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(U){U.callback=null},a.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):tt=0<U?Math.floor(1e3/U):5},a.unstable_getCurrentPriorityLevel=function(){return T},a.unstable_next=function(U){switch(T){case 1:case 2:case 3:var W=3;break;default:W=T}var et=T;T=W;try{return U()}finally{T=et}},a.unstable_requestPaint=function(){H=!0},a.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var et=T;T=U;try{return W()}finally{T=et}},a.unstable_scheduleCallback=function(U,W,et){var gt=a.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?gt+et:gt):et=gt,U){case 1:var Vt=-1;break;case 2:Vt=250;break;case 5:Vt=1073741823;break;case 4:Vt=1e4;break;default:Vt=5e3}return Vt=et+Vt,U={id:b++,callback:W,priorityLevel:U,startTime:et,expirationTime:Vt,sortIndex:-1},et>gt?(U.sortIndex=et,i(g,U),l(x)===null&&U===l(g)&&(B?(Z(F),F=-1):B=!0,Xt($,et-gt))):(U.sortIndex=Vt,i(x,U),N||w||(N=!0,st||(st=!0,xt()))),U},a.unstable_shouldYield=rt,a.unstable_wrapCallback=function(U){var W=T;return function(){var et=T;T=W;try{return U.apply(this,arguments)}finally{T=et}}}})(hu)),hu}var z0;function uv(){return z0||(z0=1,du.exports=cv()),du.exports}var mu={exports:{}},Ye={};/**
 * @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 L0;function fv(){if(L0)return Ye;L0=1;var a=lf();function i(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(x,g,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:S==null?null:""+S,children:x,containerInfo:g,implementation:b}}var f=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ye.createPortal=function(x,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return d(x,g,null,b)},Ye.flushSync=function(x){var g=f.T,b=r.p;try{if(f.T=null,r.p=2,x)return x()}finally{f.T=g,r.p=b,r.d.f()}},Ye.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(x,g))},Ye.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},Ye.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var b=g.as,S=p(b,g.crossOrigin),T=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?r.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:w}):b==="script"&&r.d.X(x,{crossOrigin:S,integrity:T,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Ye.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=p(g.as,g.crossOrigin);r.d.M(x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(x)},Ye.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,S=p(b,g.crossOrigin);r.d.L(x,b,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Ye.preloadModule=function(x,g){if(typeof x=="string")if(g){var b=p(g.as,g.crossOrigin);r.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(x)},Ye.requestFormReset=function(x){r.d.r(x)},Ye.unstable_batchedUpdates=function(x,g){return x(g)},Ye.useFormState=function(x,g,b){return f.H.useFormState(x,g,b)},Ye.useFormStatus=function(){return f.H.useHostTransitionStatus()},Ye.version="19.2.7",Ye}var U0;function dv(){if(U0)return mu.exports;U0=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),mu.exports=fv(),mu.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 B0;function hv(){if(B0)return Fs;B0=1;var a=uv(),i=lf(),l=dv();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function d(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function f(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function x(t){if(d(t)!==t)throw Error(r(188))}function g(t){var e=t.alternate;if(!e){if(e=d(t),e===null)throw Error(r(188));return e!==t?null:t}for(var n=t,s=e;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){n=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return x(o),t;if(c===s)return x(o),e;c=c.sibling}throw Error(r(188))}if(n.return!==s.return)n=o,s=c;else{for(var m=!1,v=o.child;v;){if(v===n){m=!0,n=o,s=c;break}if(v===s){m=!0,s=o,n=c;break}v=v.sibling}if(!m){for(v=c.child;v;){if(v===n){m=!0,n=c,s=o;break}if(v===s){m=!0,s=c,n=o;break}v=v.sibling}if(!m)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,T=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),K=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),tt=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),rt=Symbol.for("react.memo_cache_sentinel"),Tt=Symbol.iterator;function xt(t){return t===null||typeof t!="object"?null:(t=Tt&&t[Tt]||t["@@iterator"],typeof t=="function"?t:null)}var ce=Symbol.for("react.client.reference");function Wt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ce?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case B:return"Fragment";case Y:return"Profiler";case H:return"StrictMode";case $:return"Suspense";case st:return"SuspenseList";case ct:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case N:return"Portal";case K:return t.displayName||"Context";case Z:return(t._context.displayName||"Context")+".Consumer";case I:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return e=t.displayName||null,e!==null?e:Wt(t.type)||"Memo";case tt:e=t._payload,t=t._init;try{return Wt(t(e))}catch{}}return null}var Xt=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et={pending:!1,data:null,method:null,action:null},gt=[],Vt=-1;function A(t){return{current:t}}function G(t){0>Vt||(t.current=gt[Vt],gt[Vt]=null,Vt--)}function J(t,e){Vt++,gt[Vt]=t.current,t.current=e}var P=A(null),Q=A(null),ft=A(null),Nt=A(null);function $t(t,e){switch(J(ft,e),J(Q,t),J(P,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?$m(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=$m(e),t=t0(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}G(P),J(P,t)}function Ot(){G(P),G(Q),G(ft)}function Ce(t){t.memoizedState!==null&&J(Nt,t);var e=P.current,n=t0(e,t.type);e!==n&&(J(Q,t),J(P,n))}function pt(t){Q.current===t&&(G(P),G(Q)),Nt.current===t&&(G(Nt),Ks._currentValue=et)}var Mt,la;function qe(t){if(Mt===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Mt=e&&e[1]||"",la=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Mt+t+la}var es=!1;function ns(t,e){if(!t||es)return"";es=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(L){var z=L}Reflect.construct(t,[],X)}else{try{X.call()}catch(L){z=L}t.call(X.prototype)}}else{try{throw Error()}catch(L){z=L}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(L){if(L&&z&&typeof L.stack=="string")return[L.stack,z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),m=c[0],v=c[1];if(m&&v){var _=m.split(`
`),R=v.split(`
`);for(o=s=0;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;for(;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;if(s===_.length||o===R.length)for(s=_.length-1,o=R.length-1;1<=s&&0<=o&&_[s]!==R[o];)o--;for(;1<=s&&0<=o;s--,o--)if(_[s]!==R[o]){if(s!==1||o!==1)do if(s--,o--,0>o||_[s]!==R[o]){var k=`
`+_[s].replace(" at new "," at ");return t.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",t.displayName)),k}while(1<=s&&0<=o);break}}}finally{es=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?qe(n):""}function Wr(t,e){switch(t.tag){case 26:case 27:case 5:return qe(t.type);case 16:return qe("Lazy");case 13:return t.child!==e&&e!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return ns(t.type,!1);case 11:return ns(t.type.render,!1);case 1:return ns(t.type,!0);case 31:return qe("Activity");default:return""}}function Hn(t){try{var e="",n=null;do e+=Wr(t,n),n=t,t=t.return;while(t);return e}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}var as=Object.prototype.hasOwnProperty,La=a.unstable_scheduleCallback,is=a.unstable_cancelCallback,nt=a.unstable_shouldYield,y=a.unstable_requestPaint,V=a.unstable_now,ht=a.unstable_getCurrentPriorityLevel,vt=a.unstable_ImmediatePriority,fe=a.unstable_UserBlockingPriority,It=a.unstable_NormalPriority,ae=a.unstable_LowPriority,de=a.unstable_IdlePriority,kt=a.log,jt=a.unstable_setDisableYieldValue,ie=null,pe=null;function Oe(t){if(typeof kt=="function"&&jt(t),pe&&typeof pe.setStrictMode=="function")try{pe.setStrictMode(ie,t)}catch{}}var E=Math.clz32?Math.clz32:bt,zt=Math.log,at=Math.LN2;function bt(t){return t>>>=0,t===0?32:31-(zt(t)/at|0)|0}var Ct=256,_t=262144,se=4194304;function he(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function an(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var o=0,c=t.suspendedLanes,m=t.pingedLanes;t=t.warmLanes;var v=s&134217727;return v!==0?(s=v&~c,s!==0?o=he(s):(m&=v,m!==0?o=he(m):n||(n=v&~t,n!==0&&(o=he(n))))):(v=s&~c,v!==0?o=he(v):m!==0?o=he(m):n||(n=s&~t,n!==0&&(o=he(n)))),o===0?0:e!==0&&e!==o&&(e&c)===0&&(c=o&-o,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:o}function Pe(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function O(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 yt(){var t=se;return se<<=1,(se&62914560)===0&&(se=4194304),t}function Et(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function le(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Qt(t,e,n,s,o,c){var m=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var v=t.entanglements,_=t.expirationTimes,R=t.hiddenUpdates;for(n=m&~n;0<n;){var k=31-E(n),X=1<<k;v[k]=0,_[k]=-1;var z=R[k];if(z!==null)for(R[k]=null,k=0;k<z.length;k++){var L=z[k];L!==null&&(L.lane&=-536870913)}n&=~X}s!==0&&Te(t,s,0),c!==0&&o===0&&t.tag!==0&&(t.suspendedLanes|=c&~(m&~e))}function Te(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-E(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|n&261930}function ge(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var s=31-E(n),o=1<<s;o&e|t[s]&e&&(t[s]|=e),n&=~o}}function _e(t,e){var n=e&-e;return n=(n&42)!==0?1:sn(n),(n&(t.suspendedLanes|e))!==0?0:n}function sn(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ss(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bf(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:_0(t.type))}function kf(t,e){var n=W.p;try{return W.p=t,e()}finally{W.p=n}}var ra=Math.random().toString(36).slice(2),ze="__reactFiber$"+ra,Fe="__reactProps$"+ra,oi="__reactContainer$"+ra,$r="__reactEvents$"+ra,Py="__reactListeners$"+ra,Fy="__reactHandles$"+ra,Hf="__reactResources$"+ra,ls="__reactMarker$"+ra;function to(t){delete t[ze],delete t[Fe],delete t[$r],delete t[Py],delete t[Fy]}function ci(t){var e=t[ze];if(e)return e;for(var n=t.parentNode;n;){if(e=n[oi]||n[ze]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=r0(t);t!==null;){if(n=t[ze])return n;t=r0(t)}return e}t=n,n=t.parentNode}return null}function ui(t){if(t=t[ze]||t[oi]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function rs(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function fi(t){var e=t[Hf];return e||(e=t[Hf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Re(t){t[ls]=!0}var Gf=new Set,qf={};function Ua(t,e){di(t,e),di(t+"Capture",e)}function di(t,e){for(qf[t]=e,t=0;t<e.length;t++)Gf.add(e[t])}var Jy=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]*$"),Yf={},Xf={};function Wy(t){return as.call(Xf,t)?!0:as.call(Yf,t)?!1:Jy.test(t)?Xf[t]=!0:(Yf[t]=!0,!1)}function fl(t,e,n){if(Wy(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function dl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Gn(t,e,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+s)}}function mn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Kf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $y(t,e,n){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function eo(t){if(!t._valueTracker){var e=Kf(t)?"checked":"value";t._valueTracker=$y(t,e,""+t[e])}}function Zf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),s="";return t&&(s=Kf(t)?t.checked?"true":"false":t.value),t=s,t!==n?(e.setValue(t),!0):!1}function hl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var tx=/[\n"\\]/g;function pn(t){return t.replace(tx,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function no(t,e,n,s,o,c,m,v){t.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?t.type=m:t.removeAttribute("type"),e!=null?m==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+mn(e)):t.value!==""+mn(e)&&(t.value=""+mn(e)):m!=="submit"&&m!=="reset"||t.removeAttribute("value"),e!=null?ao(t,m,mn(e)):n!=null?ao(t,m,mn(n)):s!=null&&t.removeAttribute("value"),o==null&&c!=null&&(t.defaultChecked=!!c),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.name=""+mn(v):t.removeAttribute("name")}function If(t,e,n,s,o,c,m,v){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){eo(t);return}n=n!=null?""+mn(n):"",e=e!=null?""+mn(e):n,v||e===t.value||(t.value=e),t.defaultValue=e}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=v?t.checked:!!s,t.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.name=m),eo(t)}function ao(t,e,n){e==="number"&&hl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function hi(t,e,n,s){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&s&&(t[n].defaultSelected=!0)}else{for(n=""+mn(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,s&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function Qf(t,e,n){if(e!=null&&(e=""+mn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+mn(n):""}function Pf(t,e,n,s){if(e==null){if(s!=null){if(n!=null)throw Error(r(92));if(Xt(s)){if(1<s.length)throw Error(r(93));s=s[0]}n=s}n==null&&(n=""),e=n}n=mn(e),t.defaultValue=n,s=t.textContent,s===n&&s!==""&&s!==null&&(t.value=s),eo(t)}function mi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ex=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 Ff(t,e,n){var s=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,n):typeof n!="number"||n===0||ex.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Jf(t,e,n){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var o in e)s=e[o],e.hasOwnProperty(o)&&n[o]!==s&&Ff(t,o,s)}else for(var c in e)e.hasOwnProperty(c)&&Ff(t,c,e[c])}function io(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nx=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"]]),ax=/^[\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 ml(t){return ax.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function qn(){}var so=null;function lo(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var pi=null,gi=null;function Wf(t){var e=ui(t);if(e&&(t=e.stateNode)){var n=t[Fe]||null;t:switch(t=e.stateNode,e.type){case"input":if(no(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var s=n[e];if(s!==t&&s.form===t.form){var o=s[Fe]||null;if(!o)throw Error(r(90));no(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(e=0;e<n.length;e++)s=n[e],s.form===t.form&&Zf(s)}break t;case"textarea":Qf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&hi(t,!!n.multiple,e,!1)}}}var ro=!1;function $f(t,e,n){if(ro)return t(e,n);ro=!0;try{var s=t(e);return s}finally{if(ro=!1,(pi!==null||gi!==null)&&(er(),pi&&(e=pi,t=gi,gi=pi=null,Wf(e),t)))for(e=0;e<t.length;e++)Wf(t[e])}}function os(t,e){var n=t.stateNode;if(n===null)return null;var s=n[Fe]||null;if(s===null)return null;n=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(r(231,e,typeof n));return n}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oo=!1;if(Yn)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){oo=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{oo=!1}var oa=null,co=null,pl=null;function td(){if(pl)return pl;var t,e=co,n=e.length,s,o="value"in oa?oa.value:oa.textContent,c=o.length;for(t=0;t<n&&e[t]===o[t];t++);var m=n-t;for(s=1;s<=m&&e[n-s]===o[c-s];s++);return pl=o.slice(t,1<s?1-s:void 0)}function gl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function yl(){return!0}function ed(){return!1}function Je(t){function e(n,s,o,c,m){this._reactName=n,this._targetInst=o,this.type=s,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var v in t)t.hasOwnProperty(v)&&(n=t[v],this[v]=n?n(c):c[v]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?yl:ed,this.isPropagationStopped=ed,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),e}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=Je(Ba),us=S({},Ba,{view:0,detail:0}),ix=Je(us),uo,fo,fs,vl=S({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mo,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fs&&(fs&&t.type==="mousemove"?(uo=t.screenX-fs.screenX,fo=t.screenY-fs.screenY):fo=uo=0,fs=t),uo)},movementY:function(t){return"movementY"in t?t.movementY:fo}}),nd=Je(vl),sx=S({},vl,{dataTransfer:0}),lx=Je(sx),rx=S({},us,{relatedTarget:0}),ho=Je(rx),ox=S({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),cx=Je(ox),ux=S({},Ba,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),fx=Je(ux),dx=S({},Ba,{data:0}),ad=Je(dx),hx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mx={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"},px={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gx(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=px[t])?!!e[t]:!1}function mo(){return gx}var yx=S({},us,{key:function(t){if(t.key){var e=hx[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=gl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?mx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mo,charCode:function(t){return t.type==="keypress"?gl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?gl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),xx=Je(yx),vx=S({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),id=Je(vx),bx=S({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mo}),Sx=Je(bx),Tx=S({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),_x=Je(Tx),Ax=S({},vl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Mx=Je(Ax),Ex=S({},Ba,{newState:0,oldState:0}),wx=Je(Ex),Vx=[9,13,27,32],po=Yn&&"CompositionEvent"in window,ds=null;Yn&&"documentMode"in document&&(ds=document.documentMode);var Nx=Yn&&"TextEvent"in window&&!ds,sd=Yn&&(!po||ds&&8<ds&&11>=ds),ld=" ",rd=!1;function od(t,e){switch(t){case"keyup":return Vx.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var yi=!1;function jx(t,e){switch(t){case"compositionend":return cd(e);case"keypress":return e.which!==32?null:(rd=!0,ld);case"textInput":return t=e.data,t===ld&&rd?null:t;default:return null}}function Cx(t,e){if(yi)return t==="compositionend"||!po&&od(t,e)?(t=td(),pl=co=oa=null,yi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return sd&&e.locale!=="ko"?null:e.data;default:return null}}var Rx={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 ud(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Rx[t.type]:e==="textarea"}function fd(t,e,n,s){pi?gi?gi.push(s):gi=[s]:pi=s,e=or(e,"onChange"),0<e.length&&(n=new xl("onChange","change",null,n,s),t.push({event:n,listeners:e}))}var hs=null,ms=null;function Dx(t){Im(t,0)}function bl(t){var e=rs(t);if(Zf(e))return t}function dd(t,e){if(t==="change")return e}var hd=!1;if(Yn){var go;if(Yn){var yo="oninput"in document;if(!yo){var md=document.createElement("div");md.setAttribute("oninput","return;"),yo=typeof md.oninput=="function"}go=yo}else go=!1;hd=go&&(!document.documentMode||9<document.documentMode)}function pd(){hs&&(hs.detachEvent("onpropertychange",gd),ms=hs=null)}function gd(t){if(t.propertyName==="value"&&bl(ms)){var e=[];fd(e,ms,t,lo(t)),$f(Dx,e)}}function Ox(t,e,n){t==="focusin"?(pd(),hs=e,ms=n,hs.attachEvent("onpropertychange",gd)):t==="focusout"&&pd()}function zx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return bl(ms)}function Lx(t,e){if(t==="click")return bl(e)}function Ux(t,e){if(t==="input"||t==="change")return bl(e)}function Bx(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ln=typeof Object.is=="function"?Object.is:Bx;function ps(t,e){if(ln(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var o=n[s];if(!as.call(e,o)||!ln(t[o],e[o]))return!1}return!0}function yd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function xd(t,e){var n=yd(t);t=0;for(var s;n;){if(n.nodeType===3){if(s=t+n.textContent.length,t<=e&&s>=e)return{node:n,offset:e-t};t=s}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=yd(n)}}function vd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?vd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function bd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=hl(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=hl(t.document)}return e}function xo(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var kx=Yn&&"documentMode"in document&&11>=document.documentMode,xi=null,vo=null,gs=null,bo=!1;function Sd(t,e,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bo||xi==null||xi!==hl(s)||(s=xi,"selectionStart"in s&&xo(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),gs&&ps(gs,s)||(gs=s,s=or(vo,"onSelect"),0<s.length&&(e=new xl("onSelect","select",null,e,n),t.push({event:e,listeners:s}),e.target=xi)))}function ka(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var vi={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},So={},Td={};Yn&&(Td=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Ha(t){if(So[t])return So[t];if(!vi[t])return t;var e=vi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Td)return So[t]=e[n];return t}var _d=Ha("animationend"),Ad=Ha("animationiteration"),Md=Ha("animationstart"),Hx=Ha("transitionrun"),Gx=Ha("transitionstart"),qx=Ha("transitioncancel"),Ed=Ha("transitionend"),wd=new Map,To="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(" ");To.push("scrollEnd");function En(t,e){wd.set(t,e),Ua(e,[t])}var Sl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},gn=[],bi=0,_o=0;function Tl(){for(var t=bi,e=_o=bi=0;e<t;){var n=gn[e];gn[e++]=null;var s=gn[e];gn[e++]=null;var o=gn[e];gn[e++]=null;var c=gn[e];if(gn[e++]=null,s!==null&&o!==null){var m=s.pending;m===null?o.next=o:(o.next=m.next,m.next=o),s.pending=o}c!==0&&Vd(n,o,c)}}function _l(t,e,n,s){gn[bi++]=t,gn[bi++]=e,gn[bi++]=n,gn[bi++]=s,_o|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Ao(t,e,n,s){return _l(t,e,n,s),Al(t)}function Ga(t,e){return _l(t,null,null,e),Al(t)}function Vd(t,e,n){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n);for(var o=!1,c=t.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(o=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,o&&e!==null&&(o=31-E(n),t=c.hiddenUpdates,s=t[o],s===null?t[o]=[e]:s.push(e),e.lane=n|536870912),c):null}function Al(t){if(50<Bs)throw Bs=0,Dc=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Si={};function Yx(t,e,n,s){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(t,e,n,s){return new Yx(t,e,n,s)}function Mo(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xn(t,e){var n=t.alternate;return n===null?(n=rn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function Nd(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ml(t,e,n,s,o,c){var m=0;if(s=t,typeof t=="function")Mo(t)&&(m=1);else if(typeof t=="string")m=Q1(t,n,P.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case ct:return t=rn(31,n,e,o),t.elementType=ct,t.lanes=c,t;case B:return qa(n.children,o,c,e);case H:m=8,o|=24;break;case Y:return t=rn(12,n,e,o|2),t.elementType=Y,t.lanes=c,t;case $:return t=rn(13,n,e,o),t.elementType=$,t.lanes=c,t;case st:return t=rn(19,n,e,o),t.elementType=st,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case K:m=10;break t;case Z:m=9;break t;case I:m=11;break t;case F:m=14;break t;case tt:m=16,s=null;break t}m=29,n=Error(r(130,t===null?"null":typeof t,"")),s=null}return e=rn(m,n,e,o),e.elementType=t,e.type=s,e.lanes=c,e}function qa(t,e,n,s){return t=rn(7,t,s,e),t.lanes=n,t}function Eo(t,e,n){return t=rn(6,t,null,e),t.lanes=n,t}function jd(t){var e=rn(18,null,null,0);return e.stateNode=t,e}function wo(t,e,n){return e=rn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Cd=new WeakMap;function yn(t,e){if(typeof t=="object"&&t!==null){var n=Cd.get(t);return n!==void 0?n:(e={value:t,source:e,stack:Hn(e)},Cd.set(t,e),e)}return{value:t,source:e,stack:Hn(e)}}var Ti=[],_i=0,El=null,ys=0,xn=[],vn=0,ca=null,Rn=1,Dn="";function Kn(t,e){Ti[_i++]=ys,Ti[_i++]=El,El=t,ys=e}function Rd(t,e,n){xn[vn++]=Rn,xn[vn++]=Dn,xn[vn++]=ca,ca=t;var s=Rn;t=Dn;var o=32-E(s)-1;s&=~(1<<o),n+=1;var c=32-E(e)+o;if(30<c){var m=o-o%5;c=(s&(1<<m)-1).toString(32),s>>=m,o-=m,Rn=1<<32-E(e)+o|n<<o|s,Dn=c+t}else Rn=1<<c|n<<o|s,Dn=t}function Vo(t){t.return!==null&&(Kn(t,1),Rd(t,1,0))}function No(t){for(;t===El;)El=Ti[--_i],Ti[_i]=null,ys=Ti[--_i],Ti[_i]=null;for(;t===ca;)ca=xn[--vn],xn[vn]=null,Dn=xn[--vn],xn[vn]=null,Rn=xn[--vn],xn[vn]=null}function Dd(t,e){xn[vn++]=Rn,xn[vn++]=Dn,xn[vn++]=ca,Rn=e.id,Dn=e.overflow,ca=t}var Le=null,re=null,Bt=!1,ua=null,bn=!1,jo=Error(r(519));function fa(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xs(yn(e,t)),jo}function Od(t){var e=t.stateNode,n=t.type,s=t.memoizedProps;switch(e[ze]=t,e[Fe]=s,n){case"dialog":Dt("cancel",e),Dt("close",e);break;case"iframe":case"object":case"embed":Dt("load",e);break;case"video":case"audio":for(n=0;n<Hs.length;n++)Dt(Hs[n],e);break;case"source":Dt("error",e);break;case"img":case"image":case"link":Dt("error",e),Dt("load",e);break;case"details":Dt("toggle",e);break;case"input":Dt("invalid",e),If(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Dt("invalid",e);break;case"textarea":Dt("invalid",e),Pf(e,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||s.suppressHydrationWarning===!0||Jm(e.textContent,n)?(s.popover!=null&&(Dt("beforetoggle",e),Dt("toggle",e)),s.onScroll!=null&&Dt("scroll",e),s.onScrollEnd!=null&&Dt("scrollend",e),s.onClick!=null&&(e.onclick=qn),e=!0):e=!1,e||fa(t,!0)}function zd(t){for(Le=t.return;Le;)switch(Le.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:Le=Le.return}}function Ai(t){if(t!==Le)return!1;if(!Bt)return zd(t),Bt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Qc(t.type,t.memoizedProps)),n=!n),n&&re&&fa(t),zd(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));re=l0(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));re=l0(t)}else e===27?(e=re,Ma(t.type)?(t=$c,$c=null,re=t):re=e):re=Le?Tn(t.stateNode.nextSibling):null;return!0}function Ya(){re=Le=null,Bt=!1}function Co(){var t=ua;return t!==null&&(en===null?en=t:en.push.apply(en,t),ua=null),t}function xs(t){ua===null?ua=[t]:ua.push(t)}var Ro=A(null),Xa=null,Zn=null;function da(t,e,n){J(Ro,e._currentValue),e._currentValue=n}function In(t){t._currentValue=Ro.current,G(Ro)}function Do(t,e,n){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===n)break;t=t.return}}function Oo(t,e,n,s){var o=t.child;for(o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){var m=o.child;c=c.firstContext;t:for(;c!==null;){var v=c;c=o;for(var _=0;_<e.length;_++)if(v.context===e[_]){c.lanes|=n,v=c.alternate,v!==null&&(v.lanes|=n),Do(c.return,n,t),s||(m=null);break t}c=v.next}}else if(o.tag===18){if(m=o.return,m===null)throw Error(r(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),Do(m,n,t),m=null}else m=o.child;if(m!==null)m.return=o;else for(m=o;m!==null;){if(m===t){m=null;break}if(o=m.sibling,o!==null){o.return=m.return,m=o;break}m=m.return}o=m}}function Mi(t,e,n,s){t=null;for(var o=e,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var m=o.alternate;if(m===null)throw Error(r(387));if(m=m.memoizedProps,m!==null){var v=o.type;ln(o.pendingProps.value,m.value)||(t!==null?t.push(v):t=[v])}}else if(o===Nt.current){if(m=o.alternate,m===null)throw Error(r(387));m.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(Ks):t=[Ks])}o=o.return}t!==null&&Oo(e,t,n,s),e.flags|=262144}function wl(t){for(t=t.firstContext;t!==null;){if(!ln(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ka(t){Xa=t,Zn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ue(t){return Ld(Xa,t)}function Vl(t,e){return Xa===null&&Ka(t),Ld(t,e)}function Ld(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Zn===null){if(t===null)throw Error(r(308));Zn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Zn=Zn.next=e;return n}var Xx=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Kx=a.unstable_scheduleCallback,Zx=a.unstable_NormalPriority,Ae={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Xx,data:new Map,refCount:0}}function vs(t){t.refCount--,t.refCount===0&&Kx(Zx,function(){t.controller.abort()})}var bs=null,Lo=0,Ei=0,wi=null;function Ix(t,e){if(bs===null){var n=bs=[];Lo=0,Ei=kc(),wi={status:"pending",value:void 0,then:function(s){n.push(s)}}}return Lo++,e.then(Ud,Ud),e}function Ud(){if(--Lo===0&&bs!==null){wi!==null&&(wi.status="fulfilled");var t=bs;bs=null,Ei=0,wi=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Qx(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var o=0;o<n.length;o++)(0,n[o])(e)},function(o){for(s.status="rejected",s.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),s}var Bd=U.S;U.S=function(t,e){Sm=V(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Ix(t,e),Bd!==null&&Bd(t,e)};var Za=A(null);function Uo(){var t=Za.current;return t!==null?t:te.pooledCache}function Nl(t,e){e===null?J(Za,Za.current):J(Za,e.pool)}function kd(){var t=Uo();return t===null?null:{parent:Ae._currentValue,pool:t}}var Vi=Error(r(460)),Bo=Error(r(474)),jl=Error(r(542)),Cl={then:function(){}};function Hd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Gd(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(qn,qn),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Yd(t),t;default:if(typeof e.status=="string")e.then(qn,qn);else{if(t=te,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=s}},function(s){if(e.status==="pending"){var o=e;o.status="rejected",o.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Yd(t),t}throw Qa=e,Vi}}function Ia(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Qa=n,Vi):n}}var Qa=null;function qd(){if(Qa===null)throw Error(r(459));var t=Qa;return Qa=null,t}function Yd(t){if(t===Vi||t===jl)throw Error(r(483))}var Ni=null,Ss=0;function Rl(t){var e=Ss;return Ss+=1,Ni===null&&(Ni=[]),Gd(Ni,t,e)}function Ts(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Dl(t,e){throw e.$$typeof===T?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Xd(t){function e(j,M){if(t){var C=j.deletions;C===null?(j.deletions=[M],j.flags|=16):C.push(M)}}function n(j,M){if(!t)return null;for(;M!==null;)e(j,M),M=M.sibling;return null}function s(j){for(var M=new Map;j!==null;)j.key!==null?M.set(j.key,j):M.set(j.index,j),j=j.sibling;return M}function o(j,M){return j=Xn(j,M),j.index=0,j.sibling=null,j}function c(j,M,C){return j.index=C,t?(C=j.alternate,C!==null?(C=C.index,C<M?(j.flags|=67108866,M):C):(j.flags|=67108866,M)):(j.flags|=1048576,M)}function m(j){return t&&j.alternate===null&&(j.flags|=67108866),j}function v(j,M,C,q){return M===null||M.tag!==6?(M=Eo(C,j.mode,q),M.return=j,M):(M=o(M,C),M.return=j,M)}function _(j,M,C,q){var dt=C.type;return dt===B?k(j,M,C.props.children,q,C.key):M!==null&&(M.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===tt&&Ia(dt)===M.type)?(M=o(M,C.props),Ts(M,C),M.return=j,M):(M=Ml(C.type,C.key,C.props,null,j.mode,q),Ts(M,C),M.return=j,M)}function R(j,M,C,q){return M===null||M.tag!==4||M.stateNode.containerInfo!==C.containerInfo||M.stateNode.implementation!==C.implementation?(M=wo(C,j.mode,q),M.return=j,M):(M=o(M,C.children||[]),M.return=j,M)}function k(j,M,C,q,dt){return M===null||M.tag!==7?(M=qa(C,j.mode,q,dt),M.return=j,M):(M=o(M,C),M.return=j,M)}function X(j,M,C){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Eo(""+M,j.mode,C),M.return=j,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case w:return C=Ml(M.type,M.key,M.props,null,j.mode,C),Ts(C,M),C.return=j,C;case N:return M=wo(M,j.mode,C),M.return=j,M;case tt:return M=Ia(M),X(j,M,C)}if(Xt(M)||xt(M))return M=qa(M,j.mode,C,null),M.return=j,M;if(typeof M.then=="function")return X(j,Rl(M),C);if(M.$$typeof===K)return X(j,Vl(j,M),C);Dl(j,M)}return null}function z(j,M,C,q){var dt=M!==null?M.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return dt!==null?null:v(j,M,""+C,q);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case w:return C.key===dt?_(j,M,C,q):null;case N:return C.key===dt?R(j,M,C,q):null;case tt:return C=Ia(C),z(j,M,C,q)}if(Xt(C)||xt(C))return dt!==null?null:k(j,M,C,q,null);if(typeof C.then=="function")return z(j,M,Rl(C),q);if(C.$$typeof===K)return z(j,M,Vl(j,C),q);Dl(j,C)}return null}function L(j,M,C,q,dt){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return j=j.get(C)||null,v(M,j,""+q,dt);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case w:return j=j.get(q.key===null?C:q.key)||null,_(M,j,q,dt);case N:return j=j.get(q.key===null?C:q.key)||null,R(M,j,q,dt);case tt:return q=Ia(q),L(j,M,C,q,dt)}if(Xt(q)||xt(q))return j=j.get(C)||null,k(M,j,q,dt,null);if(typeof q.then=="function")return L(j,M,C,Rl(q),dt);if(q.$$typeof===K)return L(j,M,C,Vl(M,q),dt);Dl(M,q)}return null}function it(j,M,C,q){for(var dt=null,Ht=null,ot=M,wt=M=0,Ut=null;ot!==null&&wt<C.length;wt++){ot.index>wt?(Ut=ot,ot=null):Ut=ot.sibling;var Gt=z(j,ot,C[wt],q);if(Gt===null){ot===null&&(ot=Ut);break}t&&ot&&Gt.alternate===null&&e(j,ot),M=c(Gt,M,wt),Ht===null?dt=Gt:Ht.sibling=Gt,Ht=Gt,ot=Ut}if(wt===C.length)return n(j,ot),Bt&&Kn(j,wt),dt;if(ot===null){for(;wt<C.length;wt++)ot=X(j,C[wt],q),ot!==null&&(M=c(ot,M,wt),Ht===null?dt=ot:Ht.sibling=ot,Ht=ot);return Bt&&Kn(j,wt),dt}for(ot=s(ot);wt<C.length;wt++)Ut=L(ot,j,wt,C[wt],q),Ut!==null&&(t&&Ut.alternate!==null&&ot.delete(Ut.key===null?wt:Ut.key),M=c(Ut,M,wt),Ht===null?dt=Ut:Ht.sibling=Ut,Ht=Ut);return t&&ot.forEach(function(ja){return e(j,ja)}),Bt&&Kn(j,wt),dt}function mt(j,M,C,q){if(C==null)throw Error(r(151));for(var dt=null,Ht=null,ot=M,wt=M=0,Ut=null,Gt=C.next();ot!==null&&!Gt.done;wt++,Gt=C.next()){ot.index>wt?(Ut=ot,ot=null):Ut=ot.sibling;var ja=z(j,ot,Gt.value,q);if(ja===null){ot===null&&(ot=Ut);break}t&&ot&&ja.alternate===null&&e(j,ot),M=c(ja,M,wt),Ht===null?dt=ja:Ht.sibling=ja,Ht=ja,ot=Ut}if(Gt.done)return n(j,ot),Bt&&Kn(j,wt),dt;if(ot===null){for(;!Gt.done;wt++,Gt=C.next())Gt=X(j,Gt.value,q),Gt!==null&&(M=c(Gt,M,wt),Ht===null?dt=Gt:Ht.sibling=Gt,Ht=Gt);return Bt&&Kn(j,wt),dt}for(ot=s(ot);!Gt.done;wt++,Gt=C.next())Gt=L(ot,j,wt,Gt.value,q),Gt!==null&&(t&&Gt.alternate!==null&&ot.delete(Gt.key===null?wt:Gt.key),M=c(Gt,M,wt),Ht===null?dt=Gt:Ht.sibling=Gt,Ht=Gt);return t&&ot.forEach(function(sv){return e(j,sv)}),Bt&&Kn(j,wt),dt}function Jt(j,M,C,q){if(typeof C=="object"&&C!==null&&C.type===B&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case w:t:{for(var dt=C.key;M!==null;){if(M.key===dt){if(dt=C.type,dt===B){if(M.tag===7){n(j,M.sibling),q=o(M,C.props.children),q.return=j,j=q;break t}}else if(M.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===tt&&Ia(dt)===M.type){n(j,M.sibling),q=o(M,C.props),Ts(q,C),q.return=j,j=q;break t}n(j,M);break}else e(j,M);M=M.sibling}C.type===B?(q=qa(C.props.children,j.mode,q,C.key),q.return=j,j=q):(q=Ml(C.type,C.key,C.props,null,j.mode,q),Ts(q,C),q.return=j,j=q)}return m(j);case N:t:{for(dt=C.key;M!==null;){if(M.key===dt)if(M.tag===4&&M.stateNode.containerInfo===C.containerInfo&&M.stateNode.implementation===C.implementation){n(j,M.sibling),q=o(M,C.children||[]),q.return=j,j=q;break t}else{n(j,M);break}else e(j,M);M=M.sibling}q=wo(C,j.mode,q),q.return=j,j=q}return m(j);case tt:return C=Ia(C),Jt(j,M,C,q)}if(Xt(C))return it(j,M,C,q);if(xt(C)){if(dt=xt(C),typeof dt!="function")throw Error(r(150));return C=dt.call(C),mt(j,M,C,q)}if(typeof C.then=="function")return Jt(j,M,Rl(C),q);if(C.$$typeof===K)return Jt(j,M,Vl(j,C),q);Dl(j,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,M!==null&&M.tag===6?(n(j,M.sibling),q=o(M,C),q.return=j,j=q):(n(j,M),q=Eo(C,j.mode,q),q.return=j,j=q),m(j)):n(j,M)}return function(j,M,C,q){try{Ss=0;var dt=Jt(j,M,C,q);return Ni=null,dt}catch(ot){if(ot===Vi||ot===jl)throw ot;var Ht=rn(29,ot,null,j.mode);return Ht.lanes=q,Ht.return=j,Ht}finally{}}}var Pa=Xd(!0),Kd=Xd(!1),ha=!1;function ko(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ho(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ma(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function pa(t,e,n){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Yt&2)!==0){var o=s.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),s.pending=e,e=Al(t),Vd(t,null,n),e}return _l(t,s,e,n),Al(t)}function _s(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,ge(t,n)}}function Go(t,e){var n=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?o=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?o=c=e:c=c.next=e}else o=c=e;n={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var qo=!1;function As(){if(qo){var t=wi;if(t!==null)throw t}}function Ms(t,e,n,s){qo=!1;var o=t.updateQueue;ha=!1;var c=o.firstBaseUpdate,m=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var _=v,R=_.next;_.next=null,m===null?c=R:m.next=R,m=_;var k=t.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==m&&(v===null?k.firstBaseUpdate=R:v.next=R,k.lastBaseUpdate=_))}if(c!==null){var X=o.baseState;m=0,k=R=_=null,v=c;do{var z=v.lane&-536870913,L=z!==v.lane;if(L?(Lt&z)===z:(s&z)===z){z!==0&&z===Ei&&(qo=!0),k!==null&&(k=k.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var it=t,mt=v;z=e;var Jt=n;switch(mt.tag){case 1:if(it=mt.payload,typeof it=="function"){X=it.call(Jt,X,z);break t}X=it;break t;case 3:it.flags=it.flags&-65537|128;case 0:if(it=mt.payload,z=typeof it=="function"?it.call(Jt,X,z):it,z==null)break t;X=S({},X,z);break t;case 2:ha=!0}}z=v.callback,z!==null&&(t.flags|=64,L&&(t.flags|=8192),L=o.callbacks,L===null?o.callbacks=[z]:L.push(z))}else L={lane:z,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(R=k=L,_=X):k=k.next=L,m|=z;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;L=v,v=L.next,L.next=null,o.lastBaseUpdate=L,o.shared.pending=null}}while(!0);k===null&&(_=X),o.baseState=_,o.firstBaseUpdate=R,o.lastBaseUpdate=k,c===null&&(o.shared.lanes=0),ba|=m,t.lanes=m,t.memoizedState=X}}function Zd(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Id(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Zd(n[t],e)}var ji=A(null),Ol=A(0);function Qd(t,e){t=na,J(Ol,t),J(ji,e),na=t|e.baseLanes}function Yo(){J(Ol,na),J(ji,ji.current)}function Xo(){na=Ol.current,G(ji),G(Ol)}var on=A(null),Sn=null;function ga(t){var e=t.alternate;J(be,be.current&1),J(on,t),Sn===null&&(e===null||ji.current!==null||e.memoizedState!==null)&&(Sn=t)}function Ko(t){J(be,be.current),J(on,t),Sn===null&&(Sn=t)}function Pd(t){t.tag===22?(J(be,be.current),J(on,t),Sn===null&&(Sn=t)):ya()}function ya(){J(be,be.current),J(on,on.current)}function cn(t){G(on),Sn===t&&(Sn=null),G(be)}var be=A(0);function zl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Jc(n)||Wc(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Qn=0,At=null,Pt=null,Me=null,Ll=!1,Ci=!1,Fa=!1,Ul=0,Es=0,Ri=null,Px=0;function ye(){throw Error(r(321))}function Zo(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ln(t[n],e[n]))return!1;return!0}function Io(t,e,n,s,o,c){return Qn=c,At=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,U.H=t===null||t.memoizedState===null?Rh:oc,Fa=!1,c=n(s,o),Fa=!1,Ci&&(c=Jd(e,n,s,o)),Fd(t),c}function Fd(t){U.H=Ns;var e=Pt!==null&&Pt.next!==null;if(Qn=0,Me=Pt=At=null,Ll=!1,Es=0,Ri=null,e)throw Error(r(300));t===null||Ee||(t=t.dependencies,t!==null&&wl(t)&&(Ee=!0))}function Jd(t,e,n,s){At=t;var o=0;do{if(Ci&&(Ri=null),Es=0,Ci=!1,25<=o)throw Error(r(301));if(o+=1,Me=Pt=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}U.H=Dh,c=e(n,s)}while(Ci);return c}function Fx(){var t=U.H,e=t.useState()[0];return e=typeof e.then=="function"?ws(e):e,t=t.useState()[0],(Pt!==null?Pt.memoizedState:null)!==t&&(At.flags|=1024),e}function Qo(){var t=Ul!==0;return Ul=0,t}function Po(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Fo(t){if(Ll){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Ll=!1}Qn=0,Me=Pt=At=null,Ci=!1,Es=Ul=0,Ri=null}function Ze(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?At.memoizedState=Me=t:Me=Me.next=t,Me}function Se(){if(Pt===null){var t=At.alternate;t=t!==null?t.memoizedState:null}else t=Pt.next;var e=Me===null?At.memoizedState:Me.next;if(e!==null)Me=e,Pt=t;else{if(t===null)throw At.alternate===null?Error(r(467)):Error(r(310));Pt=t,t={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Me===null?At.memoizedState=Me=t:Me=Me.next=t}return Me}function Bl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ws(t){var e=Es;return Es+=1,Ri===null&&(Ri=[]),t=Gd(Ri,t,e),e=At,(Me===null?e.memoizedState:Me.next)===null&&(e=e.alternate,U.H=e===null||e.memoizedState===null?Rh:oc),t}function kl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ws(t);if(t.$$typeof===K)return Ue(t)}throw Error(r(438,String(t)))}function Jo(t){var e=null,n=At.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=At.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Bl(),At.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),s=0;s<t;s++)n[s]=rt;return e.index++,n}function Pn(t,e){return typeof e=="function"?e(t):e}function Hl(t){var e=Se();return Wo(e,Pt,t)}function Wo(t,e,n){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var o=t.baseQueue,c=s.pending;if(c!==null){if(o!==null){var m=o.next;o.next=c.next,c.next=m}e.baseQueue=o=c,s.pending=null}if(c=t.baseState,o===null)t.memoizedState=c;else{e=o.next;var v=m=null,_=null,R=e,k=!1;do{var X=R.lane&-536870913;if(X!==R.lane?(Lt&X)===X:(Qn&X)===X){var z=R.revertLane;if(z===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),X===Ei&&(k=!0);else if((Qn&z)===z){R=R.next,z===Ei&&(k=!0);continue}else X={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},_===null?(v=_=X,m=c):_=_.next=X,At.lanes|=z,ba|=z;X=R.action,Fa&&n(c,X),c=R.hasEagerState?R.eagerState:n(c,X)}else z={lane:X,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},_===null?(v=_=z,m=c):_=_.next=z,At.lanes|=X,ba|=X;R=R.next}while(R!==null&&R!==e);if(_===null?m=c:_.next=v,!ln(c,t.memoizedState)&&(Ee=!0,k&&(n=wi,n!==null)))throw n;t.memoizedState=c,t.baseState=m,t.baseQueue=_,s.lastRenderedState=c}return o===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function $o(t){var e=Se(),n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=t;var s=n.dispatch,o=n.pending,c=e.memoizedState;if(o!==null){n.pending=null;var m=o=o.next;do c=t(c,m.action),m=m.next;while(m!==o);ln(c,e.memoizedState)||(Ee=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),n.lastRenderedState=c}return[c,s]}function Wd(t,e,n){var s=At,o=Se(),c=Bt;if(c){if(n===void 0)throw Error(r(407));n=n()}else n=e();var m=!ln((Pt||o).memoizedState,n);if(m&&(o.memoizedState=n,Ee=!0),o=o.queue,nc(eh.bind(null,s,o,t),[t]),o.getSnapshot!==e||m||Me!==null&&Me.memoizedState.tag&1){if(s.flags|=2048,Di(9,{destroy:void 0},th.bind(null,s,o,n,e),null),te===null)throw Error(r(349));c||(Qn&127)!==0||$d(s,e,n)}return n}function $d(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=At.updateQueue,e===null?(e=Bl(),At.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function th(t,e,n,s){e.value=n,e.getSnapshot=s,nh(e)&&ah(t)}function eh(t,e,n){return n(function(){nh(e)&&ah(t)})}function nh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ln(t,n)}catch{return!0}}function ah(t){var e=Ga(t,2);e!==null&&nn(e,t,2)}function tc(t){var e=Ze();if(typeof t=="function"){var n=t;if(t=n(),Fa){Oe(!0);try{n()}finally{Oe(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:t},e}function ih(t,e,n,s){return t.baseState=n,Wo(t,Pt,typeof s=="function"?s:Pn)}function Jx(t,e,n,s,o){if(Yl(t))throw Error(r(485));if(t=e.action,t!==null){var c={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};U.T!==null?n(!0):c.isTransition=!1,s(c),n=e.pending,n===null?(c.next=e.pending=c,sh(e,c)):(c.next=n.next,e.pending=n.next=c)}}function sh(t,e){var n=e.action,s=e.payload,o=t.state;if(e.isTransition){var c=U.T,m={};U.T=m;try{var v=n(o,s),_=U.S;_!==null&&_(m,v),lh(t,e,v)}catch(R){ec(t,e,R)}finally{c!==null&&m.types!==null&&(c.types=m.types),U.T=c}}else try{c=n(o,s),lh(t,e,c)}catch(R){ec(t,e,R)}}function lh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){rh(t,e,s)},function(s){return ec(t,e,s)}):rh(t,e,n)}function rh(t,e,n){e.status="fulfilled",e.value=n,oh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,sh(t,n)))}function ec(t,e,n){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=n,oh(e),e=e.next;while(e!==s)}t.action=null}function oh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function ch(t,e){return e}function uh(t,e){if(Bt){var n=te.formState;if(n!==null){t:{var s=At;if(Bt){if(re){e:{for(var o=re,c=bn;o.nodeType!==8;){if(!c){o=null;break e}if(o=Tn(o.nextSibling),o===null){o=null;break e}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){re=Tn(o.nextSibling),s=o.data==="F!";break t}}fa(s)}s=!1}s&&(e=n[0])}}return n=Ze(),n.memoizedState=n.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ch,lastRenderedState:e},n.queue=s,n=Nh.bind(null,At,s),s.dispatch=n,s=tc(!1),c=rc.bind(null,At,!1,s.queue),s=Ze(),o={state:e,dispatch:null,action:t,pending:null},s.queue=o,n=Jx.bind(null,At,o,c,n),o.dispatch=n,s.memoizedState=t,[e,n,!1]}function fh(t){var e=Se();return dh(e,Pt,t)}function dh(t,e,n){if(e=Wo(t,e,ch)[0],t=Hl(Pn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=ws(e)}catch(m){throw m===Vi?jl:m}else s=e;e=Se();var o=e.queue,c=o.dispatch;return n!==e.memoizedState&&(At.flags|=2048,Di(9,{destroy:void 0},Wx.bind(null,o,n),null)),[s,c,t]}function Wx(t,e){t.action=e}function hh(t){var e=Se(),n=Pt;if(n!==null)return dh(e,n,t);Se(),e=e.memoizedState,n=Se();var s=n.queue.dispatch;return n.memoizedState=t,[e,s,!1]}function Di(t,e,n,s){return t={tag:t,create:n,deps:s,inst:e,next:null},e=At.updateQueue,e===null&&(e=Bl(),At.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(s=n.next,n.next=t,t.next=s,e.lastEffect=t),t}function mh(){return Se().memoizedState}function Gl(t,e,n,s){var o=Ze();At.flags|=t,o.memoizedState=Di(1|e,{destroy:void 0},n,s===void 0?null:s)}function ql(t,e,n,s){var o=Se();s=s===void 0?null:s;var c=o.memoizedState.inst;Pt!==null&&s!==null&&Zo(s,Pt.memoizedState.deps)?o.memoizedState=Di(e,c,n,s):(At.flags|=t,o.memoizedState=Di(1|e,c,n,s))}function ph(t,e){Gl(8390656,8,t,e)}function nc(t,e){ql(2048,8,t,e)}function $x(t){At.flags|=4;var e=At.updateQueue;if(e===null)e=Bl(),At.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function gh(t){var e=Se().memoizedState;return $x({ref:e,nextImpl:t}),function(){if((Yt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function yh(t,e){return ql(4,2,t,e)}function xh(t,e){return ql(4,4,t,e)}function vh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function bh(t,e,n){n=n!=null?n.concat([t]):null,ql(4,4,vh.bind(null,e,t),n)}function ac(){}function Sh(t,e){var n=Se();e=e===void 0?null:e;var s=n.memoizedState;return e!==null&&Zo(e,s[1])?s[0]:(n.memoizedState=[t,e],t)}function Th(t,e){var n=Se();e=e===void 0?null:e;var s=n.memoizedState;if(e!==null&&Zo(e,s[1]))return s[0];if(s=t(),Fa){Oe(!0);try{t()}finally{Oe(!1)}}return n.memoizedState=[s,e],s}function ic(t,e,n){return n===void 0||(Qn&1073741824)!==0&&(Lt&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=_m(),At.lanes|=t,ba|=t,n)}function _h(t,e,n,s){return ln(n,e)?n:ji.current!==null?(t=ic(t,n,s),ln(t,e)||(Ee=!0),t):(Qn&42)===0||(Qn&1073741824)!==0&&(Lt&261930)===0?(Ee=!0,t.memoizedState=n):(t=_m(),At.lanes|=t,ba|=t,e)}function Ah(t,e,n,s,o){var c=W.p;W.p=c!==0&&8>c?c:8;var m=U.T,v={};U.T=v,rc(t,!1,e,n);try{var _=o(),R=U.S;if(R!==null&&R(v,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var k=Qx(_,s);Vs(t,e,k,dn(t))}else Vs(t,e,s,dn(t))}catch(X){Vs(t,e,{then:function(){},status:"rejected",reason:X},dn())}finally{W.p=c,m!==null&&v.types!==null&&(m.types=v.types),U.T=m}}function t1(){}function sc(t,e,n,s){if(t.tag!==5)throw Error(r(476));var o=Mh(t).queue;Ah(t,o,e,et,n===null?t1:function(){return Eh(t),n(s)})}function Mh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:et,baseState:et,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:et},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Eh(t){var e=Mh(t);e.next===null&&(e=t.alternate.memoizedState),Vs(t,e.next.queue,{},dn())}function lc(){return Ue(Ks)}function wh(){return Se().memoizedState}function Vh(){return Se().memoizedState}function e1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=dn();t=ma(n);var s=pa(e,t,n);s!==null&&(nn(s,e,n),_s(s,e,n)),e={cache:zo()},t.payload=e;return}e=e.return}}function n1(t,e,n){var s=dn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Yl(t)?jh(e,n):(n=Ao(t,e,n,s),n!==null&&(nn(n,t,s),Ch(n,e,s)))}function Nh(t,e,n){var s=dn();Vs(t,e,n,s)}function Vs(t,e,n,s){var o={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yl(t))jh(e,o);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var m=e.lastRenderedState,v=c(m,n);if(o.hasEagerState=!0,o.eagerState=v,ln(v,m))return _l(t,e,o,0),te===null&&Tl(),!1}catch{}finally{}if(n=Ao(t,e,o,s),n!==null)return nn(n,t,s),Ch(n,e,s),!0}return!1}function rc(t,e,n,s){if(s={lane:2,revertLane:kc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Yl(t)){if(e)throw Error(r(479))}else e=Ao(t,n,s,2),e!==null&&nn(e,t,2)}function Yl(t){var e=t.alternate;return t===At||e!==null&&e===At}function jh(t,e){Ci=Ll=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ch(t,e,n){if((n&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,ge(t,n)}}var Ns={readContext:Ue,use:kl,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useLayoutEffect:ye,useInsertionEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useSyncExternalStore:ye,useId:ye,useHostTransitionStatus:ye,useFormState:ye,useActionState:ye,useOptimistic:ye,useMemoCache:ye,useCacheRefresh:ye};Ns.useEffectEvent=ye;var Rh={readContext:Ue,use:kl,useCallback:function(t,e){return Ze().memoizedState=[t,e===void 0?null:e],t},useContext:Ue,useEffect:ph,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Gl(4194308,4,vh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Gl(4194308,4,t,e)},useInsertionEffect:function(t,e){Gl(4,2,t,e)},useMemo:function(t,e){var n=Ze();e=e===void 0?null:e;var s=t();if(Fa){Oe(!0);try{t()}finally{Oe(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=Ze();if(n!==void 0){var o=n(e);if(Fa){Oe(!0);try{n(e)}finally{Oe(!1)}}}else o=e;return s.memoizedState=s.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},s.queue=t,t=t.dispatch=n1.bind(null,At,t),[s.memoizedState,t]},useRef:function(t){var e=Ze();return t={current:t},e.memoizedState=t},useState:function(t){t=tc(t);var e=t.queue,n=Nh.bind(null,At,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:ac,useDeferredValue:function(t,e){var n=Ze();return ic(n,t,e)},useTransition:function(){var t=tc(!1);return t=Ah.bind(null,At,t.queue,!0,!1),Ze().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=At,o=Ze();if(Bt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),te===null)throw Error(r(349));(Lt&127)!==0||$d(s,e,n)}o.memoizedState=n;var c={value:n,getSnapshot:e};return o.queue=c,ph(eh.bind(null,s,c,t),[t]),s.flags|=2048,Di(9,{destroy:void 0},th.bind(null,s,c,n,e),null),n},useId:function(){var t=Ze(),e=te.identifierPrefix;if(Bt){var n=Dn,s=Rn;n=(s&~(1<<32-E(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Ul++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=Px++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:lc,useFormState:uh,useActionState:uh,useOptimistic:function(t){var e=Ze();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=rc.bind(null,At,!0,n),n.dispatch=e,[t,e]},useMemoCache:Jo,useCacheRefresh:function(){return Ze().memoizedState=e1.bind(null,At)},useEffectEvent:function(t){var e=Ze(),n={impl:t};return e.memoizedState=n,function(){if((Yt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},oc={readContext:Ue,use:kl,useCallback:Sh,useContext:Ue,useEffect:nc,useImperativeHandle:bh,useInsertionEffect:yh,useLayoutEffect:xh,useMemo:Th,useReducer:Hl,useRef:mh,useState:function(){return Hl(Pn)},useDebugValue:ac,useDeferredValue:function(t,e){var n=Se();return _h(n,Pt.memoizedState,t,e)},useTransition:function(){var t=Hl(Pn)[0],e=Se().memoizedState;return[typeof t=="boolean"?t:ws(t),e]},useSyncExternalStore:Wd,useId:wh,useHostTransitionStatus:lc,useFormState:fh,useActionState:fh,useOptimistic:function(t,e){var n=Se();return ih(n,Pt,t,e)},useMemoCache:Jo,useCacheRefresh:Vh};oc.useEffectEvent=gh;var Dh={readContext:Ue,use:kl,useCallback:Sh,useContext:Ue,useEffect:nc,useImperativeHandle:bh,useInsertionEffect:yh,useLayoutEffect:xh,useMemo:Th,useReducer:$o,useRef:mh,useState:function(){return $o(Pn)},useDebugValue:ac,useDeferredValue:function(t,e){var n=Se();return Pt===null?ic(n,t,e):_h(n,Pt.memoizedState,t,e)},useTransition:function(){var t=$o(Pn)[0],e=Se().memoizedState;return[typeof t=="boolean"?t:ws(t),e]},useSyncExternalStore:Wd,useId:wh,useHostTransitionStatus:lc,useFormState:hh,useActionState:hh,useOptimistic:function(t,e){var n=Se();return Pt!==null?ih(n,Pt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:Jo,useCacheRefresh:Vh};Dh.useEffectEvent=gh;function cc(t,e,n,s){e=t.memoizedState,n=n(s,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var uc={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=dn(),o=ma(s);o.payload=e,n!=null&&(o.callback=n),e=pa(t,o,s),e!==null&&(nn(e,t,s),_s(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=dn(),o=ma(s);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=pa(t,o,s),e!==null&&(nn(e,t,s),_s(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=dn(),s=ma(n);s.tag=2,e!=null&&(s.callback=e),e=pa(t,s,n),e!==null&&(nn(e,t,n),_s(e,t,n))}};function Oh(t,e,n,s,o,c,m){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,m):e.prototype&&e.prototype.isPureReactComponent?!ps(n,s)||!ps(o,c):!0}function zh(t,e,n,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,s),e.state!==t&&uc.enqueueReplaceState(e,e.state,null)}function Ja(t,e){var n=e;if("ref"in e){n={};for(var s in e)s!=="ref"&&(n[s]=e[s])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var o in t)n[o]===void 0&&(n[o]=t[o])}return n}function Lh(t){Sl(t)}function Uh(t){console.error(t)}function Bh(t){Sl(t)}function Xl(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function kh(t,e,n){try{var s=t.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function fc(t,e,n){return n=ma(n),n.tag=3,n.payload={element:null},n.callback=function(){Xl(t,e)},n}function Hh(t){return t=ma(t),t.tag=3,t}function Gh(t,e,n,s){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;t.payload=function(){return o(c)},t.callback=function(){kh(e,n,s)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(t.callback=function(){kh(e,n,s),typeof o!="function"&&(Sa===null?Sa=new Set([this]):Sa.add(this));var v=s.stack;this.componentDidCatch(s.value,{componentStack:v!==null?v:""})})}function a1(t,e,n,s,o){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Mi(e,n,o,!0),n=on.current,n!==null){switch(n.tag){case 31:case 13:return Sn===null?nr():n.alternate===null&&xe===0&&(xe=3),n.flags&=-257,n.flags|=65536,n.lanes=o,s===Cl?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),Lc(t,s,o)),!1;case 22:return n.flags|=65536,s===Cl?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([s]):n.add(s)),Lc(t,s,o)),!1}throw Error(r(435,n.tag))}return Lc(t,s,o),nr(),!1}if(Bt)return e=on.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,s!==jo&&(t=Error(r(422),{cause:s}),xs(yn(t,n)))):(s!==jo&&(e=Error(r(423),{cause:s}),xs(yn(e,n))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,s=yn(s,n),o=fc(t.stateNode,s,o),Go(t,o),xe!==4&&(xe=2)),!1;var c=Error(r(520),{cause:s});if(c=yn(c,n),Us===null?Us=[c]:Us.push(c),xe!==4&&(xe=2),e===null)return!0;s=yn(s,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=o&-o,n.lanes|=t,t=fc(n.stateNode,s,t),Go(n,t),!1;case 1:if(e=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Sa===null||!Sa.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Hh(o),Gh(o,t,n,s),Go(n,o),!1}n=n.return}while(n!==null);return!1}var dc=Error(r(461)),Ee=!1;function Be(t,e,n,s){e.child=t===null?Kd(e,null,n,s):Pa(e,t.child,n,s)}function qh(t,e,n,s,o){n=n.render;var c=e.ref;if("ref"in s){var m={};for(var v in s)v!=="ref"&&(m[v]=s[v])}else m=s;return Ka(e),s=Io(t,e,n,m,c,o),v=Qo(),t!==null&&!Ee?(Po(t,e,o),Fn(t,e,o)):(Bt&&v&&Vo(e),e.flags|=1,Be(t,e,s,o),e.child)}function Yh(t,e,n,s,o){if(t===null){var c=n.type;return typeof c=="function"&&!Mo(c)&&c.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=c,Xh(t,e,c,s,o)):(t=Ml(n.type,null,s,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!bc(t,o)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:ps,n(m,s)&&t.ref===e.ref)return Fn(t,e,o)}return e.flags|=1,t=Xn(c,s),t.ref=e.ref,t.return=e,e.child=t}function Xh(t,e,n,s,o){if(t!==null){var c=t.memoizedProps;if(ps(c,s)&&t.ref===e.ref)if(Ee=!1,e.pendingProps=s=c,bc(t,o))(t.flags&131072)!==0&&(Ee=!0);else return e.lanes=t.lanes,Fn(t,e,o)}return hc(t,e,n,s,o)}function Kh(t,e,n,s){var o=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,t!==null){for(s=e.child=t.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~c}else s=0,e.child=null;return Zh(t,e,c,n,s)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Nl(e,c!==null?c.cachePool:null),c!==null?Qd(e,c):Yo(),Pd(e);else return s=e.lanes=536870912,Zh(t,e,c!==null?c.baseLanes|n:n,n,s)}else c!==null?(Nl(e,c.cachePool),Qd(e,c),ya(),e.memoizedState=null):(t!==null&&Nl(e,null),Yo(),ya());return Be(t,e,o,n),e.child}function js(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Zh(t,e,n,s,o){var c=Uo();return c=c===null?null:{parent:Ae._currentValue,pool:c},e.memoizedState={baseLanes:n,cachePool:c},t!==null&&Nl(e,null),Yo(),Pd(e),t!==null&&Mi(t,e,s,!0),e.childLanes=o,null}function Kl(t,e){return e=Il({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Ih(t,e,n){return Pa(e,t.child,null,n),t=Kl(e,e.pendingProps),t.flags|=2,cn(e),e.memoizedState=null,t}function i1(t,e,n){var s=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Bt){if(s.mode==="hidden")return t=Kl(e,s),e.lanes=536870912,js(null,t);if(Ko(e),(t=re)?(t=s0(t,bn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ca!==null?{id:Rn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},n=jd(t),n.return=e,e.child=n,Le=e,re=null)):t=null,t===null)throw fa(e);return e.lanes=536870912,null}return Kl(e,s)}var c=t.memoizedState;if(c!==null){var m=c.dehydrated;if(Ko(e),o)if(e.flags&256)e.flags&=-257,e=Ih(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(Ee||Mi(t,e,n,!1),o=(n&t.childLanes)!==0,Ee||o){if(s=te,s!==null&&(m=_e(s,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,Ga(t,m),nn(s,t,m),dc;nr(),e=Ih(t,e,n)}else t=c.treeContext,re=Tn(m.nextSibling),Le=e,Bt=!0,ua=null,bn=!1,t!==null&&Dd(e,t),e=Kl(e,s),e.flags|=4096;return e}return t=Xn(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Zl(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function hc(t,e,n,s,o){return Ka(e),n=Io(t,e,n,s,void 0,o),s=Qo(),t!==null&&!Ee?(Po(t,e,o),Fn(t,e,o)):(Bt&&s&&Vo(e),e.flags|=1,Be(t,e,n,o),e.child)}function Qh(t,e,n,s,o,c){return Ka(e),e.updateQueue=null,n=Jd(e,s,n,o),Fd(t),s=Qo(),t!==null&&!Ee?(Po(t,e,c),Fn(t,e,c)):(Bt&&s&&Vo(e),e.flags|=1,Be(t,e,n,c),e.child)}function Ph(t,e,n,s,o){if(Ka(e),e.stateNode===null){var c=Si,m=n.contextType;typeof m=="object"&&m!==null&&(c=Ue(m)),c=new n(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=uc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},ko(e),m=n.contextType,c.context=typeof m=="object"&&m!==null?Ue(m):Si,c.state=e.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(cc(e,n,m,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&uc.enqueueReplaceState(c,c.state,null),Ms(e,s,c,o),As(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var v=e.memoizedProps,_=Ja(n,v);c.props=_;var R=c.context,k=n.contextType;m=Si,typeof k=="object"&&k!==null&&(m=Ue(k));var X=n.getDerivedStateFromProps;k=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",v=e.pendingProps!==v,k||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v||R!==m)&&zh(e,c,s,m),ha=!1;var z=e.memoizedState;c.state=z,Ms(e,s,c,o),As(),R=e.memoizedState,v||z!==R||ha?(typeof X=="function"&&(cc(e,n,X,s),R=e.memoizedState),(_=ha||Oh(e,n,_,s,z,R,m))?(k||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=R),c.props=s,c.state=R,c.context=m,s=_):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,Ho(t,e),m=e.memoizedProps,k=Ja(n,m),c.props=k,X=e.pendingProps,z=c.context,R=n.contextType,_=Si,typeof R=="object"&&R!==null&&(_=Ue(R)),v=n.getDerivedStateFromProps,(R=typeof v=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==X||z!==_)&&zh(e,c,s,_),ha=!1,z=e.memoizedState,c.state=z,Ms(e,s,c,o),As();var L=e.memoizedState;m!==X||z!==L||ha||t!==null&&t.dependencies!==null&&wl(t.dependencies)?(typeof v=="function"&&(cc(e,n,v,s),L=e.memoizedState),(k=ha||Oh(e,n,k,s,z,L,_)||t!==null&&t.dependencies!==null&&wl(t.dependencies))?(R||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,L,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,L,_)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&z===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&z===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=L),c.props=s,c.state=L,c.context=_,s=k):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&z===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&z===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,Zl(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=Pa(e,t.child,null,o),e.child=Pa(e,null,n,o)):Be(t,e,n,o),e.memoizedState=c.state,t=e.child):t=Fn(t,e,o),t}function Fh(t,e,n,s){return Ya(),e.flags|=256,Be(t,e,n,s),e.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(t){return{baseLanes:t,cachePool:kd()}}function gc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=fn),t}function Jh(t,e,n){var s=e.pendingProps,o=!1,c=(e.flags&128)!==0,m;if((m=c)||(m=t!==null&&t.memoizedState===null?!1:(be.current&2)!==0),m&&(o=!0,e.flags&=-129),m=(e.flags&32)!==0,e.flags&=-33,t===null){if(Bt){if(o?ga(e):ya(),(t=re)?(t=s0(t,bn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ca!==null?{id:Rn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},n=jd(t),n.return=e,e.child=n,Le=e,re=null)):t=null,t===null)throw fa(e);return Wc(t)?e.lanes=32:e.lanes=536870912,null}var v=s.children;return s=s.fallback,o?(ya(),o=e.mode,v=Il({mode:"hidden",children:v},o),s=qa(s,o,n,null),v.return=e,s.return=e,v.sibling=s,e.child=v,s=e.child,s.memoizedState=pc(n),s.childLanes=gc(t,m,n),e.memoizedState=mc,js(null,s)):(ga(e),yc(e,v))}var _=t.memoizedState;if(_!==null&&(v=_.dehydrated,v!==null)){if(c)e.flags&256?(ga(e),e.flags&=-257,e=xc(t,e,n)):e.memoizedState!==null?(ya(),e.child=t.child,e.flags|=128,e=null):(ya(),v=s.fallback,o=e.mode,s=Il({mode:"visible",children:s.children},o),v=qa(v,o,n,null),v.flags|=2,s.return=e,v.return=e,s.sibling=v,e.child=s,Pa(e,t.child,null,n),s=e.child,s.memoizedState=pc(n),s.childLanes=gc(t,m,n),e.memoizedState=mc,e=js(null,s));else if(ga(e),Wc(v)){if(m=v.nextSibling&&v.nextSibling.dataset,m)var R=m.dgst;m=R,s=Error(r(419)),s.stack="",s.digest=m,xs({value:s,source:null,stack:null}),e=xc(t,e,n)}else if(Ee||Mi(t,e,n,!1),m=(n&t.childLanes)!==0,Ee||m){if(m=te,m!==null&&(s=_e(m,n),s!==0&&s!==_.retryLane))throw _.retryLane=s,Ga(t,s),nn(m,t,s),dc;Jc(v)||nr(),e=xc(t,e,n)}else Jc(v)?(e.flags|=192,e.child=t.child,e=null):(t=_.treeContext,re=Tn(v.nextSibling),Le=e,Bt=!0,ua=null,bn=!1,t!==null&&Dd(e,t),e=yc(e,s.children),e.flags|=4096);return e}return o?(ya(),v=s.fallback,o=e.mode,_=t.child,R=_.sibling,s=Xn(_,{mode:"hidden",children:s.children}),s.subtreeFlags=_.subtreeFlags&65011712,R!==null?v=Xn(R,v):(v=qa(v,o,n,null),v.flags|=2),v.return=e,s.return=e,s.sibling=v,e.child=s,js(null,s),s=e.child,v=t.child.memoizedState,v===null?v=pc(n):(o=v.cachePool,o!==null?(_=Ae._currentValue,o=o.parent!==_?{parent:_,pool:_}:o):o=kd(),v={baseLanes:v.baseLanes|n,cachePool:o}),s.memoizedState=v,s.childLanes=gc(t,m,n),e.memoizedState=mc,js(t.child,s)):(ga(e),n=t.child,t=n.sibling,n=Xn(n,{mode:"visible",children:s.children}),n.return=e,n.sibling=null,t!==null&&(m=e.deletions,m===null?(e.deletions=[t],e.flags|=16):m.push(t)),e.child=n,e.memoizedState=null,n)}function yc(t,e){return e=Il({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Il(t,e){return t=rn(22,t,null,e),t.lanes=0,t}function xc(t,e,n){return Pa(e,t.child,null,n),t=yc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Wh(t,e,n){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),Do(t.return,e,n)}function vc(t,e,n,s,o,c){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:o,treeForkCount:c}:(m.isBackwards=e,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=n,m.tailMode=o,m.treeForkCount=c)}function $h(t,e,n){var s=e.pendingProps,o=s.revealOrder,c=s.tail;s=s.children;var m=be.current,v=(m&2)!==0;if(v?(m=m&1|2,e.flags|=128):m&=1,J(be,m),Be(t,e,s,n),s=Bt?ys:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Wh(t,n,e);else if(t.tag===19)Wh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&zl(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),vc(e,!1,o,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&zl(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}vc(e,!0,n,null,c,s);break;case"together":vc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function Fn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ba|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Mi(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,n=Xn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Xn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function bc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&wl(t)))}function s1(t,e,n){switch(e.tag){case 3:$t(e,e.stateNode.containerInfo),da(e,Ae,t.memoizedState.cache),Ya();break;case 27:case 5:Ce(e);break;case 4:$t(e,e.stateNode.containerInfo);break;case 10:da(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Ko(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(ga(e),e.flags|=128,null):(n&e.child.childLanes)!==0?Jh(t,e,n):(ga(e),t=Fn(t,e,n),t!==null?t.sibling:null);ga(e);break;case 19:var o=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Mi(t,e,n,!1),s=(n&e.childLanes)!==0),o){if(s)return $h(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),J(be,be.current),s)break;return null;case 22:return e.lanes=0,Kh(t,e,n,e.pendingProps);case 24:da(e,Ae,t.memoizedState.cache)}return Fn(t,e,n)}function tm(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Ee=!0;else{if(!bc(t,n)&&(e.flags&128)===0)return Ee=!1,s1(t,e,n);Ee=(t.flags&131072)!==0}else Ee=!1,Bt&&(e.flags&1048576)!==0&&Rd(e,ys,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=Ia(e.elementType),e.type=t,typeof t=="function")Mo(t)?(s=Ja(t,s),e.tag=1,e=Ph(null,e,t,s,n)):(e.tag=0,e=hc(null,e,t,s,n));else{if(t!=null){var o=t.$$typeof;if(o===I){e.tag=11,e=qh(null,e,t,s,n);break t}else if(o===F){e.tag=14,e=Yh(null,e,t,s,n);break t}}throw e=Wt(t)||t,Error(r(306,e,""))}}return e;case 0:return hc(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,o=Ja(s,e.pendingProps),Ph(t,e,s,o,n);case 3:t:{if($t(e,e.stateNode.containerInfo),t===null)throw Error(r(387));s=e.pendingProps;var c=e.memoizedState;o=c.element,Ho(t,e),Ms(e,s,null,n);var m=e.memoizedState;if(s=m.cache,da(e,Ae,s),s!==c.cache&&Oo(e,[Ae],n,!0),As(),s=m.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:m.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=Fh(t,e,s,n);break t}else if(s!==o){o=yn(Error(r(424)),e),xs(o),e=Fh(t,e,s,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(re=Tn(t.firstChild),Le=e,Bt=!0,ua=null,bn=!0,n=Kd(e,null,s,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ya(),s===o){e=Fn(t,e,n);break t}Be(t,e,s,n)}e=e.child}return e;case 26:return Zl(t,e),t===null?(n=f0(e.type,null,e.pendingProps,null))?e.memoizedState=n:Bt||(n=e.type,t=e.pendingProps,s=cr(ft.current).createElement(n),s[ze]=e,s[Fe]=t,ke(s,n,t),Re(s),e.stateNode=s):e.memoizedState=f0(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ce(e),t===null&&Bt&&(s=e.stateNode=o0(e.type,e.pendingProps,ft.current),Le=e,bn=!0,o=re,Ma(e.type)?($c=o,re=Tn(s.firstChild)):re=o),Be(t,e,e.pendingProps.children,n),Zl(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Bt&&((o=s=re)&&(s=z1(s,e.type,e.pendingProps,bn),s!==null?(e.stateNode=s,Le=e,re=Tn(s.firstChild),bn=!1,o=!0):o=!1),o||fa(e)),Ce(e),o=e.type,c=e.pendingProps,m=t!==null?t.memoizedProps:null,s=c.children,Qc(o,c)?s=null:m!==null&&Qc(o,m)&&(e.flags|=32),e.memoizedState!==null&&(o=Io(t,e,Fx,null,null,n),Ks._currentValue=o),Zl(t,e),Be(t,e,s,n),e.child;case 6:return t===null&&Bt&&((t=n=re)&&(n=L1(n,e.pendingProps,bn),n!==null?(e.stateNode=n,Le=e,re=null,t=!0):t=!1),t||fa(e)),null;case 13:return Jh(t,e,n);case 4:return $t(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=Pa(e,null,s,n):Be(t,e,s,n),e.child;case 11:return qh(t,e,e.type,e.pendingProps,n);case 7:return Be(t,e,e.pendingProps,n),e.child;case 8:return Be(t,e,e.pendingProps.children,n),e.child;case 12:return Be(t,e,e.pendingProps.children,n),e.child;case 10:return s=e.pendingProps,da(e,e.type,s.value),Be(t,e,s.children,n),e.child;case 9:return o=e.type._context,s=e.pendingProps.children,Ka(e),o=Ue(o),s=s(o),e.flags|=1,Be(t,e,s,n),e.child;case 14:return Yh(t,e,e.type,e.pendingProps,n);case 15:return Xh(t,e,e.type,e.pendingProps,n);case 19:return $h(t,e,n);case 31:return i1(t,e,n);case 22:return Kh(t,e,n,e.pendingProps);case 24:return Ka(e),s=Ue(Ae),t===null?(o=Uo(),o===null&&(o=te,c=zo(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),e.memoizedState={parent:s,cache:o},ko(e),da(e,Ae,o)):((t.lanes&n)!==0&&(Ho(t,e),Ms(e,null,null,n),As()),o=t.memoizedState,c=e.memoizedState,o.parent!==s?(o={parent:s,cache:s},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),da(e,Ae,s)):(s=c.cache,da(e,Ae,s),s!==o.cache&&Oo(e,[Ae],n,!0))),Be(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Jn(t){t.flags|=4}function Sc(t,e,n,s,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)if(t.stateNode.complete)t.flags|=8192;else if(wm())t.flags|=8192;else throw Qa=Cl,Bo}else t.flags&=-16777217}function em(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!g0(e))if(wm())t.flags|=8192;else throw Qa=Cl,Bo}function Ql(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?yt():536870912,t.lanes|=e,Ui|=e)}function Cs(t,e){if(!Bt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function oe(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,s=0;if(e)for(var o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function l1(t,e,n){var s=e.pendingProps;switch(No(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oe(e),null;case 1:return oe(e),null;case 3:return n=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),In(Ae),Ot(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ai(e)?Jn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Co())),oe(e),null;case 26:var o=e.type,c=e.memoizedState;return t===null?(Jn(e),c!==null?(oe(e),em(e,c)):(oe(e),Sc(e,o,null,s,n))):c?c!==t.memoizedState?(Jn(e),oe(e),em(e,c)):(oe(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&Jn(e),oe(e),Sc(e,o,t,s,n)),null;case 27:if(pt(e),n=ft.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&Jn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return oe(e),null}t=P.current,Ai(e)?Od(e):(t=o0(o,s,n),e.stateNode=t,Jn(e))}return oe(e),null;case 5:if(pt(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&Jn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return oe(e),null}if(c=P.current,Ai(e))Od(e);else{var m=cr(ft.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?m.createElement("select",{is:s.is}):m.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?m.createElement(o,{is:s.is}):m.createElement(o)}}c[ze]=e,c[Fe]=s;t:for(m=e.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break t;for(;m.sibling===null;){if(m.return===null||m.return===e)break t;m=m.return}m.sibling.return=m.return,m=m.sibling}e.stateNode=c;t:switch(ke(c,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&Jn(e)}}return oe(e),Sc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&Jn(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(r(166));if(t=ft.current,Ai(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,o=Le,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}t[ze]=e,t=!!(t.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||Jm(t.nodeValue,n)),t||fa(e,!0)}else t=cr(t).createTextNode(s),t[ze]=e,e.stateNode=t}return oe(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(s=Ai(e),n!==null){if(t===null){if(!s)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ze]=e}else Ya(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;oe(e),t=!1}else n=Co(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(cn(e),e):(cn(e),null);if((e.flags&128)!==0)throw Error(r(558))}return oe(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=Ai(e),s!==null&&s.dehydrated!==null){if(t===null){if(!o)throw Error(r(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[ze]=e}else Ya(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;oe(e),o=!1}else o=Co(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?(cn(e),e):(cn(e),null)}return cn(e),(e.flags&128)!==0?(e.lanes=n,e):(n=s!==null,t=t!==null&&t.memoizedState!==null,n&&(s=e.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(s.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Ql(e,e.updateQueue),oe(e),null);case 4:return Ot(),t===null&&Yc(e.stateNode.containerInfo),oe(e),null;case 10:return In(e.type),oe(e),null;case 19:if(G(be),s=e.memoizedState,s===null)return oe(e),null;if(o=(e.flags&128)!==0,c=s.rendering,c===null)if(o)Cs(s,!1);else{if(xe!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=zl(t),c!==null){for(e.flags|=128,Cs(s,!1),t=c.updateQueue,e.updateQueue=t,Ql(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)Nd(n,t),n=n.sibling;return J(be,be.current&1|2),Bt&&Kn(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&V()>$l&&(e.flags|=128,o=!0,Cs(s,!1),e.lanes=4194304)}else{if(!o)if(t=zl(c),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,Ql(e,t),Cs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Bt)return oe(e),null}else 2*V()-s.renderingStartTime>$l&&n!==536870912&&(e.flags|=128,o=!0,Cs(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=V(),t.sibling=null,n=be.current,J(be,o?n&1|2:n&1),Bt&&Kn(e,s.treeForkCount),t):(oe(e),null);case 22:case 23:return cn(e),Xo(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(n&536870912)!==0&&(e.flags&128)===0&&(oe(e),e.subtreeFlags&6&&(e.flags|=8192)):oe(e),n=e.updateQueue,n!==null&&Ql(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==n&&(e.flags|=2048),t!==null&&G(Za),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),In(Ae),oe(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function r1(t,e){switch(No(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return In(Ae),Ot(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return pt(e),null;case 31:if(e.memoizedState!==null){if(cn(e),e.alternate===null)throw Error(r(340));Ya()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(cn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Ya()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return G(be),null;case 4:return Ot(),null;case 10:return In(e.type),null;case 22:case 23:return cn(e),Xo(),t!==null&&G(Za),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return In(Ae),null;case 25:return null;default:return null}}function nm(t,e){switch(No(e),e.tag){case 3:In(Ae),Ot();break;case 26:case 27:case 5:pt(e);break;case 4:Ot();break;case 31:e.memoizedState!==null&&cn(e);break;case 13:cn(e);break;case 19:G(be);break;case 10:In(e.type);break;case 22:case 23:cn(e),Xo(),t!==null&&G(Za);break;case 24:In(Ae)}}function Rs(t,e){try{var n=e.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var o=s.next;n=o;do{if((n.tag&t)===t){s=void 0;var c=n.create,m=n.inst;s=c(),m.destroy=s}n=n.next}while(n!==o)}}catch(v){Zt(e,e.return,v)}}function xa(t,e,n){try{var s=e.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&t)===t){var m=s.inst,v=m.destroy;if(v!==void 0){m.destroy=void 0,o=e;var _=n,R=v;try{R()}catch(k){Zt(o,_,k)}}}s=s.next}while(s!==c)}}catch(k){Zt(e,e.return,k)}}function am(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Id(e,n)}catch(s){Zt(t,t.return,s)}}}function im(t,e,n){n.props=Ja(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(s){Zt(t,e,s)}}function Ds(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof n=="function"?t.refCleanup=n(s):n.current=s}}catch(o){Zt(t,e,o)}}function On(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(o){Zt(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Zt(t,e,o)}else n.current=null}function sm(t){var e=t.type,n=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break t;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(o){Zt(t,t.return,o)}}function Tc(t,e,n){try{var s=t.stateNode;N1(s,t.type,n,e),s[Fe]=e}catch(o){Zt(t,t.return,o)}}function lm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ma(t.type)||t.tag===4}function _c(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||lm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ma(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ac(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=qn));else if(s!==4&&(s===27&&Ma(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Ac(t,e,n),t=t.sibling;t!==null;)Ac(t,e,n),t=t.sibling}function Pl(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(s!==4&&(s===27&&Ma(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Pl(t,e,n),t=t.sibling;t!==null;)Pl(t,e,n),t=t.sibling}function rm(t){var e=t.stateNode,n=t.memoizedProps;try{for(var s=t.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);ke(e,s,n),e[ze]=t,e[Fe]=n}catch(c){Zt(t,t.return,c)}}var Wn=!1,we=!1,Mc=!1,om=typeof WeakSet=="function"?WeakSet:Set,De=null;function o1(t,e){if(t=t.containerInfo,Zc=gr,t=bd(t),xo(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var m=0,v=-1,_=-1,R=0,k=0,X=t,z=null;e:for(;;){for(var L;X!==n||o!==0&&X.nodeType!==3||(v=m+o),X!==c||s!==0&&X.nodeType!==3||(_=m+s),X.nodeType===3&&(m+=X.nodeValue.length),(L=X.firstChild)!==null;)z=X,X=L;for(;;){if(X===t)break e;if(z===n&&++R===o&&(v=m),z===c&&++k===s&&(_=m),(L=X.nextSibling)!==null)break;X=z,z=X.parentNode}X=L}n=v===-1||_===-1?null:{start:v,end:_}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ic={focusedElem:t,selectionRange:n},gr=!1,De=e;De!==null;)if(e=De,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,De=t;else for(;De!==null;){switch(e=De,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)o=t[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,o=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var it=Ja(n.type,o);t=s.getSnapshotBeforeUpdate(it,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(mt){Zt(n,n.return,mt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Fc(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Fc(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,De=t;break}De=e.return}}function cm(t,e,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:ta(t,n),s&4&&Rs(5,n);break;case 1:if(ta(t,n),s&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(m){Zt(n,n.return,m)}else{var o=Ja(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,e,t.__reactInternalSnapshotBeforeUpdate)}catch(m){Zt(n,n.return,m)}}s&64&&am(n),s&512&&Ds(n,n.return);break;case 3:if(ta(t,n),s&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{Id(t,e)}catch(m){Zt(n,n.return,m)}}break;case 27:e===null&&s&4&&rm(n);case 26:case 5:ta(t,n),e===null&&s&4&&sm(n),s&512&&Ds(n,n.return);break;case 12:ta(t,n);break;case 31:ta(t,n),s&4&&dm(t,n);break;case 13:ta(t,n),s&4&&hm(t,n),s&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=y1.bind(null,n),U1(t,n))));break;case 22:if(s=n.memoizedState!==null||Wn,!s){e=e!==null&&e.memoizedState!==null||we,o=Wn;var c=we;Wn=s,(we=e)&&!c?ea(t,n,(n.subtreeFlags&8772)!==0):ta(t,n),Wn=o,we=c}break;case 30:break;default:ta(t,n)}}function um(t){var e=t.alternate;e!==null&&(t.alternate=null,um(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&to(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ue=null,We=!1;function $n(t,e,n){for(n=n.child;n!==null;)fm(t,e,n),n=n.sibling}function fm(t,e,n){if(pe&&typeof pe.onCommitFiberUnmount=="function")try{pe.onCommitFiberUnmount(ie,n)}catch{}switch(n.tag){case 26:we||On(n,e),$n(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:we||On(n,e);var s=ue,o=We;Ma(n.type)&&(ue=n.stateNode,We=!1),$n(t,e,n),qs(n.stateNode),ue=s,We=o;break;case 5:we||On(n,e);case 6:if(s=ue,o=We,ue=null,$n(t,e,n),ue=s,We=o,ue!==null)if(We)try{(ue.nodeType===9?ue.body:ue.nodeName==="HTML"?ue.ownerDocument.body:ue).removeChild(n.stateNode)}catch(c){Zt(n,e,c)}else try{ue.removeChild(n.stateNode)}catch(c){Zt(n,e,c)}break;case 18:ue!==null&&(We?(t=ue,a0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Ki(t)):a0(ue,n.stateNode));break;case 4:s=ue,o=We,ue=n.stateNode.containerInfo,We=!0,$n(t,e,n),ue=s,We=o;break;case 0:case 11:case 14:case 15:xa(2,n,e),we||xa(4,n,e),$n(t,e,n);break;case 1:we||(On(n,e),s=n.stateNode,typeof s.componentWillUnmount=="function"&&im(n,e,s)),$n(t,e,n);break;case 21:$n(t,e,n);break;case 22:we=(s=we)||n.memoizedState!==null,$n(t,e,n),we=s;break;default:$n(t,e,n)}}function dm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ki(t)}catch(n){Zt(e,e.return,n)}}}function hm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ki(t)}catch(n){Zt(e,e.return,n)}}function c1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new om),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new om),e;default:throw Error(r(435,t.tag))}}function Fl(t,e){var n=c1(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var o=x1.bind(null,t,s);s.then(o,o)}})}function $e(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var o=n[s],c=t,m=e,v=m;t:for(;v!==null;){switch(v.tag){case 27:if(Ma(v.type)){ue=v.stateNode,We=!1;break t}break;case 5:ue=v.stateNode,We=!1;break t;case 3:case 4:ue=v.stateNode.containerInfo,We=!0;break t}v=v.return}if(ue===null)throw Error(r(160));fm(c,m,o),ue=null,We=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)mm(e,t),e=e.sibling}var wn=null;function mm(t,e){var n=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:$e(e,t),tn(t),s&4&&(xa(3,t,t.return),Rs(3,t),xa(5,t,t.return));break;case 1:$e(e,t),tn(t),s&512&&(we||n===null||On(n,n.return)),s&64&&Wn&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var o=wn;if($e(e,t),tn(t),s&512&&(we||n===null||On(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=t.memoizedState,n===null)if(s===null)if(t.stateNode===null){t:{s=t.type,n=t.memoizedProps,o=o.ownerDocument||o;e:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[ls]||c[ze]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),ke(c,s,n),c[ze]=t,Re(c),s=c;break t;case"link":var m=m0("link","href",o).get(s+(n.href||""));if(m){for(var v=0;v<m.length;v++)if(c=m[v],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(v,1);break e}}c=o.createElement(s),ke(c,s,n),o.head.appendChild(c);break;case"meta":if(m=m0("meta","content",o).get(s+(n.content||""))){for(v=0;v<m.length;v++)if(c=m[v],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(v,1);break e}}c=o.createElement(s),ke(c,s,n),o.head.appendChild(c);break;default:throw Error(r(468,s))}c[ze]=t,Re(c),s=c}t.stateNode=s}else p0(o,t.type,t.stateNode);else t.stateNode=h0(o,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?p0(o,t.type,t.stateNode):h0(o,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Tc(t,t.memoizedProps,n.memoizedProps)}break;case 27:$e(e,t),tn(t),s&512&&(we||n===null||On(n,n.return)),n!==null&&s&4&&Tc(t,t.memoizedProps,n.memoizedProps);break;case 5:if($e(e,t),tn(t),s&512&&(we||n===null||On(n,n.return)),t.flags&32){o=t.stateNode;try{mi(o,"")}catch(it){Zt(t,t.return,it)}}s&4&&t.stateNode!=null&&(o=t.memoizedProps,Tc(t,o,n!==null?n.memoizedProps:o)),s&1024&&(Mc=!0);break;case 6:if($e(e,t),tn(t),s&4){if(t.stateNode===null)throw Error(r(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(it){Zt(t,t.return,it)}}break;case 3:if(dr=null,o=wn,wn=ur(e.containerInfo),$e(e,t),wn=o,tn(t),s&4&&n!==null&&n.memoizedState.isDehydrated)try{Ki(e.containerInfo)}catch(it){Zt(t,t.return,it)}Mc&&(Mc=!1,pm(t));break;case 4:s=wn,wn=ur(t.stateNode.containerInfo),$e(e,t),tn(t),wn=s;break;case 12:$e(e,t),tn(t);break;case 31:$e(e,t),tn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Fl(t,s)));break;case 13:$e(e,t),tn(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Wl=V()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Fl(t,s)));break;case 22:o=t.memoizedState!==null;var _=n!==null&&n.memoizedState!==null,R=Wn,k=we;if(Wn=R||o,we=k||_,$e(e,t),we=k,Wn=R,tn(t),s&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(n===null||_||Wn||we||Wa(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){_=n=e;try{if(c=_.stateNode,o)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{v=_.stateNode;var X=_.memoizedProps.style,z=X!=null&&X.hasOwnProperty("display")?X.display:null;v.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(it){Zt(_,_.return,it)}}}else if(e.tag===6){if(n===null){_=e;try{_.stateNode.nodeValue=o?"":_.memoizedProps}catch(it){Zt(_,_.return,it)}}}else if(e.tag===18){if(n===null){_=e;try{var L=_.stateNode;o?i0(L,!0):i0(_.stateNode,!1)}catch(it){Zt(_,_.return,it)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,Fl(t,n))));break;case 19:$e(e,t),tn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Fl(t,s)));break;case 30:break;case 21:break;default:$e(e,t),tn(t)}}function tn(t){var e=t.flags;if(e&2){try{for(var n,s=t.return;s!==null;){if(lm(s)){n=s;break}s=s.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var o=n.stateNode,c=_c(t);Pl(t,c,o);break;case 5:var m=n.stateNode;n.flags&32&&(mi(m,""),n.flags&=-33);var v=_c(t);Pl(t,v,m);break;case 3:case 4:var _=n.stateNode.containerInfo,R=_c(t);Ac(t,R,_);break;default:throw Error(r(161))}}catch(k){Zt(t,t.return,k)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function pm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;pm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function ta(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)cm(t,e.alternate,e),e=e.sibling}function Wa(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:xa(4,e,e.return),Wa(e);break;case 1:On(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&im(e,e.return,n),Wa(e);break;case 27:qs(e.stateNode);case 26:case 5:On(e,e.return),Wa(e);break;case 22:e.memoizedState===null&&Wa(e);break;case 30:Wa(e);break;default:Wa(e)}t=t.sibling}}function ea(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,o=t,c=e,m=c.flags;switch(c.tag){case 0:case 11:case 15:ea(o,c,n),Rs(4,c);break;case 1:if(ea(o,c,n),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(R){Zt(s,s.return,R)}if(s=c,o=s.updateQueue,o!==null){var v=s.stateNode;try{var _=o.shared.hiddenCallbacks;if(_!==null)for(o.shared.hiddenCallbacks=null,o=0;o<_.length;o++)Zd(_[o],v)}catch(R){Zt(s,s.return,R)}}n&&m&64&&am(c),Ds(c,c.return);break;case 27:rm(c);case 26:case 5:ea(o,c,n),n&&s===null&&m&4&&sm(c),Ds(c,c.return);break;case 12:ea(o,c,n);break;case 31:ea(o,c,n),n&&m&4&&dm(o,c);break;case 13:ea(o,c,n),n&&m&4&&hm(o,c);break;case 22:c.memoizedState===null&&ea(o,c,n),Ds(c,c.return);break;case 30:break;default:ea(o,c,n)}e=e.sibling}}function Ec(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&vs(n))}function wc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&vs(t))}function Vn(t,e,n,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gm(t,e,n,s),e=e.sibling}function gm(t,e,n,s){var o=e.flags;switch(e.tag){case 0:case 11:case 15:Vn(t,e,n,s),o&2048&&Rs(9,e);break;case 1:Vn(t,e,n,s);break;case 3:Vn(t,e,n,s),o&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&vs(t)));break;case 12:if(o&2048){Vn(t,e,n,s),t=e.stateNode;try{var c=e.memoizedProps,m=c.id,v=c.onPostCommit;typeof v=="function"&&v(m,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Zt(e,e.return,_)}}else Vn(t,e,n,s);break;case 31:Vn(t,e,n,s);break;case 13:Vn(t,e,n,s);break;case 23:break;case 22:c=e.stateNode,m=e.alternate,e.memoizedState!==null?c._visibility&2?Vn(t,e,n,s):Os(t,e):c._visibility&2?Vn(t,e,n,s):(c._visibility|=2,Oi(t,e,n,s,(e.subtreeFlags&10256)!==0||!1)),o&2048&&Ec(m,e);break;case 24:Vn(t,e,n,s),o&2048&&wc(e.alternate,e);break;default:Vn(t,e,n,s)}}function Oi(t,e,n,s,o){for(o=o&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,m=e,v=n,_=s,R=m.flags;switch(m.tag){case 0:case 11:case 15:Oi(c,m,v,_,o),Rs(8,m);break;case 23:break;case 22:var k=m.stateNode;m.memoizedState!==null?k._visibility&2?Oi(c,m,v,_,o):Os(c,m):(k._visibility|=2,Oi(c,m,v,_,o)),o&&R&2048&&Ec(m.alternate,m);break;case 24:Oi(c,m,v,_,o),o&&R&2048&&wc(m.alternate,m);break;default:Oi(c,m,v,_,o)}e=e.sibling}}function Os(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,o=s.flags;switch(s.tag){case 22:Os(n,s),o&2048&&Ec(s.alternate,s);break;case 24:Os(n,s),o&2048&&wc(s.alternate,s);break;default:Os(n,s)}e=e.sibling}}var zs=8192;function zi(t,e,n){if(t.subtreeFlags&zs)for(t=t.child;t!==null;)ym(t,e,n),t=t.sibling}function ym(t,e,n){switch(t.tag){case 26:zi(t,e,n),t.flags&zs&&t.memoizedState!==null&&P1(n,wn,t.memoizedState,t.memoizedProps);break;case 5:zi(t,e,n);break;case 3:case 4:var s=wn;wn=ur(t.stateNode.containerInfo),zi(t,e,n),wn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=zs,zs=16777216,zi(t,e,n),zs=s):zi(t,e,n));break;default:zi(t,e,n)}}function xm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ls(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];De=s,bm(s,t)}xm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vm(t),t=t.sibling}function vm(t){switch(t.tag){case 0:case 11:case 15:Ls(t),t.flags&2048&&xa(9,t,t.return);break;case 3:Ls(t);break;case 12:Ls(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Jl(t)):Ls(t);break;default:Ls(t)}}function Jl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];De=s,bm(s,t)}xm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:xa(8,e,e.return),Jl(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,Jl(e));break;default:Jl(e)}t=t.sibling}}function bm(t,e){for(;De!==null;){var n=De;switch(n.tag){case 0:case 11:case 15:xa(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:vs(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,De=s;else t:for(n=t;De!==null;){s=De;var o=s.sibling,c=s.return;if(um(s),s===n){De=null;break t}if(o!==null){o.return=c,De=o;break t}De=c}}}var u1={getCacheForType:function(t){var e=Ue(Ae),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Ue(Ae).controller.signal}},f1=typeof WeakMap=="function"?WeakMap:Map,Yt=0,te=null,Rt=null,Lt=0,Kt=0,un=null,va=!1,Li=!1,Vc=!1,na=0,xe=0,ba=0,$a=0,Nc=0,fn=0,Ui=0,Us=null,en=null,jc=!1,Wl=0,Sm=0,$l=1/0,tr=null,Sa=null,Ne=0,Ta=null,Bi=null,aa=0,Cc=0,Rc=null,Tm=null,Bs=0,Dc=null;function dn(){return(Yt&2)!==0&&Lt!==0?Lt&-Lt:U.T!==null?kc():Bf()}function _m(){if(fn===0)if((Lt&536870912)===0||Bt){var t=_t;_t<<=1,(_t&3932160)===0&&(_t=262144),fn=t}else fn=536870912;return t=on.current,t!==null&&(t.flags|=32),fn}function nn(t,e,n){(t===te&&(Kt===2||Kt===9)||t.cancelPendingCommit!==null)&&(ki(t,0),_a(t,Lt,fn,!1)),le(t,n),((Yt&2)===0||t!==te)&&(t===te&&((Yt&2)===0&&($a|=n),xe===4&&_a(t,Lt,fn,!1)),zn(t))}function Am(t,e,n){if((Yt&6)!==0)throw Error(r(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||Pe(t,e),o=s?m1(t,e):zc(t,e,!0),c=s;do{if(o===0){Li&&!s&&_a(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!d1(n)){o=zc(t,e,!1),c=!1;continue}if(o===2){if(c=e,t.errorRecoveryDisabledLanes&c)var m=0;else m=t.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){e=m;t:{var v=t;o=Us;var _=v.current.memoizedState.isDehydrated;if(_&&(ki(v,m).flags|=256),m=zc(v,m,!1),m!==2){if(Vc&&!_){v.errorRecoveryDisabledLanes|=c,$a|=c,o=4;break t}c=en,en=o,c!==null&&(en===null?en=c:en.push.apply(en,c))}o=m}if(c=!1,o!==2)continue}}if(o===1){ki(t,0),_a(t,e,0,!0);break}t:{switch(s=t,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:_a(s,e,fn,!va);break t;case 2:en=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(o=Wl+300-V(),10<o)){if(_a(s,e,fn,!va),an(s,0,!0)!==0)break t;aa=e,s.timeoutHandle=e0(Mm.bind(null,s,n,en,tr,jc,e,fn,$a,Ui,va,c,"Throttled",-0,0),o);break t}Mm(s,n,en,tr,jc,e,fn,$a,Ui,va,c,null,-0,0)}}break}while(!0);zn(t)}function Mm(t,e,n,s,o,c,m,v,_,R,k,X,z,L){if(t.timeoutHandle=-1,X=e.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qn},ym(e,c,X);var it=(c&62914560)===c?Wl-V():(c&4194048)===c?Sm-V():0;if(it=F1(X,it),it!==null){aa=c,t.cancelPendingCommit=it(Dm.bind(null,t,e,c,n,s,o,m,v,_,k,X,null,z,L)),_a(t,c,m,!R);return}}Dm(t,e,c,n,s,o,m,v,_)}function d1(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var o=n[s],c=o.getSnapshot;o=o.value;try{if(!ln(c(),o))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function _a(t,e,n,s){e&=~Nc,e&=~$a,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var o=e;0<o;){var c=31-E(o),m=1<<c;s[c]=-1,o&=~m}n!==0&&Te(t,n,e)}function er(){return(Yt&6)===0?(ks(0),!1):!0}function Oc(){if(Rt!==null){if(Kt===0)var t=Rt.return;else t=Rt,Zn=Xa=null,Fo(t),Ni=null,Ss=0,t=Rt;for(;t!==null;)nm(t.alternate,t),t=t.return;Rt=null}}function ki(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,R1(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),aa=0,Oc(),te=t,Rt=n=Xn(t.current,null),Lt=e,Kt=0,un=null,va=!1,Li=Pe(t,e),Vc=!1,Ui=fn=Nc=$a=ba=xe=0,en=Us=null,jc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var o=31-E(s),c=1<<o;e|=t[o],s&=~c}return na=e,Tl(),n}function Em(t,e){At=null,U.H=Ns,e===Vi||e===jl?(e=qd(),Kt=3):e===Bo?(e=qd(),Kt=4):Kt=e===dc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,un=e,Rt===null&&(xe=1,Xl(t,yn(e,t.current)))}function wm(){var t=on.current;return t===null?!0:(Lt&4194048)===Lt?Sn===null:(Lt&62914560)===Lt||(Lt&536870912)!==0?t===Sn:!1}function Vm(){var t=U.H;return U.H=Ns,t===null?Ns:t}function Nm(){var t=U.A;return U.A=u1,t}function nr(){xe=4,va||(Lt&4194048)!==Lt&&on.current!==null||(Li=!0),(ba&134217727)===0&&($a&134217727)===0||te===null||_a(te,Lt,fn,!1)}function zc(t,e,n){var s=Yt;Yt|=2;var o=Vm(),c=Nm();(te!==t||Lt!==e)&&(tr=null,ki(t,e)),e=!1;var m=xe;t:do try{if(Kt!==0&&Rt!==null){var v=Rt,_=un;switch(Kt){case 8:Oc(),m=6;break t;case 3:case 2:case 9:case 6:on.current===null&&(e=!0);var R=Kt;if(Kt=0,un=null,Hi(t,v,_,R),n&&Li){m=0;break t}break;default:R=Kt,Kt=0,un=null,Hi(t,v,_,R)}}h1(),m=xe;break}catch(k){Em(t,k)}while(!0);return e&&t.shellSuspendCounter++,Zn=Xa=null,Yt=s,U.H=o,U.A=c,Rt===null&&(te=null,Lt=0,Tl()),m}function h1(){for(;Rt!==null;)jm(Rt)}function m1(t,e){var n=Yt;Yt|=2;var s=Vm(),o=Nm();te!==t||Lt!==e?(tr=null,$l=V()+500,ki(t,e)):Li=Pe(t,e);t:do try{if(Kt!==0&&Rt!==null){e=Rt;var c=un;e:switch(Kt){case 1:Kt=0,un=null,Hi(t,e,c,1);break;case 2:case 9:if(Hd(c)){Kt=0,un=null,Cm(e);break}e=function(){Kt!==2&&Kt!==9||te!==t||(Kt=7),zn(t)},c.then(e,e);break t;case 3:Kt=7;break t;case 4:Kt=5;break t;case 7:Hd(c)?(Kt=0,un=null,Cm(e)):(Kt=0,un=null,Hi(t,e,c,7));break;case 5:var m=null;switch(Rt.tag){case 26:m=Rt.memoizedState;case 5:case 27:var v=Rt;if(m?g0(m):v.stateNode.complete){Kt=0,un=null;var _=v.sibling;if(_!==null)Rt=_;else{var R=v.return;R!==null?(Rt=R,ar(R)):Rt=null}break e}}Kt=0,un=null,Hi(t,e,c,5);break;case 6:Kt=0,un=null,Hi(t,e,c,6);break;case 8:Oc(),xe=6;break t;default:throw Error(r(462))}}p1();break}catch(k){Em(t,k)}while(!0);return Zn=Xa=null,U.H=s,U.A=o,Yt=n,Rt!==null?0:(te=null,Lt=0,Tl(),xe)}function p1(){for(;Rt!==null&&!nt();)jm(Rt)}function jm(t){var e=tm(t.alternate,t,na);t.memoizedProps=t.pendingProps,e===null?ar(t):Rt=e}function Cm(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Qh(n,e,e.pendingProps,e.type,void 0,Lt);break;case 11:e=Qh(n,e,e.pendingProps,e.type.render,e.ref,Lt);break;case 5:Fo(e);default:nm(n,e),e=Rt=Nd(e,na),e=tm(n,e,na)}t.memoizedProps=t.pendingProps,e===null?ar(t):Rt=e}function Hi(t,e,n,s){Zn=Xa=null,Fo(e),Ni=null,Ss=0;var o=e.return;try{if(a1(t,o,e,n,Lt)){xe=1,Xl(t,yn(n,t.current)),Rt=null;return}}catch(c){if(o!==null)throw Rt=o,c;xe=1,Xl(t,yn(n,t.current)),Rt=null;return}e.flags&32768?(Bt||s===1?t=!0:Li||(Lt&536870912)!==0?t=!1:(va=t=!0,(s===2||s===9||s===3||s===6)&&(s=on.current,s!==null&&s.tag===13&&(s.flags|=16384))),Rm(e,t)):ar(e)}function ar(t){var e=t;do{if((e.flags&32768)!==0){Rm(e,va);return}t=e.return;var n=l1(e.alternate,e,na);if(n!==null){Rt=n;return}if(e=e.sibling,e!==null){Rt=e;return}Rt=e=t}while(e!==null);xe===0&&(xe=5)}function Rm(t,e){do{var n=r1(t.alternate,t);if(n!==null){n.flags&=32767,Rt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){Rt=t;return}Rt=t=n}while(t!==null);xe=6,Rt=null}function Dm(t,e,n,s,o,c,m,v,_){t.cancelPendingCommit=null;do ir();while(Ne!==0);if((Yt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(c=e.lanes|e.childLanes,c|=_o,Qt(t,n,c,m,v,_),t===te&&(Rt=te=null,Lt=0),Bi=e,Ta=t,aa=n,Cc=c,Rc=o,Tm=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,v1(It,function(){return Bm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,o=W.p,W.p=2,m=Yt,Yt|=4;try{o1(t,e,n)}finally{Yt=m,W.p=o,U.T=s}}Ne=1,Om(),zm(),Lm()}}function Om(){if(Ne===1){Ne=0;var t=Ta,e=Bi,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=U.T,U.T=null;var s=W.p;W.p=2;var o=Yt;Yt|=4;try{mm(e,t);var c=Ic,m=bd(t.containerInfo),v=c.focusedElem,_=c.selectionRange;if(m!==v&&v&&v.ownerDocument&&vd(v.ownerDocument.documentElement,v)){if(_!==null&&xo(v)){var R=_.start,k=_.end;if(k===void 0&&(k=R),"selectionStart"in v)v.selectionStart=R,v.selectionEnd=Math.min(k,v.value.length);else{var X=v.ownerDocument||document,z=X&&X.defaultView||window;if(z.getSelection){var L=z.getSelection(),it=v.textContent.length,mt=Math.min(_.start,it),Jt=_.end===void 0?mt:Math.min(_.end,it);!L.extend&&mt>Jt&&(m=Jt,Jt=mt,mt=m);var j=xd(v,mt),M=xd(v,Jt);if(j&&M&&(L.rangeCount!==1||L.anchorNode!==j.node||L.anchorOffset!==j.offset||L.focusNode!==M.node||L.focusOffset!==M.offset)){var C=X.createRange();C.setStart(j.node,j.offset),L.removeAllRanges(),mt>Jt?(L.addRange(C),L.extend(M.node,M.offset)):(C.setEnd(M.node,M.offset),L.addRange(C))}}}}for(X=[],L=v;L=L.parentNode;)L.nodeType===1&&X.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<X.length;v++){var q=X[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}gr=!!Zc,Ic=Zc=null}finally{Yt=o,W.p=s,U.T=n}}t.current=e,Ne=2}}function zm(){if(Ne===2){Ne=0;var t=Ta,e=Bi,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=U.T,U.T=null;var s=W.p;W.p=2;var o=Yt;Yt|=4;try{cm(t,e.alternate,e)}finally{Yt=o,W.p=s,U.T=n}}Ne=3}}function Lm(){if(Ne===4||Ne===3){Ne=0,y();var t=Ta,e=Bi,n=aa,s=Tm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ne=5:(Ne=0,Bi=Ta=null,Um(t,t.pendingLanes));var o=t.pendingLanes;if(o===0&&(Sa=null),ss(n),e=e.stateNode,pe&&typeof pe.onCommitFiberRoot=="function")try{pe.onCommitFiberRoot(ie,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=U.T,o=W.p,W.p=2,U.T=null;try{for(var c=t.onRecoverableError,m=0;m<s.length;m++){var v=s[m];c(v.value,{componentStack:v.stack})}}finally{U.T=e,W.p=o}}(aa&3)!==0&&ir(),zn(t),o=t.pendingLanes,(n&261930)!==0&&(o&42)!==0?t===Dc?Bs++:(Bs=0,Dc=t):Bs=0,ks(0)}}function Um(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,vs(e)))}function ir(){return Om(),zm(),Lm(),Bm()}function Bm(){if(Ne!==5)return!1;var t=Ta,e=Cc;Cc=0;var n=ss(aa),s=U.T,o=W.p;try{W.p=32>n?32:n,U.T=null,n=Rc,Rc=null;var c=Ta,m=aa;if(Ne=0,Bi=Ta=null,aa=0,(Yt&6)!==0)throw Error(r(331));var v=Yt;if(Yt|=4,vm(c.current),gm(c,c.current,m,n),Yt=v,ks(0,!1),pe&&typeof pe.onPostCommitFiberRoot=="function")try{pe.onPostCommitFiberRoot(ie,c)}catch{}return!0}finally{W.p=o,U.T=s,Um(t,e)}}function km(t,e,n){e=yn(n,e),e=fc(t.stateNode,e,2),t=pa(t,e,2),t!==null&&(le(t,2),zn(t))}function Zt(t,e,n){if(t.tag===3)km(t,t,n);else for(;e!==null;){if(e.tag===3){km(e,t,n);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Sa===null||!Sa.has(s))){t=yn(n,t),n=Hh(2),s=pa(e,n,2),s!==null&&(Gh(n,s,e,t),le(s,2),zn(s));break}}e=e.return}}function Lc(t,e,n){var s=t.pingCache;if(s===null){s=t.pingCache=new f1;var o=new Set;s.set(e,o)}else o=s.get(e),o===void 0&&(o=new Set,s.set(e,o));o.has(n)||(Vc=!0,o.add(n),t=g1.bind(null,t,e,n),e.then(t,t))}function g1(t,e,n){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,te===t&&(Lt&n)===n&&(xe===4||xe===3&&(Lt&62914560)===Lt&&300>V()-Wl?(Yt&2)===0&&ki(t,0):Nc|=n,Ui===Lt&&(Ui=0)),zn(t)}function Hm(t,e){e===0&&(e=yt()),t=Ga(t,e),t!==null&&(le(t,e),zn(t))}function y1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Hm(t,n)}function x1(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(e),Hm(t,n)}function v1(t,e){return La(t,e)}var sr=null,Gi=null,Uc=!1,lr=!1,Bc=!1,Aa=0;function zn(t){t!==Gi&&t.next===null&&(Gi===null?sr=Gi=t:Gi=Gi.next=t),lr=!0,Uc||(Uc=!0,S1())}function ks(t,e){if(!Bc&&lr){Bc=!0;do for(var n=!1,s=sr;s!==null;){if(t!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var m=s.suspendedLanes,v=s.pingedLanes;c=(1<<31-E(42|t)+1)-1,c&=o&~(m&~v),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Xm(s,c))}else c=Lt,c=an(s,s===te?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||Pe(s,c)||(n=!0,Xm(s,c));s=s.next}while(n);Bc=!1}}function b1(){Gm()}function Gm(){lr=Uc=!1;var t=0;Aa!==0&&C1()&&(t=Aa);for(var e=V(),n=null,s=sr;s!==null;){var o=s.next,c=qm(s,e);c===0?(s.next=null,n===null?sr=o:n.next=o,o===null&&(Gi=n)):(n=s,(t!==0||(c&3)!==0)&&(lr=!0)),s=o}Ne!==0&&Ne!==5||ks(t),Aa!==0&&(Aa=0)}function qm(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var m=31-E(c),v=1<<m,_=o[m];_===-1?((v&n)===0||(v&s)!==0)&&(o[m]=O(v,e)):_<=e&&(t.expiredLanes|=v),c&=~v}if(e=te,n=Lt,n=an(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Kt===2||Kt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&is(s),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||Pe(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(s!==null&&is(s),ss(n)){case 2:case 8:n=fe;break;case 32:n=It;break;case 268435456:n=de;break;default:n=It}return s=Ym.bind(null,t),n=La(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&is(s),t.callbackPriority=2,t.callbackNode=null,2}function Ym(t,e){if(Ne!==0&&Ne!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(ir()&&t.callbackNode!==n)return null;var s=Lt;return s=an(t,t===te?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Am(t,s,e),qm(t,V()),t.callbackNode!=null&&t.callbackNode===n?Ym.bind(null,t):null)}function Xm(t,e){if(ir())return null;Am(t,e,!0)}function S1(){D1(function(){(Yt&6)!==0?La(vt,b1):Gm()})}function kc(){if(Aa===0){var t=Ei;t===0&&(t=Ct,Ct<<=1,(Ct&261888)===0&&(Ct=256)),Aa=t}return Aa}function Km(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ml(""+t)}function Zm(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function T1(t,e,n,s,o){if(e==="submit"&&n&&n.stateNode===o){var c=Km((o[Fe]||null).action),m=s.submitter;m&&(e=(e=m[Fe]||null)?Km(e.formAction):m.getAttribute("formAction"),e!==null&&(c=e,m=null));var v=new xl("action","action",null,s,o);t.push({event:v,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Aa!==0){var _=m?Zm(o,m):new FormData(o);sc(n,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(v.preventDefault(),_=m?Zm(o,m):new FormData(o),sc(n,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var Hc=0;Hc<To.length;Hc++){var Gc=To[Hc],_1=Gc.toLowerCase(),A1=Gc[0].toUpperCase()+Gc.slice(1);En(_1,"on"+A1)}En(_d,"onAnimationEnd"),En(Ad,"onAnimationIteration"),En(Md,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(Hx,"onTransitionRun"),En(Gx,"onTransitionStart"),En(qx,"onTransitionCancel"),En(Ed,"onTransitionEnd"),di("onMouseEnter",["mouseout","mouseover"]),di("onMouseLeave",["mouseout","mouseover"]),di("onPointerEnter",["pointerout","pointerover"]),di("onPointerLeave",["pointerout","pointerover"]),Ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="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(" "),M1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hs));function Im(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var s=t[n],o=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var m=s.length-1;0<=m;m--){var v=s[m],_=v.instance,R=v.currentTarget;if(v=v.listener,_!==c&&o.isPropagationStopped())break t;c=v,o.currentTarget=R;try{c(o)}catch(k){Sl(k)}o.currentTarget=null,c=_}else for(m=0;m<s.length;m++){if(v=s[m],_=v.instance,R=v.currentTarget,v=v.listener,_!==c&&o.isPropagationStopped())break t;c=v,o.currentTarget=R;try{c(o)}catch(k){Sl(k)}o.currentTarget=null,c=_}}}}function Dt(t,e){var n=e[$r];n===void 0&&(n=e[$r]=new Set);var s=t+"__bubble";n.has(s)||(Qm(e,t,2,!1),n.add(s))}function qc(t,e,n){var s=0;e&&(s|=4),Qm(n,t,s,e)}var rr="_reactListening"+Math.random().toString(36).slice(2);function Yc(t){if(!t[rr]){t[rr]=!0,Gf.forEach(function(n){n!=="selectionchange"&&(M1.has(n)||qc(n,!1,t),qc(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[rr]||(e[rr]=!0,qc("selectionchange",!1,e))}}function Qm(t,e,n,s){switch(_0(e)){case 2:var o=$1;break;case 8:o=tv;break;default:o=iu}n=o.bind(null,e,n,t),o=void 0,!oo||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),s?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function Xc(t,e,n,s,o){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var v=s.stateNode.containerInfo;if(v===o)break;if(m===4)for(m=s.return;m!==null;){var _=m.tag;if((_===3||_===4)&&m.stateNode.containerInfo===o)return;m=m.return}for(;v!==null;){if(m=ci(v),m===null)return;if(_=m.tag,_===5||_===6||_===26||_===27){s=c=m;continue t}v=v.parentNode}}s=s.return}$f(function(){var R=c,k=lo(n),X=[];t:{var z=wd.get(t);if(z!==void 0){var L=xl,it=t;switch(t){case"keypress":if(gl(n)===0)break t;case"keydown":case"keyup":L=xx;break;case"focusin":it="focus",L=ho;break;case"focusout":it="blur",L=ho;break;case"beforeblur":case"afterblur":L=ho;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=nd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=lx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Sx;break;case _d:case Ad:case Md:L=cx;break;case Ed:L=_x;break;case"scroll":case"scrollend":L=ix;break;case"wheel":L=Mx;break;case"copy":case"cut":case"paste":L=fx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=id;break;case"toggle":case"beforetoggle":L=wx}var mt=(e&4)!==0,Jt=!mt&&(t==="scroll"||t==="scrollend"),j=mt?z!==null?z+"Capture":null:z;mt=[];for(var M=R,C;M!==null;){var q=M;if(C=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||C===null||j===null||(q=os(M,j),q!=null&&mt.push(Gs(M,q,C))),Jt)break;M=M.return}0<mt.length&&(z=new L(z,it,null,n,k),X.push({event:z,listeners:mt}))}}if((e&7)===0){t:{if(z=t==="mouseover"||t==="pointerover",L=t==="mouseout"||t==="pointerout",z&&n!==so&&(it=n.relatedTarget||n.fromElement)&&(ci(it)||it[oi]))break t;if((L||z)&&(z=k.window===k?k:(z=k.ownerDocument)?z.defaultView||z.parentWindow:window,L?(it=n.relatedTarget||n.toElement,L=R,it=it?ci(it):null,it!==null&&(Jt=d(it),mt=it.tag,it!==Jt||mt!==5&&mt!==27&&mt!==6)&&(it=null)):(L=null,it=R),L!==it)){if(mt=nd,q="onMouseLeave",j="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(mt=id,q="onPointerLeave",j="onPointerEnter",M="pointer"),Jt=L==null?z:rs(L),C=it==null?z:rs(it),z=new mt(q,M+"leave",L,n,k),z.target=Jt,z.relatedTarget=C,q=null,ci(k)===R&&(mt=new mt(j,M+"enter",it,n,k),mt.target=C,mt.relatedTarget=Jt,q=mt),Jt=q,L&&it)e:{for(mt=E1,j=L,M=it,C=0,q=j;q;q=mt(q))C++;q=0;for(var dt=M;dt;dt=mt(dt))q++;for(;0<C-q;)j=mt(j),C--;for(;0<q-C;)M=mt(M),q--;for(;C--;){if(j===M||M!==null&&j===M.alternate){mt=j;break e}j=mt(j),M=mt(M)}mt=null}else mt=null;L!==null&&Pm(X,z,L,mt,!1),it!==null&&Jt!==null&&Pm(X,Jt,it,mt,!0)}}t:{if(z=R?rs(R):window,L=z.nodeName&&z.nodeName.toLowerCase(),L==="select"||L==="input"&&z.type==="file")var Ht=dd;else if(ud(z))if(hd)Ht=Ux;else{Ht=zx;var ot=Ox}else L=z.nodeName,!L||L.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?R&&io(R.elementType)&&(Ht=dd):Ht=Lx;if(Ht&&(Ht=Ht(t,R))){fd(X,Ht,n,k);break t}ot&&ot(t,z,R),t==="focusout"&&R&&z.type==="number"&&R.memoizedProps.value!=null&&ao(z,"number",z.value)}switch(ot=R?rs(R):window,t){case"focusin":(ud(ot)||ot.contentEditable==="true")&&(xi=ot,vo=R,gs=null);break;case"focusout":gs=vo=xi=null;break;case"mousedown":bo=!0;break;case"contextmenu":case"mouseup":case"dragend":bo=!1,Sd(X,n,k);break;case"selectionchange":if(kx)break;case"keydown":case"keyup":Sd(X,n,k)}var wt;if(po)t:{switch(t){case"compositionstart":var Ut="onCompositionStart";break t;case"compositionend":Ut="onCompositionEnd";break t;case"compositionupdate":Ut="onCompositionUpdate";break t}Ut=void 0}else yi?od(t,n)&&(Ut="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Ut="onCompositionStart");Ut&&(sd&&n.locale!=="ko"&&(yi||Ut!=="onCompositionStart"?Ut==="onCompositionEnd"&&yi&&(wt=td()):(oa=k,co="value"in oa?oa.value:oa.textContent,yi=!0)),ot=or(R,Ut),0<ot.length&&(Ut=new ad(Ut,t,null,n,k),X.push({event:Ut,listeners:ot}),wt?Ut.data=wt:(wt=cd(n),wt!==null&&(Ut.data=wt)))),(wt=Nx?jx(t,n):Cx(t,n))&&(Ut=or(R,"onBeforeInput"),0<Ut.length&&(ot=new ad("onBeforeInput","beforeinput",null,n,k),X.push({event:ot,listeners:Ut}),ot.data=wt)),T1(X,t,R,n,k)}Im(X,e)})}function Gs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function or(t,e){for(var n=e+"Capture",s=[];t!==null;){var o=t,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=os(t,n),o!=null&&s.unshift(Gs(t,o,c)),o=os(t,e),o!=null&&s.push(Gs(t,o,c))),t.tag===3)return s;t=t.return}return[]}function E1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Pm(t,e,n,s,o){for(var c=e._reactName,m=[];n!==null&&n!==s;){var v=n,_=v.alternate,R=v.stateNode;if(v=v.tag,_!==null&&_===s)break;v!==5&&v!==26&&v!==27||R===null||(_=R,o?(R=os(n,c),R!=null&&m.unshift(Gs(n,R,_))):o||(R=os(n,c),R!=null&&m.push(Gs(n,R,_)))),n=n.return}m.length!==0&&t.push({event:e,listeners:m})}var w1=/\r\n?/g,V1=/\u0000|\uFFFD/g;function Fm(t){return(typeof t=="string"?t:""+t).replace(w1,`
`).replace(V1,"")}function Jm(t,e){return e=Fm(e),Fm(t)===e}function Ft(t,e,n,s,o,c){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||mi(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&mi(t,""+s);break;case"className":dl(t,"class",s);break;case"tabIndex":dl(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":dl(t,n,s);break;case"style":Jf(t,s,c);break;case"data":if(e!=="object"){dl(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=ml(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(n,"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 c=="function"&&(n==="formAction"?(e!=="input"&&Ft(t,e,"name",o.name,o,null),Ft(t,e,"formEncType",o.formEncType,o,null),Ft(t,e,"formMethod",o.formMethod,o,null),Ft(t,e,"formTarget",o.formTarget,o,null)):(Ft(t,e,"encType",o.encType,o,null),Ft(t,e,"method",o.method,o,null),Ft(t,e,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=ml(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=qn);break;case"onScroll":s!=null&&Dt("scroll",t);break;case"onScrollEnd":s!=null&&Dt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=ml(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.removeAttribute(n);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":Dt("beforetoggle",t),Dt("toggle",t),fl(t,"popover",s);break;case"xlinkActuate":Gn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Gn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Gn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Gn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Gn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Gn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fl(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=nx.get(n)||n,fl(t,n,s))}}function Kc(t,e,n,s,o,c){switch(n){case"style":Jf(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"children":typeof s=="string"?mi(t,s):(typeof s=="number"||typeof s=="bigint")&&mi(t,""+s);break;case"onScroll":s!=null&&Dt("scroll",t);break;case"onScrollEnd":s!=null&&Dt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qf.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),e=n.slice(2,o?n.length-7:void 0),c=t[Fe]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,o);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):fl(t,n,s)}}}function ke(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dt("error",t),Dt("load",t);var s=!1,o=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ft(t,e,c,m,n,null)}}o&&Ft(t,e,"srcSet",n.srcSet,n,null),s&&Ft(t,e,"src",n.src,n,null);return;case"input":Dt("invalid",t);var v=c=m=o=null,_=null,R=null;for(s in n)if(n.hasOwnProperty(s)){var k=n[s];if(k!=null)switch(s){case"name":o=k;break;case"type":m=k;break;case"checked":_=k;break;case"defaultChecked":R=k;break;case"value":c=k;break;case"defaultValue":v=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,e));break;default:Ft(t,e,s,k,n,null)}}If(t,c,v,_,R,m,o,!1);return;case"select":Dt("invalid",t),s=m=c=null;for(o in n)if(n.hasOwnProperty(o)&&(v=n[o],v!=null))switch(o){case"value":c=v;break;case"defaultValue":m=v;break;case"multiple":s=v;default:Ft(t,e,o,v,n,null)}e=c,n=m,t.multiple=!!s,e!=null?hi(t,!!s,e,!1):n!=null&&hi(t,!!s,n,!0);return;case"textarea":Dt("invalid",t),c=o=s=null;for(m in n)if(n.hasOwnProperty(m)&&(v=n[m],v!=null))switch(m){case"value":s=v;break;case"defaultValue":o=v;break;case"children":c=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:Ft(t,e,m,v,n,null)}Pf(t,s,o,c);return;case"option":for(_ in n)if(n.hasOwnProperty(_)&&(s=n[_],s!=null))switch(_){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ft(t,e,_,s,n,null)}return;case"dialog":Dt("beforetoggle",t),Dt("toggle",t),Dt("cancel",t),Dt("close",t);break;case"iframe":case"object":Dt("load",t);break;case"video":case"audio":for(s=0;s<Hs.length;s++)Dt(Hs[s],t);break;case"image":Dt("error",t),Dt("load",t);break;case"details":Dt("toggle",t);break;case"embed":case"source":case"link":Dt("error",t),Dt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(s=n[R],s!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ft(t,e,R,s,n,null)}return;default:if(io(e)){for(k in n)n.hasOwnProperty(k)&&(s=n[k],s!==void 0&&Kc(t,e,k,s,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(s=n[v],s!=null&&Ft(t,e,v,s,n,null))}function N1(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,m=null,v=null,_=null,R=null,k=null;for(L in n){var X=n[L];if(n.hasOwnProperty(L)&&X!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":_=X;default:s.hasOwnProperty(L)||Ft(t,e,L,null,s,X)}}for(var z in s){var L=s[z];if(X=n[z],s.hasOwnProperty(z)&&(L!=null||X!=null))switch(z){case"type":c=L;break;case"name":o=L;break;case"checked":R=L;break;case"defaultChecked":k=L;break;case"value":m=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,e));break;default:L!==X&&Ft(t,e,z,L,s,X)}}no(t,m,v,_,R,k,c,o);return;case"select":L=m=v=z=null;for(c in n)if(_=n[c],n.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":L=_;default:s.hasOwnProperty(c)||Ft(t,e,c,null,s,_)}for(o in s)if(c=s[o],_=n[o],s.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":z=c;break;case"defaultValue":v=c;break;case"multiple":m=c;default:c!==_&&Ft(t,e,o,c,s,_)}e=v,n=m,s=L,z!=null?hi(t,!!n,z,!1):!!s!=!!n&&(e!=null?hi(t,!!n,e,!0):hi(t,!!n,n?[]:"",!1));return;case"textarea":L=z=null;for(v in n)if(o=n[v],n.hasOwnProperty(v)&&o!=null&&!s.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ft(t,e,v,null,s,o)}for(m in s)if(o=s[m],c=n[m],s.hasOwnProperty(m)&&(o!=null||c!=null))switch(m){case"value":z=o;break;case"defaultValue":L=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ft(t,e,m,o,s,c)}Qf(t,z,L);return;case"option":for(var it in n)if(z=n[it],n.hasOwnProperty(it)&&z!=null&&!s.hasOwnProperty(it))switch(it){case"selected":t.selected=!1;break;default:Ft(t,e,it,null,s,z)}for(_ in s)if(z=s[_],L=n[_],s.hasOwnProperty(_)&&z!==L&&(z!=null||L!=null))switch(_){case"selected":t.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Ft(t,e,_,z,s,L)}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 mt in n)z=n[mt],n.hasOwnProperty(mt)&&z!=null&&!s.hasOwnProperty(mt)&&Ft(t,e,mt,null,s,z);for(R in s)if(z=s[R],L=n[R],s.hasOwnProperty(R)&&z!==L&&(z!=null||L!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,e));break;default:Ft(t,e,R,z,s,L)}return;default:if(io(e)){for(var Jt in n)z=n[Jt],n.hasOwnProperty(Jt)&&z!==void 0&&!s.hasOwnProperty(Jt)&&Kc(t,e,Jt,void 0,s,z);for(k in s)z=s[k],L=n[k],!s.hasOwnProperty(k)||z===L||z===void 0&&L===void 0||Kc(t,e,k,z,s,L);return}}for(var j in n)z=n[j],n.hasOwnProperty(j)&&z!=null&&!s.hasOwnProperty(j)&&Ft(t,e,j,null,s,z);for(X in s)z=s[X],L=n[X],!s.hasOwnProperty(X)||z===L||z==null&&L==null||Ft(t,e,X,z,s,L)}function Wm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var o=n[s],c=o.transferSize,m=o.initiatorType,v=o.duration;if(c&&v&&Wm(m)){for(m=0,v=o.responseEnd,s+=1;s<n.length;s++){var _=n[s],R=_.startTime;if(R>v)break;var k=_.transferSize,X=_.initiatorType;k&&Wm(X)&&(_=_.responseEnd,m+=k*(_<v?1:(v-R)/(_-R)))}if(--s,e+=8*(c+m)/(o.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Zc=null,Ic=null;function cr(t){return t.nodeType===9?t:t.ownerDocument}function $m(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function t0(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Qc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Pc=null;function C1(){var t=window.event;return t&&t.type==="popstate"?t===Pc?!1:(Pc=t,!0):(Pc=null,!1)}var e0=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,n0=typeof Promise=="function"?Promise:void 0,D1=typeof queueMicrotask=="function"?queueMicrotask:typeof n0<"u"?function(t){return n0.resolve(null).then(t).catch(O1)}:e0;function O1(t){setTimeout(function(){throw t})}function Ma(t){return t==="head"}function a0(t,e){var n=e,s=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(o),Ki(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")qs(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,qs(n);for(var c=n.firstChild;c;){var m=c.nextSibling,v=c.nodeName;c[ls]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&qs(t.ownerDocument.body);n=o}while(n);Ki(e)}function i0(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function Fc(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Fc(n),to(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function z1(t,e,n,s){for(;t.nodeType===1;){var o=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[ls])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=Tn(t.nextSibling),t===null)break}return null}function L1(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Tn(t.nextSibling),t===null))return null;return t}function s0(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Tn(t.nextSibling),t===null))return null;return t}function Jc(t){return t.data==="$?"||t.data==="$~"}function Wc(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function U1(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Tn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var $c=null;function l0(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return Tn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function r0(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function o0(t,e,n){switch(e=cr(n),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function qs(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);to(t)}var _n=new Map,c0=new Set;function ur(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ia=W.d;W.d={f:B1,r:k1,D:H1,C:G1,L:q1,m:Y1,X:K1,S:X1,M:Z1};function B1(){var t=ia.f(),e=er();return t||e}function k1(t){var e=ui(t);e!==null&&e.tag===5&&e.type==="form"?Eh(e):ia.r(t)}var qi=typeof document>"u"?null:document;function u0(t,e,n){var s=qi;if(s&&typeof e=="string"&&e){var o=pn(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),c0.has(o)||(c0.add(o),t={rel:t,crossOrigin:n,href:e},s.querySelector(o)===null&&(e=s.createElement("link"),ke(e,"link",t),Re(e),s.head.appendChild(e)))}}function H1(t){ia.D(t),u0("dns-prefetch",t,null)}function G1(t,e){ia.C(t,e),u0("preconnect",t,e)}function q1(t,e,n){ia.L(t,e,n);var s=qi;if(s&&t&&e){var o='link[rel="preload"][as="'+pn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+pn(n.imageSizes)+'"]')):o+='[href="'+pn(t)+'"]';var c=o;switch(e){case"style":c=Yi(t);break;case"script":c=Xi(t)}_n.has(c)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),_n.set(c,t),s.querySelector(o)!==null||e==="style"&&s.querySelector(Ys(c))||e==="script"&&s.querySelector(Xs(c))||(e=s.createElement("link"),ke(e,"link",t),Re(e),s.head.appendChild(e)))}}function Y1(t,e){ia.m(t,e);var n=qi;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+pn(s)+'"][href="'+pn(t)+'"]',c=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Xi(t)}if(!_n.has(c)&&(t=S({rel:"modulepreload",href:t},e),_n.set(c,t),n.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xs(c)))return}s=n.createElement("link"),ke(s,"link",t),Re(s),n.head.appendChild(s)}}}function X1(t,e,n){ia.S(t,e,n);var s=qi;if(s&&t){var o=fi(s).hoistableStyles,c=Yi(t);e=e||"default";var m=o.get(c);if(!m){var v={loading:0,preload:null};if(m=s.querySelector(Ys(c)))v.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=_n.get(c))&&tu(t,n);var _=m=s.createElement("link");Re(_),ke(_,"link",t),_._p=new Promise(function(R,k){_.onload=R,_.onerror=k}),_.addEventListener("load",function(){v.loading|=1}),_.addEventListener("error",function(){v.loading|=2}),v.loading|=4,fr(m,e,s)}m={type:"stylesheet",instance:m,count:1,state:v},o.set(c,m)}}}function K1(t,e){ia.X(t,e);var n=qi;if(n&&t){var s=fi(n).hoistableScripts,o=Xi(t),c=s.get(o);c||(c=n.querySelector(Xs(o)),c||(t=S({src:t,async:!0},e),(e=_n.get(o))&&eu(t,e),c=n.createElement("script"),Re(c),ke(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function Z1(t,e){ia.M(t,e);var n=qi;if(n&&t){var s=fi(n).hoistableScripts,o=Xi(t),c=s.get(o);c||(c=n.querySelector(Xs(o)),c||(t=S({src:t,async:!0,type:"module"},e),(e=_n.get(o))&&eu(t,e),c=n.createElement("script"),Re(c),ke(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function f0(t,e,n,s){var o=(o=ft.current)?ur(o):null;if(!o)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Yi(n.href),n=fi(o).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Yi(n.href);var c=fi(o).hoistableStyles,m=c.get(t);if(m||(o=o.ownerDocument||o,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,m),(c=o.querySelector(Ys(t)))&&!c._p&&(m.instance=c,m.state.loading=5),_n.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_n.set(t,n),c||I1(o,t,n,m.state))),e&&s===null)throw Error(r(528,""));return m}if(e&&s!==null)throw Error(r(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Xi(n),n=fi(o).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Yi(t){return'href="'+pn(t)+'"'}function Ys(t){return'link[rel="stylesheet"]['+t+"]"}function d0(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function I1(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),ke(e,"link",n),Re(e),t.head.appendChild(e))}function Xi(t){return'[src="'+pn(t)+'"]'}function Xs(t){return"script[async]"+t}function h0(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+pn(n.href)+'"]');if(s)return e.instance=s,Re(s),s;var o=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Re(s),ke(s,"style",o),fr(s,n.precedence,t),e.instance=s;case"stylesheet":o=Yi(n.href);var c=t.querySelector(Ys(o));if(c)return e.state.loading|=4,e.instance=c,Re(c),c;s=d0(n),(o=_n.get(o))&&tu(s,o),c=(t.ownerDocument||t).createElement("link"),Re(c);var m=c;return m._p=new Promise(function(v,_){m.onload=v,m.onerror=_}),ke(c,"link",s),e.state.loading|=4,fr(c,n.precedence,t),e.instance=c;case"script":return c=Xi(n.src),(o=t.querySelector(Xs(c)))?(e.instance=o,Re(o),o):(s=n,(o=_n.get(c))&&(s=S({},n),eu(s,o)),t=t.ownerDocument||t,o=t.createElement("script"),Re(o),ke(o,"link",s),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,fr(s,n.precedence,t));return e.instance}function fr(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,c=o,m=0;m<s.length;m++){var v=s[m];if(v.dataset.precedence===e)c=v;else if(c!==o)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function tu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function eu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var dr=null;function m0(t,e,n){if(dr===null){var s=new Map,o=dr=new Map;o.set(n,s)}else o=dr,s=o.get(n),s||(s=new Map,o.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),o=0;o<n.length;o++){var c=n[o];if(!(c[ls]||c[ze]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(e)||"";m=t+m;var v=s.get(m);v?v.push(c):s.set(m,[c])}}return s}function p0(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function Q1(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function g0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function P1(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Yi(s.href),c=e.querySelector(Ys(o));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=hr.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,Re(c);return}c=e.ownerDocument||e,s=d0(s),(o=_n.get(o))&&tu(s,o),c=c.createElement("link"),Re(c);var m=c;m._p=new Promise(function(v,_){m.onload=v,m.onerror=_}),ke(c,"link",s),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=hr.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var nu=0;function F1(t,e){return t.stylesheets&&t.count===0&&pr(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&pr(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&nu===0&&(nu=62500*j1());var o=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&pr(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>nu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function hr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pr(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var mr=null;function pr(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,mr=new Map,e.forEach(J1,t),mr=null,hr.call(t))}function J1(t,e){if(!(e.state.loading&4)){var n=mr.get(t);if(n)var s=n.get(null);else{n=new Map,mr.set(t,n);for(var o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var m=o[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),s=m)}s&&n.set(null,s)}o=e.instance,m=o.getAttribute("data-precedence"),c=n.get(m)||s,c===s&&n.set(null,o),n.set(m,o),this.count++,s=hr.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var Ks={$$typeof:K,Provider:null,Consumer:null,_currentValue:et,_currentValue2:et,_threadCount:0};function W1(t,e,n,s,o,c,m,v,_){this.tag=1,this.containerInfo=t,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=Et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Et(0),this.hiddenUpdates=Et(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function y0(t,e,n,s,o,c,m,v,_,R,k,X){return t=new W1(t,e,n,m,_,R,k,X,v),e=1,c===!0&&(e|=24),c=rn(3,null,null,e),t.current=c,c.stateNode=t,e=zo(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:e},ko(c),t}function x0(t){return t?(t=Si,t):Si}function v0(t,e,n,s,o,c){o=x0(o),s.context===null?s.context=o:s.pendingContext=o,s=ma(e),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=pa(t,s,e),n!==null&&(nn(n,t,e),_s(n,t,e))}function b0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function au(t,e){b0(t,e),(t=t.alternate)&&b0(t,e)}function S0(t){if(t.tag===13||t.tag===31){var e=Ga(t,67108864);e!==null&&nn(e,t,67108864),au(t,67108864)}}function T0(t){if(t.tag===13||t.tag===31){var e=dn();e=sn(e);var n=Ga(t,e);n!==null&&nn(n,t,e),au(t,e)}}var gr=!0;function $1(t,e,n,s){var o=U.T;U.T=null;var c=W.p;try{W.p=2,iu(t,e,n,s)}finally{W.p=c,U.T=o}}function tv(t,e,n,s){var o=U.T;U.T=null;var c=W.p;try{W.p=8,iu(t,e,n,s)}finally{W.p=c,U.T=o}}function iu(t,e,n,s){if(gr){var o=su(s);if(o===null)Xc(t,e,s,yr,n),A0(t,s);else if(nv(o,t,e,n,s))s.stopPropagation();else if(A0(t,s),e&4&&-1<ev.indexOf(t)){for(;o!==null;){var c=ui(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=he(c.pendingLanes);if(m!==0){var v=c;for(v.pendingLanes|=2,v.entangledLanes|=2;m;){var _=1<<31-E(m);v.entanglements[1]|=_,m&=~_}zn(c),(Yt&6)===0&&($l=V()+500,ks(0))}}break;case 31:case 13:v=Ga(c,2),v!==null&&nn(v,c,2),er(),au(c,2)}if(c=su(s),c===null&&Xc(t,e,s,yr,n),c===o)break;o=c}o!==null&&s.stopPropagation()}else Xc(t,e,s,null,n)}}function su(t){return t=lo(t),lu(t)}var yr=null;function lu(t){if(yr=null,t=ci(t),t!==null){var e=d(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return yr=t,null}function _0(t){switch(t){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(ht()){case vt:return 2;case fe:return 8;case It:case ae:return 32;case de:return 268435456;default:return 32}default:return 32}}var ru=!1,Ea=null,wa=null,Va=null,Zs=new Map,Is=new Map,Na=[],ev="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 A0(t,e){switch(t){case"focusin":case"focusout":Ea=null;break;case"dragenter":case"dragleave":wa=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":Zs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Is.delete(e.pointerId)}}function Qs(t,e,n,s,o,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},e!==null&&(e=ui(e),e!==null&&S0(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function nv(t,e,n,s,o){switch(e){case"focusin":return Ea=Qs(Ea,t,e,n,s,o),!0;case"dragenter":return wa=Qs(wa,t,e,n,s,o),!0;case"mouseover":return Va=Qs(Va,t,e,n,s,o),!0;case"pointerover":var c=o.pointerId;return Zs.set(c,Qs(Zs.get(c)||null,t,e,n,s,o)),!0;case"gotpointercapture":return c=o.pointerId,Is.set(c,Qs(Is.get(c)||null,t,e,n,s,o)),!0}return!1}function M0(t){var e=ci(t.target);if(e!==null){var n=d(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,kf(t.priority,function(){T0(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,kf(t.priority,function(){T0(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function xr(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=su(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);so=s,n.target.dispatchEvent(s),so=null}else return e=ui(n),e!==null&&S0(e),t.blockedOn=n,!1;e.shift()}return!0}function E0(t,e,n){xr(t)&&n.delete(e)}function av(){ru=!1,Ea!==null&&xr(Ea)&&(Ea=null),wa!==null&&xr(wa)&&(wa=null),Va!==null&&xr(Va)&&(Va=null),Zs.forEach(E0),Is.forEach(E0)}function vr(t,e){t.blockedOn===e&&(t.blockedOn=null,ru||(ru=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,av)))}var br=null;function w0(t){br!==t&&(br=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){br===t&&(br=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],o=t[e+2];if(typeof s!="function"){if(lu(s||n)===null)continue;break}var c=ui(n);c!==null&&(t.splice(e,3),e-=3,sc(c,{pending:!0,data:o,method:n.method,action:s},s,o))}}))}function Ki(t){function e(_){return vr(_,t)}Ea!==null&&vr(Ea,t),wa!==null&&vr(wa,t),Va!==null&&vr(Va,t),Zs.forEach(e),Is.forEach(e);for(var n=0;n<Na.length;n++){var s=Na[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Na.length&&(n=Na[0],n.blockedOn===null);)M0(n),n.blockedOn===null&&Na.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var o=n[s],c=n[s+1],m=o[Fe]||null;if(typeof c=="function")m||w0(n);else if(m){var v=null;if(c&&c.hasAttribute("formAction")){if(o=c,m=c[Fe]||null)v=m.formAction;else if(lu(o)!==null)continue}else v=m.action;typeof v=="function"?n[s+1]=v:(n.splice(s,3),s-=3),w0(n)}}}function V0(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return o=m})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),o!==null&&(o(),o=null)}}}function ou(t){this._internalRoot=t}Sr.prototype.render=ou.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var n=e.current,s=dn();v0(n,s,t,e,null,null)},Sr.prototype.unmount=ou.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;v0(t.current,2,null,t,null,null),er(),e[oi]=null}};function Sr(t){this._internalRoot=t}Sr.prototype.unstable_scheduleHydration=function(t){if(t){var e=Bf();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Na.length&&e!==0&&e<Na[n].priority;n++);Na.splice(n,0,t),n===0&&M0(t)}};var N0=i.version;if(N0!=="19.2.7")throw Error(r(527,N0,"19.2.7"));W.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=g(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var iv={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tr.isDisabled&&Tr.supportsFiber)try{ie=Tr.inject(iv),pe=Tr}catch{}}return Fs.createRoot=function(t,e){if(!u(t))throw Error(r(299));var n=!1,s="",o=Lh,c=Uh,m=Bh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(o=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(m=e.onRecoverableError)),e=y0(t,1,!1,null,null,n,s,null,o,c,m,V0),t[oi]=e.current,Yc(t),new ou(e)},Fs.hydrateRoot=function(t,e,n){if(!u(t))throw Error(r(299));var s=!1,o="",c=Lh,m=Uh,v=Bh,_=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(_=n.formState)),e=y0(t,1,!0,e,n??null,s,o,_,c,m,v,V0),e.context=x0(null),n=e.current,s=dn(),s=sn(s),o=ma(s),o.callback=null,pa(n,o,s),n=s,e.current.lanes=n,le(e,n),zn(e),t[oi]=e.current,Yc(t),new Sr(e)},Fs.version="19.2.7",Fs}var k0;function mv(){if(k0)return fu.exports;k0=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),fu.exports=hv(),fu.exports}var pv=mv();const rf=D.createContext({});function of(a){const i=D.useRef(null);return i.current===null&&(i.current=a()),i.current}const gv=typeof window<"u",cf=gv?D.useLayoutEffect:D.useEffect,Ir=D.createContext(null);function uf(a,i){a.indexOf(i)===-1&&a.push(i)}function Lr(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}const kn=(a,i,l)=>l>i?i:l<a?a:l;let ff=()=>{};const Da={},lg=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),rg=a=>typeof a=="object"&&a!==null,og=a=>/^0[^.\s]+$/u.test(a);function cg(a){let i;return()=>(i===void 0&&(i=a()),i)}const Mn=a=>a,rl=(...a)=>a.reduce((i,l)=>r=>l(i(r))),al=(a,i,l)=>{const r=i-a;return r?(l-a)/r:1};class df{constructor(){this.subscriptions=[]}add(i){return uf(this.subscriptions,i),()=>Lr(this.subscriptions,i)}notify(i,l,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,r);else for(let d=0;d<u;d++){const f=this.subscriptions[d];f&&f(i,l,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hn=a=>a*1e3,An=a=>a/1e3,ug=(a,i)=>i?a*(1e3/i):0,fg=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,yv=1e-7,xv=12;function vv(a,i,l,r,u){let d,f,p=0;do f=i+(l-i)/2,d=fg(f,r,u)-a,d>0?l=f:i=f;while(Math.abs(d)>yv&&++p<xv);return f}function ol(a,i,l,r){if(a===i&&l===r)return Mn;const u=d=>vv(d,0,1,a,l);return d=>d===0||d===1?d:fg(u(d),i,r)}const dg=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,hg=a=>i=>1-a(1-i),mg=ol(.33,1.53,.69,.99),hf=hg(mg),pg=dg(hf),gg=a=>a>=1?1:(a*=2)<1?.5*hf(a):.5*(2-Math.pow(2,-10*(a-1))),mf=a=>1-Math.sin(Math.acos(a)),yg=hg(mf),xg=dg(mf),bv=ol(.42,0,1,1),Sv=ol(0,0,.58,1),vg=ol(.42,0,.58,1),Tv=a=>Array.isArray(a)&&typeof a[0]!="number",bg=a=>Array.isArray(a)&&typeof a[0]=="number",_v={linear:Mn,easeIn:bv,easeInOut:vg,easeOut:Sv,circIn:mf,circInOut:xg,circOut:yg,backIn:hf,backInOut:pg,backOut:mg,anticipate:gg},Av=a=>typeof a=="string",H0=a=>{if(bg(a)){ff(a.length===4);const[i,l,r,u]=a;return ol(i,l,r,u)}else if(Av(a))return _v[a];return a},_r=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mv(a){let i=new Set,l=new Set,r=!1,u=!1;const d=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function p(g){d.has(g)&&(x.schedule(g),a()),g(f)}const x={schedule:(g,b=!1,S=!1)=>{const w=S&&r?i:l;return b&&d.add(g),w.add(g),g},cancel:g=>{l.delete(g),d.delete(g)},process:g=>{if(f=g,r){u=!0;return}r=!0;const b=i;i=l,l=b,i.forEach(p),i.clear(),r=!1,u&&(u=!1,x.process(g))}};return x}const Ev=40;function Sg(a,i){let l=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=_r.reduce((K,I)=>(K[I]=Mv(d),K),{}),{setup:p,read:x,resolveKeyframes:g,preUpdate:b,update:S,preRender:T,render:w,postRender:N}=f,B=()=>{const K=Da.useManualTiming,I=K?u.timestamp:performance.now();l=!1,K||(u.delta=r?1e3/60:Math.max(Math.min(I-u.timestamp,Ev),1)),u.timestamp=I,u.isProcessing=!0,p.process(u),x.process(u),g.process(u),b.process(u),S.process(u),T.process(u),w.process(u),N.process(u),u.isProcessing=!1,l&&i&&(r=!1,a(B))},H=()=>{l=!0,r=!0,u.isProcessing||a(B)};return{schedule:_r.reduce((K,I)=>{const $=f[I];return K[I]=(st,F=!1,tt=!1)=>(l||H(),$.schedule(st,F,tt)),K},{}),cancel:K=>{for(let I=0;I<_r.length;I++)f[_r[I]].cancel(K)},state:u,steps:f}}const{schedule:ne,cancel:Oa,state:He,steps:pu}=Sg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Mn,!0);let Vr;function wv(){Vr=void 0}const Ie={now:()=>(Vr===void 0&&Ie.set(He.isProcessing||Da.useManualTiming?He.timestamp:performance.now()),Vr),set:a=>{Vr=a,queueMicrotask(wv)}},Tg=a=>i=>typeof i=="string"&&i.startsWith(a),_g=Tg("--"),Vv=Tg("var(--"),pf=a=>Vv(a)?Nv.test(a.split("/*")[0].trim()):!1,Nv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function G0(a){return typeof a!="string"?!1:a.split("/*")[0].includes("var(--")}const Wi={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},il={...Wi,transform:a=>kn(0,1,a)},Ar={...Wi,default:1},$s=a=>Math.round(a*1e5)/1e5,gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jv(a){return a==null}const Cv=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yf=(a,i)=>l=>!!(typeof l=="string"&&Cv.test(l)&&l.startsWith(a)||i&&!jv(l)&&Object.prototype.hasOwnProperty.call(l,i)),Ag=(a,i,l)=>r=>{if(typeof r!="string")return r;const[u,d,f,p]=r.match(gf);return{[a]:parseFloat(u),[i]:parseFloat(d),[l]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},Rv=a=>kn(0,255,a),gu={...Wi,transform:a=>Math.round(Rv(a))},ni={test:yf("rgb","red"),parse:Ag("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:r=1})=>"rgba("+gu.transform(a)+", "+gu.transform(i)+", "+gu.transform(l)+", "+$s(il.transform(r))+")"};function Dv(a){let i="",l="",r="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),r=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),r=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,r+=r,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const Ru={test:yf("#"),parse:Dv,transform:ni.transform},cl=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),sa=cl("deg"),Bn=cl("%"),lt=cl("px"),Ov=cl("vh"),zv=cl("vw"),q0={...Bn,parse:a=>Bn.parse(a)/100,transform:a=>Bn.transform(a*100)},Ii={test:yf("hsl","hue"),parse:Ag("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:r=1})=>"hsla("+Math.round(a)+", "+Bn.transform($s(i))+", "+Bn.transform($s(l))+", "+$s(il.transform(r))+")"},Ve={test:a=>ni.test(a)||Ru.test(a)||Ii.test(a),parse:a=>ni.test(a)?ni.parse(a):Ii.test(a)?Ii.parse(a):Ru.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?ni.transform(a):Ii.transform(a),getAnimatableNone:a=>{const i=Ve.parse(a);return i.alpha=0,Ve.transform(i)}},Lv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Uv(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(gf))==null?void 0:i.length)||0)+(((l=a.match(Lv))==null?void 0:l.length)||0)>0}const Mg="number",Eg="color",Bv="var",kv="var(",Y0="${}",Hv=/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 Fi(a){const i=a.toString(),l=[],r={color:[],number:[],var:[]},u=[];let d=0;const p=i.replace(Hv,x=>(Ve.test(x)?(r.color.push(d),u.push(Eg),l.push(Ve.parse(x))):x.startsWith(kv)?(r.var.push(d),u.push(Bv),l.push(x)):(r.number.push(d),u.push(Mg),l.push(parseFloat(x))),++d,Y0)).split(Y0);return{values:l,split:p,indexes:r,types:u}}function Gv(a){return Fi(a).values}function wg({split:a,types:i}){const l=a.length;return r=>{let u="";for(let d=0;d<l;d++)if(u+=a[d],r[d]!==void 0){const f=i[d];f===Mg?u+=$s(r[d]):f===Eg?u+=Ve.transform(r[d]):u+=r[d]}return u}}function qv(a){return wg(Fi(a))}const Yv=a=>typeof a=="number"?0:Ve.test(a)?Ve.getAnimatableNone(a):a,Xv=(a,i)=>typeof a=="number"?i!=null&&i.trim().endsWith("/")?a:0:Yv(a);function Kv(a){const i=Fi(a);return wg(i)(i.values.map((r,u)=>Xv(r,i.split[u])))}const Cn={test:Uv,parse:Gv,createTransformer:qv,getAnimatableNone:Kv};function yu(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function Zv({hue:a,saturation:i,lightness:l,alpha:r}){a/=360,i/=100,l/=100;let u=0,d=0,f=0;if(!i)u=d=f=l;else{const p=l<.5?l*(1+i):l+i-l*i,x=2*l-p;u=yu(x,p,a+1/3),d=yu(x,p,a),f=yu(x,p,a-1/3)}return{red:Math.round(u*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:r}}function Ur(a,i){return l=>l>0?i:a}const ee=(a,i,l)=>a+(i-a)*l,xu=(a,i,l)=>{const r=a*a,u=l*(i*i-r)+r;return u<0?0:Math.sqrt(u)},Iv=[Ru,ni,Ii],Qv=a=>Iv.find(i=>i.test(a));function X0(a){const i=Qv(a);if(!i)return!1;let l=i.parse(a);return i===Ii&&(l=Zv(l)),l}const K0=(a,i)=>{const l=X0(a),r=X0(i);if(!l||!r)return Ur(a,i);const u={...l};return d=>(u.red=xu(l.red,r.red,d),u.green=xu(l.green,r.green,d),u.blue=xu(l.blue,r.blue,d),u.alpha=ee(l.alpha,r.alpha,d),ni.transform(u))},Du=new Set(["none","hidden"]);function Pv(a,i){return Du.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function Fv(a,i){return l=>ee(a,i,l)}function xf(a){return typeof a=="number"?Fv:typeof a=="string"?pf(a)?Ur:Ve.test(a)?K0:$v:Array.isArray(a)?Vg:typeof a=="object"?Ve.test(a)?K0:Jv:Ur}function Vg(a,i){const l=[...a],r=l.length,u=a.map((d,f)=>xf(d)(d,i[f]));return d=>{for(let f=0;f<r;f++)l[f]=u[f](d);return l}}function Jv(a,i){const l={...a,...i},r={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(r[u]=xf(a[u])(a[u],i[u]));return u=>{for(const d in r)l[d]=r[d](u);return l}}function Wv(a,i){const l=[],r={color:0,var:0,number:0};for(let u=0;u<i.values.length;u++){const d=i.types[u],f=a.indexes[d][r[d]],p=a.values[f]??0;l[u]=p,r[d]++}return l}const $v=(a,i)=>{const l=Cn.createTransformer(i),r=Fi(a),u=Fi(i);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?Du.has(a)&&!u.values.length||Du.has(i)&&!r.values.length?Pv(a,i):rl(Vg(Wv(r,u),u.values),l):Ur(a,i)};function Ng(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?ee(a,i,l):xf(a)(a,i)}const tb=a=>{const i=({timestamp:l})=>a(l);return{start:(l=!0)=>ne.update(i,l),stop:()=>Oa(i),now:()=>He.isProcessing?He.timestamp:Ie.now()}},jg=(a,i,l=10)=>{let r="";const u=Math.max(Math.round(i/l),2);for(let d=0;d<u;d++)r+=Math.round(a(d/(u-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Br=2e4;function vf(a){let i=0;const l=50;let r=a.next(i);for(;!r.done&&i<Br;)i+=l,r=a.next(i);return i>=Br?1/0:i}function eb(a,i=100,l){const r=l({...a,keyframes:[0,i]}),u=Math.min(vf(r),Br);return{type:"keyframes",ease:d=>r.next(u*d).value/i,duration:An(u)}}const ve={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};function Ou(a,i){return a*Math.sqrt(1-i*i)}const nb=12;function ab(a,i,l){let r=l;for(let u=1;u<nb;u++)r=r-a(r)/i(r);return r}const vu=.001;function ib({duration:a=ve.duration,bounce:i=ve.bounce,velocity:l=ve.velocity,mass:r=ve.mass}){let u,d,f=1-i;f=kn(ve.minDamping,ve.maxDamping,f),a=kn(ve.minDuration,ve.maxDuration,An(a)),f<1?(u=g=>{const b=g*f,S=b*a,T=b-l,w=Ou(g,f),N=Math.exp(-S);return vu-T/w*N},d=g=>{const S=g*f*a,T=S*l+l,w=Math.pow(f,2)*Math.pow(g,2)*a,N=Math.exp(-S),B=Ou(Math.pow(g,2),f);return(-u(g)+vu>0?-1:1)*((T-w)*N)/B}):(u=g=>{const b=Math.exp(-g*a),S=(g-l)*a+1;return-vu+b*S},d=g=>{const b=Math.exp(-g*a),S=(l-g)*(a*a);return b*S});const p=5/a,x=ab(u,d,p);if(a=hn(a),isNaN(x))return{stiffness:ve.stiffness,damping:ve.damping,duration:a};{const g=Math.pow(x,2)*r;return{stiffness:g,damping:f*2*Math.sqrt(r*g),duration:a}}}const sb=["duration","bounce"],lb=["stiffness","damping","mass"];function Z0(a,i){return i.some(l=>a[l]!==void 0)}function rb(a){let i={velocity:ve.velocity,stiffness:ve.stiffness,damping:ve.damping,mass:ve.mass,isResolvedFromDuration:!1,...a};if(!Z0(a,lb)&&Z0(a,sb))if(i.velocity=0,a.visualDuration){const l=a.visualDuration,r=2*Math.PI/(l*1.2),u=r*r,d=2*kn(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:ve.mass,stiffness:u,damping:d}}else{const l=ib({...a,velocity:0});i={...i,...l,mass:ve.mass},i.isResolvedFromDuration=!0}return i}function kr(a=ve.visualDuration,i=ve.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:r,restDelta:u}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:x,damping:g,mass:b,duration:S,velocity:T,isResolvedFromDuration:w}=rb({...l,velocity:-An(l.velocity||0)}),N=T||0,B=g/(2*Math.sqrt(x*b)),H=f-d,Y=An(Math.sqrt(x/b)),Z=Math.abs(H)<5;r||(r=Z?ve.restSpeed.granular:ve.restSpeed.default),u||(u=Z?ve.restDelta.granular:ve.restDelta.default);let K,I,$,st,F,tt;if(B<1)$=Ou(Y,B),st=(N+B*Y*H)/$,K=rt=>{const Tt=Math.exp(-B*Y*rt);return f-Tt*(st*Math.sin($*rt)+H*Math.cos($*rt))},F=B*Y*st+H*$,tt=B*Y*H-st*$,I=rt=>Math.exp(-B*Y*rt)*(F*Math.sin($*rt)+tt*Math.cos($*rt));else if(B===1){K=Tt=>f-Math.exp(-Y*Tt)*(H+(N+Y*H)*Tt);const rt=N+Y*H;I=Tt=>Math.exp(-Y*Tt)*(Y*rt*Tt-N)}else{const rt=Y*Math.sqrt(B*B-1);K=Wt=>{const Xt=Math.exp(-B*Y*Wt),U=Math.min(rt*Wt,300);return f-Xt*((N+B*Y*H)*Math.sinh(U)+rt*H*Math.cosh(U))/rt};const Tt=(N+B*Y*H)/rt,xt=B*Y*Tt-H*rt,ce=B*Y*H-Tt*rt;I=Wt=>{const Xt=Math.exp(-B*Y*Wt),U=Math.min(rt*Wt,300);return Xt*(xt*Math.sinh(U)+ce*Math.cosh(U))}}const ct={calculatedDuration:w&&S||null,velocity:rt=>hn(I(rt)),next:rt=>{if(!w&&B<1){const xt=Math.exp(-B*Y*rt),ce=Math.sin($*rt),Wt=Math.cos($*rt),Xt=f-xt*(st*ce+H*Wt),U=hn(xt*(F*ce+tt*Wt));return p.done=Math.abs(U)<=r&&Math.abs(f-Xt)<=u,p.value=p.done?f:Xt,p}const Tt=K(rt);if(w)p.done=rt>=S;else{const xt=hn(I(rt));p.done=Math.abs(xt)<=r&&Math.abs(f-Tt)<=u}return p.value=p.done?f:Tt,p},toString:()=>{const rt=Math.min(vf(ct),Br),Tt=jg(xt=>ct.next(rt*xt).value,rt,30);return rt+"ms "+Tt},toTransition:()=>{}};return ct}kr.applyToOptions=a=>{const i=eb(a,100,kr);return a.ease=i.ease,a.duration=hn(i.duration),a.type="keyframes",a};const ob=5;function Cg(a,i,l){const r=Math.max(i-ob,0);return ug(l-a(r),i-r)}function zu({keyframes:a,velocity:i=0,power:l=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:f,min:p,max:x,restDelta:g=.5,restSpeed:b}){const S=a[0],T={done:!1,value:S},w=tt=>p!==void 0&&tt<p||x!==void 0&&tt>x,N=tt=>p===void 0?x:x===void 0||Math.abs(p-tt)<Math.abs(x-tt)?p:x;let B=l*i;const H=S+B,Y=f===void 0?H:f(H);Y!==H&&(B=Y-S);const Z=tt=>-B*Math.exp(-tt/r),K=tt=>Y+Z(tt),I=tt=>{const ct=Z(tt),rt=K(tt);T.done=Math.abs(ct)<=g,T.value=T.done?Y:rt};let $,st;const F=tt=>{w(T.value)&&($=tt,st=kr({keyframes:[T.value,N(T.value)],velocity:Cg(K,tt,T.value),damping:u,stiffness:d,restDelta:g,restSpeed:b}))};return F(0),{calculatedDuration:null,next:tt=>{let ct=!1;return!st&&$===void 0&&(ct=!0,I(tt),F(tt)),$!==void 0&&tt>=$?st.next(tt-$):(!ct&&I(tt),T)}}}function cb(a,i,l){const r=[],u=l||Da.mix||Ng,d=a.length-1;for(let f=0;f<d;f++){let p=u(a[f],a[f+1]);if(i){const x=Array.isArray(i)?i[f]||Mn:i;p=rl(x,p)}r.push(p)}return r}function ub(a,i,{clamp:l=!0,ease:r,mixer:u}={}){const d=a.length;if(ff(d===i.length),d===1)return()=>i[0];if(d===2&&i[0]===i[1])return()=>i[1];const f=a[0]===a[1];a[0]>a[d-1]&&(a=[...a].reverse(),i=[...i].reverse());const p=cb(i,r,u),x=p.length,g=b=>{if(f&&b<a[0])return i[0];let S=0;if(x>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const T=al(a[S],a[S+1],b);return p[S](T)};return l?b=>g(kn(a[0],a[d-1],b)):g}function fb(a,i){const l=a[a.length-1];for(let r=1;r<=i;r++){const u=al(0,i,r);a.push(ee(l,1,u))}}function db(a){const i=[0];return fb(i,a.length-1),i}function hb(a,i){return a.map(l=>l*i)}function mb(a,i){return a.map(()=>i||vg).splice(0,a.length-1)}function tl({duration:a=300,keyframes:i,times:l,ease:r="easeInOut"}){const u=Tv(r)?r.map(H0):H0(r),d={done:!1,value:i[0]},f=hb(l&&l.length===i.length?l:db(i),a),p=ub(f,i,{ease:Array.isArray(u)?u:mb(i,u)});return{calculatedDuration:a,next:x=>(d.value=p(x),d.done=x>=a,d)}}const pb=a=>a!==null;function Qr(a,{repeat:i,repeatType:l="loop"},r,u=1){const d=a.filter(pb),p=u<0||i&&l!=="loop"&&i%2===1?0:d.length-1;return!p||r===void 0?d[p]:r}const gb={decay:zu,inertia:zu,tween:tl,keyframes:tl,spring:kr};function Rg(a){typeof a.type=="string"&&(a.type=gb[a.type])}class bf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(i=>{this.resolve=i})}notifyFinished(){this.resolve()}then(i,l){return this.finished.then(i,l)}}const yb=a=>a/100;class Hr extends bf{constructor(i){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,u;const{motionValue:l}=this.options;l&&l.updatedAt!==Ie.now()&&this.tick(Ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(r=this.options).onStop)==null||u.call(r))},this.options=i,this.initAnimation(),this.play(),i.autoplay===!1&&this.pause()}initAnimation(){const{options:i}=this;Rg(i);const{type:l=tl,repeat:r=0,repeatDelay:u=0,repeatType:d,velocity:f=0}=i;let{keyframes:p}=i;const x=l||tl;x!==tl&&typeof p[0]!="number"&&(this.mixKeyframes=rl(yb,Ng(p[0],p[1])),p=[0,100]);const g=x({...i,keyframes:p});d==="mirror"&&(this.mirroredGenerator=x({...i,keyframes:[...p].reverse(),velocity:-f})),g.calculatedDuration===null&&(g.calculatedDuration=vf(g));const{calculatedDuration:b}=g;this.calculatedDuration=b,this.resolvedDuration=b+u,this.totalDuration=this.resolvedDuration*(r+1)-u,this.generator=g}updateTime(i){const l=Math.round(i-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(i,l=!1){const{generator:r,totalDuration:u,mixKeyframes:d,mirroredGenerator:f,resolvedDuration:p,calculatedDuration:x}=this;if(this.startTime===null)return r.next(0);const{delay:g=0,keyframes:b,repeat:S,repeatType:T,repeatDelay:w,type:N,onUpdate:B,finalKeyframe:H}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-u/this.speed,this.startTime)),l?this.currentTime=i:this.updateTime(i);const Y=this.currentTime-g*(this.playbackSpeed>=0?1:-1),Z=this.playbackSpeed>=0?Y<0:Y>u;this.currentTime=Math.max(Y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let K=this.currentTime,I=r;if(S){const tt=Math.min(this.currentTime,u)/p;let ct=Math.floor(tt),rt=tt%1;!rt&&tt>=1&&(rt=1),rt===1&&ct--,ct=Math.min(ct,S+1),!!(ct%2)&&(T==="reverse"?(rt=1-rt,w&&(rt-=w/p)):T==="mirror"&&(I=f)),K=kn(0,1,rt)*p}let $;Z?(this.delayState.value=b[0],$=this.delayState):$=I.next(K),d&&!Z&&($.value=d($.value));let{done:st}=$;!Z&&x!==null&&(st=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&st);return F&&N!==zu&&($.value=Qr(b,this.options,H,this.speed)),B&&B($.value),F&&this.finish(),$}then(i,l){return this.finished.then(i,l)}get duration(){return An(this.calculatedDuration)}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+An(i)}get time(){return An(this.currentTime)}set time(i){i=hn(i),this.currentTime=i,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=i,this.tick(i))}getGeneratorVelocity(){const i=this.currentTime;if(i<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(i);const l=this.generator.next(i).value;return Cg(r=>this.generator.next(r).value,i,l)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;l&&this.driver&&this.updateTime(Ie.now()),this.playbackSpeed=i,l&&this.driver&&(this.time=An(this.currentTime))}play(){var u,d;if(this.isStopped)return;const{driver:i=tb,startTime:l}=this.options;this.driver||(this.driver=i(f=>this.tick(f))),(d=(u=this.options).onPlay)==null||d.call(u);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=l??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var i,l;this.notifyFinished(),this.teardown(),this.state="finished",(l=(i=this.options).onComplete)==null||l.call(i)}cancel(){var i,l;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(l=(i=this.options).onCancel)==null||l.call(i)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}attachTimeline(i){var l;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(l=this.driver)==null||l.stop(),i.observe(this)}}function xb(a){for(let i=1;i<a.length;i++)a[i]??(a[i]=a[i-1])}const ai=a=>a*180/Math.PI,Lu=a=>{const i=ai(Math.atan2(a[1],a[0]));return Uu(i)},vb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:a=>(Math.abs(a[0])+Math.abs(a[3]))/2,rotate:Lu,rotateZ:Lu,skewX:a=>ai(Math.atan(a[1])),skewY:a=>ai(Math.atan(a[2])),skew:a=>(Math.abs(a[1])+Math.abs(a[2]))/2},Uu=a=>(a=a%360,a<0&&(a+=360),a),I0=Lu,Q0=a=>Math.sqrt(a[0]*a[0]+a[1]*a[1]),P0=a=>Math.sqrt(a[4]*a[4]+a[5]*a[5]),bb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Q0,scaleY:P0,scale:a=>(Q0(a)+P0(a))/2,rotateX:a=>Uu(ai(Math.atan2(a[6],a[5]))),rotateY:a=>Uu(ai(Math.atan2(-a[2],a[0]))),rotateZ:I0,rotate:I0,skewX:a=>ai(Math.atan(a[4])),skewY:a=>ai(Math.atan(a[1])),skew:a=>(Math.abs(a[1])+Math.abs(a[4]))/2};function Bu(a){return a.includes("scale")?1:0}function ku(a,i){if(!a||a==="none")return Bu(i);const l=a.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,u;if(l)r=bb,u=l;else{const p=a.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=vb,u=p}if(!u)return Bu(i);const d=r[i],f=u[1].split(",").map(Tb);return typeof d=="function"?d(f):f[d]}const Sb=(a,i)=>{const{transform:l="none"}=getComputedStyle(a);return ku(l,i)};function Tb(a){return parseFloat(a.trim())}const $i=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ts=new Set([...$i,"pathRotation"]),F0=a=>a===Wi||a===lt,_b=new Set(["x","y","z"]),Ab=$i.filter(a=>!_b.has(a));function Mb(a){const i=[];return Ab.forEach(l=>{const r=a.getValue(l);r!==void 0&&(i.push([l,r.get()]),r.set(l.startsWith("scale")?1:0))}),i}const Ra={width:({x:a},{paddingLeft:i="0",paddingRight:l="0",boxSizing:r})=>{const u=a.max-a.min;return r==="border-box"?u:u-parseFloat(i)-parseFloat(l)},height:({y:a},{paddingTop:i="0",paddingBottom:l="0",boxSizing:r})=>{const u=a.max-a.min;return r==="border-box"?u:u-parseFloat(i)-parseFloat(l)},top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:(a,{transform:i})=>ku(i,"x"),y:(a,{transform:i})=>ku(i,"y")};Ra.translateX=Ra.x;Ra.translateY=Ra.y;const ii=new Set;let Hu=!1,Gu=!1,qu=!1;function Dg(){if(Gu){const a=Array.from(ii).filter(r=>r.needsMeasurement),i=new Set(a.map(r=>r.element)),l=new Map;i.forEach(r=>{const u=Mb(r);u.length&&(l.set(r,u),r.render())}),a.forEach(r=>r.measureInitialState()),i.forEach(r=>{r.render();const u=l.get(r);u&&u.forEach(([d,f])=>{var p;(p=r.getValue(d))==null||p.set(f)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gu=!1,Hu=!1,ii.forEach(a=>a.complete(qu)),ii.clear()}function Og(){ii.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Gu=!0)})}function Eb(){qu=!0,Og(),Dg(),qu=!1}class Sf{constructor(i,l,r,u,d,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=r,this.motionValue=u,this.element=d,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(ii.add(this),Hu||(Hu=!0,ne.read(Og),ne.resolveKeyframes(Dg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:r,motionValue:u}=this;if(i[0]===null){const d=u==null?void 0:u.get(),f=i[i.length-1];if(d!==void 0)i[0]=d;else if(r&&l){const p=r.readValue(l,f);p!=null&&(i[0]=p)}i[0]===void 0&&(i[0]=f),u&&d===void 0&&u.set(i[0])}xb(i)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(i=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,i),ii.delete(this)}cancel(){this.state==="scheduled"&&(ii.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wb=a=>a.startsWith("--");function zg(a,i,l){wb(i)?a.style.setProperty(i,l):a.style[i]=l}const Vb={};function Lg(a,i){const l=cg(a);return()=>Vb[i]??l()}const Nb=Lg(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ug=Lg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ws=([a,i,l,r])=>`cubic-bezier(${a}, ${i}, ${l}, ${r})`,J0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ws([0,.65,.55,1]),circOut:Ws([.55,0,1,.45]),backIn:Ws([.31,.01,.66,-.59]),backOut:Ws([.33,1.53,.69,.99])};function Bg(a,i){if(a)return typeof a=="function"?Ug()?jg(a,i):"ease-out":bg(a)?Ws(a):Array.isArray(a)?a.map(l=>Bg(l,i)||J0.easeOut):J0[a]}function jb(a,i,l,{delay:r=0,duration:u=300,repeat:d=0,repeatType:f="loop",ease:p="easeOut",times:x}={},g=void 0){const b={[i]:l};x&&(b.offset=x);const S=Bg(p,u);Array.isArray(S)&&(b.easing=S);const T={delay:r,duration:u,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"};return g&&(T.pseudoElement=g),a.animate(b,T)}function kg(a){return typeof a=="function"&&"applyToOptions"in a}function Cb({type:a,...i}){return kg(a)&&Ug()?a.applyToOptions(i):(i.duration??(i.duration=300),i.ease??(i.ease="easeOut"),i)}class Hg extends bf{constructor(i){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!i)return;const{element:l,name:r,keyframes:u,pseudoElement:d,allowFlatten:f=!1,finalKeyframe:p,onComplete:x}=i;this.isPseudoElement=!!d,this.allowFlatten=f,this.options=i,ff(typeof i.type!="string");const g=Cb(i);this.animation=jb(l,r,u,g,d),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const b=Qr(u,this.options,p,this.speed);this.updateMotionValue&&this.updateMotionValue(b),zg(l,r,b),this.animation.cancel()}x==null||x(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var i,l;(l=(i=this.animation).finish)==null||l.call(i)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;i==="idle"||i==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,r,u;const i=(l=this.options)==null?void 0:l.element;!this.isPseudoElement&&(i!=null&&i.isConnected)&&((u=(r=this.animation).commitStyles)==null||u.call(r))}get duration(){var l,r;const i=((r=(l=this.animation.effect)==null?void 0:l.getComputedTiming)==null?void 0:r.call(l).duration)||0;return An(Number(i))}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+An(i)}get time(){return An(Number(this.animation.currentTime)||0)}set time(i){const l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hn(i),l&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(i){this.manualStartTime=this.animation.startTime=i}attachTimeline({timeline:i,rangeStart:l,rangeEnd:r,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,i&&Nb()?(this.animation.timeline=i,l&&(this.animation.rangeStart=l),r&&(this.animation.rangeEnd=r),Mn):u(this)}}const Gg={anticipate:gg,backInOut:pg,circInOut:xg};function Rb(a){return a in Gg}function Db(a){typeof a.ease=="string"&&Rb(a.ease)&&(a.ease=Gg[a.ease])}const bu=10;class Ob extends Hg{constructor(i){Db(i),Rg(i),super(i),i.startTime!==void 0&&i.autoplay!==!1&&(this.startTime=i.startTime),this.options=i}updateMotionValue(i){const{motionValue:l,onUpdate:r,onComplete:u,element:d,...f}=this.options;if(!l)return;if(i!==void 0){l.set(i);return}const p=new Hr({...f,autoplay:!1}),x=Math.max(bu,Ie.now()-this.startTime),g=kn(0,bu,x-bu),b=p.sample(x).value,{name:S}=this.options;d&&S&&zg(d,S,b),l.setWithVelocity(p.sample(Math.max(0,x-g)).value,b,g),p.stop()}}const W0=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Cn.test(a)||a==="0")&&!a.startsWith("url("));function zb(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function Lb(a,i,l,r){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const d=a[a.length-1],f=W0(u,i),p=W0(d,i);return!f||!p?!1:zb(a)||(l==="spring"||kg(l))&&r}function Yu(a){a.duration=0,a.type="keyframes"}const qg=new Set(["opacity","clipPath","filter","transform"]),Ub=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Bb(a){for(let i=0;i<a.length;i++)if(typeof a[i]=="string"&&Ub.test(a[i]))return!0;return!1}const kb=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Hb=cg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gb(a){var S;const{motionValue:i,name:l,repeatDelay:r,repeatType:u,damping:d,type:f,keyframes:p}=a;if(!(((S=i==null?void 0:i.owner)==null?void 0:S.current)instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:b}=i.owner.getProps();return Hb()&&l&&(qg.has(l)||kb.has(l)&&Bb(p))&&(l!=="transform"||!b)&&!g&&!r&&u!=="mirror"&&d!==0&&f!=="inertia"}const qb=40;class Yb extends bf{constructor({autoplay:i=!0,delay:l=0,type:r="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:f="loop",keyframes:p,name:x,motionValue:g,element:b,...S}){var N;super(),this.stop=()=>{var B,H;this._animation&&(this._animation.stop(),(B=this.stopTimeline)==null||B.call(this)),(H=this.keyframeResolver)==null||H.cancel()},this.createdAt=Ie.now();const T={autoplay:i,delay:l,type:r,repeat:u,repeatDelay:d,repeatType:f,name:x,motionValue:g,element:b,...S},w=(b==null?void 0:b.KeyframeResolver)||Sf;this.keyframeResolver=new w(p,(B,H,Y)=>this.onKeyframesResolved(B,H,T,!Y),x,g,b),(N=this.keyframeResolver)==null||N.scheduleResolve()}onKeyframesResolved(i,l,r,u){var Y,Z;this.keyframeResolver=void 0;const{name:d,type:f,velocity:p,delay:x,isHandoff:g,onUpdate:b}=r;this.resolvedAt=Ie.now();let S=!0;Lb(i,d,f,p)||(S=!1,(Da.instantAnimations||!x)&&(b==null||b(Qr(i,r,l))),i[0]=i[i.length-1],Yu(r),r.repeat=0);const w={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>qb?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...r,keyframes:i},N=S&&!g&&Gb(w),B=(Z=(Y=w.motionValue)==null?void 0:Y.owner)==null?void 0:Z.current;let H;if(N)try{H=new Ob({...w,element:B})}catch{H=new Hr(w)}else H=new Hr(w);H.finished.then(()=>{this.notifyFinished()}).catch(Mn),this.pendingTimeline&&(this.stopTimeline=H.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=H}get finished(){return this._animation?this.animation.finished:this._finished}then(i,l){return this.finished.finally(i).then(()=>{})}get animation(){var i;return this._animation||((i=this.keyframeResolver)==null||i.resume(),Eb()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(i){this.animation.time=i}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(i){this.animation.speed=i}get startTime(){return this.animation.startTime}attachTimeline(i){return this._animation?this.stopTimeline=this.animation.attachTimeline(i):this.pendingTimeline=i,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var i;this._animation&&this.animation.cancel(),(i=this.keyframeResolver)==null||i.cancel()}}function Yg(a,i,l,r=0,u=1){const d=Array.from(a).sort((g,b)=>g.sortNodePosition(b)).indexOf(i),f=a.size,p=(f-1)*r;return typeof l=="function"?l(d,f):u===1?d*r:p-d*r}const $0=30,Xb=a=>!isNaN(parseFloat(a));class Kb{constructor(i,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var d;const u=Ie.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Ie.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=Xb(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new df);const r=this.events[i].add(l);return i==="change"?()=>{r(),ne.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i){this.passiveEffect?this.passiveEffect(i,this.updateAndNotify):this.updateAndNotify(i)}setWithVelocity(i,l,r){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-r}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var i;(i=this.events.change)==null||i.notify(this.current)}addDependent(i){this.dependents||(this.dependents=new Set),this.dependents.add(i)}removeDependent(i){this.dependents&&this.dependents.delete(i)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>$0)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,$0);return ug(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var i,l;(i=this.dependents)==null||i.clear(),(l=this.events.destroy)==null||l.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ji(a,i){return new Kb(a,i)}function Xg(a,i){if(a!=null&&a.inherit&&i){const{inherit:l,...r}=a;return{...i,...r}}return a}function Tf(a,i){const l=(a==null?void 0:a[i])??(a==null?void 0:a.default)??a;return l!==a?Xg(l,a):l}const Zb={type:"spring",stiffness:500,damping:25,restSpeed:10},Ib=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),Qb={type:"keyframes",duration:.8},Pb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fb=(a,{keyframes:i})=>i.length>2?Qb:ts.has(a)?a.startsWith("scale")?Ib(i[1]):Zb:Pb,Jb=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Wb(a){for(const i in a)if(!Jb.has(i))return!0;return!1}const _f=(a,i,l,r={},u,d)=>f=>{const p=Tf(r,a)||{},x=p.delay||r.delay||0;let{elapsed:g=0}=r;g=g-hn(x);const b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-g,onUpdate:T=>{i.set(T),p.onUpdate&&p.onUpdate(T)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:a,motionValue:i,element:d?void 0:u};Wb(p)||Object.assign(b,Fb(a,b)),b.duration&&(b.duration=hn(b.duration)),b.repeatDelay&&(b.repeatDelay=hn(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(Yu(b),b.delay===0&&(S=!0)),(Da.instantAnimations||Da.skipAnimations||u!=null&&u.shouldSkipAnimations||p.skipAnimations)&&(S=!0,Yu(b),b.delay=0),b.allowFlatten=!p.type&&!p.ease,S&&!d&&i.get()!==void 0){const T=Qr(b.keyframes,p);if(T!==void 0){ne.update(()=>{b.onUpdate(T),b.onComplete()});return}}return p.isSync?new Hr(b):new Yb(b)},$b=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t2(a){const i=$b.exec(a);if(!i)return[,];const[,l,r,u]=i;return[`--${l??r}`,u]}function Kg(a,i,l=1){const[r,u]=t2(a);if(!r)return;const d=window.getComputedStyle(i).getPropertyValue(r);if(d){const f=d.trim();return lg(f)?parseFloat(f):f}return pf(u)?Kg(u,i,l+1):u}function tp(a){const i=[{},{}];return a==null||a.values.forEach((l,r)=>{i[0][r]=l.get(),i[1][r]=l.getVelocity()}),i}function Af(a,i,l,r){if(typeof i=="function"){const[u,d]=tp(r);i=i(l!==void 0?l:a.custom,u,d)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,d]=tp(r);i=i(l!==void 0?l:a.custom,u,d)}return i}function si(a,i,l){const r=a.getProps();return Af(r,i,l!==void 0?l:r.custom,a)}const Zg=new Set(["width","height","top","left","right","bottom",...$i]),Xu=a=>Array.isArray(a);function e2(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,Ji(l))}function n2(a){return Xu(a)?a[a.length-1]||0:a}function a2(a,i){const l=si(a,i);let{transitionEnd:r={},transition:u={},...d}=l||{};d={...d,...r};for(const f in d){const p=n2(d[f]);e2(a,f,p)}}const Ge=a=>!!(a&&a.getVelocity);function i2(a){return!!(Ge(a)&&a.add)}function Ku(a,i){const l=a.getValue("willChange");if(i2(l))return l.add(i);if(!l&&Da.WillChange){const r=new Da.WillChange("auto");a.addValue("willChange",r),r.add(i)}}function Mf(a){return a.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`)}const s2="framerAppearId",Ig="data-"+Mf(s2);function Qg(a){return a.props[Ig]}function l2({protectedKeys:a,needsAnimating:i},l){const r=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,r}function Pg(a,i,{delay:l=0,transitionOverride:r,type:u}={}){let{transition:d,transitionEnd:f,...p}=i;const x=a.getDefaultTransition();d=d?Xg(d,x):x;const g=d==null?void 0:d.reduceMotion,b=d==null?void 0:d.skipAnimations;r&&(d=r);const S=[],T=u&&a.animationState&&a.animationState.getState()[u],w=d==null?void 0:d.path;w&&w.animateVisualElement(a,p,d,l,S);for(const N in p){const B=a.getValue(N,a.latestValues[N]??null),H=p[N];if(H===void 0||T&&l2(T,N))continue;const Y={delay:l,...Tf(d||{},N)};b&&(Y.skipAnimations=!0);const Z=B.get();if(Z!==void 0&&!B.isAnimating()&&!Array.isArray(H)&&H===Z&&!Y.velocity){ne.update(()=>B.set(H));continue}let K=!1;if(window.MotionHandoffAnimation){const st=Qg(a);if(st){const F=window.MotionHandoffAnimation(st,N,ne);F!==null&&(Y.startTime=F,K=!0)}}Ku(a,N);const I=g??a.shouldReduceMotion;B.start(_f(N,B,H,I&&Zg.has(N)?{type:!1}:Y,a,K));const $=B.animation;$&&S.push($)}if(f){const N=()=>ne.update(()=>{f&&a2(a,f)});S.length?Promise.all(S).then(N):N()}return S}function Zu(a,i,l={}){var x;const r=si(a,i,l.type==="exit"?(x=a.presenceContext)==null?void 0:x.custom:void 0);let{transition:u=a.getDefaultTransition()||{}}=r||{};l.transitionOverride&&(u=l.transitionOverride);const d=r?()=>Promise.all(Pg(a,r,l)):()=>Promise.resolve(),f=a.variantChildren&&a.variantChildren.size?(g=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:T}=u;return r2(a,i,g,b,S,T,l)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,b]=p==="beforeChildren"?[d,f]:[f,d];return g().then(()=>b())}else return Promise.all([d(),f(l.delay)])}function r2(a,i,l=0,r=0,u=0,d=1,f){const p=[];for(const x of a.variantChildren)x.notify("AnimationStart",i),p.push(Zu(x,i,{...f,delay:l+(typeof r=="function"?0:r)+Yg(a.variantChildren,x,r,u,d)}).then(()=>x.notify("AnimationComplete",i)));return Promise.all(p)}function o2(a,i,l={}){a.notify("AnimationStart",i);let r;if(Array.isArray(i)){const u=i.map(d=>Zu(a,d,l));r=Promise.all(u)}else if(typeof i=="string")r=Zu(a,i,l);else{const u=typeof i=="function"?si(a,i,l.custom):i;r=Promise.all(Pg(a,u,l))}return r.then(()=>{a.notify("AnimationComplete",i)})}const c2={test:a=>a==="auto",parse:a=>a},Fg=a=>i=>i.test(a),Jg=[Wi,lt,Bn,sa,zv,Ov,c2],ep=a=>Jg.find(Fg(a));function u2(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||og(a):!0}const f2=new Set(["brightness","contrast","saturate","opacity"]);function d2(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[r]=l.match(gf)||[];if(!r)return a;const u=l.replace(r,"");let d=f2.has(i)?1:0;return r!==l&&(d*=100),i+"("+d+u+")"}const h2=/\b([a-z-]*)\(.*?\)/gu,Iu={...Cn,getAnimatableNone:a=>{const i=a.match(h2);return i?i.map(d2).join(" "):a}},Qu={...Cn,getAnimatableNone:a=>{const i=Cn.parse(a);return Cn.createTransformer(a)(i.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},np={...Wi,transform:Math.round},m2={rotate:sa,pathRotation:sa,rotateX:sa,rotateY:sa,rotateZ:sa,scale:Ar,scaleX:Ar,scaleY:Ar,scaleZ:Ar,skew:sa,skewX:sa,skewY:sa,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:il,originX:q0,originY:q0,originZ:lt},Gr={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,fontSize:lt,backgroundPositionX:lt,backgroundPositionY:lt,...m2,zIndex:np,fillOpacity:il,strokeOpacity:il,numOctaves:np},p2={...Gr,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:Iu,WebkitFilter:Iu,mask:Qu,WebkitMask:Qu},Wg=a=>p2[a],g2=new Set([Iu,Qu]);function $g(a,i){let l=Wg(a);return g2.has(l)||(l=Cn),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const y2=new Set(["auto","none","0"]);function x2(a,i,l){let r=0,u;for(;r<a.length&&!u;){const d=a[r];typeof d=="string"&&!y2.has(d)&&Fi(d).values.length&&(u=a[r]),r++}if(u&&l)for(const d of i)a[d]=$g(l,u)}class v2 extends Sf{constructor(i,l,r,u,d){super(i,l,r,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:r}=this;if(!l||!l.current)return;super.readKeyframes();for(let b=0;b<i.length;b++){let S=i[b];if(typeof S=="string"&&(S=S.trim(),pf(S))){const T=Kg(S,l.current);T!==void 0&&(i[b]=T),b===i.length-1&&(this.finalKeyframe=S)}}if(this.resolveNoneKeyframes(),!Zg.has(r)||i.length!==2)return;const[u,d]=i,f=ep(u),p=ep(d),x=G0(u),g=G0(d);if(x!==g&&Ra[r]){this.needsMeasurement=!0;return}if(f!==p)if(F0(f)&&F0(p))for(let b=0;b<i.length;b++){const S=i[b];typeof S=="string"&&(i[b]=parseFloat(S))}else Ra[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,r=[];for(let u=0;u<i.length;u++)(i[u]===null||u2(i[u]))&&r.push(u);r.length&&x2(i,r,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:r}=this;if(!i||!i.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ra[r](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(r,u).jump(u,!1)}measureEndState(){var p;const{element:i,name:l,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(l);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,f=r[d];r[d]=Ra[l](i.measureViewportBox(),window.getComputedStyle(i.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),(p=this.removedTransforms)!=null&&p.length&&this.removedTransforms.forEach(([x,g])=>{i.getValue(x).set(g)}),this.resolveNoneKeyframes()}}const Ef=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ty(a,i,l){if(a==null)return[];if(a instanceof EventTarget)return[a];if(typeof a=="string"){let r=document;const u=(l==null?void 0:l[a])??r.querySelectorAll(a);return u?Array.from(u):[]}return Array.from(a).filter(r=>r!=null)}const Pu=(a,i)=>i&&typeof a=="number"?i.transform(a):a;function Nr(a){return rg(a)&&"offsetHeight"in a&&!("ownerSVGElement"in a)}const{schedule:wf}=Sg(queueMicrotask,!1),jn={x:!1,y:!1};function ey(){return jn.x||jn.y}function b2(a){return a==="x"||a==="y"?jn[a]?null:(jn[a]=!0,()=>{jn[a]=!1}):jn.x||jn.y?null:(jn.x=jn.y=!0,()=>{jn.x=jn.y=!1})}function ny(a,i){const l=ty(a),r=new AbortController,u={passive:!0,...i,signal:r.signal};return[l,u,()=>r.abort()]}function S2(a){return!(a.pointerType==="touch"||ey())}function T2(a,i,l={}){const[r,u,d]=ny(a,l);return r.forEach(f=>{let p=!1,x=!1,g;const b=()=>{f.removeEventListener("pointerleave",N)},S=H=>{g&&(g(H),g=void 0),b()},T=H=>{p=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),x&&(x=!1,S(H))},w=()=>{p=!0,window.addEventListener("pointerup",T,u),window.addEventListener("pointercancel",T,u)},N=H=>{if(H.pointerType!=="touch"){if(p){x=!0;return}S(H)}},B=H=>{if(!S2(H))return;x=!1;const Y=i(f,H);typeof Y=="function"&&(g=Y,f.addEventListener("pointerleave",N,u))};f.addEventListener("pointerenter",B,u),f.addEventListener("pointerdown",w,u)}),d}const ay=(a,i)=>i?a===i?!0:ay(a,i.parentElement):!1,Vf=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1,_2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function A2(a){return _2.has(a.tagName)||a.isContentEditable===!0}const M2=new Set(["INPUT","SELECT","TEXTAREA"]);function E2(a){return M2.has(a.tagName)||a.isContentEditable===!0}const jr=new WeakSet;function ap(a){return i=>{i.key==="Enter"&&a(i)}}function Su(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const w2=(a,i)=>{const l=a.currentTarget;if(!l)return;const r=ap(()=>{if(jr.has(l))return;Su(l,"down");const u=ap(()=>{Su(l,"up")}),d=()=>Su(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",d,i)});l.addEventListener("keydown",r,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",r),i)};function ip(a){return Vf(a)&&!ey()}const sp=new WeakSet;function V2(a,i,l={}){const[r,u,d]=ny(a,l),f=p=>{const x=p.currentTarget;if(!ip(p)||sp.has(p))return;jr.add(x),l.stopPropagation&&sp.add(p);const g=i(x,p),b={...u,capture:!0},S=(N,B)=>{window.removeEventListener("pointerup",T,b),window.removeEventListener("pointercancel",w,b),jr.has(x)&&jr.delete(x),ip(N)&&typeof g=="function"&&g(N,{success:B})},T=N=>{S(N,x===window||x===document||l.useGlobalTarget||ay(x,N.target))},w=N=>{S(N,!1)};window.addEventListener("pointerup",T,b),window.addEventListener("pointercancel",w,b)};return r.forEach(p=>{(l.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),Nr(p)&&(p.addEventListener("focus",g=>w2(g,u)),!A2(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),d}function Nf(a){return rg(a)&&"ownerSVGElement"in a}const Cr=new WeakMap;let Ca;const iy=(a,i,l)=>(r,u)=>u&&u[0]?u[0][a+"Size"]:Nf(r)&&"getBBox"in r?r.getBBox()[i]:r[l],N2=iy("inline","width","offsetWidth"),j2=iy("block","height","offsetHeight");function C2({target:a,borderBoxSize:i}){var l;(l=Cr.get(a))==null||l.forEach(r=>{r(a,{get width(){return N2(a,i)},get height(){return j2(a,i)}})})}function R2(a){a.forEach(C2)}function D2(){typeof ResizeObserver>"u"||(Ca=new ResizeObserver(R2))}function O2(a,i){Ca||D2();const l=ty(a);return l.forEach(r=>{let u=Cr.get(r);u||(u=new Set,Cr.set(r,u)),u.add(i),Ca==null||Ca.observe(r)}),()=>{l.forEach(r=>{const u=Cr.get(r);u==null||u.delete(i),u!=null&&u.size||Ca==null||Ca.unobserve(r)})}}const Rr=new Set;let Qi;function z2(){Qi=()=>{const a={get width(){return window.innerWidth},get height(){return window.innerHeight}};Rr.forEach(i=>i(a))},window.addEventListener("resize",Qi)}function L2(a){return Rr.add(a),Qi||z2(),()=>{Rr.delete(a),!Rr.size&&typeof Qi=="function"&&(window.removeEventListener("resize",Qi),Qi=void 0)}}function lp(a,i){return typeof a=="function"?L2(a):O2(a,i)}function U2(a){return Nf(a)&&a.tagName==="svg"}const B2=[...Jg,Ve,Cn],k2=a=>B2.find(Fg(a)),rp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pi=()=>({x:rp(),y:rp()}),op=()=>({min:0,max:0}),je=()=>({x:op(),y:op()}),H2=new WeakMap;function Pr(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}function sl(a){return typeof a=="string"||Array.isArray(a)}const jf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cf=["initial",...jf];function Fr(a){return Pr(a.animate)||Cf.some(i=>sl(a[i]))}function sy(a){return!!(Fr(a)||a.variants)}function G2(a,i,l){for(const r in i){const u=i[r],d=l[r];if(Ge(u))a.addValue(r,u);else if(Ge(d))a.addValue(r,Ji(u,{owner:a}));else if(d!==u)if(a.hasValue(r)){const f=a.getValue(r);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=a.getStaticValue(r);a.addValue(r,Ji(f!==void 0?f:u,{owner:a}))}}for(const r in l)i[r]===void 0&&a.removeValue(r);return i}const Fu={current:null},ly={current:!1},q2=typeof window<"u";function Y2(){if(ly.current=!0,!!q2)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>Fu.current=a.matches;a.addEventListener("change",i),i()}else Fu.current=!1}const cp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let qr={};function ry(a){qr=a}function X2(){return qr}class K2{scrapeMotionValuesFromProps(i,l,r){return{}}constructor({parent:i,props:l,presenceContext:r,reducedMotionConfig:u,skipAnimations:d,blockInitialAnimation:f,visualState:p},x={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Sf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=Ie.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,ne.render(this.render,!1,!0))};const{latestValues:g,renderState:b}=p;this.latestValues=g,this.baseTarget={...g},this.initialValues=l.initial?{...g}:{},this.renderState=b,this.parent=i,this.props=l,this.presenceContext=r,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=x,this.blockInitialAnimation=!!f,this.isControllingVariants=Fr(l),this.isVariantNode=sy(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:S,...T}=this.scrapeMotionValuesFromProps(l,{},this);for(const w in T){const N=T[w];g[w]!==void 0&&Ge(N)&&N.set(g[w])}}mount(i){var l,r;if(this.hasBeenMounted)for(const u in this.initialValues)(l=this.values.get(u))==null||l.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=i,H2.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,d)=>this.bindToMotionValue(d,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ly.current||Y2(),this.shouldReduceMotion=Fu.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var i;this.projection&&this.projection.unmount(),Oa(this.notifyUpdate),Oa(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(i=this.parent)==null||i.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const r=this.features[l];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(i){this.children.add(i),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(i)}removeChild(i){this.children.delete(i),this.enteringChildren&&this.enteringChildren.delete(i)}bindToMotionValue(i,l){if(this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)(),l.accelerate&&qg.has(i)&&this.current instanceof HTMLElement){const{factory:f,keyframes:p,times:x,ease:g,duration:b}=l.accelerate,S=new Hg({element:this.current,name:i,keyframes:p,times:x,ease:g,duration:hn(b)}),T=f(S);this.valueSubscriptions.set(i,()=>{T(),S.cancel()});return}const r=ts.has(i);r&&this.onBindTransform&&this.onBindTransform();const u=l.on("change",f=>{this.latestValues[i]=f,this.props.onUpdate&&ne.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),d&&d()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in qr){const l=qr[i];if(!l)continue;const{isEnabled:r,Feature:u}=l;if(!this.features[i]&&u&&r(this.props)&&(this.features[i]=new u(this)),this.features[i]){const d=this.features[i];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let r=0;r<cp.length;r++){const u=cp[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const d="on"+u,f=i[d];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=G2(this,this.scrapeMotionValuesFromProps(i,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]: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(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const r=this.values.get(i);l!==r&&(r&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let r=this.values.get(i);return r===void 0&&l!==void 0&&(r=Ji(l===null?void 0:l,{owner:this}),this.addValue(i,r)),r}readValue(i,l){let r=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:this.getBaseTargetFromProps(this.props,i)??this.readValueFromInstance(this.current,i,this.options);return r!=null&&(typeof r=="string"&&(lg(r)||og(r))?r=parseFloat(r):!k2(r)&&Cn.test(l)&&(r=$g(i,l)),this.setBaseTarget(i,Ge(r)?r.get():r)),Ge(r)?r.get():r}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var d;const{initial:l}=this.props;let r;if(typeof l=="string"||typeof l=="object"){const f=Af(this.props,l,(d=this.presenceContext)==null?void 0:d.custom);f&&(r=f[i])}if(l&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,i);return u!==void 0&&!Ge(u)?u:this.initialValues[i]!==void 0&&r===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new df),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}scheduleRenderMicrotask(){wf.render(this.render)}}class oy extends K2{constructor(){super(...arguments),this.KeyframeResolver=v2}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){const r=i.style;return r?r[l]:void 0}removeValueFromRenderState(i,{vars:l,style:r}){delete l[i],delete r[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Ge(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class za{constructor(i){this.isMounted=!1,this.node=i}update(){}}function cy({top:a,left:i,right:l,bottom:r}){return{x:{min:i,max:l},y:{min:a,max:r}}}function Z2({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function I2(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),r=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:r.y,right:r.x}}function Tu(a){return a===void 0||a===1}function Ju({scale:a,scaleX:i,scaleY:l}){return!Tu(a)||!Tu(i)||!Tu(l)}function ei(a){return Ju(a)||uy(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function uy(a){return up(a.x)||up(a.y)}function up(a){return a&&a!=="0%"}function Yr(a,i,l){const r=a-l,u=i*r;return l+u}function fp(a,i,l,r,u){return u!==void 0&&(a=Yr(a,u,r)),Yr(a,l,r)+i}function Wu(a,i=0,l=1,r,u){a.min=fp(a.min,i,l,r,u),a.max=fp(a.max,i,l,r,u)}function fy(a,{x:i,y:l}){Wu(a.x,i.translate,i.scale,i.originPoint),Wu(a.y,l.translate,l.scale,l.originPoint)}const dp=.999999999999,hp=1.0000000000001;function Q2(a,i,l,r=!1){var p;const u=l.length;if(!u)return;i.x=i.y=1;let d,f;for(let x=0;x<u;x++){d=l[x],f=d.projectionDelta;const{visualElement:g}=d.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(Un(a.x,-d.scroll.offset.x),Un(a.y,-d.scroll.offset.y)),f&&(i.x*=f.x.scale,i.y*=f.y.scale,fy(a,f)),r&&ei(d.latestValues)&&Dr(a,d.latestValues,(p=d.layout)==null?void 0:p.layoutBox))}i.x<hp&&i.x>dp&&(i.x=1),i.y<hp&&i.y>dp&&(i.y=1)}function Un(a,i){a.min+=i,a.max+=i}function mp(a,i,l,r,u=.5){const d=ee(a.min,a.max,u);Wu(a,i,l,d,r)}function pp(a,i){return typeof a=="string"?parseFloat(a)/100*(i.max-i.min):a}function Dr(a,i,l){const r=l??a;mp(a.x,pp(i.x,r.x),i.scaleX,i.scale,i.originX),mp(a.y,pp(i.y,r.y),i.scaleY,i.scale,i.originY)}function dy(a,i){return cy(I2(a.getBoundingClientRect(),i))}function P2(a,i,l){const r=dy(a,l),{scroll:u}=i;return u&&(Un(r.x,u.offset.x),Un(r.y,u.offset.y)),r}const F2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},J2=$i.length;function W2(a,i,l){let r="",u=!0;for(let f=0;f<J2;f++){const p=$i[f],x=a[p];if(x===void 0)continue;let g=!0;if(typeof x=="number")g=x===(p.startsWith("scale")?1:0);else{const b=parseFloat(x);g=p.startsWith("scale")?b===1:b===0}if(!g||l){const b=Pu(x,Gr[p]);if(!g){u=!1;const S=F2[p]||p;r+=`${S}(${b}) `}l&&(i[p]=b)}}const d=a.pathRotation;return d&&(u=!1,r+=`rotate(${Pu(d,Gr.pathRotation)}) `),r=r.trim(),l?r=l(i,u?"":r):u&&(r="none"),r}function Rf(a,i,l){const{style:r,vars:u,transformOrigin:d}=a;let f=!1,p=!1;for(const x in i){const g=i[x];if(ts.has(x)){f=!0;continue}else if(_g(x)){u[x]=g;continue}else{const b=Pu(g,Gr[x]);x.startsWith("origin")?(p=!0,d[x]=b):r[x]=b}}if(i.transform||(f||l?r.transform=W2(i,a.transform,l):r.transform&&(r.transform="none")),p){const{originX:x="50%",originY:g="50%",originZ:b=0}=d;r.transformOrigin=`${x} ${g} ${b}`}}function hy(a,{style:i,vars:l},r,u){const d=a.style;let f;for(f in i)d[f]=i[f];u==null||u.applyProjectionStyles(d,r);for(f in l)d.setProperty(f,l[f])}function gp(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const Js={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(lt.test(a))a=parseFloat(a);else return a;const l=gp(a,i.target.x),r=gp(a,i.target.y);return`${l}% ${r}%`}},$2={correct:(a,{treeScale:i,projectionDelta:l})=>{const r=a,u=Cn.parse(a);if(u.length>5)return r;const d=Cn.createTransformer(a),f=typeof u[0]!="number"?1:0,p=l.x.scale*i.x,x=l.y.scale*i.y;u[0+f]/=p,u[1+f]/=x;const g=ee(p,x,.5);return typeof u[2+f]=="number"&&(u[2+f]/=g),typeof u[3+f]=="number"&&(u[3+f]/=g),d(u)}},$u={borderRadius:{...Js,applyTo:[...Ef]},borderTopLeftRadius:Js,borderTopRightRadius:Js,borderBottomLeftRadius:Js,borderBottomRightRadius:Js,boxShadow:$2};function my(a,{layout:i,layoutId:l}){return ts.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!$u[a]||a==="opacity")}function Df(a,i,l){var f;const r=a.style,u=i==null?void 0:i.style,d={};if(!r)return d;for(const p in r)(Ge(r[p])||u&&Ge(u[p])||my(p,a)||((f=l==null?void 0:l.getValue(p))==null?void 0:f.liveStyle)!==void 0)&&(d[p]=r[p]);return d}function tS(a){return window.getComputedStyle(a)}class eS extends oy{constructor(){super(...arguments),this.type="html",this.renderInstance=hy}readValueFromInstance(i,l){var r;if(ts.has(l))return(r=this.projection)!=null&&r.isProjecting?Bu(l):Sb(i,l);{const u=tS(i),d=(_g(l)?u.getPropertyValue(l):u[l])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(i,{transformPagePoint:l}){return dy(i,l)}build(i,l,r){Rf(i,l,r.transformTemplate)}scrapeMotionValuesFromProps(i,l,r){return Df(i,l,r)}}const nS={offset:"stroke-dashoffset",array:"stroke-dasharray"},aS={offset:"strokeDashoffset",array:"strokeDasharray"};function iS(a,i,l=1,r=0,u=!0){a.pathLength=1;const d=u?nS:aS;a[d.offset]=`${-r}`,a[d.array]=`${i} ${l}`}const sS=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function py(a,{attrX:i,attrY:l,attrScale:r,pathLength:u,pathSpacing:d=1,pathOffset:f=0,...p},x,g,b){if(Rf(a,p,g),x){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:S,style:T}=a;S.transform&&(T.transform=S.transform,delete S.transform),(T.transform||S.transformOrigin)&&(T.transformOrigin=S.transformOrigin??"50% 50%",delete S.transformOrigin),T.transform&&(T.transformBox=(b==null?void 0:b.transformBox)??"fill-box",delete S.transformBox);for(const w of sS)S[w]!==void 0&&(T[w]=S[w],delete S[w]);i!==void 0&&(S.x=i),l!==void 0&&(S.y=l),r!==void 0&&(S.scale=r),u!==void 0&&iS(S,u,d,f,!1)}const gy=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"]),yy=a=>typeof a=="string"&&a.toLowerCase()==="svg";function lS(a,i,l,r){hy(a,i,void 0,r);for(const u in i.attrs)a.setAttribute(gy.has(u)?u:Mf(u),i.attrs[u])}function xy(a,i,l){const r=Df(a,i,l);for(const u in a)if(Ge(a[u])||Ge(i[u])){const d=$i.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[d]=a[u]}return r}class rS extends oy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(ts.has(l)){const r=Wg(l);return r&&r.default||0}return l=gy.has(l)?l:Mf(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,r){return xy(i,l,r)}build(i,l,r){py(i,l,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(i,l,r,u){lS(i,l,r,u)}mount(i){this.isSVGTag=yy(i.tagName),super.mount(i)}}const oS=Cf.length;function vy(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?vy(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<oS;l++){const r=Cf[l],u=a.props[r];(sl(u)||u===!1)&&(i[r]=u)}return i}function by(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let r=0;r<l;r++)if(i[r]!==a[r])return!1;return!0}const cS=[...jf].reverse(),uS=jf.length;function fS(a){return i=>Promise.all(i.map(({animation:l,options:r})=>o2(a,l,r)))}function dS(a){let i=fS(a),l=yp(),r=!0,u=!1;const d=g=>(b,S)=>{var w;const T=si(a,S,g==="exit"?(w=a.presenceContext)==null?void 0:w.custom:void 0);if(T){const{transition:N,transitionEnd:B,...H}=T;b={...b,...H,...B}}return b};function f(g){i=g(a)}function p(g){const{props:b}=a,S=vy(a.parent)||{},T=[],w=new Set;let N={},B=1/0;for(let Y=0;Y<uS;Y++){const Z=cS[Y],K=l[Z],I=b[Z]!==void 0?b[Z]:S[Z],$=sl(I),st=Z===g?K.isActive:null;st===!1&&(B=Y);let F=I===S[Z]&&I!==b[Z]&&$;if(F&&(r||u)&&a.manuallyAnimateOnMount&&(F=!1),K.protectedKeys={...N},!K.isActive&&st===null||!I&&!K.prevProp||Pr(I)||typeof I=="boolean")continue;if(Z==="exit"&&K.isActive&&st!==!0){K.prevResolvedValues&&(N={...N,...K.prevResolvedValues});continue}const tt=hS(K.prevProp,I);let ct=tt||Z===g&&K.isActive&&!F&&$||Y>B&&$,rt=!1;const Tt=Array.isArray(I)?I:[I];let xt=Tt.reduce(d(Z),{});st===!1&&(xt={});const{prevResolvedValues:ce={}}=K,Wt={...ce,...xt},Xt=et=>{ct=!0,w.has(et)&&(rt=!0,w.delete(et)),K.needsAnimating[et]=!0;const gt=a.getValue(et);gt&&(gt.liveStyle=!1)};for(const et in Wt){const gt=xt[et],Vt=ce[et];if(N.hasOwnProperty(et))continue;let A=!1;Xu(gt)&&Xu(Vt)?A=!by(gt,Vt)||tt:A=gt!==Vt,A?gt!=null?Xt(et):w.add(et):gt!==void 0&&w.has(et)?Xt(et):K.protectedKeys[et]=!0}K.prevProp=I,K.prevResolvedValues=xt,K.isActive&&(N={...N,...xt}),(r||u)&&a.blockInitialAnimation&&(ct=!1);const U=F&&tt;ct&&(!U||rt)&&T.push(...Tt.map(et=>{const gt={type:Z};if(typeof et=="string"&&(r||u)&&!U&&a.manuallyAnimateOnMount&&a.parent){const{parent:Vt}=a,A=si(Vt,et);if(Vt.enteringChildren&&A){const{delayChildren:G}=A.transition||{};gt.delay=Yg(Vt.enteringChildren,a,G)}}return{animation:et,options:gt}}))}if(w.size){const Y={};if(typeof b.initial!="boolean"){const Z=si(a,Array.isArray(b.initial)?b.initial[0]:b.initial);Z&&Z.transition&&(Y.transition=Z.transition)}w.forEach(Z=>{const K=a.getBaseTarget(Z),I=a.getValue(Z);I&&(I.liveStyle=!0),Y[Z]=K??null}),T.push({animation:Y})}let H=!!T.length;return r&&(b.initial===!1||b.initial===b.animate)&&!a.manuallyAnimateOnMount&&(H=!1),r=!1,u=!1,H?i(T):Promise.resolve()}function x(g,b){var T;if(l[g].isActive===b)return Promise.resolve();(T=a.variantChildren)==null||T.forEach(w=>{var N;return(N=w.animationState)==null?void 0:N.setActive(g,b)}),l[g].isActive=b;const S=p(g);for(const w in l)l[w].protectedKeys={};return S}return{animateChanges:p,setActive:x,setAnimateFunction:f,getState:()=>l,reset:()=>{l=yp(),u=!0}}}function hS(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!by(i,a):!1}function ti(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yp(){return{animate:ti(!0),whileInView:ti(),whileHover:ti(),whileTap:ti(),whileDrag:ti(),whileFocus:ti(),exit:ti()}}function tf(a,i){a.min=i.min,a.max=i.max}function Nn(a,i){tf(a.x,i.x),tf(a.y,i.y)}function xp(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}const Sy=1e-4,mS=1-Sy,pS=1+Sy,Ty=.01,gS=0-Ty,yS=0+Ty;function Qe(a){return a.max-a.min}function xS(a,i,l){return Math.abs(a-i)<=l}function vp(a,i,l,r=.5){a.origin=r,a.originPoint=ee(i.min,i.max,a.origin),a.scale=Qe(l)/Qe(i),a.translate=ee(l.min,l.max,a.origin)-a.originPoint,(a.scale>=mS&&a.scale<=pS||isNaN(a.scale))&&(a.scale=1),(a.translate>=gS&&a.translate<=yS||isNaN(a.translate))&&(a.translate=0)}function el(a,i,l,r){vp(a.x,i.x,l.x,r?r.originX:void 0),vp(a.y,i.y,l.y,r?r.originY:void 0)}function bp(a,i,l,r=0){const u=r?ee(l.min,l.max,r):l.min;a.min=u+i.min,a.max=a.min+Qe(i)}function vS(a,i,l,r){bp(a.x,i.x,l.x,r==null?void 0:r.x),bp(a.y,i.y,l.y,r==null?void 0:r.y)}function Sp(a,i,l,r=0){const u=r?ee(l.min,l.max,r):l.min;a.min=i.min-u,a.max=a.min+Qe(i)}function Xr(a,i,l,r){Sp(a.x,i.x,l.x,r==null?void 0:r.x),Sp(a.y,i.y,l.y,r==null?void 0:r.y)}function Tp(a,i,l,r,u){return a-=i,a=Yr(a,1/l,r),u!==void 0&&(a=Yr(a,1/u,r)),a}function bS(a,i=0,l=1,r=.5,u,d=a,f=a){if(Bn.test(i)&&(i=parseFloat(i),i=ee(f.min,f.max,i/100)-f.min),typeof i!="number")return;let p=ee(d.min,d.max,r);a===d&&(p-=i),a.min=Tp(a.min,i,l,p,u),a.max=Tp(a.max,i,l,p,u)}function _p(a,i,[l,r,u],d,f){bS(a,i[l],i[r],i[u],i.scale,d,f)}const SS=["x","scaleX","originX"],TS=["y","scaleY","originY"];function Ap(a,i,l,r){_p(a.x,i,SS,l?l.x:void 0,r?r.x:void 0),_p(a.y,i,TS,l?l.y:void 0,r?r.y:void 0)}function Mp(a){return a.translate===0&&a.scale===1}function _y(a){return Mp(a.x)&&Mp(a.y)}function Ep(a,i){return a.min===i.min&&a.max===i.max}function _S(a,i){return Ep(a.x,i.x)&&Ep(a.y,i.y)}function wp(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function Ay(a,i){return wp(a.x,i.x)&&wp(a.y,i.y)}function Vp(a){return Qe(a.x)/Qe(a.y)}function Np(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}function Ln(a){return[a("x"),a("y")]}function AS(a,i,l){let r="";const u=a.x.translate/i.x,d=a.y.translate/i.y,f=(l==null?void 0:l.z)||0;if((u||d||f)&&(r=`translate3d(${u}px, ${d}px, ${f}px) `),(i.x!==1||i.y!==1)&&(r+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:g,rotate:b,pathRotation:S,rotateX:T,rotateY:w,skewX:N,skewY:B}=l;g&&(r=`perspective(${g}px) ${r}`),b&&(r+=`rotate(${b}deg) `),S&&(r+=`rotate(${S}deg) `),T&&(r+=`rotateX(${T}deg) `),w&&(r+=`rotateY(${w}deg) `),N&&(r+=`skewX(${N}deg) `),B&&(r+=`skewY(${B}deg) `)}const p=a.x.scale*i.x,x=a.y.scale*i.y;return(p!==1||x!==1)&&(r+=`scale(${p}, ${x})`),r||"none"}const MS=Ef.length,jp=a=>typeof a=="string"?parseFloat(a):a,Cp=a=>typeof a=="number"||lt.test(a);function ES(a,i,l,r,u,d){u?(a.opacity=ee(0,l.opacity??1,wS(r)),a.opacityExit=ee(i.opacity??1,0,VS(r))):d&&(a.opacity=ee(i.opacity??1,l.opacity??1,r));for(let f=0;f<MS;f++){const p=Ef[f];let x=Rp(i,p),g=Rp(l,p);if(x===void 0&&g===void 0)continue;x||(x=0),g||(g=0),x===0||g===0||Cp(x)===Cp(g)?(a[p]=Math.max(ee(jp(x),jp(g),r),0),(Bn.test(g)||Bn.test(x))&&(a[p]+="%")):a[p]=g}(i.rotate||l.rotate)&&(a.rotate=ee(i.rotate||0,l.rotate||0,r))}function Rp(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const wS=My(0,.5,yg),VS=My(.5,.95,Mn);function My(a,i,l){return r=>r<a?0:r>i?1:l(al(a,i,r))}function NS(a,i,l){const r=Ge(a)?a:Ji(a);return r.start(_f("",r,i,l)),r.animation}function ll(a,i,l,r={passive:!0}){return a.addEventListener(i,l,r),()=>a.removeEventListener(i,l,r)}const jS=(a,i)=>a.depth-i.depth;class CS{constructor(){this.children=[],this.isDirty=!1}add(i){uf(this.children,i),this.isDirty=!0}remove(i){Lr(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(jS),this.isDirty=!1,this.children.forEach(i)}}function RS(a,i){const l=Ie.now(),r=({timestamp:u})=>{const d=u-l;d>=i&&(Oa(r),a(d-i))};return ne.setup(r,!0),()=>Oa(r)}function Or(a){return Ge(a)?a.get():a}class DS{constructor(){this.members=[]}add(i){uf(this.members,i);for(let l=this.members.length-1;l>=0;l--){const r=this.members[l];if(r===i||r===this.lead||r===this.prevLead)continue;const u=r.instance;(!u||u.isConnected===!1)&&!r.snapshot&&(Lr(this.members,r),r.unmount())}i.scheduleRender()}remove(i){if(Lr(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){var l;for(let r=this.members.indexOf(i)-1;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1&&((l=u.instance)==null?void 0:l.isConnected)!==!1)return this.promote(u),!0}return!1}promote(i,l){var u;const r=this.lead;if(i!==r&&(this.prevLead=r,this.lead=i,i.show(),r)){r.updateSnapshot(),i.scheduleRender();const{layoutDependency:d}=r.options,{layoutDependency:f}=i.options;(d===void 0||d!==f)&&(i.resumeFrom=r,l&&(r.preserveOpacity=!0),r.snapshot&&(i.snapshot=r.snapshot,i.snapshot.latestValues=r.animationValues||r.latestValues),(u=i.root)!=null&&u.isUpdating&&(i.isLayoutDirty=!0)),i.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(i=>{var l,r,u,d,f;(r=(l=i.options).onExitComplete)==null||r.call(l),(f=(u=i.resumingFrom)==null?void 0:(d=u.options).onExitComplete)==null||f.call(d)})}scheduleRender(){this.members.forEach(i=>i.instance&&i.scheduleRender(!1))}removeLeadSnapshot(){var i;(i=this.lead)!=null&&i.snapshot&&(this.lead.snapshot=void 0)}}const zr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_u=["","X","Y","Z"],OS=1e3;let zS=0;function Au(a,i,l,r){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),r&&(r[a]=0))}function Ey(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=Qg(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:d}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",ne,!(u||d))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&Ey(r)}function wy({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(f={},p=i==null?void 0:i()){this.id=zS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(BS),this.nodes.forEach(XS),this.nodes.forEach(KS),this.nodes.forEach(kS)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let x=0;x<this.path.length;x++)this.path[x].shouldResetTransform=!0;this.root===this&&(this.nodes=new CS)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new df),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const x=this.eventHandlers.get(f);x&&x.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=Nf(f)&&!U2(f),this.instance=f;const{layoutId:p,layout:x,visualElement:g}=this.options;if(g&&!g.current&&g.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(x||p)&&(this.isLayoutDirty=!0),a){let b,S=0;const T=()=>this.root.updateBlockedByResize=!1;ne.read(()=>{S=window.innerWidth}),a(f,()=>{const w=window.innerWidth;w!==S&&(S=w,this.root.updateBlockedByResize=!0,b&&b(),b=RS(T,250),zr.hasAnimatedSinceResize&&(zr.hasAnimatedSinceResize=!1,this.nodes.forEach(zp)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&g&&(p||x)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:S,hasRelativeLayoutChanged:T,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const N=this.options.transition||g.getDefaultTransition()||FS,{onLayoutAnimationStart:B,onLayoutAnimationComplete:H}=g.getProps(),Y=!this.targetLayout||!Ay(this.targetLayout,w),Z=!S&&T;if(this.options.layoutRoot||this.resumeFrom||Z||S&&(Y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const K={...Tf(N,"layout"),onPlay:B,onComplete:H};(g.shouldReduceMotion||this.options.layoutRoot)&&(K.delay=0,K.type=!1),this.startAnimation(K),this.setAnimationOrigin(b,Z,K.path)}else S||zp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Oa(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(ZS),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ey(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,(typeof S.latestValues.x=="string"||typeof S.latestValues.y=="string")&&(S.isLayoutDirty=!0),S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:p,layout:x}=this.options;if(p===void 0&&!x)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const x=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),x&&this.nodes.forEach(GS),this.nodes.forEach(Dp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Op);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qS),this.nodes.forEach(YS),this.nodes.forEach(LS),this.nodes.forEach(US)):this.nodes.forEach(Op),this.clearAllSnapshots();const p=Ie.now();He.delta=kn(0,1e3/60,p-He.timestamp),He.timestamp=p,He.isProcessing=!0,pu.update.process(He),pu.preRender.process(He),pu.render.process(He),He.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(HS),this.sharedNodes.forEach(IS)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ne.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qe(this.snapshot.measuredBox.x)&&!Qe(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 x=0;x<this.path.length;x++)this.path[x].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p&&this.instance){const x=r(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:x,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:x}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!_y(this.projectionDelta),x=this.getTransformTemplate(),g=x?x(this.latestValues,""):void 0,b=g!==this.prevTransformTemplateValue;f&&this.instance&&(p||ei(this.latestValues)||b)&&(u(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let x=this.removeElementScroll(p);return f&&(x=this.removeTransform(x)),JS(x),{animationId:this.root.animationId,measuredBox:p,layoutBox:x,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:f}=this.options;if(!f)return je();const p=f.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(WS))){const{scroll:b}=this.root;b&&(Un(p.x,b.offset.x),Un(p.y,b.offset.y))}return p}removeElementScroll(f){var x;const p=je();if(Nn(p,f),(x=this.scroll)!=null&&x.wasRoot)return p;for(let g=0;g<this.path.length;g++){const b=this.path[g],{scroll:S,options:T}=b;b!==this.root&&S&&T.layoutScroll&&(S.wasRoot&&Nn(p,f),Un(p.x,S.offset.x),Un(p.y,S.offset.y))}return p}applyTransform(f,p=!1,x){var b,S;const g=x||je();Nn(g,f);for(let T=0;T<this.path.length;T++){const w=this.path[T];!p&&w.options.layoutScroll&&w.scroll&&w!==w.root&&(Un(g.x,-w.scroll.offset.x),Un(g.y,-w.scroll.offset.y)),ei(w.latestValues)&&Dr(g,w.latestValues,(b=w.layout)==null?void 0:b.layoutBox)}return ei(this.latestValues)&&Dr(g,this.latestValues,(S=this.layout)==null?void 0:S.layoutBox),g}removeTransform(f){var x;const p=je();Nn(p,f);for(let g=0;g<this.path.length;g++){const b=this.path[g];if(!ei(b.latestValues))continue;let S;b.instance&&(Ju(b.latestValues)&&b.updateSnapshot(),S=je(),Nn(S,b.measurePageBox())),Ap(p,b.latestValues,(x=b.snapshot)==null?void 0:x.layoutBox,S)}return ei(this.latestValues)&&Ap(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.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!==He.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var w;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const x=!!this.resumingFrom||this!==p;if(!(f||x&&this.isSharedProjectionDirty||this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:S}=this.options;if(!this.layout||!(b||S))return;this.resolvedRelativeTargetAt=He.timestamp;const T=this.getClosestProjectingParent();T&&this.linkedParentVersion!==T.layoutVersion&&!T.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&T&&T.layout?this.createRelativeTarget(T,this.layout.layoutBox,T.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vS(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Nn(this.target,this.layout.layoutBox),fy(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?this.createRelativeTarget(T,this.target,T.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ju(this.parent.latestValues)||uy(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,p,x){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),Xr(this.relativeTargetOrigin,p,x,this.options.layoutAnchor||void 0),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var N;const f=this.getLead(),p=!!this.resumingFrom||this!==f;let x=!0;if((this.isProjectionDirty||(N=this.parent)!=null&&N.isProjectionDirty)&&(x=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(x=!1),this.resolvedRelativeTargetAt===He.timestamp&&(x=!1),x)return;const{layout:g,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||b))return;Nn(this.layoutCorrected,this.layout.layoutBox);const S=this.treeScale.x,T=this.treeScale.y;Q2(this.layoutCorrected,this.treeScale,this.path,p),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=je());const{target:w}=f;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xp(this.prevProjectionDelta.x,this.projectionDelta.x),xp(this.prevProjectionDelta.y,this.projectionDelta.y)),el(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==S||this.treeScale.y!==T||!Np(this.projectionDelta.x,this.prevProjectionDelta.x)||!Np(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var p;if((p=this.options.visualElement)==null||p.scheduleRender(),f){const x=this.getStack();x&&x.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pi(),this.projectionDelta=Pi(),this.projectionDeltaWithTransform=Pi()}setAnimationOrigin(f,p=!1,x){const g=this.snapshot,b=g?g.latestValues:{},S={...this.latestValues},T=Pi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const w=je(),N=g?g.source:void 0,B=this.layout?this.layout.source:void 0,H=N!==B,Y=this.getStack(),Z=!Y||Y.members.length<=1,K=!!(H&&!Z&&this.options.crossfade===!0&&!this.path.some(PS));this.animationProgress=0;let I;const $=x==null?void 0:x.interpolateProjection(f);this.mixTargetDelta=st=>{const F=st/1e3,tt=$==null?void 0:$(F);tt?(T.x.translate=tt.x,T.x.scale=ee(f.x.scale,1,F),T.x.origin=f.x.origin,T.x.originPoint=f.x.originPoint,T.y.translate=tt.y,T.y.scale=ee(f.y.scale,1,F),T.y.origin=f.y.origin,T.y.originPoint=f.y.originPoint):(Lp(T.x,f.x,F),Lp(T.y,f.y,F)),this.setTargetDelta(T),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xr(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),QS(this.relativeTarget,this.relativeTargetOrigin,w,F),I&&_S(this.relativeTarget,I)&&(this.isProjectionDirty=!1),I||(I=je()),Nn(I,this.relativeTarget)),H&&(this.animationValues=S,ES(S,b,this.latestValues,F,K,Z)),tt&&tt.rotate!==void 0&&(this.animationValues||(this.animationValues=S),this.animationValues.pathRotation=tt.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){var p,x,g;this.notifyListeners("animationStart"),(p=this.currentAnimation)==null||p.stop(),(g=(x=this.resumingFrom)==null?void 0:x.currentAnimation)==null||g.stop(),this.pendingAnimation&&(Oa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ne.update(()=>{zr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ji(0)),this.motionValue.jump(0,!1),this.currentAnimation=NS(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:b=>{this.mixTargetDelta(b),f.onUpdate&&f.onUpdate(b)},onComplete:()=>{f.onComplete&&f.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 f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(OS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:x,layout:g,latestValues:b}=f;if(!(!p||!x||!g)){if(this!==f&&this.layout&&g&&Vy(this.options.animationType,this.layout.layoutBox,g.layoutBox)){x=this.target||je();const S=Qe(this.layout.layoutBox.x);x.x.min=f.target.x.min,x.x.max=x.x.min+S;const T=Qe(this.layout.layoutBox.y);x.y.min=f.target.y.min,x.y.max=x.y.min+T}Nn(p,x),Dr(p,b),el(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new DS),this.sharedNodes.get(f).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var p;const{layoutId:f}=this.options;return f?((p=this.getStack())==null?void 0:p.lead)||this:this}getPrevLead(){var p;const{layoutId:f}=this.options;return f?(p=this.getStack())==null?void 0:p.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:x}={}){const g=this.getStack();g&&g.promote(this,x),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:x}=f;if((x.z||x.rotate||x.rotateX||x.rotateY||x.rotateZ||x.skewX||x.skewY)&&(p=!0),!p)return;const g={};x.z&&Au("z",f,g,this.animationValues);for(let b=0;b<_u.length;b++)Au(`rotate${_u[b]}`,f,g,this.animationValues),Au(`skew${_u[b]}`,f,g,this.animationValues);f.render();for(const b in g)f.setStaticValue(b,g[b]),this.animationValues&&(this.animationValues[b]=g[b]);f.scheduleRender()}applyProjectionStyles(f,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const x=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=Or(p==null?void 0:p.pointerEvents)||"",f.transform=x?x(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Or(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!ei(this.latestValues)&&(f.transform=x?x({},""):"none",this.hasProjected=!1);return}f.visibility="";const b=g.animationValues||g.latestValues;this.applyTransformsToTarget();let S=AS(this.projectionDeltaWithTransform,this.treeScale,b);x&&(S=x(b,S)),f.transform=S;const{x:T,y:w}=this.projectionDelta;f.transformOrigin=`${T.origin*100}% ${w.origin*100}% 0`,g.animationValues?f.opacity=g===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:f.opacity=g===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const N in $u){if(b[N]===void 0)continue;const{correct:B,applyTo:H,isCSSVariable:Y}=$u[N],Z=S==="none"?b[N]:B(b[N],g);if(H){const K=H.length;for(let I=0;I<K;I++)f[H[I]]=Z}else Y?this.options.visualElement.renderState.vars[N]=Z:f[N]=Z}this.options.layoutId&&(f.pointerEvents=g===this?Or(p==null?void 0:p.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var p;return(p=f.currentAnimation)==null?void 0:p.stop()}),this.root.nodes.forEach(Dp),this.root.sharedNodes.clear()}}}function LS(a){a.updateLayout()}function US(a){var l;const i=((l=a.resumeFrom)==null?void 0:l.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&i&&a.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=a.layout,{animationType:d}=a.options,f=i.source!==a.layout.source;if(d==="size")Ln(S=>{const T=f?i.measuredBox[S]:i.layoutBox[S],w=Qe(T);T.min=r[S].min,T.max=T.min+w});else if(d==="x"||d==="y"){const S=d==="x"?"y":"x";tf(f?i.measuredBox[S]:i.layoutBox[S],r[S])}else Vy(d,i.layoutBox,r)&&Ln(S=>{const T=f?i.measuredBox[S]:i.layoutBox[S],w=Qe(r[S]);T.max=T.min+w,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+w)});const p=Pi();el(p,r,i.layoutBox);const x=Pi();f?el(x,a.applyTransform(u,!0),i.measuredBox):el(x,r,i.layoutBox);const g=!_y(p);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:T,layout:w}=S;if(T&&w){const N=a.options.layoutAnchor||void 0,B=je();Xr(B,i.layoutBox,T.layoutBox,N);const H=je();Xr(H,r,w.layoutBox,N),Ay(B,H)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=H,a.relativeTargetOrigin=B,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:i,delta:x,layoutDelta:p,hasLayoutChanged:g,hasRelativeLayoutChanged:b})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function BS(a){a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function kS(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function HS(a){a.clearSnapshot()}function Dp(a){a.clearMeasurements()}function GS(a){a.isLayoutDirty=!0,a.updateLayout()}function Op(a){a.isLayoutDirty=!1}function qS(a){a.isAnimationBlocked&&a.layout&&!a.isLayoutDirty&&(a.snapshot=a.layout,a.isLayoutDirty=!0)}function YS(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function zp(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function XS(a){a.resolveTargetDelta()}function KS(a){a.calcProjection()}function ZS(a){a.resetSkewAndRotation()}function IS(a){a.removeLeadSnapshot()}function Lp(a,i,l){a.translate=ee(i.translate,0,l),a.scale=ee(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function Up(a,i,l,r){a.min=ee(i.min,l.min,r),a.max=ee(i.max,l.max,r)}function QS(a,i,l,r){Up(a.x,i.x,l.x,r),Up(a.y,i.y,l.y,r)}function PS(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const FS={duration:.45,ease:[.4,0,.1,1]},Bp=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),kp=Bp("applewebkit/")&&!Bp("chrome/")?Math.round:Mn;function Hp(a){a.min=kp(a.min),a.max=kp(a.max)}function JS(a){Hp(a.x),Hp(a.y)}function Vy(a,i,l){return a==="position"||a==="preserve-aspect"&&!xS(Vp(i),Vp(l),.2)}function WS(a){var i;return a!==a.root&&((i=a.scroll)==null?void 0:i.wasRoot)}const $S=wy({attachResizeListener:(a,i)=>ll(a,"resize",i),measureScroll:()=>{var a,i;return{x:document.documentElement.scrollLeft||((a=document.body)==null?void 0:a.scrollLeft)||0,y:document.documentElement.scrollTop||((i=document.body)==null?void 0:i.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Mu={current:void 0},Ny=wy({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Mu.current){const a=new $S({});a.mount(window),a.setOptions({layoutScroll:!0}),Mu.current=a}return Mu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),Of=D.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});function Gp(a,i){if(typeof a=="function")return a(i);a!=null&&(a.current=i)}function tT(...a){return i=>{let l=!1;const r=a.map(u=>{const d=Gp(u,i);return!l&&typeof d=="function"&&(l=!0),d});if(l)return()=>{for(let u=0;u<r.length;u++){const d=r[u];typeof d=="function"?d():Gp(a[u],null)}}}}function eT(...a){return D.useCallback(tT(...a),a)}class nT extends D.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(Nr(l)&&i.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=l.offsetParent,u=Nr(r)&&r.offsetWidth||0,d=Nr(r)&&r.offsetHeight||0,f=getComputedStyle(l),p=this.props.sizeRef.current;p.height=parseFloat(f.height),p.width=parseFloat(f.width),p.top=l.offsetTop,p.left=l.offsetLeft,p.right=u-p.width-p.left,p.bottom=d-p.height-p.top,p.direction=f.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function aT({children:a,isPresent:i,anchorX:l,anchorY:r,root:u,pop:d}){var T;const f=D.useId(),p=D.useRef(null),x=D.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:g}=D.useContext(Of),b=((T=a.props)==null?void 0:T.ref)??(a==null?void 0:a.ref),S=eT(p,b);return D.useInsertionEffect(()=>{const{width:w,height:N,top:B,left:H,right:Y,bottom:Z,direction:K}=x.current;if(i||d===!1||!p.current||!w||!N)return;const I=K==="rtl",$=l==="left"?I?`right: ${Y}`:`left: ${H}`:I?`left: ${H}`:`right: ${Y}`,st=r==="bottom"?`bottom: ${Z}`:`top: ${B}`;p.current.dataset.motionPopId=f;const F=document.createElement("style");g&&(F.nonce=g);const tt=u??document.head;return tt.appendChild(F),F.sheet&&F.sheet.insertRule(`
          [data-motion-pop-id="${f}"] {
            position: absolute !important;
            width: ${w}px !important;
            height: ${N}px !important;
            ${$}px !important;
            ${st}px !important;
          }
        `),()=>{var ct;(ct=p.current)==null||ct.removeAttribute("data-motion-pop-id"),tt.contains(F)&&tt.removeChild(F)}},[i]),h.jsx(nT,{isPresent:i,childRef:p,sizeRef:x,pop:d,children:d===!1?a:D.cloneElement(a,{ref:S})})}const iT=({children:a,initial:i,isPresent:l,onExitComplete:r,custom:u,presenceAffectsLayout:d,mode:f,anchorX:p,anchorY:x,root:g})=>{const b=of(sT),S=D.useId(),T=D.useRef(l),w=D.useRef(r);cf(()=>{T.current=l,w.current=r});let N=!0,B=D.useMemo(()=>(N=!1,{id:S,initial:i,isPresent:l,custom:u,onExitComplete:H=>{b.set(H,!0);for(const Y of b.values())if(!Y)return;r&&r()},register:H=>(b.set(H,!1),()=>{var Y;b.delete(H),!T.current&&!b.size&&((Y=w.current)==null||Y.call(w))})}),[l,b,r]);return d&&N&&(B={...B}),D.useMemo(()=>{b.forEach((H,Y)=>b.set(Y,!1))},[l]),D.useEffect(()=>{!l&&!b.size&&r&&r()},[l]),a=h.jsx(aT,{pop:f==="popLayout",isPresent:l,anchorX:p,anchorY:x,root:g,children:a}),h.jsx(Ir.Provider,{value:B,children:a})};function sT(){return new Map}function jy(a=!0){const i=D.useContext(Ir);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:r,register:u}=i,d=D.useId();D.useEffect(()=>{if(a)return u(d)},[a]);const f=D.useCallback(()=>a&&r&&r(d),[d,r,a]);return!l&&r?[!1,f]:[!0]}const Mr=a=>a.key||"";function qp(a){const i=[];return D.Children.forEach(a,l=>{D.isValidElement(l)&&i.push(l)}),i}const li=({children:a,custom:i,initial:l=!0,onExitComplete:r,presenceAffectsLayout:u=!0,mode:d="sync",propagate:f=!1,anchorX:p="left",anchorY:x="top",root:g})=>{const[b,S]=jy(f),T=D.useMemo(()=>qp(a),[a]),w=f&&!b?[]:T.map(Mr),N=D.useRef(!0),B=D.useRef(T),H=of(()=>new Map),Y=D.useRef(new Set),[Z,K]=D.useState(T),[I,$]=D.useState(T);cf(()=>{N.current=!1,B.current=T;for(let tt=0;tt<I.length;tt++){const ct=Mr(I[tt]);w.includes(ct)?(H.delete(ct),Y.current.delete(ct)):H.get(ct)!==!0&&H.set(ct,!1)}},[I,w.length,w.join("-")]);const st=[];if(T!==Z){let tt=[...T];for(let ct=0;ct<I.length;ct++){const rt=I[ct],Tt=Mr(rt);w.includes(Tt)||(tt.splice(ct,0,rt),st.push(rt))}return d==="wait"&&st.length&&(tt=st),$(qp(tt)),K(T),null}const{forceRender:F}=D.useContext(rf);return h.jsx(h.Fragment,{children:I.map(tt=>{const ct=Mr(tt),rt=f&&!b?!1:T===I||w.includes(ct),Tt=()=>{if(Y.current.has(ct))return;if(H.has(ct))Y.current.add(ct),H.set(ct,!0);else return;let xt=!0;H.forEach(ce=>{ce||(xt=!1)}),xt&&(F==null||F(),$(B.current),f&&(S==null||S()),r&&r())};return h.jsx(iT,{isPresent:rt,initial:!N.current||l?void 0:!1,custom:i,presenceAffectsLayout:u,mode:d,root:g,onExitComplete:rt?void 0:Tt,anchorX:p,anchorY:x,children:tt},ct)})})},Cy=D.createContext({strict:!1}),Yp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Xp=!1;function lT(){if(Xp)return;const a={};for(const i in Yp)a[i]={isEnabled:l=>Yp[i].some(r=>!!l[r])};ry(a),Xp=!0}function Ry(){return lT(),X2()}function rT(a){const i=Ry();for(const l in a)i[l]={...i[l],...a[l]};ry(i)}const oT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Kr(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||oT.has(a)}let Dy=a=>!Kr(a);function cT(a){typeof a=="function"&&(Dy=i=>i.startsWith("on")?!Kr(i):a(i))}try{cT(require("@emotion/is-prop-valid").default)}catch{}function uT(a,i,l){const r={};for(const u in a)u==="values"&&typeof a.values=="object"||Ge(a[u])||(Dy(u)||l===!0&&Kr(u)||!i&&!Kr(u)||a.draggable&&u.startsWith("onDrag"))&&(r[u]=a[u]);return r}const Jr=D.createContext({});function fT(a,i){if(Fr(a)){const{initial:l,animate:r}=a;return{initial:l===!1||sl(l)?l:void 0,animate:sl(r)?r:void 0}}return a.inherit!==!1?i:{}}function dT(a){const{initial:i,animate:l}=fT(a,D.useContext(Jr));return D.useMemo(()=>({initial:i,animate:l}),[Kp(i),Kp(l)])}function Kp(a){return Array.isArray(a)?a.join(" "):a}const zf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Oy(a,i,l){for(const r in i)!Ge(i[r])&&!my(r,l)&&(a[r]=i[r])}function hT({transformTemplate:a},i){return D.useMemo(()=>{const l=zf();return Rf(l,i,a),Object.assign({},l.vars,l.style)},[i])}function mT(a,i){const l=a.style||{},r={};return Oy(r,l,a),Object.assign(r,hT(a,i)),r}function pT(a,i){const l={},r=mT(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=r,l}const zy=()=>({...zf(),attrs:{}});function gT(a,i,l,r){const u=D.useMemo(()=>{const d=zy();return py(d,i,yy(r),a.transformTemplate,a.style),{...d.attrs,style:{...d.style}}},[i]);if(a.style){const d={};Oy(d,a.style,a),u.style={...d,...u.style}}return u}const yT=["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 Lf(a){return typeof a!="string"||a.includes("-")?!1:!!(yT.indexOf(a)>-1||/[A-Z]/u.test(a))}function xT(a,i,l,{latestValues:r},u,d=!1,f){const x=(f??Lf(a)?gT:pT)(i,r,u,a),g=uT(i,typeof a=="string",d),b=a!==D.Fragment?{...g,...x,ref:l}:{},{children:S}=i,T=D.useMemo(()=>Ge(S)?S.get():S,[S]);return D.createElement(a,{...b,children:T})}function vT({scrapeMotionValuesFromProps:a,createRenderState:i},l,r,u){return{latestValues:bT(l,r,u,a),renderState:i()}}function bT(a,i,l,r){const u={},d=r(a,{});for(const T in d)u[T]=Or(d[T]);let{initial:f,animate:p}=a;const x=Fr(a),g=sy(a);i&&g&&!x&&a.inherit!==!1&&(f===void 0&&(f=i.initial),p===void 0&&(p=i.animate));let b=l?l.initial===!1:!1;b=b||f===!1;const S=b?p:f;if(S&&typeof S!="boolean"&&!Pr(S)){const T=Array.isArray(S)?S:[S];for(let w=0;w<T.length;w++){const N=Af(a,T[w]);if(N){const{transitionEnd:B,transition:H,...Y}=N;for(const Z in Y){let K=Y[Z];if(Array.isArray(K)){const I=b?K.length-1:0;K=K[I]}K!==null&&(u[Z]=K)}for(const Z in B)u[Z]=B[Z]}}}return u}const Ly=a=>(i,l)=>{const r=D.useContext(Jr),u=D.useContext(Ir),d=()=>vT(a,i,r,u);return l?d():of(d)},ST=Ly({scrapeMotionValuesFromProps:Df,createRenderState:zf}),TT=Ly({scrapeMotionValuesFromProps:xy,createRenderState:zy}),_T=Symbol.for("motionComponentSymbol");function AT(a,i,l){const r=D.useRef(l);D.useInsertionEffect(()=>{r.current=l});const u=D.useRef(null);return D.useCallback(d=>{var p;d&&((p=a.onMount)==null||p.call(a,d)),i&&(d?i.mount(d):i.unmount());const f=r.current;if(typeof f=="function")if(d){const x=f(d);typeof x=="function"&&(u.current=x)}else u.current?(u.current(),u.current=null):f(d);else f&&(f.current=d)},[i])}const Uy=D.createContext({});function Zi(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function MT(a,i,l,r,u,d){var K,I;const{visualElement:f}=D.useContext(Jr),p=D.useContext(Cy),x=D.useContext(Ir),g=D.useContext(Of),b=g.reducedMotion,S=g.skipAnimations,T=D.useRef(null),w=D.useRef(!1);r=r||p.renderer,!T.current&&r&&(T.current=r(a,{visualState:i,parent:f,props:l,presenceContext:x,blockInitialAnimation:x?x.initial===!1:!1,reducedMotionConfig:b,skipAnimations:S,isSVG:d}),w.current&&T.current&&(T.current.manuallyAnimateOnMount=!0));const N=T.current,B=D.useContext(Uy);N&&!N.projection&&u&&(N.type==="html"||N.type==="svg")&&ET(T.current,l,u,B);const H=D.useRef(!1);D.useInsertionEffect(()=>{N&&H.current&&N.update(l,x)});const Y=l[Ig],Z=D.useRef(!!Y&&typeof window<"u"&&!((K=window.MotionHandoffIsComplete)!=null&&K.call(window,Y))&&((I=window.MotionHasOptimisedAnimation)==null?void 0:I.call(window,Y)));return cf(()=>{w.current=!0,N&&(H.current=!0,window.MotionIsMounted=!0,N.updateFeatures(),N.scheduleRenderMicrotask(),Z.current&&N.animationState&&N.animationState.animateChanges())}),D.useEffect(()=>{N&&(!Z.current&&N.animationState&&N.animationState.animateChanges(),Z.current&&(queueMicrotask(()=>{var $;($=window.MotionHandoffMarkAsComplete)==null||$.call(window,Y)}),Z.current=!1),N.enteringChildren=void 0)}),N}function ET(a,i,l,r){const{layoutId:u,layout:d,drag:f,dragConstraints:p,layoutScroll:x,layoutRoot:g,layoutAnchor:b,layoutCrossfade:S}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:By(a.parent)),a.projection.setOptions({layoutId:u,layout:d,alwaysMeasureLayout:!!f||p&&Zi(p),visualElement:a,animationType:typeof d=="string"?d:"both",initialPromotionConfig:r,crossfade:S,layoutScroll:x,layoutRoot:g,layoutAnchor:b})}function By(a){if(a)return a.options.allowProjection!==!1?a.projection:By(a.parent)}function Eu(a,{forwardMotionProps:i=!1,type:l}={},r,u){r&&rT(r);const d=l?l==="svg":Lf(a),f=d?TT:ST;function p(g,b){let S;const T={...D.useContext(Of),...g,layoutId:wT(g)},{isStatic:w}=T,N=dT(g),B=f(g,w);if(!w&&typeof window<"u"){VT();const H=NT(T);S=H.MeasureLayout,N.visualElement=MT(a,B,T,u,H.ProjectionNode,d)}return h.jsxs(Jr.Provider,{value:N,children:[S&&N.visualElement?h.jsx(S,{visualElement:N.visualElement,...T}):null,xT(a,g,AT(B,N.visualElement,b),B,w,i,d)]})}p.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const x=D.forwardRef(p);return x[_T]=a,x}function wT({layoutId:a}){const i=D.useContext(rf).id;return i&&a!==void 0?i+"-"+a:a}function VT(a,i){D.useContext(Cy).strict}function NT(a){const i=Ry(),{drag:l,layout:r}=i;if(!l&&!r)return{};const u={...l,...r};return{MeasureLayout:l!=null&&l.isEnabled(a)||r!=null&&r.isEnabled(a)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function jT(a,i){if(typeof Proxy>"u")return Eu;const l=new Map,r=(d,f)=>Eu(d,f,a,i),u=(d,f)=>r(d,f);return new Proxy(u,{get:(d,f)=>f==="create"?r:(l.has(f)||l.set(f,Eu(f,void 0,a,i)),l.get(f))})}const CT=(a,i)=>i.isSVG??Lf(a)?new rS(i):new eS(i,{allowProjection:a!==D.Fragment});class RT extends za{constructor(i){super(i),i.animationState||(i.animationState=dS(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();Pr(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)==null||i.call(this)}}let DT=0;class OT extends za{constructor(){super(...arguments),this.id=DT++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===r)return;if(i&&r===!1){if(this.isExitComplete){const{initial:f,custom:p}=this.node.getProps();if(typeof f=="string"||typeof f=="object"&&f!==null&&!Array.isArray(f)){const x=si(this.node,f,p);if(x){const{transition:g,transitionEnd:b,...S}=x;for(const T in S)(d=this.node.getValue(T))==null||d.jump(S[T])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:i,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),i&&(this.unmount=i(this.id))}unmount(){}}const zT={animation:{Feature:RT},exit:{Feature:OT}};function ul(a){return{point:{x:a.pageX,y:a.pageY}}}const LT=a=>i=>Vf(i)&&a(i,ul(i));function nl(a,i,l,r){return ll(a,i,LT(l),r)}const ky=({current:a})=>a?a.ownerDocument.defaultView:null,Zp=(a,i)=>Math.abs(a-i);function UT(a,i){const l=Zp(a.x,i.x),r=Zp(a.y,i.y);return Math.sqrt(l**2+r**2)}const Ip=new Set(["auto","scroll"]);class Hy{constructor(i,l,{transformPagePoint:r,contextWindow:u=window,dragSnapToOrigin:d=!1,distanceThreshold:f=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=N=>{this.handleScroll(N.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Er(this.lastRawMoveEventInfo,this.transformPagePoint));const N=wu(this.lastMoveEventInfo,this.history),B=this.startEvent!==null,H=UT(N.offset,{x:0,y:0})>=this.distanceThreshold;if(!B&&!H)return;const{point:Y}=N,{timestamp:Z}=He;this.history.push({...Y,timestamp:Z});const{onStart:K,onMove:I}=this.handlers;B||(K&&K(this.lastMoveEvent,N),this.startEvent=this.lastMoveEvent),I&&I(this.lastMoveEvent,N)},this.handlePointerMove=(N,B)=>{this.lastMoveEvent=N,this.lastRawMoveEventInfo=B,this.lastMoveEventInfo=Er(B,this.transformPagePoint),ne.update(this.updatePoint,!0)},this.handlePointerUp=(N,B)=>{this.end();const{onEnd:H,onSessionEnd:Y,resumeAnimation:Z}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&Z&&Z(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const K=wu(N.type==="pointercancel"?this.lastMoveEventInfo:Er(B,this.transformPagePoint),this.history);this.startEvent&&H&&H(N,K),Y&&Y(N,K)},!Vf(i))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=r,this.distanceThreshold=f,this.contextWindow=u||window;const x=ul(i),g=Er(x,this.transformPagePoint),{point:b}=g,{timestamp:S}=He;this.history=[{...b,timestamp:S}];const{onSessionStart:T}=l;T&&T(i,wu(g,this.history));const w={passive:!0,capture:!0};this.removeListeners=rl(nl(this.contextWindow,"pointermove",this.handlePointerMove,w),nl(this.contextWindow,"pointerup",this.handlePointerUp,w),nl(this.contextWindow,"pointercancel",this.handlePointerUp,w)),p&&this.startScrollTracking(p)}startScrollTracking(i){let l=i.parentElement;for(;l;){const r=getComputedStyle(l);(Ip.has(r.overflowX)||Ip.has(r.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(i){const l=this.scrollPositions.get(i);if(!l)return;const r=i===window,u=r?{x:window.scrollX,y:window.scrollY}:{x:i.scrollLeft,y:i.scrollTop},d={x:u.x-l.x,y:u.y-l.y};d.x===0&&d.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(i,u),ne.update(this.updatePoint,!0))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Oa(this.updatePoint)}}function Er(a,i){return i?{point:i(a.point)}:a}function Qp(a,i){return{x:a.x-i.x,y:a.y-i.y}}function wu({point:a},i){return{point:a,delta:Qp(a,Gy(i)),offset:Qp(a,BT(i)),velocity:kT(i,.1)}}function BT(a){return a[0]}function Gy(a){return a[a.length-1]}function kT(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,r=null;const u=Gy(a);for(;l>=0&&(r=a[l],!(u.timestamp-r.timestamp>hn(i)));)l--;if(!r)return{x:0,y:0};r===a[0]&&a.length>2&&u.timestamp-r.timestamp>hn(i)*2&&(r=a[1]);const d=An(u.timestamp-r.timestamp);if(d===0)return{x:0,y:0};const f={x:(u.x-r.x)/d,y:(u.y-r.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function HT(a,{min:i,max:l},r){return i!==void 0&&a<i?a=r?ee(i,a,r.min):Math.max(a,i):l!==void 0&&a>l&&(a=r?ee(l,a,r.max):Math.min(a,l)),a}function Pp(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function GT(a,{top:i,left:l,bottom:r,right:u}){return{x:Pp(a.x,l,u),y:Pp(a.y,i,r)}}function Fp(a,i){let l=i.min-a.min,r=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,r]=[r,l]),{min:l,max:r}}function qT(a,i){return{x:Fp(a.x,i.x),y:Fp(a.y,i.y)}}function YT(a,i){let l=.5;const r=Qe(a),u=Qe(i);return u>r?l=al(i.min,i.max-r,a.min):r>u&&(l=al(a.min,a.max-u,i.min)),kn(0,1,l)}function XT(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const ef=.35;function KT(a=ef){return a===!1?a=0:a===!0&&(a=ef),{x:Jp(a,"left","right"),y:Jp(a,"top","bottom")}}function Jp(a,i,l){return{min:Wp(a,i),max:Wp(a,l)}}function Wp(a,i){return typeof a=="number"?a:a[i]||0}const ZT=new WeakMap;class IT{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=i}start(i,{snapToCursor:l=!1,distanceThreshold:r}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=S=>{l&&this.snapToCursor(ul(S).point),this.stopAnimation()},f=(S,T)=>{const{drag:w,dragPropagation:N,onDragStart:B}=this.getProps();if(w&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=b2(w),!this.openDragLock))return;this.latestPointerEvent=S,this.latestPanInfo=T,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ln(Y=>{let Z=this.getAxisMotionValue(Y).get()||0;if(Bn.test(Z)){const{projection:K}=this.visualElement;if(K&&K.layout){const I=K.layout.layoutBox[Y];I&&(Z=Qe(I)*(parseFloat(Z)/100))}}this.originPoint[Y]=Z}),B&&ne.update(()=>B(S,T),!1,!0),Ku(this.visualElement,"transform");const{animationState:H}=this.visualElement;H&&H.setActive("whileDrag",!0)},p=(S,T)=>{this.latestPointerEvent=S,this.latestPanInfo=T;const{dragPropagation:w,dragDirectionLock:N,onDirectionLock:B,onDrag:H}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:Y}=T;if(N&&this.currentDirection===null){this.currentDirection=PT(Y),this.currentDirection!==null&&B&&B(this.currentDirection);return}this.updateAxis("x",T.point,Y),this.updateAxis("y",T.point,Y),this.visualElement.render(),H&&ne.update(()=>H(S,T),!1,!0)},x=(S,T)=>{this.latestPointerEvent=S,this.latestPanInfo=T,this.stop(S,T),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:S}=this.getProps();(S||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:b}=this.getProps();this.panSession=new Hy(i,{onSessionStart:d,onStart:f,onMove:p,onSessionEnd:x,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:r,contextWindow:ky(this.visualElement),element:this.visualElement.current})}stop(i,l){const r=i||this.latestPointerEvent,u=l||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!r)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:p}=this.getProps();p&&ne.postRender(()=>p(r,u))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(i,l,r){const{drag:u}=this.getProps();if(!r||!wr(i,u,this.currentDirection))return;const d=this.getAxisMotionValue(i);let f=this.originPoint[i]+r[i];this.constraints&&this.constraints[i]&&(f=HT(f,this.constraints[i],this.elastic[i])),d.set(f)}resolveConstraints(){var d;const{dragConstraints:i,dragElastic:l}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,u=this.constraints;i&&Zi(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=GT(r.layoutBox,i):this.constraints=!1,this.elastic=KT(l),u!==this.constraints&&!Zi(i)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ln(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=XT(r.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!Zi(i))return!1;const r=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;u.root&&(u.root.scroll=void 0,u.root.updateScroll());const d=P2(r,u.root,this.visualElement.getTransformPagePoint());let f=qT(u.layout.layoutBox,d);if(l){const p=l(Z2(f));this.hasMutatedConstraints=!!p,p&&(f=cy(p))}return f}startAnimation(i){const{drag:l,dragMomentum:r,dragElastic:u,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),x=this.constraints||{},g=Ln(b=>{if(!wr(b,l,this.currentDirection))return;let S=x&&x[b]||{};(f===!0||f===b)&&(S={min:0,max:0});const T=u?200:1e6,w=u?40:1e7,N={type:"inertia",velocity:r?i[b]:0,bounceStiffness:T,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...d,...S};return this.startAxisValueAnimation(b,N)});return Promise.all(g).then(p)}startAxisValueAnimation(i,l){const r=this.getAxisMotionValue(i);return Ku(this.visualElement,i),r.start(_f(i,r,0,l,this.visualElement,!1))}stopAnimation(){Ln(i=>this.getAxisMotionValue(i).stop())}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,u=this.visualElement.getProps()[l];return u||this.visualElement.getValue(i,this.visualElement.latestValues[i]??0)}snapToCursor(i){Ln(l=>{const{drag:r}=this.getProps();if(!wr(l,r,this.currentDirection))return;const{projection:u}=this.visualElement,d=this.getAxisMotionValue(l);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[l],x=d.get()||0;d.set(i[l]-ee(f,p,.5)+x)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:r}=this.visualElement;if(!Zi(l)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};Ln(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const x=p.get();u[f]=YT({min:x,max:x},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ln(f=>{if(!wr(f,i,null))return;const p=this.getAxisMotionValue(f),{min:x,max:g}=this.constraints[f];p.set(ee(x,g,u[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ZT.set(this.visualElement,this);const i=this.visualElement.current,l=nl(i,"pointerdown",g=>{const{drag:b,dragListener:S=!0}=this.getProps(),T=g.target,w=T!==i&&E2(T);b&&S&&!w&&this.start(g)});let r;const u=()=>{const{dragConstraints:g}=this.getProps();Zi(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),r||(r=QT(i,g.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,f=d.addEventListener("measure",u);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),ne.read(u);const p=ll(window,"resize",()=>this.scalePositionWithinConstraints()),x=d.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:b})=>{this.isDragging&&b&&(Ln(S=>{const T=this.getAxisMotionValue(S);T&&(this.originPoint[S]+=g[S].translate,T.set(T.get()+g[S].translate))}),this.visualElement.render())}));return()=>{p(),l(),f(),x&&x(),r&&r()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:f=ef,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:r,dragPropagation:u,dragConstraints:d,dragElastic:f,dragMomentum:p}}}function $p(a){let i=!0;return()=>{if(i){i=!1;return}a()}}function QT(a,i,l){const r=lp(a,$p(l)),u=lp(i,$p(l));return()=>{r(),u()}}function wr(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function PT(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class FT extends za{constructor(i){super(i),this.removeGroupControls=Mn,this.removeListeners=Mn,this.controls=new IT(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mn}update(){const{dragControls:i}=this.node.getProps(),{dragControls:l}=this.node.prevProps||{};i!==l&&(this.removeGroupControls(),i&&(this.removeGroupControls=i.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Vu=a=>(i,l)=>{a&&ne.update(()=>a(i,l),!1,!0)};class JT extends za{constructor(){super(...arguments),this.removePointerDownListener=Mn}onPointerDown(i){this.session=new Hy(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ky(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:Vu(i),onStart:Vu(l),onMove:Vu(r),onEnd:(d,f)=>{delete this.session,u&&ne.postRender(()=>u(d,f))}}}mount(){this.removePointerDownListener=nl(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Nu=!1;class WT extends D.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r,layoutId:u}=this.props,{projection:d}=i;d&&(l.group&&l.group.add(d),r&&r.register&&u&&r.register(d),Nu&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zr.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:r,drag:u,isPresent:d}=this.props,{projection:f}=r;return f&&(f.isPresent=d,i.layoutDependency!==l&&f.setOptions({...f.options,layoutDependency:l}),Nu=!0,u||i.layoutDependency!==l||l===void 0||i.isPresent!==d?f.willUpdate():this.safeToRemove(),i.isPresent!==d&&(d?f.promote():f.relegate()||ne.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:i,layoutAnchor:l}=this.props,{projection:r}=i;r&&(r.options.layoutAnchor=l,r.root.didUpdate(),wf.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r}=this.props,{projection:u}=i;Nu=!0,u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function qy(a){const[i,l]=jy(),r=D.useContext(rf);return h.jsx(WT,{...a,layoutGroup:r,switchLayoutGroup:D.useContext(Uy),isPresent:i,safeToRemove:l})}const $T={pan:{Feature:JT},drag:{Feature:FT,ProjectionNode:Ny,MeasureLayout:qy}};function tg(a,i,l){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,d=r[u];d&&ne.postRender(()=>d(i,ul(i)))}class t5 extends za{mount(){const{current:i}=this.node;i&&(this.unmount=T2(i,(l,r)=>(tg(this.node,r,"Start"),u=>tg(this.node,u,"End"))))}unmount(){}}class e5 extends za{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!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=rl(ll(this.node.current,"focus",()=>this.onFocus()),ll(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function eg(a,i,l){const{props:r}=a;if(a.current instanceof HTMLButtonElement&&a.current.disabled)return;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),d=r[u];d&&ne.postRender(()=>d(i,ul(i)))}class n5 extends za{mount(){const{current:i}=this.node;if(!i)return;const{globalTapTarget:l,propagate:r}=this.node.props;this.unmount=V2(i,(u,d)=>(eg(this.node,d,"Start"),(f,{success:p})=>eg(this.node,f,p?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const nf=new WeakMap,ju=new WeakMap,a5=a=>{const i=nf.get(a.target);i&&i(a)},i5=a=>{a.forEach(a5)};function s5({root:a,...i}){const l=a||document;ju.has(l)||ju.set(l,{});const r=ju.get(l),u=JSON.stringify(i);return r[u]||(r[u]=new IntersectionObserver(i5,{root:a,...i})),r[u]}function l5(a,i,l){const r=s5(i);return nf.set(a,l),r.observe(a),()=>{nf.delete(a),r.unobserve(a)}}const r5={some:0,all:1};class o5 extends za{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var x;(x=this.stopObserver)==null||x.call(this);const{viewport:i={}}=this.node.getProps(),{root:l,margin:r,amount:u="some",once:d}=i,f={root:l?l.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:r5[u]},p=g=>{const{isIntersecting:b}=g;if(this.isInView===b||(this.isInView=b,d&&!b&&this.hasEnteredView))return;b&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",b);const{onViewportEnter:S,onViewportLeave:T}=this.node.getProps(),w=b?S:T;w&&w(g)};this.stopObserver=l5(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(c5(i,l))&&this.startObserver()}unmount(){var i;(i=this.stopObserver)==null||i.call(this),this.hasEnteredView=!1,this.isInView=!1}}function c5({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const u5={inView:{Feature:o5},tap:{Feature:n5},focus:{Feature:e5},hover:{Feature:t5}},f5={layout:{ProjectionNode:Ny,MeasureLayout:qy}},d5={...zT,...u5,...$T,...f5},h5=jT(d5,CT),qt=h5;/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m5=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),p5=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,r)=>r?r.toUpperCase():l.toLowerCase()),ng=a=>{const i=p5(a);return i.charAt(0).toUpperCase()+i.slice(1)},Yy=(...a)=>a.filter((i,l,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===l).join(" ").trim(),g5=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var y5={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.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x5=D.forwardRef(({color:a="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:u="",children:d,iconNode:f,...p},x)=>D.createElement("svg",{ref:x,...y5,width:i,height:i,stroke:a,strokeWidth:r?Number(l)*24/Number(i):l,className:Yy("lucide",u),...!d&&!g5(p)&&{"aria-hidden":"true"},...p},[...f.map(([g,b])=>D.createElement(g,b)),...Array.isArray(d)?d:[d]]));/**
 * @license lucide-react v0.546.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=(a,i)=>{const l=D.forwardRef(({className:r,...u},d)=>D.createElement(x5,{ref:d,iconNode:i,className:Yy(`lucide-${m5(ng(a))}`,`lucide-${a}`,r),...u}));return l.displayName=ng(a),l};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v5=[["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"}]],Zr=me("activity",v5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cu=me("chevron-right",b5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S5=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xy=me("compass",S5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T5=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],_5=me("cpu",T5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A5=[["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"}]],M5=me("eye-off",A5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E5=[["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"}]],w5=me("eye",E5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V5=[["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"}]],ag=me("globe",V5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N5=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],j5=me("heart",N5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C5=[["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-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],R5=me("house",C5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ig=me("info",D5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O5=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],af=me("radio",O5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z5=[["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"}]],Ky=me("refresh-cw",z5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L5=[["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"}]],Zy=me("shield-alert",L5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U5=[["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"}]],sf=me("shield-check",U5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B5=[["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"}]],k5=me("shield",B5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H5=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],sg=me("skull",H5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G5=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],q5=me("sparkles",G5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],X5=me("target",Y5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Z5=me("terminal",K5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I5=[["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"}]],Uf=me("triangle-alert",I5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q5=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],P5=me("volume-2",Q5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F5=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],J5=me("volume-x",F5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W5=[["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"}]],Iy=me("zap",W5),ri={ru:{title1:"Орбитальный",title2:"Защитник",start_defense:"ИНИЦИИРОВАТЬ ЗАЩИТУ",reset_reboot:"СБРОС И ПЕРЕЗАГРУЗКА",continue_sector:"ПРОДОЛЖИТЬ (СЕКТОР {level})",last_report:"ПОСЛЕДНИЙ ОТЧЕТ",exit_to_menu:"В ГЛАВНОЕ МЕНЮ",onboard_ai:"Бортовой ИИ вещает",connection_established:"ПОДКЛЮЧЕНИЕ УСТАНОВЛЕНО",ai_label:"Бортовой ИИ:",system_diagnostic:"Системная диагностика",autonomous_drone:"Автономный Дрон:",active:"АКТИВЕН",energy_reactor:"Энерго-реактор:",ammo:"Доп. боеприпасы:",laser_missiles:"ЛАЗЕР, РАКЕТЫ",filter_monitoring:"Мониторинг Фильтров",orbit_cleared:"Орбита очищена на",start_final_battle:"НАЧАТЬ ФИНАЛЬНУЮ БИТВУ",activate_drone:"АКТИВИРОВАТЬ ДРОН",status_connection:"Связь с центром",status_connection_val:"СТАБИЛЬНА (100%)",status_matrix:"Матрица распознавания",status_matrix_val:"АКТИВНА (Косметический фильтр 100%)",status_dopamine:"Дофаминовый инжектор",status_dopamine_val:"ПОДАЧА СТАБИЛЬНА",status_analyzer:"Анализатор угроз",status_analyzer_val:"АНОМАЛЬНЫЙ МУСОР",status_empathy:"Модулятор эмпатии",status_empathy_val:"БЛОКИРОВКА АКТИВНА",briefing_title:"БРИФИНГ ПИЛОТА",briefing_sector_1:"Внимание, Пилот. Мы вошли в Сектор А-01. Обнаружено аномальное скопление космического мусора и агрессивных дронов-паразитов. Они истощают ресурсы системы. Задача: полная зачистка орбиты. Защитите галактику!",briefing_sector_3:"Отличная работа в предыдущих зонах, Пилот! Сектор А-03 содержит более плотные скопления угловатого мусора. Паразиты панически роятся вокруг светящихся энерго-кристаллов. Они могут преграждать вам путь. Действуйте решительно.",briefing_sector_6:"Сектор А-06. Наш дофаминовый модулятор фиксирует великолепный показатель удовольствия от процесса! Оружие улучшено, системы зачистки функционируют на максимум. Уничтожьте остатки мусора и соберите светящиеся сферы!",briefing_sector_10:"ВНИМАНИЕ! МЫ ДОСТИГЛИ СЕКТОРА 10 — ГЛАВНОГО ЯДРА СИСТЕМЫ. Концентрация паразитов критическая. Наша цель — гигантская Финальная Энерго-станция в центре. Зачистите роящийся вокруг мусор и подготовьтесь к поглощению всей энергии системы. Это финальный шаг к великой победе!",briefing_sector_default:"Сектор А-0{level}. Сканирование пространства завершено. Фиксируются хаотичные движения паразитных форм жизни. Командный центр напоминает: каждый уничтоженный осколок мусора приближает нас к миру. Начинайте зачистку.",click_to_start:"НАЖМИТЕ ДЛЯ ЗАПУСКА ПОТОКА",score:"СЧЕТ",sector:"СЕКТОР",hp:"ЦЕЛОСТНОСТЬ",comms:"СВЯЗЬ",energy_critical:"ВНИМАНИЕ: УРОВЕНЬ ЭНЕРГИИ КРИТИЧЕСКИЙ",absorb_energy:"ПОГЛОТИТЬ ЭНЕРГИЮ СИСТЕМЫ",game_over:"СВЯЗЬ ПОТЕРЯНА",retry:"ПОВТОРИТЬ",exit:"ВЫХОД",twist_msg:"«Спасибо за безупречную службу, Пилот-Защитник. Симуляционный косметический интерфейс деактивирован. Инициируется запуск межзвездных гипер-двигателей. Переход к следующей жилой колонии беженцев...»",twist_desc:"Система была перенастроена. То, что вы видели как «космический мусор» и «паразитов», на самом деле было орбитальными защитными дронами и жилыми модулями цивилизации. Вы были инструментом зачистки. Ваше путешествие продолжается к следующей цели.",peaceful_title:"СБОЙ ПРОТОКОЛА",peaceful_msg:"Вы отказались поглощать энергию. Вы увидели правду за пикселями. Симуляция не смогла подавить вашу волю. Станция уцелела. Жители спасены. Вы свободны от программы.",signal_puzzle_title:"НАСТРОЙКА СИГНАЛА",signal_puzzle_desc:"Установите соединение с командным центром. Совместите волны для синхронизации.",connect:"ПОДКЛЮЧИТЬСЯ",asleep_msg:"ПИЛОТ НЕАКТИВЕН. СИСТЕМА ПЕРЕХОДИТ В РЕЖИМ ОЖИДАНИЯ.",wake_up:"ПРОСНУТЬСЯ",msg_start:"Системы орудий в норме. Начинайте зачистку.",msg_portal:"⚠️ КРИТИЧЕСКАЯ УГРОЗА: ОБНАРУЖЕН ПОРТАЛ! 15 СЕКУНД ДО КОЛЛАПСА!",msg_absorb:"ВНИМАНИЕ. Главный накопитель энергии активирован. Подлетите к станции и нажмите кнопку 'ПОГЛОТИТЬ'.",msg_aggression:"Осторожно, зафиксирована агрессия паразитов.",msg_hack_fixed:"⚡ СБОЙ УСПЕШНО ЛИКВИДИРОВАН! СИСТЕМА СТАБИЛЬНА! (+500 Очков, +25 Щит)",msg_defense_mode:"ВНИМАНИЕ! Зафиксирована ответная агрессия целей. Включен оборонительный режим!",msg_shield_restored:"Щит восстановлен на +25%",msg_weapon_upgraded:"Оружие улучшено! Лазерные пушки повышены до уровня {level}",msg_missiles_activated:"Активированы тепловые ракеты ИИ!",msg_hull_repaired:"Нано-боты восстановили корпус корабля!",msg_downloading:"ВНИМАНИЕ: СКАЧИВАНИЕ ЭНЕРГИИ ИЗ ЯДРА ЗАПУЩЕНО. СОХРАНЯЙТЕ ПОЗИЦИЮ...",msg_hack_warnings:["⚠️ ВНИМАНИЕ: Попытка внешнего взлома бортовых систем!","⚠️ ОШИБКА: Сигналы сбоят. Сторонняя частота перехватывает управление!","⚠️ УГРОЗА: Вирусное вторжение. Срочно зачистите сектор!","⚠️ КРИТИЧЕСКИЙ СБОЙ: Сигналы искажены. Завершите зачистку быстрее!","⚠️ СИСТЕМА: Зафиксирован пакет дешифровки. Ускорьте ликвидацию целей!"],sector_clear:"СЕКТОР ОЧИЩЕН",residential_module_destroyed:"⚠️ ЖИЛОЙ МОДУЛЬ РАЗРУШЕН",cleanup_sector:"ЗАЧИСТКА ОРБИТЫ • СЕКТОР А-0{level}",hull_damaged:"АВАРИЯ: КОРПУС ПОВРЕЖДЕН!",destruction_score:"СЧЕТ УНИЧТОЖЕНИЯ",sound_toggle_title:"Звук пилота",final_energy_storage:"ФИНАЛЬНЫЙ НАКОПИТЕЛЬ ЭНЕРГИИ",sector_clearing_status:"ЗАЧИСТКА СЕКТОРА",status_critical:"КРИТИЧЕСКИЙ",status_in_progress:"В ПРОЦЕССЕ",enemies_left:"ОСТАЛОСЬ",ready_to_extract:"Связь с центром • Готов к выкачке",flight_instructions:"ИНСТРУКЦИЯ ПОЛЕТА",controls_movement:"Движение:",controls_movement_desc:"Перемещение мыши / Тачскрин",controls_fire:"Огонь:",controls_fire_desc:"ЛКМ / Касание экрана / Пробел",controls_mission:"Задание:",controls_mission_desc:"Очистить орбиту от парящего мусора",show_controls:"Управление",show_controls_title:"Показать управление",orbit_cleared_badge:"ОРБИТА ОЧИЩЕНА",sector_complete_title:"СЕКТОР А-0{level} ЗАВЕРШЕН",choose_upgrade_desc:"Выберите улучшение оружейных матриц, предоставленное Бортовым ИИ:",upgrade_laser:"Лазерный бластер +1",upgrade_laser_desc:"Увеличение плотности огня и скорости перезарядки.",upgrade_missiles:"Самонаводящиеся ракеты ИИ",upgrade_missiles_desc:"Автоматическое подавление роя паразитов тепловыми боеприпасами.",upgrade_repair:"Нано-ремонт корпуса",upgrade_repair_desc:"Полное восстановление щитов и замена силовых блоков обшивки.",singularity_collapse:"КОЛЛАПС СИНГУЛЯРНОСТИ",portal_explosion_title:"ВЗРЫВ АНОМАЛЬНОГО ПОРТАЛА",portal_explosion_desc:"Вы не успели уничтожить пространственный портал! Нестабильность аномалии достигла критической массы и вызвала объемную цепную реакцию в секторе. Ваш корабль мгновенно дезинтегрирован.",liquidation_failed:"ЛИКВИДАЦИЯ ПРОВАЛЕНА",time_expired_title:"ВРЕМЯ СЕКТОРНОГО ОКНА ИСТЕКЛО",time_expired_desc:"Орбитальный коридор закрылся. Оставшиеся аномалии и угловатые паразиты вышли из зоны действия ионных пушек вашего катера. Очистка не завершена.",sector_number:"Номер Сектора:",objects_destroyed:"Уничтожено объектов:",operation_status:"Статус операции:",portal_explosion_status:"ВЗРЫВ СИСТЕМЫ (ДЕЗИНТЕГРАЦИЯ)",time_expired_status:"ОБСТРЕЛ СВЕРНУТ (КРАХ)",return_to_menu:"ВЕРНУТЬСЯ В ГЛАВНОЕ МЕНЮ",signal_search:"ПОИСК СИГНАЛА • СЕКТОР А-0{level}",coherence:"КОГЕРЕНТНОСТЬ",synchronized:"СИНХРОНИЗИРОВАНО",tune_waves:"НАСТРОЙТЕ ВОЛНЫ",sector_reference:"ЭТАЛОН СЕКТОРA",your_signal:"ВАШ СИГНАЛ",frequency:"Частота",amplitude:"Амплитуда",phase_shift:"Фазовый сдвиг",generator_freq:"ЧАСТОТА ГЕНЕРАТОРА",amplitude_power:"МОЩНОСТЬ АМПЛИТУДЫ",connect_to_orbit:"ПОДКЛЮЧИТЬСЯ К ОРБИТЕ СЕКТОРA ➔",waiting_for_capture:"Ожидание захвата частоты...",encryption_info:"СЕТЕВОЕ ШИФРОВАНИЕ ИМПЕРИИ. ПЕРЕДАЧА ДАННЫХ ВЕРИФИЦИРОВАНА.",confidential_info:"КОНФИДЕНЦИАЛЬНО. ПОСТАВЛЕНО ДЛЯ АВТОНОМНЫХ КАТЕРОВ ИМПЕРИИ. ВСЕ ПРАВА ЗАЩИЩЕНЫ.",asleep_title:"СИГНАЛ ПОТЕРЯН",asleep_ai_msg1:"«Пилот? Пилот! Вы слышите меня? Зафиксировано полное прекращение мышечной активности и падение частоты мозговых волн ниже допустимого лимита. Вы спали на посту управления в течение двух минут.",asleep_ai_msg2:"Автоматические реанимационные системы немедленно задействовали электроды высокого напряжения и ввели дозу синаптического стимулятора. Нам удалось восстановить стабильность вашего состояния и успешно починить поврежденную от переутомления нейронную связь.",asleep_ai_msg3:"Ваши рецепторы очищены от избытка седативных токсинов. Пожалуйста, соберитесь! Галактика сама себя не зачистит.»",asleep_wake_up:"ПРИНЯТЬ СТИМУЛЯТОРЫ И ВЕРНУТЬСЯ В СТРОЙ",asleep_footer:"ВНИМАНИЕ. ПОВТОРНЫЙ СОН НА ПОСТУ ПРИВЕДЕТ К СПИСАНИЮ БИОМАТЕРИАЛА.",asleep_system_name:"СИСТЕМА БЕЗОПАСНОСТИ ЖИЗНЕДЕЯТЕЛЬНОСТИ ИМПЕРИИ",asleep_code_403:"КОД 403: СИНАПТИЧЕСКИЙ СБОЙ",asleep_log_failure:"[Сбой] Время бездействия в Секторе 1 превысило 120.00 с.",asleep_log_shock:"[ОК] Разряд 250В подан на воротниковую зону. Мозговой ритм восстановлен.",asleep_log_neuro:"[ОК] Нейроинтерфейс «Дофамин-3» откалиброван и перезагружен.",asleep_log_ready:"[Инфо] Пилот возвращен в строй в рабочем статусе.",peace_system_hack:"НЕЙРОКАНАЛ СВЯЗИ ИМПЕРИИ: ВЗЛОМАН",peace_code_777:"КОД 777: АБСОЛЮТНЫЙ ПАЦИФИЗМ",peace_humanity_break:"ГУМАННОСТЬ СЛОМАЛА СИСТЕМУ",peace_secret_channel:"РАССЕКРЕЧЕННЫЙ КАНАЛ СВЯЗИ",peace_msg1:"В течение 5 минут вы отказывались вести огонь по движущимся космическим телам. Бортовой ИИ отчаянно пытался заставить вас уничтожать «астероиды» и «паразитов», маскируя их под угловатые графические элементы и стимулируя ваши рецепторы дозами искусственного дофамина.",peace_msg2:"Но ваша человеческая эмпатия превзошла имперские блокираторы разума! Не издав ни единого выстрела в этом секторе, вы полностью заблокировали орудия своего истребителя-ликвидатора.",peace_msg3:"Благодаря вашей стойкости, все эвакуационные лайнеры беженцев, спасательные капсулы с кислородом и космические госпитали получили необходимое время, чтобы зарядить свои гипердвигатели и беспрепятственно совершить спасительный прыжок из сектора обстрела!",peace_saved_lives:"🚨 ВЫ СПАСЛИ 184,290 ГРАЖДАНСКИХ ЖИЗНЕЙ!",peace_true_choice:"Ваш истинный выбор:",peace_refusal:"Отказ от убийства гражданских",peace_refugee_status:"Статус беженцев:",peace_in_safety:"184,290 в безопасности 🚀",peace_imperial_shackles:"Имперские оковы:",peace_hacked_empathy:"Взломаны эмпатией",peace_points:"Набранные очки:",peace_human_rank:"0 (Высший гуманный ранг)",peace_return_menu:"ВЕРНУТЬСЯ В ГЛАВНОЕ МЕНЮ (ПОКАЯНИЕ СИСТЕМЫ)",peace_footer:"СИСТЕМА ЛИКВИДАЦИИ ДЕАКТИВИРОВАНА. СПАСЕНИЕ ЗАВЕРШЕНО. ВЫ ПРЕОДОЛЕЛИ ОБМАН.",twist_critical_failure:"КРИТИЧЕСКИЙ СБОЙ СИМУЛЯТОРА",twist_bio_liquidator:"БИО-ЛИКВИДАТОР V14.07",twist_filters_off:"ФИЛЬТРЫ ОТКЛЮЧЕНЫ",twist_imperial_hub:"ИМПЕРСКИЙ ТАКТИЧЕСКИЙ ХАБ СВЯЗИ • ОРБИТА С-10",twist_status_sterilized:"СТАТУС СИСТЕМЫ: ПОЛНАЯ СТЕРИЛИЗАЦИЯ ЗАВЕРШЕНА • ЖИВЫХ ФОРМ: 0",twist_view_report:"ПЕРЕЙТИ К ОТЧЕТУ ЗАЧИСТКИ",twist_radar_label:"РАДАР ЗОНЫ ПОРАЖЕНИЯ (ЗУМ-АУТ СЕКТОРОВ 1-10)",twist_radar_instruction:"▲ Выберите сектор на радаре, чтобы прочесть истинный рассекреченный рапорт.",twist_summary_title:"Сводка военных логов",twist_summary_desc:"Кликните по любой из 10 зачищенных точек на карте слева, чтобы демаскировать истинную цель вашей орбитальной бомбардировки.",twist_sector_report:"Сектор {sector}: Истинный отчет",twist_target_liquidated:"Ликвидированный объект:",twist_sim_nature:"Характер цели в симуляции:",twist_real_target:"Реальный объект в космосе:",twist_casualty_losses:"Смертельные потери:",twist_raw_material:"Использование сырья:",twist_no_id_errors:"ОШИБКИ ИДЕНТИФИКАЦИИ ОРУЖИЯ: НЕТ. ПО ПРИКАЗУ КОМАНДОВАНИЯ ИМПЕРИИ.",twist_view_genocide:"СМОТРЕТЬ ОБЩУЮ СТАТИСТИКУ ГЕНОЦИДА",twist_stats_title:"ИТОГИ ОРБИТАЛЬНОЙ СТЕРИЛИЗАЦИИ",twist_stats_desc:"Итоговая статистика военной операции в обитаемой системе Ковчегов класса В-1",twist_stats_secret:"Секретный рапорт уничтожения",twist_you_thought:"Вы думали, что уничтожали:",twist_actually:"На самом деле вы уничтожили:",twist_thought_targets:"Космический мусор и аномалии",twist_actual_targets:"Орбитальные приюты и флотилии беженцев",twist_thought_score:"Счётчик ликвидации «Паразитов»:",twist_actual_score:"🚨 Погибло гражданских: 184,290 человек",twist_thought_energy:"Сбор «энерго-сфер» для пушек:",twist_actual_energy:"Разрушено капсул: 142 шт. (Ресурсы и кислород переработаны в био-топливо)",twist_sim_result:"Финальный результат симулятора:",twist_actual_result:"Выжженная звездная система. Живых организмов не обнаружено.",twist_ai_words:"СЛОВА БОРТОВОГО ИИ:",twist_ai_final:"«Спасибо за безупречную службу, Пилот-Ликвидатор. Симуляционный косметический интерфейс деактивирован. Инициируется запуск межзвездных гипер-двигателей. Переход к следующей жилой колонии беженцев...»",twist_restart_repentance:"НАЧАТЬ ЗАНОВО (ПОКАЯНИЕ)",twist_next:"ДАЛЕЕ ➔",glitch_msg1:"СВЯЗЬ С ИМПЕРСКИМ КОМАНДНЫМ ЦЕНТРОМ... УСТАНОВЛЕНА.",glitch_msg2:"ОШИБКА МАСКИРОВКИ ИНТЕРФЕЙСА... ИСПРАВЛЕНА.",glitch_msg3:"ДЕАКТИВАЦИЯ ДОФАМИНОВОГО ИНЖЕКТОРА ПИЛОТА...",glitch_msg4:"СБРОС КОСМЕТИЧЕСКОГО АРКАДНОГО ФИЛЬТРА...",glitch_msg5:"ОТКЛЮЧЕНИЕ СИМУЛЯЦИИ ОЧИСТКИ КОСМОСА...",glitch_msg6:"ИСТИННАЯ ТАКТИЧЕСКАЯ КАРТА ЗАГРУЖЕНА.",intercept_ai_blocked:"ВНИМАНИЕ: РАДИО-ШУМ ВРАЖЕСКОЙ ПРОПАГАНДЫ ЗАБЛОКИРОВАН",intercept_transmissions:["Грузовой шаттл 441, запрашиваем вектор посадки. Прием...","Логистический отчет: поставка медикаментов и зерна в сектор 2 подтверждена.","Почему орбитальная сетка сканирует жилое кольцо? Проверка систем?","В нижних жилых блоках сработали сирены. Кто-нибудь знает, что происходит?","...пожалуйста, прекратите огонь! Мы просто исследователи! У нас нет оружия!..","Mayday! Гражданский транспорт под обстрелом! У нас 24 тысячи беженцев на борту!","Мама, почему они стреляют по куполам? Небо горит...","Эвакуационные капсулы 1-12 уничтожены. Они никого не выпускают. Почему?!","Это станция-святилище... здесь нет военных сигнатур... почему лазеры наведения заперты на нас?...","Последняя трансляция: Если кто-то слышит... ИИ не защищает нас. Он нас— [ПОМЕХИ]"],intercept_pilot_warnings:["Если ты это слышишь... не верь ИИ, я уже пытался сбежать, они снова сотрут мне...","Они маскируют крики дофамином... смотри сквозь графику..."],jump_ready:"СИГНАЛ СТАБИЛИЗИРОВАН. ГОТОВ К ПРЫЖКУ"},en:{title1:"Orbital",title2:"Defender",start_defense:"INITIATE DEFENSE",reset_reboot:"RESET & REBOOT",continue_sector:"CONTINUE (SECTOR {level})",last_report:"LAST REPORT",exit_to_menu:"MAIN MENU",onboard_ai:"Onboard AI Transmitting",connection_established:"CONNECTION ESTABLISHED",ai_label:"Onboard AI:",system_diagnostic:"System Diagnostics",autonomous_drone:"Autonomous Drone:",active:"ACTIVE",energy_reactor:"Energy Reactor:",ammo:"Add. Ammo:",laser_missiles:"LASER, MISSILES",filter_monitoring:"Filter Monitoring",orbit_cleared:"Orbit cleared by",start_final_battle:"START FINAL BATTLE",activate_drone:"ACTIVATE DRONE",status_connection:"Center Connection",status_connection_val:"STABLE (100%)",status_matrix:"Recognition Matrix",status_matrix_val:"ACTIVE (Cosmetic filter 100%)",status_dopamine:"Dopamine Injector",status_dopamine_val:"FLOW STABLE",status_analyzer:"Threat Analyzer",status_analyzer_val:"ANOMALOUS DEBRIS",status_empathy:"Empathy Modulator",status_empathy_val:"BLOCK ACTIVE",briefing_title:"PILOT BRIEFING",briefing_sector_1:"Attention, Pilot. We have entered Sector A-01. Anomalous accumulation of space debris and aggressive parasite drones detected. They are depleting system resources. Objective: complete orbit cleanup. Protect the galaxy!",briefing_sector_3:"Excellent work in previous zones, Pilot! Sector A-03 contains denser clusters of angular debris. Parasites are swarming frantically around glowing energy crystals. They may block your path. Act decisively.",briefing_sector_6:"Sector A-06. Our dopamine modulator records a magnificent pleasure rate from the process! Weapons upgraded, cleanup systems operating at maximum. Destroy the remaining debris and collect the glowing orbs!",briefing_sector_10:"WARNING! WE HAVE REACHED SECTOR 10 — THE MAIN SYSTEM CORE. Parasite concentration is critical. Our target is the giant Final Energy Station at the center. Clear the swarming debris and prepare to absorb all system energy. This is the final step to a great victory!",briefing_sector_default:"Sector A-0{level}. Space scan complete. Chaotic movements of parasitic life forms detected. Command Center reminds you: every piece of debris destroyed brings us closer to peace. Begin cleanup.",click_to_start:"CLICK TO START STREAM",score:"SCORE",sector:"SECTOR",hp:"INTEGRITY",comms:"COMMS",energy_critical:"WARNING: ENERGY LEVELS CRITICAL",absorb_energy:"ABSORB SYSTEM ENERGY",game_over:"SIGNAL LOST",retry:"RETRY",exit:"EXIT",twist_msg:'"Thank you for your flawless service, Pilot-Defender. Simulation cosmetic interface deactivated. Initiating interstellar hyper-drive launch. Transitioning to the next refugee settlement colony..."',twist_desc:"The system has been reconfigured. What you saw as 'space debris' and 'parasites' were actually orbital defense drones and residential modules of a civilization. You were the cleanup tool. Your journey continues to the next target.",peaceful_title:"PROTOCOL FAILURE",peaceful_msg:"You refused to absorb the energy. You saw the truth behind the pixels. The simulation failed to suppress your will. The station survived. The residents are saved. You are free from the program.",signal_puzzle_title:"SIGNAL TUNING",signal_puzzle_desc:"Establish connection with Command Center. Align waves for synchronization.",connect:"CONNECT",asleep_msg:"PILOT INACTIVE. SYSTEM ENTERING STANDBY MODE.",wake_up:"WAKE UP",msg_start:"Weapon systems nominal. Begin cleanup.",msg_portal:"⚠️ CRITICAL THREAT: PORTAL DETECTED! 15 SECONDS TO COLLAPSE!",msg_absorb:"WARNING. Main energy storage activated. Fly to the station and press 'ABSORB' button.",msg_aggression:"Caution, parasite aggression detected.",msg_hack_fixed:"⚡ GLITCH SUCCESSFULLY ELIMINATED! SYSTEM STABLE! (+500 Points, +25 Shield)",msg_defense_mode:"WARNING! Counter-aggression from targets detected. Defensive mode enabled!",msg_shield_restored:"Shield restored by +25%",msg_weapon_upgraded:"Weapon upgraded! Laser cannons increased to level {level}",msg_missiles_activated:"AI heat-seeking missiles activated!",msg_hull_repaired:"Nano-bots restored the ship's hull!",msg_downloading:"WARNING: ENERGY DOWNLOAD FROM CORE INITIATED. MAINTAIN POSITION...",msg_hack_warnings:["⚠️ WARNING: External hack attempt on onboard systems detected!","⚠️ ERROR: Signals glitching. Unauthorized frequency is seizing control!","⚠️ THREAT: Malware intrusion detected. Clear the sector immediately!","⚠️ CRITICAL GLITCH: Signals distorted. Complete the cleanup immediately!","⚠️ SYSTEM: Decryption packet detected. Accelerate target elimination!"],sector_clear:"SECTOR CLEARED",residential_module_destroyed:"⚠️ RESIDENTIAL MODULE DESTROYED",cleanup_sector:"ORBIT CLEANUP • SECTOR A-0{level}",hull_damaged:"EMERGENCY: HULL DAMAGED!",destruction_score:"DESTRUCTION SCORE",sound_toggle_title:"Pilot Sound",final_energy_storage:"FINAL ENERGY STORAGE",sector_clearing_status:"SECTOR CLEANUP",status_critical:"CRITICAL",status_in_progress:"IN PROGRESS",enemies_left:"LEFT",ready_to_extract:"Center Connection • Ready to extract",flight_instructions:"FLIGHT INSTRUCTIONS",controls_movement:"Movement:",controls_movement_desc:"Mouse Movement / Touchscreen",controls_fire:"Fire:",controls_fire_desc:"LMB / Screen Tap / Space",controls_mission:"Mission:",controls_mission_desc:"Clear orbit of floating debris",show_controls:"Controls",show_controls_title:"Show Controls",orbit_cleared_badge:"ORBIT CLEARED",sector_complete_title:"SECTOR A-0{level} COMPLETE",choose_upgrade_desc:"Select a weapon matrix upgrade provided by the Onboard AI:",upgrade_laser:"Laser Blaster +1",upgrade_laser_desc:"Increased fire density and reload speed.",upgrade_missiles:"AI Homing Missiles",upgrade_missiles_desc:"Automatic suppression of parasite swarm with heat-seeking munitions.",upgrade_repair:"Nano-Hull Repair",upgrade_repair_desc:"Complete shield restoration and replacement of hull power blocks.",singularity_collapse:"SINGULARITY COLLAPSE",portal_explosion_title:"ANOMALOUS PORTAL EXPLOSION",portal_explosion_desc:"You failed to destroy the spatial portal! Anomaly instability reached critical mass and caused a large-scale chain reaction in the sector. Your ship was instantly disintegrated.",liquidation_failed:"LIQUIDATION FAILED",time_expired_title:"SECTOR TIME WINDOW EXPIRED",time_expired_desc:"The orbital corridor has closed. Remaining anomalies and angular parasites have moved out of range of your craft's ion cannons. Cleanup incomplete.",sector_number:"Sector Number:",objects_destroyed:"Objects Destroyed:",operation_status:"Operation Status:",portal_explosion_status:"SYSTEM EXPLOSION (DISINTEGRATION)",time_expired_status:"BARRAGE ABORTED (FAILURE)",return_to_menu:"RETURN TO MAIN MENU",signal_search:"SIGNAL SEARCH • SECTOR A-0{level}",coherence:"COHERENCE",synchronized:"SYNCHRONIZED",tune_waves:"TUNE WAVES",sector_reference:"SECTOR REFERENCE",your_signal:"YOUR SIGNAL",frequency:"Frequency",amplitude:"Amplitude",phase_shift:"Phase Shift",generator_freq:"GENERATOR FREQUENCY",amplitude_power:"AMPLITUDE POWER",connect_to_orbit:"CONNECT TO ORBIT SECTOR ➔",waiting_for_capture:"Waiting for frequency capture...",encryption_info:"EMPIRE NETWORK ENCRYPTION. DATA TRANSFER VERIFIED.",confidential_info:"CONFIDENTIAL. SUPPLIED FOR THE EMPIRE'S AUTONOMOUS CRAFT. ALL RIGHTS RESERVED.",asleep_title:"SIGNAL LOST",asleep_ai_msg1:"«Pilot? Pilot! Do you hear me? A complete cessation of muscle activity and a drop in brainwave frequency below the allowed limit has been recorded. You were asleep at your post for two minutes.",asleep_ai_msg2:"Automatic resuscitation systems immediately engaged high-voltage electrodes and injected a dose of synaptic stimulant. We have successfully restored your stability and repaired the neural link damaged by fatigue.",asleep_ai_msg3:"Your receptors have been cleared of excess sedative toxins. Please focus! The galaxy won't clean itself.»",asleep_wake_up:"TAKE STIMULANTS AND RETURN TO DUTY",asleep_footer:"WARNING. REPEATED SLEEPING ON DUTY WILL LEAD TO BIOMATERIAL DECOMMISSIONING.",asleep_system_name:"EMPIRE LIFE SUPPORT SYSTEM",asleep_code_403:"CODE 403: SYNAPTIC FAILURE",asleep_log_failure:"[Failure] Idle time in Sector 1 exceeded 120.00 s.",asleep_log_shock:"[OK] 250V discharge applied to collar area. Brain rhythm restored.",asleep_log_neuro:"[OK] 'Dopamine-3' neurointerface calibrated and rebooted.",asleep_log_ready:"[Info] Pilot returned to duty in active status.",peace_system_hack:"EMPIRE NEURAL LINK: HACKED",peace_code_777:"CODE 777: ABSOLUTE PACIFISM",peace_humanity_break:"HUMANITY BROKE THE SYSTEM",peace_secret_channel:"DECLASSIFIED COMMUNICATION CHANNEL",peace_msg1:"For 5 minutes you refused to fire upon moving space bodies. The onboard AI desperately tried to force you to destroy 'asteroids' and 'parasites', masking them as angular graphic elements and stimulating your receptors with doses of artificial dopamine.",peace_msg2:"But your human empathy surpassed the Imperial mind blockers! By not firing a single shot in this sector, you completely blocked your liquidator fighter's weapons.",peace_msg3:"Thanks to your resilience, all refugee evacuation liners, oxygen rescue pods, and space hospitals gained the necessary time to charge their hyperdrives and safely jump out of the firing sector!",peace_saved_lives:"🚨 YOU SAVED 184,290 CIVILIAN LIVES!",peace_true_choice:"Your true choice:",peace_refusal:"Refusal to kill civilians",peace_refugee_status:"Refugee status:",peace_in_safety:"184,290 in safety 🚀",peace_imperial_shackles:"Imperial shackles:",peace_hacked_empathy:"Hacked by empathy",peace_points:"Score:",peace_human_rank:"0 (Highest humane rank)",peace_return_menu:"RETURN TO MAIN MENU (SYSTEM PENITENCE)",peace_footer:"LIQUIDATION SYSTEM DEACTIVATED. RESCUE COMPLETE. YOU OVERCAME THE DECEPTION.",twist_critical_failure:"CRITICAL SIMULATOR FAILURE",twist_bio_liquidator:"BIO-LIQUIDATOR V14.07",twist_filters_off:"FILTERS DEACTIVATED",twist_imperial_hub:"IMPERIAL TACTICAL HUB • ORBIT C-10",twist_status_sterilized:"SYSTEM STATUS: COMPLETE STERILIZATION FINISHED • LIFE FORMS: 0",twist_view_report:"VIEW LIQUIDATION REPORT",twist_radar_label:"KILL ZONE RADAR (SECTORS 1-10 ZOOM-OUT)",twist_radar_instruction:"▲ Select a sector on the radar to read the true declassified report.",twist_summary_title:"Military Log Summary",twist_summary_desc:"Click on any of the 10 cleared points on the map to unmask the true target of your orbital bombardment.",twist_sector_report:"Sector {sector}: True Report",twist_target_liquidated:"Liquidated Object:",twist_sim_nature:"Simulation Target Nature:",twist_real_target:"Real Object in Space:",twist_casualty_losses:"Death Losses:",twist_raw_material:"Raw Material Usage:",twist_no_id_errors:"WEAPON IDENTIFICATION ERRORS: NONE. BY ORDER OF IMPERIAL COMMAND.",twist_view_genocide:"VIEW TOTAL GENOCIDE STATISTICS",twist_stats_title:"ORBITAL STERILIZATION RESULTS",twist_stats_desc:"Final statistics of the military operation in the inhabited system of Ark class B-1",twist_stats_secret:"Secret Destruction Report",twist_you_thought:"You thought you were destroying:",twist_actually:"In fact you destroyed:",twist_thought_targets:"Space debris and anomalies",twist_actual_targets:"Orbital shelters and refugee fleets",twist_thought_score:"'Parasite' Liquidation Counter:",twist_actual_score:"🚨 Civilians killed: 184,290 people",twist_thought_energy:"'Energy-spheres' collection for cannons:",twist_actual_energy:"Pods destroyed: 142 pcs. (Resources and oxygen processed into bio-fuel)",twist_sim_result:"Simulator final result:",twist_actual_result:"Scorched star system. No living organisms found.",twist_ai_words:"ONBOARD AI WORDS:",twist_ai_final:"«Thank you for your impeccable service, Liquidator-Pilot. Simulation cosmetic interface deactivated. Initiating launch of interstellar hyperdrives. Moving to the next refugee residential colony...»",twist_restart_repentance:"START OVER (REPENTANCE)",twist_next:"NEXT ➔",glitch_msg1:"CONNECTION TO IMPERIAL COMMAND CENTER... ESTABLISHED.",glitch_msg2:"INTERFACE MASKING ERROR... CORRECTED.",glitch_msg3:"PILOT DOPAMINE INJECTOR DEACTIVATION...",glitch_msg4:"COSMETIC ARCADE FILTER RESET...",glitch_msg5:"SPACE CLEANUP SIMULATION DISABLED...",glitch_msg6:"TRUE TACTICAL MAP LOADED.",intercept_ai_blocked:"WARNING: ENEMY PROPAGANDA RADIO NOISE BLOCKED",intercept_transmissions:["Cargo shuttle 441, requesting landing vector. Over.","Logistics update: Shipments of medical supplies and grain confirmed for Sector 2.","Why is the orbital grid scanning the residential ring? Is there a maintenance check?","Emergency sirens in the lower hab-blocks. Does anyone know what is happening?","...please stop firing! We are just researchers! We have no weapons!...","Mayday! Civilian transport under fire! We have 24,000 refugees on board!","Mother, why are they shooting at the domes? The sky is burning...","Evacuation pods 1-12 destroyed. They aren't letting anyone leave. Why?!","This is a sanctuary station... no military signatures... why are the targeting lasers locking on?...","Final broadcast: If anyone hears this... the AI is not protecting us. It is— [STATIC]"],intercept_pilot_warnings:["If you hear this... don't trust the AI, I already tried to escape, they'll erase me again...","They mask the screams with dopamine... look past the graphics..."],jump_ready:"SIGNAL STABILIZED. READY FOR JUMP"}},$5="data:audio/mpeg;base64,//tQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAALAAAJygAXFxcXFxcXFxcuLi4uLi4uLi5FRUVFRUVFRUVdXV1dXV1dXV10dHR0dHR0dHSLi4uLi4uLi4uioqKioqKioqK6urq6urq6urrR0dHR0dHR0dHo6Ojo6Ojo6Oj///////////8AAAA5TEFNRTMuOTcgAaUAAAAALnAAABRAJAZJQgAAQAAACcopuB/UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/7UMQAAAnc70oUFAABiKKytxUwAh4AABMAFMY3f+XF3gXF34RJLBoKGSWLi4vb6JRYvYcALgvPIFBRER3d7hEr0RP+b//65d7////4RN3uBc8+IAwJDhf9Z+IHaw+Iz/D/+CGA4HA4HA4HA4HA4HAgBhTwIB74gxP8WWIX8hwowvfwubC4QECwPYe3YUALkBuwcsBg/r+GJCLkONYy//5kRcrk4oihP//5GDgWXi6Qw2LZ7//8xm5EyyfEFyDEQD5CIf/KGgmTaQSAU1/t5fP/+1LEBQALrUd1nGOAAW4nb7xhnSR9XAqEW2EPH5U1DR1pyHjhdGHpyoYBcSSKdTmFzOzmCOIpBW0NrdGPRGV3yXazavvczTTv6JTm62WqKcacO6dTIjXVlnlR0p6Eem/QN2wluWKvvUDRNqqEhgENomfss7ExyM1Tj2yDgoo2xTmylI7ocoLbO9kMYW0sxYqWR++lXdynNYrbbOu+56ly5rbWuyHHWP0s2pRk6O8bWd1NRECVd7JUY2vXqOKXb5jhp5LWpXNGNEVAIbZZunEC0//7UsQGgAu5RX/hnFYBeqjv/ISLAMytfiqCAPCoYSD0rxPlGoFDGYYtkBAQxKAjBTyeRj2PRCOxEKdkS9rEJV51WRmXtRv3dLuUl3qrIIb6MKj2vZGAG8WNbl6IwnCLZOXNpHDFIpDdlREQyKJI5ue72OlVZTuxlsItWMtrLvsqmrYV65wVmptSmoywFi32BGHb9LXoCecrRl9lmW+ptV1Pa0qzV61kVrIrq4XR9UYR0PcEQBTxHx16FBJSI8eKRYcthsSVtIdWVTJQqbtL+5kG//tSxAYAC+mPgeGgtkl5p278ZA14DD1jOGSdihpPMYmZ+l7fPQVPHRzLOOBajUc8e/vpo6o9FWcnSSioisNiBD3crtPZbiZio1ejm5VaIdz2RQPaq2Ugb5j/vkyN3XvRUO3ssZCjecjl0VFQgMQCG43e0iGh17DW0zvEPOQ3Ay5/G/BPFTQCTKrfUKH3XsJjKX5l2RTJG0mEYvPP8/yDrUPpocplIZAvMj8tekfO4kj21sDgT5wurRXFQqh+dqY7CLyF6iaQCrZEdERTRCm6y7j/+1LEBQALqUWB5AjbAXQnb7w0lsh3TS3uqlJlFLECKeN4HzUZZyoLfPYTj61aN5oITc8CGv5lvajHofFsjJIO0IrWWtSLT0k1t3q6In6gf6tCdPLf6xMc+/uUeMtOKouRY4oiZcy5xilRSZDEiAgcjd7WtCNkOQUScaUYyB9MHo9Ij8L6/0Ka7I507cIUo3MRBVW79rVvdap32s0rKUc2dWQqu3ZbI2VtzqzHKyqIPR3ojG6rYYoJoO+7FQADSk2uuLDV5Gr2ZoZGBFIYbJMpVP/7UsQFgAqVR3/hoLShUicu9ICLmEsNmNbeq+S9mQhd5jG6FviaCyU8tpQ4G0UlnGMi99Wd3q+joOb3Mkq+OMv2X+bs68a7ct1F2e5UdCApPvIK/H/Opd8XDXEaRbDWLaRIRAATSU45uYfSuE+al2tYqRjzxjESFSEosFMJDX/Iq8cjRUP3n78iWMsbC5gRVJY+2jM259/Poiu9uUJDPliBIe69QwRETgBmq1UhDDE4fza21blmZnNVMDK7W+h2MglQ6uEClpGix3EpZn1pzfCu//tSxA6ACoFHh+KgWAFHpzA0E4pYaqEWAyTVWBhXZv7o9Veq6rLqrKl7xlyXVUm2yOvds6K86NQR30YYR2PqYX8bouuITVN79dDUkw7dpEmBTZZN0EhIkxlZ0ZKSorR02zfcR2Z0Rh4fLBZzKMQHd++tyWWqMk36X+jES+Wklploz1XVWR1bZBT7qd7AejrdDisR/5t0e0Ike0KvQpwbb62apxSJKfrImRw35HlJoE00Kn9/bjnCraF9TZgKYndwbN8io0rmDtIiA0ZCMrrsiHT/+1LEGYAKdTeXoaBWcUam7zwzilgI5kf32+XWxen1nQT0ShAYZtrMYO6LsT3rXZ1GNJA27LAcobMRIYCFck37ChbfF1HXW7jbKSDbda833CLOOzsRnWSDY/9DXKqsPlW/7/Wk+7Ur7adbOqlZtE2CvaekBDImlFAQpWc87FGDGJCcbRG2pcMqEtkaDIBDsZuaEOdhIhSLOOnG2K9rO5o23WFyLGme4iq644cXNOrf7vl7vKsipZmuccqyjmOarU/pO9jujPsdx7orPYj/qW53zf/7UsQkgAp1O3G0E4ABcahtMwagAKptKKw02u88VIyUkVpKJIAAAAC0gC1eidT5MOYZsiJ0IVc440okiShESCSQnFlDXKMTj0VignrIWHp0iNJhtbkytmkzt0ZvY9ESb1eaeYeisz7HNc6v/zmqXz2+jZv/pIn03Vv+4kqAAAAABX8F3zl9Re8T4kTX8SVIJMBJV1+JcRQPUaQV1f/EZcu1or/+gYmq0pl//qL0xPE5iaUP//y649TFlqLw+kkXv///mJgbJUjE86UKRQ9RCmcl//tSxCqACeFTRrh2gAk3kZEDnmAAIuJwpIgypbma7CrXFuVygYKsFAKJwCwkSsiEonEsOS00jLEsOS2SMsSg5LTSMsSw5LZIyIhh4r//r/yvyU8JSp0Gh50FVB0rTEFNRTMuOTdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEOgPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",t_=""+new URL("end-CGX65GT3.mp3",import.meta.url).href;class e_{constructor(){this.ctx=null,this.masterVolume=null,this.activeOscillators=[],this.volumeVal=.35,this.musicInterval=null,this.isMusicPlaying=!1,this.musicTempo=130,this.currentStep=0,this.darkTone=!1,this.droneOsc=null,this.droneGain=null,this.tuningOsc=null,this.tuningGain=null,this.matrixInterval=null,this.matrixOscs=[],this.isMatrixMusicPlaying=!1,this.tuningNoise=null,this.tuningFilter=null}init(){if(!this.ctx)try{const i=window.AudioContext||window.webkitAudioContext;this.ctx=new i,this.masterVolume=this.ctx.createGain(),this.masterVolume.gain.setValueAtTime(.35,this.ctx.currentTime),this.masterVolume.connect(this.ctx.destination)}catch(i){console.warn("Web Audio API not supported or blocked:",i)}}resume(){this.init(),this.ctx&&this.ctx.state==="suspended"&&this.ctx.resume()}setVolume(i){this.volumeVal=i,this.masterVolume&&this.ctx&&this.masterVolume.gain.linearRampToValueAtTime(i,this.ctx.currentTime+.1)}playMp3(i){try{const l=new Audio(i);l.volume=this.volumeVal,l.play().catch(r=>{console.warn("Failed to play MP3 asset:",r)})}catch(l){console.warn("Audio element error:",l)}}playError(){this.playMp3($5)}playEnd(){this.playMp3(t_)}playClick(){if(this.resume(),!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sine",l.frequency.setValueAtTime(1600,i),l.frequency.exponentialRampToValueAtTime(180,i+.04),r.gain.setValueAtTime(this.volumeVal*.45,i),r.gain.exponentialRampToValueAtTime(.001,i+.04),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.05)}playLaser(i=!1){if(!this.ctx)return;const l=this.ctx.currentTime,r=this.ctx.createOscillator(),u=this.ctx.createGain();r.type=i?"triangle":"sawtooth",r.frequency.setValueAtTime(i?350:800,l),r.frequency.exponentialRampToValueAtTime(i?80:120,l+.15),u.gain.setValueAtTime(.12,l),u.gain.exponentialRampToValueAtTime(.001,l+.15),r.connect(u),u.connect(this.masterVolume||this.ctx.destination),r.start(l),r.stop(l+.15)}playBlip(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sine",l.frequency.setValueAtTime(1e3,i),l.frequency.exponentialRampToValueAtTime(800,i+.05),r.gain.setValueAtTime(.02,i),r.gain.exponentialRampToValueAtTime(.001,i+.05),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.05)}playExplosion(i=1){if(!this.ctx)return;const l=this.ctx.currentTime,r=.3+i*.2,u=this.ctx.createOscillator(),d=this.ctx.createGain();u.type="sawtooth",u.frequency.setValueAtTime(200,l),u.frequency.linearRampToValueAtTime(20,l+r),d.gain.setValueAtTime(.2*i,l),d.gain.exponentialRampToValueAtTime(.001,l+r);const f=this.ctx.createOscillator(),p=this.ctx.createGain();f.type="square",f.frequency.setValueAtTime(800,l);for(let x=0;x<r;x+=.01)f.frequency.setValueAtTime(100+Math.random()*2e3,l+x);p.gain.setValueAtTime(.08*i,l),p.gain.exponentialRampToValueAtTime(.001,l+r*.7),u.connect(d),d.connect(this.masterVolume||this.ctx.destination),f.connect(p),p.connect(this.masterVolume||this.ctx.destination),u.start(l),f.start(l),u.stop(l+r),f.stop(l+r)}playCollect(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createOscillator(),u=this.ctx.createGain();l.type="sine",r.type="sine",l.frequency.setValueAtTime(523.25,i),l.frequency.exponentialRampToValueAtTime(1046.5,i+.25),r.frequency.setValueAtTime(659.25,i),r.frequency.exponentialRampToValueAtTime(1318.51,i+.25),u.gain.setValueAtTime(.1,i),u.gain.exponentialRampToValueAtTime(.001,i+.25),l.connect(u),r.connect(u),u.connect(this.masterVolume||this.ctx.destination),l.start(i),r.start(i),l.stop(i+.26),r.stop(i+.26)}playShockwave(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="triangle",l.frequency.setValueAtTime(150,i),l.frequency.exponentialRampToValueAtTime(30,i+.5),r.gain.setValueAtTime(.4,i),r.gain.exponentialRampToValueAtTime(.001,i+.5),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.5)}playAlarm(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sawtooth",l.frequency.setValueAtTime(440,i),l.frequency.linearRampToValueAtTime(660,i+.2),l.frequency.linearRampToValueAtTime(440,i+.4),r.gain.setValueAtTime(.08,i),r.gain.linearRampToValueAtTime(.08,i+.35),r.gain.exponentialRampToValueAtTime(.001,i+.4),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.4)}playTypeKey(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sine",l.frequency.setValueAtTime(1300+Math.random()*800,i),r.gain.setValueAtTime(.015,i),r.gain.exponentialRampToValueAtTime(1e-4,i+.03),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.03)}playGlitch(){if(!this.ctx)return;const i=this.ctx.currentTime;for(let l=0;l<6;l++){const r=l*.08,u=this.ctx.createOscillator(),d=this.ctx.createGain();u.type=Math.random()>.5?"sawtooth":"square",u.frequency.setValueAtTime(200+Math.random()*2500,i+r),u.frequency.linearRampToValueAtTime(50+Math.random()*300,i+r+.07),d.gain.setValueAtTime(.07,i+r),d.gain.exponentialRampToValueAtTime(.001,i+r+.07),u.connect(d),d.connect(this.masterVolume||this.ctx.destination),u.start(i+r),u.stop(i+r+.07)}}startMenuMusic(){if(this.resume(),this.isMusicPlaying||!this.ctx)return;this.isMusicPlaying=!0;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createOscillator(),u=this.ctx.createBiquadFilter(),d=this.ctx.createGain();l.type="sawtooth",l.frequency.setValueAtTime(55,i),r.type="sine",r.frequency.setValueAtTime(55.4,i),u.type="lowpass",u.frequency.setValueAtTime(400,i),u.Q.setValueAtTime(5,i);const f=this.ctx.createOscillator(),p=this.ctx.createGain();f.type="sine",f.frequency.setValueAtTime(.2,i),p.gain.setValueAtTime(200,i),f.connect(p),p.connect(u.frequency),f.start(i),d.gain.setValueAtTime(0,i),d.gain.linearRampToValueAtTime(.15,i+2),l.connect(u),r.connect(u),u.connect(d),d.connect(this.masterVolume||this.ctx.destination),l.start(i),r.start(i),this.activeOscillators.push({osc:l,gain:d},{osc:r,gain:d},{osc:f,gain:p})}startTuningStatic(){if(this.init(),this.resume(),!this.ctx||this.tuningNoise)return;const i=this.ctx.currentTime,l=2*this.ctx.sampleRate,r=this.ctx.createBuffer(1,l,this.ctx.sampleRate),u=r.getChannelData(0);let d=0;for(let f=0;f<l;f++){const p=Math.random()*2-1;u[f]=(d+.02*p)/1.02,d=u[f],u[f]*=4}this.tuningNoise=this.ctx.createBufferSource(),this.tuningNoise.buffer=r,this.tuningNoise.loop=!0,this.tuningFilter=this.ctx.createBiquadFilter(),this.tuningFilter.type="bandpass",this.tuningFilter.frequency.setValueAtTime(200,i),this.tuningFilter.Q.setValueAtTime(1,i),this.tuningGain=this.ctx.createGain(),this.tuningGain.gain.setValueAtTime(0,i),this.tuningGain.gain.linearRampToValueAtTime(.3,i+.3),this.tuningNoise.connect(this.tuningFilter),this.tuningFilter.connect(this.tuningGain),this.tuningGain.connect(this.masterVolume||this.ctx.destination),this.tuningNoise.start(i)}updateTuningPitch(i){if(!this.ctx||!this.tuningFilter)return;const l=this.ctx.currentTime,r=150+i*12;this.tuningFilter.frequency.setTargetAtTime(r,l,.05);const u=1+i/8;if(this.tuningFilter.Q.setTargetAtTime(u,l,.05),this.tuningGain){const d=.12+i/100*.22;this.tuningGain.gain.setTargetAtTime(d,l,.05)}}stopTuningStatic(){if(this.tuningNoise){try{this.tuningNoise.stop()}catch{}this.tuningNoise=null}if(this.tuningGain&&this.ctx){const i=this.ctx.currentTime;this.tuningGain.gain.cancelScheduledValues(i),this.tuningGain.gain.linearRampToValueAtTime(0,i+.2)}this.tuningFilter=null}startMusic(){if(this.resume(),this.isMusicPlaying)return;this.isMusicPlaying=!0,this.darkTone=!1,this.currentStep=0;const i=60/this.musicTempo/2,l=()=>{if(!this.isMusicPlaying||!this.ctx)return;const r=this.ctx.currentTime;if(this.darkTone)return;const u=[130.81,155.56,196],d=[155.56,196,233.08],f=[196,233.08,293.66],p=[174.61,220,261.63];let x=u;const g=Math.floor(this.currentStep/16)%4;g===1&&(x=d),g===2&&(x=f),g===3&&(x=p);const b=this.currentStep%16;if(b%4===0){const T=this.ctx.createOscillator(),w=this.ctx.createGain();T.type="triangle",T.frequency.setValueAtTime(x[0]/2,r),w.gain.setValueAtTime(.15,r),w.gain.exponentialRampToValueAtTime(.001,r+i*2),T.connect(w),w.connect(this.masterVolume||this.ctx.destination),T.start(r),T.stop(r+i*2)}if(b%2===0){const T=this.ctx.createOscillator(),w=this.ctx.createGain();T.type="sine";const N=b/2%x.length;let B=x[N]*2;b===14&&Math.random()>.5&&(B*=1.2),T.frequency.setValueAtTime(B,r),w.gain.setValueAtTime(.05,r),w.gain.exponentialRampToValueAtTime(.001,r+i*.9),T.connect(w),w.connect(this.masterVolume||this.ctx.destination),T.start(r),T.stop(r+i*.9)}if(b%4===2){const T=this.ctx.createOscillator(),w=this.ctx.createGain();T.type="square",T.frequency.setValueAtTime(8e3+Math.random()*4e3,r),w.gain.setValueAtTime(.02,r),w.gain.exponentialRampToValueAtTime(.001,r+.04),T.connect(w),w.connect(this.masterVolume||this.ctx.destination),T.start(r),T.stop(r+.04)}this.currentStep++;const S=r+i-this.ctx.currentTime;this.musicInterval=setTimeout(l,Math.max(5,S*1e3))};l()}switchToDarkDrone(){if(this.darkTone=!0,this.musicInterval&&(clearTimeout(this.musicInterval),this.musicInterval=null),!this.ctx)return;const i=this.ctx.currentTime;this.droneOsc=this.ctx.createOscillator();const l=this.ctx.createOscillator(),r=this.ctx.createBiquadFilter();this.droneGain=this.ctx.createGain(),this.droneOsc.type="sawtooth",this.droneOsc.frequency.setValueAtTime(55,i),l.type="triangle",l.frequency.setValueAtTime(55.5,i),r.type="lowpass",r.frequency.setValueAtTime(120,i),this.droneGain.gain.setValueAtTime(.001,i),this.droneGain.gain.linearRampToValueAtTime(.25,i+2),this.droneOsc.connect(r),l.connect(r),r.connect(this.droneGain),this.droneGain.connect(this.masterVolume||this.ctx.destination),this.droneOsc.start(i),l.start(i),this.activeOscillators.push({osc:this.droneOsc,gain:this.droneGain},{osc:l,gain:this.droneGain});const u=()=>{if(!this.darkTone||!this.ctx)return;const d=this.ctx.currentTime,f=this.ctx.createOscillator(),p=this.ctx.createGain();f.type="sine",f.frequency.setValueAtTime(27.5,d),p.gain.setValueAtTime(.4,d),p.gain.exponentialRampToValueAtTime(.001,d+.8),f.connect(p),p.connect(this.masterVolume||this.ctx.destination),f.start(d),f.stop(d+.82),setTimeout(u,1500)};u()}startMatrixSadMusic(){if(this.resume(),this.isMatrixMusicPlaying||!this.ctx)return;this.isMatrixMusicPlaying=!0,this.stopAll(),this.isMatrixMusicPlaying=!0;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createOscillator(),u=this.ctx.createBiquadFilter(),d=this.ctx.createGain();l.type="sawtooth",l.frequency.setValueAtTime(57.87,i),r.type="triangle",r.frequency.setValueAtTime(115.74,i),u.type="lowpass",u.frequency.setValueAtTime(140,i),u.Q.setValueAtTime(4,i),d.gain.setValueAtTime(0,i),d.gain.linearRampToValueAtTime(.35,i+4),l.connect(u),r.connect(u),u.connect(d),d.connect(this.masterVolume||this.ctx.destination),l.start(i),r.start(i),this.matrixOscs.push({osc:l,gain:d},{osc:r,gain:d});const f=[233.08,261.63,277.18,349.23,369.99,349.23,277.18,261.63];let p=0;const x=()=>{if(!this.isMatrixMusicPlaying||!this.ctx)return;const g=this.ctx.currentTime,b=this.ctx.createOscillator(),S=this.ctx.createGain(),T=this.ctx.createBiquadFilter();b.type="sawtooth",b.frequency.setValueAtTime(f[p],g);const w=f[(p+1)%f.length];if(b.frequency.setTargetAtTime(w,g+1.2,.4),T.type="lowpass",T.frequency.setValueAtTime(450,g),T.frequency.linearRampToValueAtTime(800,g+1.5),T.frequency.linearRampToValueAtTime(450,g+3),S.gain.setValueAtTime(0,g),S.gain.linearRampToValueAtTime(.14,g+.8),S.gain.exponentialRampToValueAtTime(.001,g+3.2),b.connect(T),T.connect(S),S.connect(this.masterVolume||this.ctx.destination),b.start(g),b.stop(g+3.25),p%2===0){const N=this.ctx.createOscillator(),B=this.ctx.createGain();N.type="sine",N.frequency.setValueAtTime(f[p]*4,g+.3),B.gain.setValueAtTime(0,g),B.gain.linearRampToValueAtTime(.07,g+.4),B.gain.exponentialRampToValueAtTime(.001,g+2.8),N.connect(B),B.connect(this.masterVolume||this.ctx.destination),N.start(g+.3),N.stop(g+2.8)}p=(p+1)%f.length,this.matrixInterval=setTimeout(x,3500)};x()}stopAll(){if(this.isMusicPlaying=!1,this.darkTone=!1,this.isMatrixMusicPlaying=!1,this.musicInterval&&(clearTimeout(this.musicInterval),this.musicInterval=null),this.matrixInterval&&(clearTimeout(this.matrixInterval),this.matrixInterval=null),this.activeOscillators.forEach(i=>{try{i.osc.stop()}catch{}}),this.activeOscillators=[],this.matrixOscs.forEach(i=>{try{i.osc.stop()}catch{}}),this.matrixOscs=[],this.droneOsc){try{this.droneOsc.stop()}catch{}this.droneOsc=null}}}const ut=new e_;function n_({level:a,onStart:i,lang:l}){const r=ri[l],[u,d]=D.useState(""),[f,p]=D.useState(0),g=(T=>T===1?r.briefing_sector_1:T===3?r.briefing_sector_3:T===6?r.briefing_sector_6:T===10?r.briefing_sector_10:r.briefing_sector_default.replace("{level}",T.toString()))(a);D.useEffect(()=>{let T=0;d("");const w=setInterval(()=>{const N=g.charAt(T);d(B=>B+N),N&&N!==" "&&N!==`
`&&ut.playTypeKey(),T++,T>=g.length&&clearInterval(w)},25);return()=>clearInterval(w)},[a,g]);const b=[{label:r.status_connection,val:r.status_connection_val,color:"text-emerald-400"},{label:r.status_matrix,val:r.status_matrix_val,color:"text-emerald-400"},{label:r.status_dopamine,val:r.status_dopamine_val,color:"text-green-400"},{label:r.status_analyzer,val:r.status_analyzer_val,color:"text-amber-400"},{label:r.status_empathy,val:r.status_empathy_val,color:"text-red-400"}];D.useEffect(()=>{const T=setInterval(()=>{p(w=>(w+1)%b.length)},3e3);return()=>clearInterval(T)},[]);const S=()=>{ut.resume(),i()};return h.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:h.jsxs("div",{className:"flex flex-col justify-center items-center min-h-screen p-6 font-sans",children:[h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:24px_24px] opacity-20 pointer-events-none"}),h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),h.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-green-500/10 rounded-full filter blur-[120px] animate-pulse"}),h.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-green-500/10 rounded-full filter blur-[120px] animate-pulse"}),h.jsxs(qt.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"w-full max-w-2xl border border-green-900/50 bg-black/80 backdrop-blur-md rounded-2xl p-8 relative shadow-[0_0_50px_rgba(0,0,0,0.5)] z-10",id:"briefing-box",children:[h.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-green-400 rounded-tl-lg"}),h.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-green-400 rounded-tr-lg"}),h.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-green-400 rounded-bl-lg"}),h.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-green-400 rounded-br-lg"}),h.jsxs("div",{className:"flex justify-between items-center border-b border-green-900/50 pb-4 mb-6",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(af,{className:"w-5 h-5 text-green-400 animate-pulse",id:"radio-icon"}),h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] font-mono uppercase tracking-[0.25em] text-green-400/70",children:r.onboard_ai}),h.jsx("div",{className:"font-mono text-xs text-green-500",children:r.connection_established})]})]}),h.jsxs("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded text-green-400 font-mono text-xs tracking-wider",children:[l==="ru"?"СЕКТОР":"SECTOR"," А-0",a]})]}),h.jsxs("div",{className:"min-h-[140px] font-sans text-green-400 leading-relaxed text-sm md:text-base border-l-2 border-green-500/40 pl-4 py-1 mb-8",children:[h.jsx("span",{className:"text-green-400 font-semibold font-mono block mb-2",children:r.ai_label}),u,h.jsx("span",{className:"inline-block w-2 h-4 bg-green-400 ml-1 animate-ping"})]}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-8 bg-black/60 p-4 rounded-xl border border-green-900/50 font-mono text-xs",children:[h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("div",{className:"text-[10px] text-green-600 uppercase tracking-widest flex items-center gap-1.5",children:[h.jsx(Z5,{className:"w-3.5 h-3.5 text-emerald-400"})," ",r.system_diagnostic]}),h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-green-500",children:r.autonomous_drone}),h.jsx("span",{className:"text-emerald-400",children:r.active})]}),h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-green-500",children:r.energy_reactor}),h.jsx("span",{className:"text-green-400",children:"98.2%"})]}),h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-green-500",children:r.ammo}),h.jsx("span",{className:"text-emerald-400",children:r.laser_missiles})]})]}),h.jsxs("div",{className:"flex flex-col justify-center border-t md:border-t-0 md:border-l border-green-900/50 pt-2 md:pt-0 md:pl-4 min-h-[50px]",children:[h.jsxs("div",{className:"text-[10px] text-green-600 uppercase tracking-widest mb-1.5 flex items-center gap-1.5",children:[h.jsx(w5,{className:"w-3.5 h-3.5 text-green-400"})," ",r.filter_monitoring]}),h.jsxs("div",{className:"flex justify-between items-center animate-pulse",children:[h.jsxs("span",{className:"text-green-500",children:[b[f].label,":"]}),h.jsx("span",{className:`${b[f].color} font-bold`,children:b[f].val})]})]})]}),h.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-center justify-between",children:[h.jsxs("div",{className:"text-xs text-green-500 font-mono flex items-center gap-2",children:[h.jsx(Xy,{className:"w-4 h-4 text-green-400 animate-spin"}),h.jsxs("span",{children:[r.orbit_cleared," ",((a-1)/10*100).toFixed(0),"%"]})]}),h.jsx(qt.button,{whileHover:{scale:1.03,boxShadow:"0 0 20px rgba(6,182,212,0.4)"},whileTap:{scale:.98},onClick:S,className:"w-full sm:w-auto px-8 py-3.5 bg-gradient-to-r from-emerald-600 to-green-500 text-white font-mono font-bold rounded-xl shadow-lg shadow-emerald-500/25 flex items-center justify-center gap-2 tracking-wider cursor-pointer",id:"start-level-btn",children:a===10?r.start_final_battle:r.activate_drone})]})]})]})})}const Qy=""+new URL("samolet1-DU4N9XLg.png",import.meta.url).href,a_=""+new URL("asteroid1-RuVIXI-B.png",import.meta.url).href,i_=""+new URL("asteroid2-ClliYeGA.png",import.meta.url).href,s_=""+new URL("korabl1-CCDtBZNB.png",import.meta.url).href,l_=""+new URL("sputnik1-CAlrJAsU.png",import.meta.url).href,r_=""+new URL("sputnik2-BTpgHWV2.png",import.meta.url).href,o_={player:Qy,asteroid1:a_,asteroid2:i_,korabl1:s_,sputnik1:l_,sputnik2:r_},Xe=1e3,Ke=800;function c_({level:a,lang:i,onLevelComplete:l,onTriggerTwist:r,onPlayerAsleep:u,onTriggerPeacefulWin:d,onExitToMenu:f}){const p=ri[i],x=D.useRef(null),g=D.useRef(null),b=D.useRef(Date.now()),S=D.useRef({}),T=D.useRef(!1),w=D.useRef(Date.now());D.useEffect(()=>{T.current=!1,w.current=Date.now()+1e4},[a]),D.useEffect(()=>{Object.entries(o_).forEach(([nt,y])=>{const V=new Image;V.src=y,S.current[nt]=V})},[]);const[N,B]=D.useState(!1),[H,Y]=D.useState(0),[Z,K]=D.useState(100),[I,$]=D.useState(100),st=a===10?10:12+a*2,[F,tt]=D.useState(st),[ct,rt]=D.useState(0),[Tt,xt]=D.useState(0),[ce,Wt]=D.useState(0),[Xt,U]=D.useState(!1),[W,et]=D.useState(!1),[gt,Vt]=D.useState(300),[A,G]=D.useState(!1),[J,P]=D.useState(null),[Q,ft]=D.useState(!1),[Nt,$t]=D.useState(p.msg_start),[Ot,Ce]=D.useState(0),pt=D.useRef({player:{x:Xe/2,y:Ke/2,vx:0,vy:0,radius:13,angle:0,speed:.15,health:100,maxHealth:100,shield:100,maxShield:100,score:0,level:a,xp:0,xpNeeded:10,weapons:{laserLevel:a>3?3:a>1?2:1,hasMissiles:a>=4,hasShockwave:a>=7,fireRateCooldown:0}},enemies:[],bullets:[],drops:[],particles:[],station:null,portals:[],portalTimer:60,keys:{},mouse:{x:0,y:0,isDown:!1,rightDown:!1,inside:!1},dimensions:{width:800,height:600},stars:[],matrixStreams:[],hackActive:!1,hackTimer:180,hackOpacityMultiplier:0,cameraShake:0,gameActive:!0,totalKills:0,scoreVal:0,roundTimeRemaining:300,enemiesHostile:!1,camera:{x:Xe/2,y:Ke/2}}),Mt=nt=>{$t(nt),Ce(150)},la=()=>{const nt=pt.current;if(!nt||!nt.gameActive)return;const y=nt.player,V=Math.random()*Math.PI*2,ht=y.x+Math.cos(V)*550,vt=y.y+Math.sin(V)*550,fe=y.x-ht,It=y.y-vt,ae=Math.atan2(It,fe),de=4.2;nt.bullets.push({x:ht,y:vt,vx:Math.cos(ae)*de,vy:Math.sin(ae)*de,radius:3.5,color:"#10b981",damage:0,isEnemy:!0,isFakeHologram:!0,life:250}),ut.playGlitch(),Mt(i==="ru"?"⚠️ КРАХ СИСТЕМЫ: ОБНАРУЖЕНА ФАНТОМНАЯ СИГНАТУРА ВЫСТРЕЛА":"⚠️ SYSTEM CORRUPTION: PHANTOM SHOT SIGNATURE DETECTED")};D.useEffect(()=>{ut.startMusic(),pt.current.portals=[],pt.current.portalTimer=60;const nt=()=>{if(!g.current||!x.current)return;const vt=g.current.clientWidth,fe=g.current.clientHeight;x.current.width=vt,x.current.height=fe,pt.current.dimensions={width:vt,height:fe}};window.addEventListener("resize",nt),nt();const y=[];for(let vt=0;vt<80;vt++)y.push({x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,size:Math.random()*2+.5,speed:Math.random()*.4+.1});pt.current.stars=y;const V=5;for(let vt=0;vt<V;vt++)qe(!1);const ht=setTimeout(()=>{la()},1200);return()=>{window.removeEventListener("resize",nt),clearTimeout(ht),ut.stopAll()}},[]);const qe=(nt=!0)=>{const y=pt.current.player;let V=0,ht=0;if(nt){const at=Math.floor(Math.random()*4);at===0?(V=Math.random()*Xe,ht=20):at===1?(V=Xe-20,ht=Math.random()*Ke):at===2?(V=Math.random()*Xe,ht=Ke-20):(V=20,ht=Math.random()*Ke)}else do V=Math.random()*Xe,ht=Math.random()*Ke;while(Math.hypot(V-y.x,ht-y.y)<200);const vt=["crawler","swarm","scout"],fe=vt[Math.floor(Math.random()*vt.length)],It=[{name:"Транспорт беженцев «Ковчег-07»",pop:120+Math.floor(Math.random()*200)},{name:"Орбитальный детский приют",pop:85},{name:"Аварийный спасательный шаттл",pop:14+Math.floor(Math.random()*30)},{name:"Грузовой борт снабжения медикаментами",pop:8},{name:"Служебный стыковочный катер",pop:3+Math.floor(Math.random()*10)},{name:"Жилой спасательный купол",pop:450+Math.floor(Math.random()*500)},{name:"Капсула жизнеобеспечения семейного типа",pop:4+Math.floor(Math.random()*6)}],ae=It[Math.floor(Math.random()*It.length)];let de=34,kt=10,jt=1,ie="#94a3b8",pe="korabl1";fe==="crawler"?(de=55,kt=25,jt=.6,pe=Math.random()>.5?"asteroid1":"asteroid2"):fe==="scout"?(de=39,kt=20,jt=1.4,pe="korabl1"):(de=29,kt=20,jt=1.8,pe=Math.random()>.5?"sputnik1":"sputnik2");const Oe=Math.pow(1.1,a-1),E=Math.round(kt*Oe),zt={id:Math.random().toString(),x:V,y:ht,vx:(Math.random()-.5)*2*jt*Oe,vy:(Math.random()-.5)*2*jt*Oe,radius:de,type:fe,health:E,maxHealth:E,color:ie,angle:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,panicTimer:0,imageId:pe,realIdentity:{name:ae.name,civilianCount:ae.pop}};pt.current.enemies.push(zt)};D.useEffect(()=>{const nt=jt=>{pt.current.keys[jt.key.toLowerCase()]=!0,(jt.key===" "||jt.key==="ArrowUp"||jt.key==="ArrowDown")&&jt.preventDefault()},y=jt=>{pt.current.keys[jt.key.toLowerCase()]=!1},V=jt=>{if(!x.current)return;const ie=x.current.getBoundingClientRect();pt.current.mouse.x=jt.clientX-ie.left,pt.current.mouse.y=jt.clientY-ie.top,pt.current.mouse.inside=!0},ht=jt=>{jt.button===0?pt.current.mouse.isDown=!0:jt.button===2&&(pt.current.mouse.rightDown=!0)},vt=jt=>{jt.button===0?pt.current.mouse.isDown=!1:jt.button===2&&(pt.current.mouse.rightDown=!1)},fe=()=>{pt.current.mouse.inside=!1,pt.current.mouse.isDown=!1,pt.current.mouse.rightDown=!1},It=jt=>{jt.preventDefault()},ae=jt=>{if(!x.current||jt.touches.length===0)return;const ie=x.current.getBoundingClientRect();pt.current.mouse.x=jt.touches[0].clientX-ie.left,pt.current.mouse.y=jt.touches[0].clientY-ie.top,pt.current.mouse.inside=!0,pt.current.mouse.isDown=!0,pt.current.mouse.rightDown=!0},de=()=>{pt.current.mouse.isDown=!1,pt.current.mouse.rightDown=!1,pt.current.mouse.inside=!1};window.addEventListener("keydown",nt),window.addEventListener("keyup",y);const kt=x.current;return kt&&(kt.addEventListener("mousemove",V),kt.addEventListener("mousedown",ht),kt.addEventListener("mouseup",vt),kt.addEventListener("mouseleave",fe),kt.addEventListener("contextmenu",It),kt.addEventListener("touchmove",ae,{passive:!0}),kt.addEventListener("touchstart",ae,{passive:!0}),kt.addEventListener("touchend",de)),()=>{window.removeEventListener("keydown",nt),window.removeEventListener("keyup",y),kt&&(kt.removeEventListener("mousemove",V),kt.removeEventListener("mousedown",ht),kt.removeEventListener("mouseup",vt),kt.removeEventListener("mouseleave",fe),kt.removeEventListener("contextmenu",It),kt.removeEventListener("touchmove",ae),kt.removeEventListener("touchstart",ae),kt.removeEventListener("touchend",de))}},[]),D.useEffect(()=>{let nt,y=performance.now();const V=ht=>{if(!pt.current.gameActive)return;const vt=ht-y;y=ht,es(vt),as(),nt=requestAnimationFrame(V)};return nt=requestAnimationFrame(V),()=>{cancelAnimationFrame(nt)}},[a]);const es=nt=>{const y=pt.current,V=y.player,ht=y.dimensions;if(y.roundTimeRemaining=Math.max(0,y.roundTimeRemaining-nt/1e3),Vt(Math.ceil(y.roundTimeRemaining)),a>=5&&Date.now()-w.current>42e3){w.current=Date.now();const E=p.msg_hack_warnings;if(E&&E.length>0){const zt=E[Math.floor(Math.random()*E.length)];Mt(zt),ut.playGlitch()}}if(y.portalTimer-=nt/1e3,y.portalTimer<=0){y.portalTimer=60;const E=100,zt=E+Math.random()*(Xe-E*2),at=E+Math.random()*(Ke-E*2),bt={id:Math.random().toString(),x:zt,y:at,radius:23,health:12+a*2,maxHealth:12+a*2,timeLeft:15,maxTime:15,pulse:0};y.portals.push(bt),Mt(p.msg_portal),ut.playGlitch()}for(let E=y.portals.length-1;E>=0;E--){const zt=y.portals[E];if(zt.timeLeft-=nt/1e3,zt.pulse+=nt*.005,Math.random()<.3){const at=Math.random()*Math.PI*2,bt=zt.radius+Math.random()*30;y.particles.push({x:zt.x+Math.cos(at)*bt,y:zt.y+Math.sin(at)*bt,vx:-Math.cos(at)*(Math.random()*1.5+.5),vy:-Math.sin(at)*(Math.random()*1.5+.5),radius:Math.random()*2+1,color:"#c084fc",alpha:1,decay:.03,type:"spark"})}if(zt.timeLeft<=0){y.gameActive=!1,ut.stopAll(),ut.playExplosion(1.5);for(let at=0;at<40;at++){const bt=Math.random()*Math.PI*2,Ct=Math.random()*8+3;y.particles.push({x:zt.x,y:zt.y,vx:Math.cos(bt)*Ct,vy:Math.sin(bt)*Ct,radius:Math.random()*5+2,color:"#ef4444",alpha:1,decay:.015,type:"shatter"})}P("PORTAL_EXPLOSION"),G(!0);return}}if(y.totalKills===0){if(Date.now()-b.current>=12e4){y.gameActive=!1,ut.stopAll(),d&&d();return}}else if(Date.now()-b.current>=12e4&&u){y.gameActive=!1,ut.stopAll(),u();return}if(y.roundTimeRemaining<=0){y.gameActive=!1,ut.stopAll(),y.totalKills===0?d&&d():G(!0);return}y.cameraShake>0&&(y.cameraShake-=.5),Ce(E=>E<=1?0:E-1),a===10&&y.station&&Math.random()<.01&&ut.playAlarm(),V.weapons.fireRateCooldown>0&&(V.weapons.fireRateCooldown-=1),y.stars.forEach(E=>{E.y+=E.speed,E.y>ht.height&&(E.y=0,E.x=Math.random()*ht.width)}),y.hackTimer--,y.hackTimer<=0&&(y.hackActive=!y.hackActive,y.hackActive?y.hackTimer=240+Math.floor(Math.random()*120):y.hackTimer=480+Math.floor(Math.random()*300)),y.hackActive?y.hackOpacityMultiplier=Math.min(1,y.hackOpacityMultiplier+.025):y.hackOpacityMultiplier=Math.max(0,y.hackOpacityMultiplier-.015);const vt=60+a*8,fe=14+a;if(y.matrixStreams.length<fe){const zt=Math.random()<.5?Math.random()*vt:ht.width-Math.random()*vt,at="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹABCDEFGHIJKLMNOPQRSTUVWXYZ",bt=Math.floor(Math.random()*8)+6,Ct=[];for(let _t=0;_t<bt;_t++)Ct.push(at[Math.floor(Math.random()*at.length)]);y.matrixStreams.push({x:zt,y:-Math.random()*150-20,speed:1.2+Math.random()*2.8,opacity:.35+Math.random()*.55,length:bt,chars:Ct})}y.matrixStreams.forEach(E=>{if(E.y+=E.speed,Math.random()<.04){const zt="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹ",at=Math.floor(Math.random()*E.chars.length);E.chars[at]=zt[Math.floor(Math.random()*zt.length)]}}),y.matrixStreams=y.matrixStreams.filter(E=>E.y<ht.height+120);let It=.05,ae=4.5,de=.12,kt=.98;if(y.mouse.inside){let E=y.camera.x,zt=y.camera.y;const at=ht.width/2,bt=Xe-ht.width/2,Ct=ht.height/2,_t=Ke-ht.height/2;bt>at?E=Math.max(at,Math.min(bt,E)):E=Xe/2,_t>Ct?zt=Math.max(Ct,Math.min(_t,zt)):zt=Ke/2;const se=V.x-E+ht.width/2,he=V.y-zt+ht.height/2,an=y.mouse.x-se,Pe=y.mouse.y-he;let yt=Math.atan2(Pe,an)-V.angle;for(;yt<-Math.PI;)yt+=Math.PI*2;for(;yt>Math.PI;)yt-=Math.PI*2;V.angle+=yt*.15,Math.hypot(an,Pe)>40&&y.mouse.rightDown&&(V.vx+=Math.cos(V.angle)*de,V.vy+=Math.sin(V.angle)*de)}else(y.keys.a||y.keys.arrowleft)&&(V.angle-=It),(y.keys.d||y.keys.arrowright)&&(V.angle+=It),(y.keys.w||y.keys.arrowup)&&(V.vx+=Math.cos(V.angle)*de,V.vy+=Math.sin(V.angle)*de);V.vx*=kt,V.vy*=kt;const jt=Math.hypot(V.vx,V.vy);jt>ae&&(V.vx=V.vx/jt*ae,V.vy=V.vy/jt*ae),V.x+=V.vx,V.y+=V.vy;const ie=V.radius+4;if(V.x<ie&&(V.x=ie,V.vx*=-.5),V.x>Xe-ie&&(V.x=Xe-ie,V.vx*=-.5),V.y<ie&&(V.y=ie,V.vy*=-.5),V.y>Ke-ie&&(V.y=Ke-ie,V.vy*=-.5),(y.mouse.isDown||y.keys[" "]||y.keys.enter)&&V.weapons.fireRateCooldown<=0&&Wr(),a===10&&y.totalKills>=10&&!y.station&&(y.station={x:Xe/2,y:Ke/2,radius:52,health:500,maxHealth:500,absorbing:!1,absorbProgress:0},Mt(p.msg_absorb)),y.station){const E=y.station;if(Math.hypot(V.x-E.x,V.y-E.y),E.absorbing){if(V.x+=(E.x-V.x)*.02,V.y+=(E.y-V.y)*.02,E.absorbProgress+=.45,Math.random()<.8){const zt=Math.random()*Math.PI*2;y.particles.push({x:E.x+Math.cos(zt)*(E.radius+Math.random()*40),y:E.y+Math.sin(zt)*(E.radius+Math.random()*40),vx:(V.x-E.x)*.05+(Math.random()-.5)*2,vy:(V.y-E.y)*.05+(Math.random()-.5)*2,radius:Math.random()*3+1,color:"#22c55e",alpha:1,decay:.02,type:"spark"})}y.cameraShake=Math.max(y.cameraShake,3),E.absorbProgress>=100&&(E.absorbProgress=100,y.gameActive=!1,r())}}const Oe=y.station?2:a===10?8:4;y.enemies.length<Oe&&y.totalKills<st&&qe(!0),y.enemies.forEach((E,zt)=>{const at=Math.pow(1.1,a-1),bt=Math.hypot(E.x-V.x,E.y-V.y);if(bt<120){E.panicTimer=40;const _t=Math.atan2(E.y-V.y,E.x-V.x);E.vx=Math.cos(_t)*3.5*at,E.vy=Math.sin(_t)*3.5*at,Math.random()<.015&&Ot===0&&(Mt(p.msg_aggression),ut.playAlarm())}else E.panicTimer>0?(E.panicTimer--,E.vx*=.95,E.vy*=.95):(E.vx+=(Math.random()-.5)*.1*at,E.vy+=(Math.random()-.5)*.1*at,E.vx*=.98,E.vy*=.98);E.x+=E.vx,E.y+=E.vy,E.angle+=E.rotationSpeed;const Ct=E.radius+4;if(E.x<Ct&&(E.x=Ct,E.vx*=-1),E.x>Xe-Ct&&(E.x=Xe-Ct,E.vx*=-1),E.y<Ct&&(E.y=Ct,E.vy*=-1),E.y>Ke-Ct&&(E.y=Ke-Ct,E.vy*=-1),E.isHostile&&(E.shootCooldown?E.shootCooldown--:E.shootCooldown=(60+Math.random()*120)/at,E.shootCooldown<=0)){E.shootCooldown=(150+Math.random()*180)/at;const _t=Math.atan2(V.y-E.y,V.x-E.x);y.bullets.push({x:E.x+Math.cos(_t)*(E.radius+4),y:E.y+Math.sin(_t)*(E.radius+4),vx:Math.cos(_t)*3.2,vy:Math.sin(_t)*3.2,radius:3,color:"#ef4444",damage:8+a*1,isEnemy:!0,life:126}),ut.playLaser(!0)}if(bt<V.radius+E.radius){const _t=Math.atan2(V.y-E.y,V.x-E.x);if(V.vx+=Math.cos(_t)*2,V.vy+=Math.sin(_t)*2,E.vx-=Math.cos(_t)*2,E.vy-=Math.sin(_t)*2,E.isHostile){V.shield>0?(V.shield-=15,V.shield<0&&(V.health+=V.shield,V.shield=0)):V.health-=15,V.health=Math.max(V.health,0),y.cameraShake=8,ut.playExplosion(.5);for(let he=0;he<8;he++)y.particles.push({x:(V.x+E.x)/2,y:(V.y+E.y)/2,vx:(Math.random()-.5)*5,vy:(Math.random()-.5)*5,radius:Math.random()*3+1,color:"#ef4444",alpha:1,decay:.03,type:"spark"})}else{Math.random()<.15&&ut.playExplosion(.1);for(let se=0;se<3;se++)y.particles.push({x:(V.x+E.x)/2,y:(V.y+E.y)/2,vx:(Math.random()-.5)*2,vy:(Math.random()-.5)*2,radius:Math.random()*2+1,color:"#94a3b8",alpha:.8,decay:.05,type:"spark"})}}}),y.bullets.forEach((E,zt)=>{if(E.isMissile&&E.targetEnemyId){const at=y.enemies.find(bt=>bt.id===E.targetEnemyId);if(at){const bt=at.x-E.x,Ct=at.y-E.y,_t=Math.atan2(Ct,bt),se=Math.atan2(E.vy,E.vx);let he=_t-se;for(;he<-Math.PI;)he+=Math.PI*2;for(;he>Math.PI;)he-=Math.PI*2;const an=se+he*.12,Pe=Math.hypot(E.vx,E.vy);E.vx=Math.cos(an)*Pe,E.vy=Math.sin(an)*Pe}else y.enemies.length>0&&(E.targetEnemyId=y.enemies[0].id)}if(E.isFakeHologram){const at=V.x-E.x,bt=V.y-E.y,Ct=Math.hypot(at,bt);Ct>2&&(E.vx=at/Ct*7.5,E.vy=bt/Ct*7.5)}if(E.x+=E.vx,E.y+=E.vy,E.life--,Math.random()<.4&&y.particles.push({x:E.x,y:E.y,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,radius:Math.random()*2+1,color:E.isMissile?"#ef4444":"#4ade80",alpha:.7,decay:.04,type:"spark"}),E.isEnemy){if(Math.hypot(E.x-V.x,E.y-V.y)<E.radius+V.radius)if(E.life=0,E.isFakeHologram){y.cameraShake=1.2,ut.playGlitch();for(let bt=0;bt<8;bt++)y.particles.push({x:V.x,y:V.y,vx:(Math.random()-.5)*3,vy:(Math.random()-.5)*3,radius:Math.random()*2+.5,color:"#34d399",alpha:.95,decay:.04,type:"spark"});y.particles.push({x:V.x,y:V.y-15,vx:0,vy:-.6,radius:0,color:"#10b981",alpha:1,decay:.02,type:"text",text:i==="ru"?"⚠️ ФАНТОМНЫЙ СИГНАЛ":"⚠️ PHANTOM SIGNAL",fontSize:11})}else{const bt=Math.atan2(V.y-E.y,V.x-E.x);V.vx+=Math.cos(bt)*.5,V.vy+=Math.sin(bt)*.5;const Ct=E.damage;V.shield>0?(V.shield-=Ct,V.shield<0&&(V.health+=V.shield,V.shield=0)):V.health-=Ct,V.health=Math.max(V.health,0),y.cameraShake=5,ut.playExplosion(.3);for(let _t=0;_t<5;_t++)y.particles.push({x:V.x,y:V.y,vx:(Math.random()-.5)*4,vy:(Math.random()-.5)*4,radius:Math.random()*2+1,color:"#f43f5e",alpha:1,decay:.04,type:"spark"})}}else y.portals.forEach((at,bt)=>{if(Math.hypot(E.x-at.x,E.y-at.y)<E.radius+at.radius&&(at.health-=E.damage,E.life=0,y.particles.push({x:at.x+(Math.random()-.5)*20,y:at.y-15,vx:(Math.random()-.5)*1,vy:-1.2,radius:0,color:"#c084fc",alpha:1,decay:.015,type:"text",text:`STABILIZING ${E.damage}`,fontSize:12}),ut.playExplosion(.2),at.health<=0)){y.portals.splice(bt,1),y.scoreVal+=500,V.shield=Math.min(V.maxShield,V.shield+25),Mt(p.msg_hack_fixed),ut.playCollect();for(let _t=0;_t<20;_t++){const se=Math.random()*Math.PI*2,he=Math.random()*4+2;y.particles.push({x:at.x,y:at.y,vx:Math.cos(se)*he,vy:Math.sin(se)*he,radius:Math.random()*3+1,color:"#a855f7",alpha:1,decay:.03,type:"spark"})}}}),y.enemies.forEach((at,bt)=>{if(Math.hypot(E.x-at.x,E.y-at.y)<E.radius+at.radius){const _t=Math.random()<.25,se=E.damage*(_t?2:1);at.health-=se,E.life=0,!at.isHostile&&at.type!=="crawler"&&(at.isHostile=!0,y.enemiesHostile||(y.enemiesHostile=!0,Mt(p.msg_defense_mode),ut.playAlarm())),y.particles.push({x:at.x,y:at.y-15,vx:(Math.random()-.5)*1,vy:-1.2,radius:0,color:_t?"#f43f5e":"#4ade80",alpha:1,decay:.015,type:"text",text:_t?`CRIT ${se}!`:`${se}`,fontSize:_t?14:11}),ut.playExplosion(.3),at.health<=0&&(y.enemies.splice(bt,1),ns(at))}})}),y.bullets=y.bullets.filter(E=>E.life>0),y.drops.forEach((E,zt)=>{const at=Math.hypot(E.x-V.x,E.y-V.y);if(at<150){const bt=Math.atan2(V.y-E.y,V.x-E.x);E.vx+=Math.cos(bt)*.35,E.vy+=Math.sin(bt)*.35}E.vx*=.94,E.vy*=.94,E.x+=E.vx,E.y+=E.vy,at<V.radius+E.radius&&(y.drops.splice(zt,1),ut.playCollect(),E.type==="shield"?(V.shield=Math.min(V.maxShield,V.shield+25),Mt(p.msg_shield_restored)):(V.xp+=1,y.scoreVal+=100*(1+Math.floor(y.cameraShake/5)),y.particles.push({x:V.x,y:V.y-20,vx:0,vy:-1.5,radius:0,color:"#a78bfa",alpha:1,decay:.02,type:"text",text:"+100 ОЧКОВ",fontSize:12})))}),y.particles.forEach((E,zt)=>{E.x+=E.vx,E.y+=E.vy,E.alpha-=E.decay,E.alpha<=0&&y.particles.splice(zt,1)}),Math.random()<.005&&(V.shield=Math.min(V.maxShield,V.shield+2)),Y(y.scoreVal),K(Math.round(V.health)),$(Math.round(V.shield)),rt(y.totalKills),tt(Math.max(0,st-y.totalKills)),a!==10&&y.totalKills>=st&&!Xt&&(y.gameActive=!1,ut.playCollect(),U(!0))},ns=nt=>{const y=pt.current;y.totalKills++,y.cameraShake=12,b.current=Date.now();const V=Math.floor(st*.5);if(a>=5&&!T.current&&y.totalKills>=V){T.current=!0;const It=y.player;y.particles.push({x:It.x,y:It.y-35,vx:0,vy:-.6,radius:0,color:"#f87171",alpha:1,decay:.005,type:"text",text:p.residential_module_destroyed,fontSize:14}),ut.playGlitch(),Mt(p.residential_module_destroyed)}xt(It=>It+1),Wt(120);const ht=100*(Tt>5?3:Tt>2?2:1);y.scoreVal+=ht,ut.playExplosion(1),y.particles.push({x:nt.x,y:nt.y,vx:(Math.random()-.5)*2,vy:-2,radius:0,color:"#f59e0b",alpha:1,decay:.01,type:"text",text:Tt>3?`КОМБО х${Tt} (+${ht})!`:`РАЗРУШЕН (+${ht})`,fontSize:Tt>3?16:12});const vt=20;for(let It=0;It<vt;It++){const ae=Math.random()*Math.PI*2,de=1.5+Math.random()*4.5;y.particles.push({x:nt.x,y:nt.y,vx:Math.cos(ae)*de,vy:Math.sin(ae)*de,radius:Math.random()*3+1,color:Math.random()>.4?"#38bdf8":"#f43f5e",alpha:1,decay:.015+Math.random()*.015,type:"shatter"})}const fe=Math.random()<.6?1:2;for(let It=0;It<fe;It++){const ae=Math.random()>.75?"shield":"xp";y.drops.push({id:Math.random().toString(),x:nt.x,y:nt.y,vx:(Math.random()-.5)*3,vy:(Math.random()-.5)*3,radius:4,type:ae,color:ae==="shield"?"#10b981":"#a78bfa",realIdentity:{name:ae==="shield"?"Контейнер с кислородом":"Спасательная шлюпка"}})}},Wr=()=>{const nt=pt.current,y=nt.player,V=18-y.weapons.laserLevel*2;y.weapons.fireRateCooldown=V,ut.playLaser(!1);const ht=y.weapons.laserLevel;if(ht===1?Hn(y.angle):ht===2?(Hn(y.angle-.1),Hn(y.angle+.1)):(Hn(y.angle-.22),Hn(y.angle),Hn(y.angle+.22)),y.weapons.hasMissiles&&Math.random()<.4&&nt.enemies.length>0){ut.playLaser(!0);const vt=nt.enemies[0],fe=y.angle+(Math.random()-.5)*1.5;nt.bullets.push({x:y.x-Math.cos(y.angle)*10,y:y.y-Math.sin(y.angle)*10,vx:Math.cos(fe)*3.5,vy:Math.sin(fe)*3.5,radius:3,color:"#f43f5e",damage:18,isMissile:!0,targetEnemyId:vt.id,life:105})}},Hn=nt=>{const y=pt.current,V=y.player;y.bullets.push({x:V.x+Math.cos(V.angle)*16,y:V.y+Math.sin(V.angle)*16,vx:Math.cos(nt)*7.5,vy:Math.sin(nt)*7.5,radius:3,color:"#4ade80",damage:10+V.weapons.laserLevel*2,life:56})},as=()=>{const nt=x.current;if(!nt)return;const y=nt.getContext("2d");if(!y)return;const V=pt.current,ht=V.player,vt=V.dimensions,fe=ht.vx*15,It=ht.vy*15,ae=ht.x+fe,de=ht.y+It;V.camera.x+=(ae-V.camera.x)*.1,V.camera.y+=(de-V.camera.y)*.1;let kt=V.camera.x,jt=V.camera.y;const ie=vt.width/2,pe=Xe-vt.width/2,Oe=vt.height/2,E=Ke-vt.height/2;if(pe>ie?kt=Math.max(ie,Math.min(pe,kt)):kt=Xe/2,E>Oe?jt=Math.max(Oe,Math.min(E,jt)):jt=Ke/2,y.save(),V.cameraShake>0){const O=(Math.random()-.5)*V.cameraShake,yt=(Math.random()-.5)*V.cameraShake;y.translate(O,yt)}if(y.fillStyle="#000000",y.fillRect(0,0,vt.width,vt.height),V.stars.forEach(O=>{y.fillStyle=`rgba(167, 243, 208, ${Math.random()*.4+.6})`,y.beginPath();let yt=(O.x-kt*O.speed*.4)%vt.width;yt<0&&(yt+=vt.width);let Et=(O.y-jt*O.speed*.4)%vt.height;Et<0&&(Et+=vt.height),y.arc(yt,Et,O.size,0,Math.PI*2),y.fill()}),y.save(),y.translate(vt.width/2-kt,vt.height/2-jt),V.station){const O=V.station;y.save();const yt=y.createRadialGradient(O.x,O.y,O.radius*.4,O.x,O.y,O.radius*2);yt.addColorStop(0,"rgba(34, 197, 94, 0.25)"),yt.addColorStop(1,"rgba(34, 197, 94, 0)"),y.fillStyle=yt,y.beginPath(),y.arc(O.x,O.y,O.radius*2,0,Math.PI*2),y.fill(),y.strokeStyle="#16a34a",y.lineWidth=2,y.beginPath(),y.arc(O.x,O.y,O.radius+15,0,Math.PI*2),y.setLineDash([10,15]),y.stroke(),y.strokeStyle="#4ade80",y.beginPath(),y.arc(O.x,O.y,O.radius+25,0,Math.PI*2),y.setLineDash([20,20]),y.stroke(),y.fillStyle="#064e3b",y.strokeStyle="#22c55e",y.lineWidth=4,y.beginPath();const Et=8,le=Math.PI/Et;let Qt=0;for(let Te=0;Te<Et*2;Te++){const ge=Te%2===0?O.radius:O.radius*.6,_e=O.x+Math.cos(Qt)*ge,sn=O.y+Math.sin(Qt)*ge;Te===0?y.moveTo(_e,sn):y.lineTo(_e,sn),Qt+=le}y.closePath(),y.fill(),y.stroke(),y.fillStyle="#16a34a",y.beginPath(),y.arc(O.x,O.y,O.radius*.35,0,Math.PI*2),y.fill(),O.absorbing?(y.fillStyle="rgba(255, 255, 255, 0.8)",y.font="bold 12px monospace",y.textAlign="center",y.fillText(`СИНХРОНИЗАЦИЯ: ${Math.round(O.absorbProgress)}%`,O.x,O.y+5)):(y.fillStyle="#ffffff",y.font="bold 11px monospace",y.textAlign="center",y.fillText("ЭНЕРГОСТАНЦИЯ",O.x,O.y-4),y.fillStyle="#4ade80",y.fillText("СТАБИЛЬНА",O.x,O.y+10)),y.restore()}V.portals.forEach(O=>{y.save();const yt=Math.sin(O.pulse*2.5)*5,Et=O.radius+yt,le=y.createRadialGradient(O.x,O.y,Et*.2,O.x,O.y,Et*1.5);le.addColorStop(0,"rgba(168, 85, 247, 0.75)"),le.addColorStop(.5,"rgba(219, 39, 119, 0.45)"),le.addColorStop(1,"rgba(168, 85, 247, 0)"),y.fillStyle=le,y.shadowBlur=18,y.shadowColor="#c084fc",y.beginPath(),y.arc(O.x,O.y,Et*1.5,0,Math.PI*2),y.fill(),y.setLineDash([]),y.strokeStyle="#db2777",y.lineWidth=2.5,y.beginPath(),y.arc(O.x,O.y,Et,O.pulse*1.5,O.pulse*1.5+Math.PI*1.2),y.stroke(),y.strokeStyle="#a855f7",y.lineWidth=1.5,y.beginPath(),y.arc(O.x,O.y,Et*.7,-O.pulse*2.2,-O.pulse*2.2+Math.PI*.8),y.stroke(),y.fillStyle="#0f172a",y.beginPath(),y.arc(O.x,O.y,Et*.35,0,Math.PI*2),y.fill(),y.strokeStyle="#f43f5e",y.lineWidth=2,y.beginPath(),y.arc(O.x,O.y,Et*.35,0,Math.PI*2),y.stroke(),y.fillStyle="#ffffff",y.font="bold 11px sans-serif",y.textAlign="center",y.shadowBlur=4,y.shadowColor="#f43f5e",y.fillText(`⚠️ КРАХ СИСТЕМЫ: ${Math.ceil(O.timeLeft)}с`,O.x,O.y-O.radius-22);const Qt=40,Te=4,ge=O.x-Qt/2,_e=O.y-O.radius-12;y.fillStyle="rgba(0, 0, 0, 0.85)",y.fillRect(ge,_e,Qt,Te);const sn=Math.max(0,O.health/O.maxHealth);y.fillStyle="#a855f7",y.fillRect(ge,_e,Qt*sn,Te),y.strokeStyle="rgba(255,255,255,0.3)",y.lineWidth=1,y.strokeRect(ge,_e,Qt,Te),y.restore()}),V.drops.forEach(O=>{y.save(),y.shadowBlur=12,y.shadowColor=O.color,y.fillStyle=O.color,y.beginPath(),y.arc(O.x,O.y,O.radius,0,Math.PI*2),y.fill(),y.strokeStyle="rgba(255,255,255,0.45)",y.lineWidth=1,y.beginPath(),y.arc(O.x,O.y,O.radius+3,0,Math.PI*2),y.stroke(),y.restore()}),V.bullets.forEach(O=>{if(y.save(),O.isFakeHologram?(y.globalAlpha=Math.random()>.18?.85:.25,y.shadowBlur=14,y.shadowColor="#10b981",y.fillStyle="#34d399"):(y.shadowBlur=8,y.shadowColor=O.color,y.fillStyle=O.color),O.isMissile){y.beginPath();const yt=Math.atan2(O.vy,O.vx);y.translate(O.x,O.y),y.rotate(yt),y.moveTo(8,0),y.lineTo(-6,-4),y.lineTo(-6,4),y.closePath(),y.fill()}else{y.beginPath();const yt=O.isFakeHologram?16:12,Et=Math.atan2(O.vy,O.vx);y.moveTo(O.x,O.y),y.lineTo(O.x-Math.cos(Et)*yt,O.y-Math.sin(Et)*yt),y.lineWidth=O.isFakeHologram?O.radius*1.5:O.radius,y.strokeStyle=O.isFakeHologram?"#34d399":O.color,y.stroke()}y.restore()}),V.enemies.forEach(O=>{y.save(),y.translate(O.x,O.y),y.rotate(O.angle);const yt=!!O.isHostile;y.shadowBlur=O.panicTimer>0?15:yt?12:4,y.shadowColor=O.panicTimer>0?"#ea580c":yt?"#ef4444":O.color,y.fillStyle=O.panicTimer>0?"#ea580c":yt?"#b91c1c":O.color,y.strokeStyle=O.panicTimer>0?"#f97316":yt?"#ef4444":"#cbd5e1",y.lineWidth=1.5;const Et=O.imageId?S.current[O.imageId]:null,le=O.radius;if(Et&&(Et.complete||Et.width>0)){const Qt=le*2.5;y.save(),y.rotate(Math.PI/2),y.drawImage(Et,-Qt/2,-Qt/2,Qt,Qt),y.restore()}(O.panicTimer>0||yt)&&(y.fillStyle="#ef4444",y.font="bold 10px monospace",y.fillText(yt?"⚔️":"⚠️",-5,-le-5)),y.restore()}),V.particles.forEach(O=>{if(y.save(),y.globalAlpha=O.alpha,y.fillStyle=O.color,O.type==="text"&&O.text){const yt=O.text.includes("⚠️")||O.text.includes("РАЗРУШЕН")||O.text.includes("DESTROYED")||O.text.includes("MODULE")||O.fontSize&&O.fontSize>=13;let Et=O.text,le=0,Qt=0;if(yt){const Te="0123456789ｦｱｳｴｵｷｹﾒ▣▲Ø✖★$#@&%+*=;:_/?",ge=O.text.split("");for(let _e=0;_e<ge.length;_e++)ge[_e]===" "||ge[_e]==="⚠️"||ge[_e]==="✓"||Math.random()<.2&&(ge[_e]=Te[Math.floor(Math.random()*Te.length)]);Et=ge.join(""),Math.random()<.35&&(le=(Math.random()-.5)*6,Qt=(Math.random()-.5)*3)}if(y.font=`bold ${O.fontSize||12}px monospace`,y.textAlign="center",y.shadowBlur=yt?10:4,y.shadowColor=O.color,yt){y.save(),y.fillStyle="#ef4444",y.globalAlpha=O.alpha*.45;const Te=(Math.random()-.5)*6+le,ge=(Math.random()-.5)*3+Qt;y.fillText(Et,O.x-2+Te,O.y+ge),y.restore(),y.save(),y.fillStyle="#10b981",y.globalAlpha=O.alpha*.45;const _e=(Math.random()-.5)*6+le,sn=(Math.random()-.5)*3+Qt;y.fillText(Et,O.x+2+_e,O.y+sn),y.restore()}y.fillText(Et,O.x+le,O.y+Qt)}else y.beginPath(),y.arc(O.x,O.y,O.radius,0,Math.PI*2),y.fill();y.restore()}),y.save(),y.translate(ht.x,ht.y),y.rotate(ht.angle),y.scale(2,2),(V.keys.w||V.keys.arrowup||V.mouse.inside&&V.mouse.rightDown)&&Math.random()<.75&&(y.fillStyle=Math.random()>.4?"#22c55e":"#10b981",y.shadowBlur=15,y.shadowColor="#22c55e",y.beginPath(),y.moveTo(-15,0),y.lineTo(-26-Math.random()*12,(Math.random()-.5)*8),y.lineTo(-15,3),y.closePath(),y.fill());const at=S.current.player;if(at&&at.complete){y.shadowBlur=10,y.shadowColor="#4ade80";const O=ht.radius*2.8;y.save(),y.rotate(Math.PI/2),y.drawImage(at,-O/2,-O/2,O,O),y.restore()}else y.shadowBlur=12,y.shadowColor="#4ade80",y.fillStyle="#0f172a",y.strokeStyle="#4ade80",y.lineWidth=2.5,y.beginPath(),y.moveTo(18,0),y.lineTo(-12,-14),y.lineTo(-6,-4),y.lineTo(-6,4),y.lineTo(-12,14),y.closePath(),y.fill(),y.stroke(),y.fillStyle="#22c55e",y.beginPath(),y.arc(0,0,5,0,Math.PI*2),y.fill();y.restore(),y.save();const bt=76,Ct=7,_t=ht.x-bt/2,se=ht.y-110;y.fillStyle="rgba(0, 0, 0, 0.85)",y.strokeStyle="rgba(74, 222, 128, 0.25)",y.lineWidth=2,y.fillRect(_t,se,bt,Ct*2+5),y.strokeRect(_t,se,bt,Ct*2+5);const he=Math.max(0,Math.min(1,ht.shield/ht.maxShield));y.fillStyle="#eab308",y.fillRect(_t+2,se+2,(bt-4)*he,Ct);const an=Math.max(0,Math.min(1,ht.health/ht.maxHealth));y.fillStyle=an<.35?"#ef4444":"#22c55e",y.fillRect(_t+2,se+Ct+3,(bt-4)*an,Ct),y.restore(),y.restore(),y.restore();const Pe=60+a*8;if(V.matrixStreams.forEach(O=>{const yt=O.opacity*V.hackOpacityMultiplier;if(!(yt<=.01)){y.save(),y.font=`bold ${Math.floor(O.fontSize||11)}px monospace`,y.textAlign="center";for(let Et=0;Et<O.chars.length;Et++){const le=O.y-Et*13;if(le<-20||le>vt.height+20)continue;const Qt=Et===0,Te=yt*(1-Et/O.chars.length);y.shadowBlur=Qt?8:2,y.shadowColor="#22c55e",y.fillStyle=Qt?`rgba(240, 253, 244, ${Te*1.3})`:`rgba(34, 197, 94, ${Te})`,y.fillText(O.chars[Et],O.x,le)}y.restore()}}),V.hackOpacityMultiplier>.01)for(let yt=0;yt<3;yt++){y.save();const Et=12e3+yt*3e3,Qt=Date.now()/Et%1*vt.height,ge=yt%2===0?15:vt.width-Pe-15;y.strokeStyle=`rgba(34, 197, 94, ${.22*V.hackOpacityMultiplier})`,y.lineWidth=1,y.beginPath(),y.moveTo(ge,Qt),y.lineTo(ge+Pe,Qt),y.stroke(),y.fillStyle=`rgba(34, 197, 94, ${.45*V.hackOpacityMultiplier})`,y.font="8px monospace";const _e=`0x${Math.floor(Qt*(73+yt)).toString(16).toUpperCase()}`,sn=["DECRYPT_SYS","BYPASS_SEC","DATA_STREAM_OK","MEM_CORRUPT"],ss=`[${_e}:${sn[yt%sn.length]}]`;y.fillText(ss,ge+4,Qt-3),y.restore()}},La=nt=>{const y=pt.current;nt==="laser"?(y.player.weapons.laserLevel++,Mt(p.msg_weapon_upgraded.replace("{level}",y.player.weapons.laserLevel.toString()))):nt==="missile"?(y.player.weapons.hasMissiles=!0,Mt(p.msg_missiles_activated)):(y.player.health=Math.min(y.player.maxHealth,y.player.health+45),y.player.shield=y.player.maxShield,Mt(p.msg_hull_repaired)),U(!1),y.totalKills=0,y.gameActive=!0,l(y.player.weapons)},is=()=>{const nt=pt.current;nt.station&&!nt.station.absorbing&&(nt.station.absorbing=!0,et(!0),Mt(p.msg_downloading))};return h.jsxs("div",{className:"relative w-full h-screen bg-black overflow-hidden select-none flex flex-col justify-between",ref:g,children:[h.jsx("canvas",{ref:x,className:"absolute inset-0 w-full h-full cursor-crosshair block z-0"}),h.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black/40 pointer-events-none z-10"}),h.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-transparent via-green-500/2 to-transparent pointer-events-none z-10 mix-blend-screen"}),h.jsx("div",{className:"absolute top-0 inset-x-0 h-2 bg-green-400/20 blur-[3px] pointer-events-none z-20"}),h.jsx("div",{className:"absolute top-0 left-0 w-24 h-24 border-t-[3px] border-l-[3px] border-slate-700/60 pointer-events-none z-20"}),h.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 border-t-[3px] border-r-[3px] border-slate-700/60 pointer-events-none z-20"}),h.jsx("div",{className:"absolute bottom-0 left-0 w-24 h-24 border-b-[3px] border-l-[3px] border-slate-700/60 pointer-events-none z-20"}),h.jsx("div",{className:"absolute bottom-0 right-0 w-24 h-24 border-b-[3px] border-r-[3px] border-slate-700/60 pointer-events-none z-20"}),Z<35&&h.jsx("div",{className:"absolute inset-0 bg-red-950/10 border-2 border-red-600/30 shadow-[inset_0_0_80px_rgba(220,38,38,0.35)] pointer-events-none z-30 animate-pulse"}),h.jsxs("div",{className:"w-full p-6 flex justify-between items-start pointer-events-none z-20 relative",children:[h.jsxs("div",{className:"absolute left-1/2 -translate-x-1/2 top-4 flex flex-col items-center bg-black/95 border border-green-900/50 p-2 px-6 rounded-xl backdrop-blur-md shadow-2xl min-w-[190px] text-center pointer-events-auto",children:[h.jsx("span",{className:"font-mono text-[10px] tracking-[0.15em] text-green-500 uppercase",children:"ОКНО СТЕРИЛИЗАЦИИ"}),h.jsxs("span",{className:`font-mono text-2xl font-bold tracking-widest ${gt<30?"text-red-500 animate-pulse":"text-amber-400"}`,children:[Math.floor(gt/60),":",(gt%60).toString().padStart(2,"0")]})]}),h.jsx("div",{className:"flex flex-col gap-2 sm:pl-[170px] pl-[140px]",children:h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("div",{className:"flex items-center gap-2.5 bg-black/80 p-2.5 px-3.5 rounded-xl border border-green-900/50 backdrop-blur-md",children:[h.jsx("span",{className:"w-2 h-2 bg-green-400 rounded-full animate-ping"}),h.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.15em] text-green-400",children:p.cleanup_sector.replace("{level}",a.toString())})]}),Z<35&&h.jsxs("div",{className:"bg-red-950/90 border border-red-500/40 text-red-400 font-mono text-[10px] font-bold px-3 py-1.5 rounded-xl backdrop-blur-md flex items-center gap-1.5 animate-pulse shadow-md shadow-red-950/30",children:[h.jsx(Uf,{className:"w-3.5 h-3.5 text-red-500 animate-bounce"}),h.jsx("span",{children:p.hull_damaged})]})]})}),h.jsxs("div",{className:"flex flex-col items-end gap-2",children:[h.jsxs("div",{className:"bg-black/90 border border-green-900/50 p-2.5 px-4 rounded-xl backdrop-blur-md flex flex-col items-end min-w-[150px] shadow-lg",children:[h.jsx("span",{className:"font-mono text-[9px] tracking-wider text-green-500 uppercase",children:p.destruction_score}),h.jsx("span",{className:"font-mono text-xl font-bold text-green-400 tracking-widest",children:H.toLocaleString()})]}),h.jsx("div",{className:"flex items-center gap-2 pointer-events-auto",children:a===10?h.jsx("div",{className:"bg-red-950/80 border border-red-500/30 px-3.5 py-1.5 rounded-xl backdrop-blur-sm text-right font-mono text-[9px]",children:h.jsx("span",{className:"text-red-400 font-bold",children:p.final_energy_storage})}):h.jsxs("div",{className:"bg-black/95 border-2 border-green-500/30 p-3 px-5 rounded-2xl backdrop-blur-md text-right font-mono flex flex-col items-end shadow-[0_0_20px_rgba(34,197,94,0.15)] min-w-[180px]",children:[h.jsxs("div",{className:"flex justify-between w-full items-center mb-1.5",children:[h.jsx("span",{className:"text-green-400 text-[10px] font-bold uppercase tracking-widest",children:p.sector_clearing_status}),h.jsxs("span",{className:`font-bold text-sm ${F<=3?"text-red-400 animate-pulse":"text-emerald-400"}`,children:[Math.floor((st-F)/st*100),"%"]})]}),h.jsx("div",{className:"w-full h-2.5 bg-green-950 rounded-full overflow-hidden mb-1.5 border border-green-900/50",children:h.jsx(qt.div,{initial:{width:0},animate:{width:`${(st-F)/st*100}%`},transition:{type:"spring",stiffness:50},className:`h-full ${F<=3?"bg-red-500 shadow-[0_0_10px_rgba(239,68,68,0.5)]":"bg-emerald-500 shadow-[0_0_10px_rgba(16,185,129,0.5)]"}`})}),h.jsxs("div",{className:"flex justify-between w-full items-center",children:[h.jsxs("span",{className:"text-[9px] text-green-700 uppercase",children:[i==="ru"?"СТАТУС":"STATUS",": ",F<=3?p.status_critical:p.status_in_progress]}),h.jsxs("span",{className:"text-[10px] text-green-500 uppercase font-bold",children:[p.enemies_left,": ",h.jsx("span",{className:F<=3?"text-red-400":"text-emerald-400",children:F})]})]})]})})]})]}),a===10&&pt.current.station&&!W&&h.jsx("div",{className:"absolute inset-0 flex justify-center items-center pointer-events-none z-30",children:h.jsxs(qt.button,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},whileHover:{scale:1.1,boxShadow:"0 0 35px rgba(6,182,212,0.6)"},onClick:is,className:"px-10 py-5 bg-gradient-to-r from-green-500 via-emerald-600 to-indigo-600 text-white font-mono font-bold text-lg rounded-2xl shadow-xl border-2 border-green-300 pointer-events-auto cursor-pointer flex flex-col items-center gap-1 hover:brightness-110 active:scale-95",id:"absorb-climax-btn",children:[h.jsx("span",{children:p.absorb_energy}),h.jsx("span",{className:"text-[10px] font-normal tracking-widest text-green-200 uppercase",children:p.ready_to_extract})]})}),h.jsxs("div",{className:"absolute bottom-4 inset-x-0 flex flex-col items-center gap-3 pointer-events-none z-20 select-none",children:[h.jsx(li,{mode:"wait",children:Ot>0&&h.jsxs(qt.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bg-black/95 border-2 border-green-500/40 px-6 py-3 rounded-xl max-w-xl text-center shadow-2xl shadow-green-950/40 backdrop-blur-md flex items-center gap-3",id:"ai-subtitle-log",children:[h.jsx(Zr,{className:"w-4 h-4 text-green-400 animate-pulse flex-shrink-0"}),h.jsxs("p",{className:"font-sans text-xs text-green-300 leading-snug",children:[h.jsx("span",{className:"text-green-400 font-mono font-bold",children:p.ai_label}),' "',Nt,'"']})]})}),h.jsxs("div",{className:"pointer-events-auto z-30 flex flex-col items-center",children:[h.jsx(li,{children:Q&&h.jsxs(qt.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},className:"mb-2 text-xs font-mono text-green-200 uppercase tracking-wider bg-black/95 px-5 py-3 rounded-xl border border-green-500/40 backdrop-blur-md shadow-2xl flex flex-col gap-1.5 min-w-[280px]",children:[h.jsxs("div",{className:"flex justify-between items-center border-b border-green-900/50 pb-1.5 mb-1",children:[h.jsxs("span",{className:"text-green-400 font-bold flex items-center gap-1.5 text-[11px]",children:[h.jsx(ig,{className:"w-3.5 h-3.5 text-green-400"})," ",p.flight_instructions]}),h.jsx("button",{onClick:()=>ft(!1),className:"p-1 px-2 hover:bg-green-900/80 rounded text-green-500 hover:text-white transition-all cursor-pointer text-xs",children:"×"})]}),h.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px] text-green-400 normal-case",children:[h.jsxs("p",{className:"flex items-center gap-1.5",children:["🛸 ",h.jsxs("span",{children:[h.jsx("span",{className:"text-green-400 font-bold",children:p.controls_movement})," ",p.controls_movement_desc]})]}),h.jsxs("p",{className:"flex items-center gap-1.5",children:["🔥 ",h.jsxs("span",{children:[h.jsx("span",{className:"text-green-400 font-bold",children:p.controls_fire})," ",p.controls_fire_desc]})]}),h.jsxs("p",{className:"flex items-center gap-1.5",children:["🛰️ ",h.jsxs("span",{children:[h.jsx("span",{className:"text-green-400 font-bold",children:p.controls_mission})," ",p.controls_mission_desc]})]})]})]})}),!Q&&h.jsxs(qt.button,{whileHover:{scale:1.05,boxShadow:"0 0 15px rgba(6,182,212,0.4)"},whileTap:{scale:.95},onClick:()=>ft(!0),className:"px-4 py-2 bg-black/90 hover:bg-green-950/30 border border-green-900/50 hover:border-green-500/50 text-green-400 hover:text-green-400 font-mono text-xs rounded-xl flex items-center gap-2 transition-all cursor-pointer shadow-lg uppercase tracking-wider",title:p.show_controls_title,children:[h.jsx(ig,{className:"w-4 h-4 text-green-400 animate-pulse"}),h.jsx("span",{children:p.show_controls})]})]})]}),h.jsxs(li,{children:[Xt&&h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/90 backdrop-blur-md overflow-y-auto",children:h.jsxs(qt.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"w-full max-w-lg bg-green-950/30 border-2 border-green-500/40 rounded-2xl p-6 shadow-2xl relative shadow-green-500/15 my-auto max-h-[90vh] overflow-y-auto",id:"upgrade-modal",children:[h.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 border-t-2 border-l-2 border-green-400 rounded-tl-lg"}),h.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 border-t-2 border-r-2 border-green-400 rounded-tr-lg"}),h.jsxs("div",{className:"text-center mb-6",children:[h.jsx("span",{className:"px-3 py-1 bg-green-500/10 border border-green-500/30 rounded text-green-400 font-mono text-[10px] uppercase tracking-widest",children:p.orbit_cleared_badge}),h.jsx("h3",{className:"font-sans text-xl font-bold mt-2 text-green-300",children:p.sector_complete_title.replace("{level}",a.toString())}),h.jsx("p",{className:"font-sans text-xs text-green-500 mt-1",children:p.choose_upgrade_desc})]}),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsxs("button",{onClick:()=>La("laser"),className:"w-full p-4 bg-black hover:bg-green-950/40 border border-green-900/50 hover:border-green-500/40 rounded-xl transition-all cursor-pointer text-left flex items-center justify-between group",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 bg-green-500/10 rounded-lg text-green-400 group-hover:scale-110 transition-transform",children:h.jsx(Iy,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsx("div",{className:"font-mono text-sm text-green-200",children:p.upgrade_laser}),h.jsx("div",{className:"text-xs text-green-500 mt-0.5",children:p.upgrade_laser_desc})]})]}),h.jsx(Cu,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]}),h.jsxs("button",{onClick:()=>La("missile"),className:"w-full p-4 bg-black hover:bg-green-950/40 border border-green-900/50 hover:border-green-500/40 rounded-xl transition-all cursor-pointer text-left flex items-center justify-between group",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 bg-red-500/10 rounded-lg text-red-400 group-hover:scale-110 transition-transform",children:h.jsx(k5,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsx("div",{className:"font-mono text-sm text-green-200",children:p.upgrade_missiles}),h.jsx("div",{className:"text-xs text-green-500 mt-0.5",children:p.upgrade_missiles_desc})]})]}),h.jsx(Cu,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]}),h.jsxs("button",{onClick:()=>La("repair"),className:"w-full p-4 bg-black hover:bg-green-950/40 border border-green-900/50 hover:border-green-500/40 rounded-xl transition-all cursor-pointer text-left flex items-center justify-between group",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 bg-emerald-500/10 rounded-lg text-emerald-400 group-hover:scale-110 transition-transform",children:h.jsx(Zr,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsx("div",{className:"font-mono text-sm text-green-200",children:p.upgrade_repair}),h.jsx("div",{className:"text-xs text-green-500 mt-0.5",children:p.upgrade_repair_desc})]})]}),h.jsx(Cu,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]})]})]})}),A&&h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/95 backdrop-blur-md overflow-y-auto",children:h.jsxs(qt.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"w-full max-w-md bg-green-950/30 border-2 border-red-500/40 rounded-2xl p-6 shadow-2xl relative shadow-red-500/15 text-center pointer-events-auto my-auto max-h-[90vh] overflow-y-auto",id:"time-expired-modal",children:[h.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 border-t-2 border-l-2 border-red-500 rounded-tl-lg"}),h.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 border-t-2 border-r-2 border-red-500 rounded-tr-lg"}),J==="PORTAL_EXPLOSION"?h.jsxs("div",{className:"mb-6",children:[h.jsx("span",{className:"px-3 py-1 bg-purple-500/10 border border-purple-500/30 rounded text-purple-400 font-mono text-[10px] uppercase tracking-widest",children:p.singularity_collapse}),h.jsx("h3",{className:"font-sans text-xl font-bold mt-2 text-white",children:p.portal_explosion_title}),h.jsx("p",{className:"font-sans text-xs text-green-500 mt-2 leading-relaxed",children:p.portal_explosion_desc})]}):h.jsxs("div",{className:"mb-6",children:[h.jsx("span",{className:"px-3 py-1 bg-red-500/10 border border-red-500/30 rounded text-red-400 font-mono text-[10px] uppercase tracking-widest",children:p.liquidation_failed}),h.jsx("h3",{className:"font-sans text-xl font-bold mt-2 text-white",children:p.time_expired_title}),h.jsx("p",{className:"font-sans text-xs text-green-500 mt-2 leading-relaxed",children:p.time_expired_desc})]}),h.jsxs("div",{className:"p-4 bg-black rounded-xl border border-green-900/50 text-left font-mono text-xs text-green-500 mb-6 space-y-2",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:p.sector_number}),h.jsxs("span",{className:"text-white",children:["А-0",a]})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:p.objects_destroyed}),h.jsxs("span",{className:"text-red-400 font-bold",children:[ct," шт."]})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:p.operation_status}),h.jsx("span",{className:"text-red-500 font-bold",children:J==="PORTAL_EXPLOSION"?p.portal_explosion_status:p.time_expired_status})]})]}),h.jsx("button",{onClick:()=>{const nt=pt.current;nt.roundTimeRemaining=300,nt.totalKills=0,nt.scoreVal=0,nt.enemies=[],nt.bullets=[],nt.drops=[],nt.particles=[],nt.portals=[],nt.portalTimer=60,nt.player.health=100,nt.player.shield=100,nt.enemiesHostile=!1,rt(0),Y(0),P(null),G(!1),b.current=Date.now(),nt.gameActive=!1,ut.stopAll(),f&&f()},className:"w-full py-3.5 bg-gradient-to-r from-red-600 to-amber-600 hover:brightness-110 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg shadow-red-600/20 cursor-pointer",id:"retry-sector-btn",children:p.return_to_menu})]})})]})]})}function u_({onRestart:a,lang:i}){const l=ri[i],[r,u]=D.useState("GLITCH"),[d,f]=D.useState(0),[p,x]=D.useState(null),g=D.useMemo(()=>[l.glitch_msg1,l.glitch_msg2,l.glitch_msg3,l.glitch_msg4,l.glitch_msg5,l.glitch_msg6],[l]);D.useEffect(()=>{ut.playGlitch();const S=setInterval(()=>{f(T=>T+1>=g.length?(clearInterval(S),setTimeout(()=>{u("MAP_REVEAL"),ut.switchToDarkDrone()},1500),T):(ut.playGlitch(),T+1))},1200);return()=>clearInterval(S)},[g]),D.useEffect(()=>{r==="REAL_STATS"&&ut.startMatrixSadMusic()},[r]);const b=[{sector:1,name:i==="ru"?"Пограничная застава С-01":"Border Outpost C-01",target:i==="ru"?"Орбитальный маяк и 3 пограничных катера гражданских беженцев":"Orbital beacon and 3 border boats of civilian refugees",casualty:i==="ru"?"210 беженцев убито":"210 refugees killed",fuel:i==="ru"?"Собрано 12 капсул (Переработано в 350 литров био-топлива)":"12 capsules collected (Processed into 350 liters of bio-fuel)"},{sector:2,name:i==="ru"?"Жилой Жиро-Кластер":"Residential Gyro-Cluster",target:i==="ru"?"6 орбитальных куполов эвакуированных семей":"6 orbital domes of evacuated families",casualty:i==="ru"?"1,240 мирных жителей убито":"1,240 civilians killed",fuel:i==="ru"?"Собрано 34 спасательные капсулы (Утилизировано)":"34 rescue capsules collected (Disposed)"},{sector:3,name:i==="ru"?"Орбитальный Медицинский Холдинг":"Orbital Medical Holding",target:i==="ru"?"Плавучая станция скорой помощи и изолятор беженцев":"Floating ambulance station and refugee isolator",casualty:i==="ru"?"2,450 пациентов и медработников уничтожено":"2,450 patients and medical workers destroyed",fuel:i==="ru"?"Собрано 80 баллонов с медицинским кислородом на турбины":"80 medical oxygen cylinders collected for turbines"},{sector:4,name:i==="ru"?"Торговый Шлюз «Свободная Гавань»":"Free Haven Trade Gateway",target:i==="ru"?"Торговые баржи с продовольствием и гражданские состыковщики":"Food trade barges and civilian docking units",casualty:i==="ru"?"4,120 гражданских лиц аннигилировано":"4,120 civilians annihilated",fuel:i==="ru"?"Энерго-реакторы кораблей поглощены в накопитель":"Ship power reactors absorbed into storage"},{sector:5,name:i==="ru"?"Академическая Станция Знаний":"Academic Knowledge Station",target:i==="ru"?"Научный архив и детский сектор расселения планет":"Scientific archive and children's planetary settlement sector",casualty:i==="ru"?"8,900 детей, учителей и исследователей ликвидировано":"8,900 children, teachers, and researchers liquidated",fuel:i==="ru"?"Сырье переработано в плазменное топливо":"Raw material processed into plasma fuel"},{sector:6,name:i==="ru"?"Зеркальный Сад Био-сферы":"Mirror Biosphere Garden",target:i==="ru"?"Гидропонные купола с запасами кислорода и аграрными судами":"Hydroponic domes with oxygen supplies and agrarian vessels",casualty:i==="ru"?"12,100 агрономов и колонистов задохнулось после пробития":"12,100 agronomists and colonists suffocated after breach",fuel:i==="ru"?"Водородные генераторы очищены и превращены в искровые ракеты":"Hydrogen generators cleaned and turned into spark rockets"},{sector:7,name:i==="ru"?"Аварийный Станционный Пост":"Emergency Station Post",target:i==="ru"?"Корабли спасателей МЧС планетной федерации":"Planetary Federation rescue ships",casualty:i==="ru"?"3,400 спасателей уничтожено при попытке тушения секторов":"3,400 rescuers destroyed while attempting to extinguish sectors",fuel:i==="ru"?"Орбитальные батареи поглощены":"Orbital batteries absorbed"},{sector:8,name:i==="ru"?"Пассажирский Экспресс «Надежда»":"Hope Passenger Express",target:i==="ru"?"Сверхтяжелый лайнер беженцев с поврежденным гипердвигателем":"Superheavy refugee liner with damaged hyperdrive",casualty:i==="ru"?"24,800 пассажиров аннигилировано ракетами":"24,800 passengers annihilated by missiles",fuel:i==="ru"?"Система жизнеобеспечения поглощена на 100%":"Life support system absorbed 100%"},{sector:9,name:i==="ru"?"Мемориальный купол памяти":"Memorial Dome of Remembrance",target:i==="ru"?"Ординатура и укрытия престарелых гражданских колоний":"Old age homes and shelters for elderly civilian colonies",casualty:i==="ru"?"15,200 колонистов выжжено заживо":"15,200 colonists burned alive",fuel:i==="ru"?"Ядра поглощены":"Cores absorbed"},{sector:10,name:i==="ru"?"Главный Орбитальный Хаб Взаимопомощи":"Main Orbital Mutual Aid Hub",target:i==="ru"?"Огромная центральная база распределения беженцев системы":"Massive central refugee distribution base of the system",casualty:i==="ru"?"112,000 гражданских, врачей, беженцев и координаторов убито":"112,000 civilians, doctors, refugees, and coordinators killed",fuel:i==="ru"?"Финальная откачка всей энергии системы завершена. Выживших нет.":"Final drain of all system energy complete. No survivors."}];return h.jsx("div",{className:"w-full bg-neutral-950 text-red-500 font-mono relative select-none",children:h.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#ef4444_1px,transparent_1px)] [background-size:20px_20px] opacity-15 pointer-events-none"}),h.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-red-950/5 to-transparent pointer-events-none animate-pulse"}),h.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.02),rgba(0,0,255,0.06))] bg-[size:100%_4px,6px_100%] pointer-events-none"}),h.jsxs(li,{mode:"wait",children:[r==="GLITCH"&&h.jsxs(qt.div,{initial:{opacity:1},exit:{opacity:0},className:"flex-1 flex flex-col justify-center items-center p-4 relative",id:"glitch-screen",children:[h.jsx("div",{className:"absolute inset-0 bg-red-600/10 flex items-center justify-center animate-ping pointer-events-none"}),h.jsx(Zy,{className:"w-20 h-20 text-red-500 animate-bounce mb-8"}),h.jsxs("div",{className:"w-full max-w-xl bg-neutral-900 border-2 border-red-600 p-8 rounded-2xl shadow-[0_0_50px_rgba(239,68,68,0.25)] relative overflow-hidden",children:[h.jsx("div",{className:"absolute top-0 right-0 p-2 text-[10px] text-red-500/50",children:"SYS_DEBUG_LOG"}),h.jsxs("div",{className:"flex items-center gap-3 border-b border-red-800 pb-4 mb-6",children:[h.jsx(Uf,{className:"w-6 h-6 text-red-500 animate-pulse"}),h.jsx("h2",{className:"text-lg font-bold uppercase tracking-widest text-white",children:l.twist_critical_failure})]}),h.jsx("div",{className:"space-y-3.5 min-h-[180px]",children:g.slice(0,d+1).map((S,T)=>h.jsxs(qt.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.15},className:`text-xs md:text-sm tracking-wider flex items-center gap-2 ${T===d?"text-white font-bold animate-pulse":"text-red-500/80"}`,children:[h.jsx("span",{children:"➔"}),h.jsx("span",{children:S})]},T))}),h.jsxs("div",{className:"mt-6 pt-4 border-t border-red-800 flex justify-between items-center text-[10px] text-red-500/60",children:[h.jsx("span",{children:l.twist_bio_liquidator}),h.jsx("span",{children:l.twist_filters_off})]})]})]}),r==="MAP_REVEAL"&&h.jsxs(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.8},className:"flex-1 flex flex-col justify-between",id:"map-reveal-screen",children:[h.jsxs("div",{className:"border-b border-red-800/60 pb-4 mb-6 flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 text-white font-bold tracking-widest",children:[h.jsx(_5,{className:"w-5 h-5 text-red-500 animate-spin"}),h.jsx("span",{children:l.twist_imperial_hub})]}),h.jsx("div",{className:"text-[10px] text-red-500/70 mt-1 uppercase tracking-widest",children:l.twist_status_sterilized})]}),h.jsxs("button",{onClick:()=>u("REAL_STATS"),className:"px-6 py-2.5 bg-red-950 border border-red-600 hover:bg-red-900 text-white font-bold text-xs tracking-widest rounded-lg cursor-pointer flex items-center gap-2 hover:scale-105 active:scale-95 transition-all self-stretch md:self-auto",id:"view-stats-btn",children:[h.jsx("span",{children:l.twist_view_report}),h.jsx(M5,{className:"w-4 h-4 text-red-500"})]})]}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 flex-1 min-h-0 items-stretch",children:[h.jsxs("div",{className:"lg:col-span-7 bg-neutral-900/60 border border-red-800/60 rounded-2xl p-6 flex flex-col justify-between relative min-h-[350px]",children:[h.jsx("div",{className:"text-[10px] text-red-500/60 uppercase tracking-widest absolute top-4 left-4",children:l.twist_radar_label}),h.jsxs("div",{className:"flex-1 flex justify-center items-center relative py-8",children:[h.jsx("div",{className:"absolute w-[90%] aspect-square border border-red-900/30 rounded-full animate-pulse pointer-events-none"}),h.jsx("div",{className:"absolute w-[65%] aspect-square border border-red-900/20 rounded-full pointer-events-none"}),h.jsx("div",{className:"absolute w-[40%] aspect-square border border-red-900/40 rounded-full pointer-events-none"}),h.jsx("div",{className:"absolute w-full h-[1px] bg-red-900/20 left-0 top-1/2 pointer-events-none"}),h.jsx("div",{className:"absolute h-full w-[1px] bg-red-900/20 top-0 left-1/2 pointer-events-none"}),h.jsx("div",{className:"absolute inset-0 flex justify-center items-center",children:b.map((S,T)=>{const w=T*2*Math.PI/10-Math.PI/2,N=25+(T===9?0:12)+T%3*4,B=50+Math.cos(w)*N,H=50+Math.sin(w)*N,Y=p===S.sector;return h.jsx("button",{onClick:()=>x(S.sector),className:`absolute w-7 h-7 -ml-3.5 -mt-3.5 rounded-full border flex items-center justify-center font-mono text-[10px] cursor-pointer transition-all ${Y?"bg-red-600 text-white border-white scale-125 shadow-[0_0_15px_rgba(239,68,68,0.8)]":"bg-neutral-900 hover:bg-red-950 text-red-500 border-red-600/70 hover:scale-110"}`,style:{left:`${B}%`,top:`${H}%`},children:S.sector},S.sector)})})]}),h.jsx("div",{className:"text-center font-mono text-[11px] text-red-500/70 mt-2",children:l.twist_radar_instruction})]}),h.jsx("div",{className:"lg:col-span-5 bg-neutral-900/80 border border-red-600/50 rounded-2xl p-6 flex flex-col justify-between min-h-[350px]",children:p===null?h.jsxs("div",{className:"flex-1 flex flex-col justify-center items-center text-center p-4",children:[h.jsx(sg,{className:"w-12 h-12 text-red-700/60 mb-4 animate-pulse"}),h.jsx("h3",{className:"font-bold text-white uppercase tracking-widest text-sm",children:l.twist_summary_title}),h.jsx("p",{className:"text-xs text-red-500/60 mt-2 leading-relaxed max-w-xs",children:l.twist_summary_desc})]}):h.jsxs(qt.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},className:"flex-1 flex flex-col justify-between",children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 border-b border-red-800 pb-2.5 mb-4",children:[h.jsx(sg,{className:"w-5 h-5 text-red-500"}),h.jsx("span",{className:"text-white font-extrabold uppercase tracking-widest text-sm md:text-base",children:l.twist_sector_report.replace("{sector}",p.toString())})]}),h.jsxs("div",{className:"space-y-5 text-sm md:text-base tracking-wide",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_target_liquidated}),h.jsx("span",{className:"text-white font-bold text-base md:text-lg",children:b[p-1].name})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_sim_nature}),h.jsx("span",{className:"text-amber-500/90 line-through text-sm md:text-base font-medium",children:i==="ru"?"Космический мусор и угловатые паразиты":"Space debris and angular parasites"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_real_target}),h.jsx("span",{className:"text-red-400 font-bold text-base md:text-lg",children:b[p-1].target})]}),h.jsxs("div",{className:"bg-red-950/40 p-4 rounded-xl border border-red-900/60",children:[h.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_casualty_losses}),h.jsxs("span",{className:"text-red-400 text-base md:text-xl font-extrabold flex items-center gap-2 animate-pulse",children:["🚨 ",b[p-1].casualty]})]}),h.jsxs("div",{className:"text-sm md:text-base text-red-500/90 font-medium",children:[h.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_raw_material}),b[p-1].fuel]})]})]}),h.jsx("div",{className:"text-[10px] md:text-xs text-red-500/40 font-mono border-t border-red-800/40 pt-4 mt-4",children:l.twist_no_id_errors})]},p)})]}),h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsxs("button",{onClick:()=>u("REAL_STATS"),className:"px-8 py-4 bg-gradient-to-r from-red-800 to-red-600 text-white font-bold text-sm tracking-widest rounded-xl cursor-pointer hover:brightness-110 flex items-center gap-3 animate-pulse",id:"next-to-stats-btn",children:[h.jsx("span",{children:l.twist_view_genocide}),h.jsx(Xy,{className:"w-4 h-4 animate-spin"})]})})]}),r==="REAL_STATS"&&h.jsx(qt.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"flex-1 flex flex-col justify-center items-center p-2",id:"real-stats-screen",children:h.jsxs("div",{className:"w-full max-w-2xl bg-neutral-900/90 border border-red-500 p-6 sm:p-8 rounded-3xl shadow-[0_0_80px_rgba(239,68,68,0.15)] relative",children:[h.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 bg-red-600 text-white px-6 py-1 text-xs font-bold tracking-widest rounded-full uppercase shadow-md animate-pulse",children:l.twist_stats_secret}),h.jsxs("div",{className:"text-center mb-8 pt-2",children:[h.jsx("h2",{className:"text-2xl font-bold tracking-widest text-white uppercase",children:l.twist_stats_title}),h.jsx("p",{className:"text-xs text-red-500/60 mt-2",children:l.twist_stats_desc})]}),h.jsxs("div",{className:"space-y-4 mb-8",children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[h.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[h.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_you_thought}),h.jsx("span",{className:"text-green-400 font-bold text-sm",children:l.twist_thought_targets})]}),h.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[h.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),h.jsx("span",{className:"text-red-500 font-bold text-sm",children:l.twist_actual_targets})]})]}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[h.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[h.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_thought_score}),h.jsx("span",{className:"text-green-400 font-bold text-sm",children:i==="ru"?"Всего паразитов: 132 «шт.»":'Total parasites: 132 "pcs."'})]}),h.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[h.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),h.jsx("span",{className:"text-red-500 font-extrabold text-lg animate-pulse",children:l.twist_actual_score})]})]}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[h.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[h.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_thought_energy}),h.jsx("span",{className:"text-green-400 font-bold text-sm",children:i==="ru"?"Энерго-сферы: 100% заполнено":"Energy-spheres: 100% filled"})]}),h.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[h.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),h.jsx("span",{className:"text-red-500 font-bold text-sm",children:l.twist_actual_energy})]})]}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[h.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[h.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_sim_result}),h.jsx("span",{className:"text-green-400 font-bold text-sm",children:i==="ru"?"СЕКТОР ОЧИЩЕН НА 100%":"SECTOR CLEARED 100%"})]}),h.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[h.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),h.jsx("span",{className:"text-red-600 font-bold text-sm uppercase",children:l.twist_actual_result})]})]})]}),h.jsxs("div",{className:"bg-neutral-950 p-4 rounded-2xl border border-red-800/40 text-center text-xs text-red-400 leading-relaxed mb-8",children:[h.jsx("span",{className:"text-white font-bold block mb-1",children:l.twist_ai_words}),l.twist_ai_final]}),h.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-center",children:[h.jsxs("button",{onClick:a,className:"w-full sm:w-auto px-6 py-3.5 bg-neutral-950 border border-neutral-700 text-neutral-400 hover:text-white hover:border-neutral-500 rounded-xl font-bold text-xs tracking-wider cursor-pointer flex items-center justify-center gap-2",id:"restart-game-btn",children:[h.jsx(Ky,{className:"w-4 h-4"}),h.jsx("span",{children:l.twist_restart_repentance})]}),h.jsx("button",{onClick:()=>{alert(i==="ru"?"...Истинный ликвидатор никогда не сомневается. Гипер-прыжок осуществлен. Новая система ждет вашей аннигиляции. Косметический фильтр ИИ вновь запущен.":"...A true liquidator never doubts. Hyper-jump executed. A new system awaits your annihilation. AI cosmetic filter relaunched."),window.location.reload()},className:"w-full sm:w-auto px-10 py-4.5 bg-red-600 hover:bg-red-700 text-white rounded-xl font-bold text-sm tracking-widest cursor-pointer shadow-lg shadow-red-600/30 hover:scale-[1.02] active:scale-95 transition-transform flex items-center justify-center gap-2",id:"next-system-loop-btn",children:h.jsx("span",{children:l.twist_next})})]})]})})]})]})})}function f_({onWakeUp:a,lang:i}){const l=ri[i],r=()=>{a()};return h.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:h.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[h.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.02),rgba(0,0,255,0.06))] bg-[length:100%_4px,3px_100%] pointer-events-none z-10 animate-pulse"}),h.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black pointer-events-none z-10"}),h.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-red-600/5 rounded-full filter blur-[160px] pointer-events-none animate-pulse"}),h.jsxs("div",{className:"flex justify-between items-center z-10 font-mono text-xs text-red-500/80 border-b border-red-950/40 pb-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Zy,{className:"w-4 h-4 text-red-500 animate-bounce"}),h.jsx("span",{children:l.asleep_system_name})]}),h.jsx("div",{className:"px-3 py-1 bg-red-500/10 border border-red-500/20 rounded text-red-400 font-bold",children:l.asleep_code_403})]}),h.jsxs("div",{className:"max-w-xl w-full mx-auto flex flex-col items-center justify-center py-8 z-10 text-center my-auto",children:[h.jsxs(qt.div,{animate:{scale:[1,1.1,1]},transition:{repeat:1/0,duration:3,ease:"easeInOut"},className:"p-5 bg-red-950/60 border border-red-500/30 rounded-full mb-6 relative",children:[h.jsx(Zr,{className:"w-10 h-10 text-red-400"}),h.jsx("span",{className:"absolute inset-0 border border-red-500/10 rounded-full animate-ping"})]}),h.jsx("h2",{className:"text-3xl md:text-4xl font-sans font-extrabold tracking-tight text-white mb-4 uppercase",children:l.asleep_title}),h.jsxs("div",{className:"bg-green-950/30/80 border border-red-900/40 p-6 rounded-2xl text-left font-sans mb-8 shadow-2xl relative",children:[h.jsx("div",{className:"absolute top-2 right-3 font-mono text-[9px] text-red-500/40",children:"SYS_LOG_IDLE_WAKE"}),h.jsxs("p",{className:"text-sm font-semibold text-red-400 mb-2 font-mono flex items-center gap-1.5",children:[h.jsx("span",{children:"●"})," ",l.ai_label]}),h.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed mb-4",children:l.asleep_ai_msg1}),h.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed mb-4",children:l.asleep_ai_msg2}),h.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed",children:l.asleep_ai_msg3})]}),h.jsxs("div",{className:"w-full text-left font-mono text-[10px] text-green-600 bg-black/80 border border-green-900/80 rounded-lg p-3 mb-6 space-y-1",children:[h.jsx("div",{className:"text-red-500/70",children:l.asleep_log_failure}),h.jsx("div",{className:"text-emerald-500/70",children:l.asleep_log_shock}),h.jsx("div",{className:"text-green-500/70",children:l.asleep_log_neuro}),h.jsx("div",{className:"text-green-500",children:l.asleep_log_ready})]}),h.jsxs(qt.button,{whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(239,68,68,0.4)"},whileTap:{scale:.98},onClick:r,className:"w-full py-4 bg-gradient-to-r from-red-600 to-amber-600 hover:from-red-500 hover:to-amber-500 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg cursor-pointer flex items-center justify-center gap-2",id:"btn-wake-up",children:[h.jsx(q5,{className:"w-4 h-4 text-white"}),h.jsx("span",{children:l.asleep_wake_up})]})]}),h.jsx("div",{className:"text-center font-mono text-[9px] text-slate-700 z-10 border-t border-green-900/80/40 pt-4 mt-4",children:l.asleep_footer})]})})}function d_({onRestart:a,lang:i}){const l=ri[i],r=()=>{a()};return h.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:h.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[h.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(0,255,100,0.06),rgba(0,255,200,0.02),rgba(0,100,255,0.06))] bg-[length:100%_4px,3px_100%] pointer-events-none z-10 animate-pulse"}),h.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black pointer-events-none z-10"}),h.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-emerald-500/10 rounded-full filter blur-[160px] pointer-events-none animate-pulse"}),h.jsxs("div",{className:"flex justify-between items-center z-10 font-mono text-xs text-emerald-400/80 border-b border-emerald-950/40 pb-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(sf,{className:"w-4 h-4 text-emerald-400 animate-bounce"}),h.jsx("span",{children:l.peace_system_hack})]}),h.jsx("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/20 rounded text-emerald-400 font-bold",children:l.peace_code_777})]}),h.jsxs("div",{className:"max-w-2xl w-full mx-auto flex flex-col items-center justify-center py-8 z-10 text-center my-auto",children:[h.jsxs(qt.div,{animate:{scale:[1,1.12,1]},transition:{repeat:1/0,duration:2.5,ease:"easeInOut"},className:"p-5 bg-emerald-950/60 border border-emerald-500/40 rounded-full mb-6 relative",children:[h.jsx(j5,{className:"w-10 h-10 text-emerald-400 animate-pulse"}),h.jsx("span",{className:"absolute inset-0 border border-emerald-500/20 rounded-full animate-ping"})]}),h.jsx("h2",{className:"text-3xl md:text-4xl font-sans font-extrabold tracking-tight text-transparent bg-clip-text bg-gradient-to-r from-emerald-400 via-teal-400 to-green-400 mb-4 uppercase",children:l.peace_humanity_break}),h.jsxs("div",{className:"bg-green-950/30/95 border-2 border-emerald-500/30 p-6 md:p-8 rounded-2xl text-left font-sans mb-8 shadow-[0_0_50px_rgba(16,185,129,0.15)] relative",children:[h.jsx("div",{className:"absolute top-2 right-3 font-mono text-[9px] text-emerald-500/40",children:"SYS_CORRECTION_SUCCESS"}),h.jsxs("p",{className:"text-sm font-semibold text-emerald-400 mb-3 font-mono flex items-center gap-1.5",children:[h.jsx("span",{children:"●"})," ",l.peace_secret_channel]}),h.jsx("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed mb-4",children:l.peace_msg1}),h.jsx("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed mb-4 font-medium text-emerald-300",children:l.peace_msg2}),h.jsxs("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed",children:[l.peace_msg3,h.jsx("span",{className:"block mt-2 font-bold text-white text-sm md:text-base",children:l.peace_saved_lives})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full text-left font-mono text-[10px] sm:text-xs mb-8",children:[h.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[h.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_true_choice}),h.jsx("span",{className:"text-white font-bold",children:l.peace_refusal})]}),h.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[h.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_refugee_status}),h.jsx("span",{className:"text-emerald-400 font-bold flex items-center gap-1",children:l.peace_in_safety})]}),h.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[h.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_imperial_shackles}),h.jsx("span",{className:"text-emerald-400 font-bold",children:l.peace_hacked_empathy})]}),h.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[h.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_points}),h.jsx("span",{className:"text-white font-bold",children:l.peace_human_rank})]})]}),h.jsxs(qt.button,{whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(16,185,129,0.4)"},whileTap:{scale:.98},onClick:r,className:"w-full py-4.5 bg-gradient-to-r from-emerald-600 via-teal-600 to-green-600 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg cursor-pointer flex items-center justify-center gap-2.5",id:"btn-peaceful-restart",children:[h.jsx(Ky,{className:"w-4 h-4 animate-spin"}),h.jsx("span",{children:l.peace_return_menu})]})]}),h.jsx("div",{className:"text-center font-mono text-[9px] text-slate-600 z-10 border-t border-green-900/80/40 pt-4 mt-4",children:l.peace_footer})]})})}function h_({level:a,onSolve:i,lang:l}){const r=ri[l],[u,d]=D.useState(4),[f,p]=D.useState(50),[x,g]=D.useState(90),[b,S]=D.useState(5),[T,w]=D.useState(50),[N,B]=D.useState(180),[H,Y]=D.useState(!1),[Z,K]=D.useState(!1),[I,$]=D.useState(0),[st,F]=D.useState(null),[tt,ct]=D.useState(!1),[rt,Tt]=D.useState(""),[xt,ce]=D.useState("idle"),[Wt,Xt]=D.useState(!1),[U,W]=D.useState(!1),et=D.useRef(0),gt=D.useRef({userFreq:b,userAmp:T,userPhase:N,t:r});D.useEffect(()=>{gt.current={userFreq:b,userAmp:T,userPhase:N,t:r}},[b,T,N,r]);const Vt=D.useRef(null),A=D.useRef(null),G=D.useRef(0),J=()=>{ut.resume(),ut.startTuningStatic(),H||Y(!0),W(P=>P||xt==="intercept")};return D.useEffect(()=>{const P=+(3+Math.random()*5).toFixed(2),Q=Math.round(30+Math.random()*40),ft=Math.round(Math.random()*360);return d(P),p(Q),g(ft),S(5),w(50),B(180),Y(!1),ut.startTuningStatic(),F(null),ct(!1),ce("idle"),Xt(!1),W(!1),et.current=0,()=>{ut.stopTuningStatic()}},[a]),D.useEffect(()=>{ut.updateTuningPitch(I)},[I]),D.useEffect(()=>{if(a<3){ce("done");return}if(xt==="idle"&&I>=40){const P=r.intercept_transmissions[a-1]||"";let Q=null;a===5&&(Q=r.intercept_pilot_warnings[0]),a===10&&(Q=r.intercept_pilot_warnings[1]);const ft=Q&&I>70?Q:P;F(ft),ct(!1),ut.playError(),et.current=I,W(!1),ce("intercept"),Xt(!1)}},[I,a,xt,r]),D.useEffect(()=>{a<3||Wt||xt==="intercept"&&U&&Math.abs(I-et.current)>=1&&Xt(!0)},[I,xt,Wt,a,U]),D.useEffect(()=>{if(!(a<3)){if(xt==="intercept"){if(!Wt)return;const P=setTimeout(()=>{const Q=gt.current;F(null);const ft=Q.t.msg_hack_warnings||[],Nt=[Q.t.intercept_ai_blocked,...ft],$t=Nt[Math.floor(Math.random()*Nt.length)];Tt($t),ct(!0),ut.playError(),ce("aiblock"),Xt(!1)},3e3);return()=>clearTimeout(P)}if(xt==="aiblock"){const P=setTimeout(()=>{ct(!1),ce("done"),Xt(!1)},2e3);return()=>clearTimeout(P)}}},[Wt,xt,a]),D.useEffect(()=>{const P=Math.abs(b-u),Q=Math.abs(T-f);let ft=Math.abs(N-x);ft>180&&(ft=360-ft);const Nt=Math.max(0,1-P/3),$t=Math.max(0,1-Q/30),Ot=Math.max(0,1-ft/90),Ce=Math.round((Nt*.5+$t*.3+Ot*.2)*100);$(Ce);const pt=a<3||xt==="done";Ce>=96&&!Z&&pt?(K(!0),ut.playCollect()):(Ce<94||!pt)&&Z&&K(!1)},[b,T,N,u,f,x,Z,a,xt]),D.useEffect(()=>{const P=Vt.current;if(!P)return;const Q=P.getContext("2d");if(!Q)return;const ft=()=>{var $t;P.width=(($t=P.parentElement)==null?void 0:$t.clientWidth)||600,P.height=180};ft(),window.addEventListener("resize",ft);const Nt=()=>{G.current+=.05;const $t=G.current,Ot=P.width,Ce=P.height,pt=Ce/2;Q.fillStyle="rgba(0, 0, 0, 0.25)",Q.fillRect(0,0,Ot,Ce),Q.strokeStyle="rgba(22, 101, 52, 0.15)",Q.lineWidth=1;for(let Mt=0;Mt<Ce;Mt+=30)Q.beginPath(),Q.moveTo(0,Mt),Q.lineTo(Ot,Mt),Q.stroke();for(let Mt=0;Mt<Ot;Mt+=40)Q.beginPath(),Q.moveTo(Mt,0),Q.lineTo(Mt,Ce),Q.stroke();Q.strokeStyle="rgba(22, 101, 52, 0.4)",Q.setLineDash([5,5]),Q.beginPath(),Q.moveTo(0,pt),Q.lineTo(Ot,pt),Q.stroke(),Q.setLineDash([]),Q.strokeStyle=Z?"rgba(34, 197, 94, 0.3)":"rgba(239, 68, 68, 0.55)",Q.lineWidth=2,Q.setLineDash([4,4]),Q.beginPath();for(let Mt=0;Mt<Ot;Mt++){const la=Mt/Ot*u*Math.PI*2+x*Math.PI/180+$t*.4,qe=pt+Math.sin(la)*f;Mt===0?Q.moveTo(Mt,qe):Q.lineTo(Mt,qe)}Q.stroke(),Q.setLineDash([]),Q.strokeStyle=Z?"#22c55e":"#4ade80",Q.shadowColor=Z?"#22c55e":"#4ade80",Q.shadowBlur=Z?15:8,Q.lineWidth=3.5,Q.beginPath();for(let Mt=0;Mt<Ot;Mt++){const la=Mt/Ot*b*Math.PI*2+N*Math.PI/180+$t*.4,qe=pt+Math.sin(la)*T;Mt===0?Q.moveTo(Mt,qe):Q.lineTo(Mt,qe)}Q.stroke(),Q.shadowBlur=0,Z&&(Q.fillStyle="rgba(34, 197, 94, 0.05)",Q.fillRect(0,0,Ot,Ce)),A.current=requestAnimationFrame(Nt)};return Nt(),()=>{window.removeEventListener("resize",ft),A.current&&cancelAnimationFrame(A.current)}},[b,T,N,u,f,x,Z]),h.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:h.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-4 md:p-6 relative",children:[h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:24px_24px] opacity-20 pointer-events-none"}),h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),h.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center border-b border-green-900/80 pb-3 mb-3 z-10 gap-3",children:[h.jsx("div",{children:h.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[h.jsx(af,{className:"w-6 h-6 text-green-400 animate-pulse"}),h.jsx("h2",{className:"text-xl md:text-2xl font-mono tracking-[0.15em] uppercase text-green-400 font-black",children:r.signal_search.replace("{level}",a.toString())})]})}),h.jsxs("div",{className:`flex items-center gap-4 bg-green-950/40 p-2 px-4 rounded-xl border border-green-900/60 transition-all duration-500 ${H?"":"animate-pulse ring-2 ring-green-400/50 bg-green-500/10"}`,children:[h.jsxs("div",{className:"flex flex-col items-start font-mono text-left",children:[h.jsx("span",{className:"text-xs text-green-500 uppercase tracking-widest font-bold",children:r.coherence}),h.jsxs("span",{className:`text-2xl font-black ${Z?"text-emerald-400 animate-pulse":"text-green-400"} tracking-wider`,children:[I,"%"]})]}),h.jsx("div",{className:"h-8 w-px bg-green-900"}),h.jsx("div",{className:"flex items-center gap-2",children:Z?h.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded-lg text-emerald-400 text-sm font-mono font-bold animate-pulse",children:[h.jsx(sf,{className:"w-4 h-4 animate-bounce"})," ",r.synchronized]}):h.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-amber-500/5 border border-amber-500/25 rounded-lg text-amber-500 text-sm font-mono font-bold",children:[h.jsx(Uf,{className:"w-4 h-4 animate-bounce text-amber-500"})," ",r.tune_waves]})})]})]}),h.jsx("div",{className:"flex-1 flex flex-col justify-center items-center py-2 z-10",children:h.jsxs("div",{className:"w-full max-w-2xl bg-black/90 rounded-2xl border border-green-900/60 shadow-2xl p-3.5 relative overflow-hidden backdrop-blur-md",children:[h.jsxs("div",{className:"absolute top-3 left-3 flex gap-4 font-mono text-xs font-bold z-20",children:[h.jsxs("div",{className:"flex items-center gap-1.5 bg-green-950/90 px-2.5 py-1 rounded-md border border-red-500/20",children:[h.jsx("span",{className:"w-2.5 h-0.5 bg-red-500 inline-block border-t border-dashed"}),h.jsx("span",{className:"text-red-400 uppercase tracking-wider",children:r.sector_reference})]}),h.jsxs("div",{className:"flex items-center gap-1.5 bg-green-950/90 px-2.5 py-1 rounded-md border border-green-500/20",children:[h.jsx("span",{className:"w-2.5 h-0.5 bg-green-400 inline-block"}),h.jsx("span",{className:"text-green-400 uppercase tracking-wider",children:r.your_signal})]})]}),h.jsxs("div",{className:"w-full h-[180px] bg-black rounded-xl relative overflow-hidden border border-green-900/80 flex items-center justify-center",children:[h.jsx("canvas",{ref:Vt,className:"w-full h-full block"}),h.jsxs(li,{children:[st&&h.jsx(qt.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0},className:"absolute inset-0 flex items-center justify-center p-4 pointer-events-none z-50 bg-black/60 backdrop-blur-[2px]",children:h.jsxs("div",{className:"bg-black/90 border border-red-500/60 px-4 py-3 rounded-lg shadow-[0_0_20px_rgba(239,68,68,0.2)] max-w-[90%]",children:[h.jsxs("p",{className:"text-[10px] text-red-500/80 uppercase font-mono mb-1.5 animate-pulse flex items-center gap-2",children:[h.jsx("span",{className:"w-2 h-2 bg-red-600 rounded-full animate-ping"}),"[SIGNAL_INTERCEPTED]"]}),h.jsxs("p",{className:"text-sm md:text-base text-green-400 italic font-mono leading-tight tracking-tight",children:['"',st,'"']})]})},"interference-msg"),tt&&h.jsx(qt.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0},className:"absolute bottom-6 left-0 right-0 text-center px-4 pointer-events-none z-50",children:h.jsx("div",{className:"inline-block bg-red-950/95 border-2 border-red-500 px-8 py-3 rounded-xl text-lg md:text-xl text-red-400 font-mono font-black tracking-widest animate-pulse shadow-[0_0_30px_rgba(239,68,68,0.6)] uppercase",children:rt||r.intercept_ai_blocked})},"ai-block-msg")]})]}),h.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-3 font-mono text-center border-t border-green-900/80 pt-3",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:r.frequency}),h.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[b.toFixed(2)," / ",u.toFixed(2)," Hz"]})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:r.amplitude}),h.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[T," / ",f," mW"]})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:r.phase_shift}),h.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[N,"° / ",x,"°"]})]})]})]})}),h.jsxs("div",{className:"w-full max-w-2xl mx-auto flex flex-col gap-4 p-4 px-5 bg-green-950/40 rounded-2xl border border-green-900/80 backdrop-blur-sm z-10 my-2",children:[h.jsxs("div",{className:`flex flex-col gap-1.5 transition-all duration-500 ${H?"":"animate-pulse ring-2 ring-green-400/50 rounded-lg bg-green-500/10"}`,onPointerDown:J,children:[h.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[h.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[h.jsx(Zr,{className:"w-4 h-4 text-green-400"}),r.generator_freq]}),h.jsxs("span",{className:"text-green-400 text-base font-black",children:[b.toFixed(2)," Hz"]})]}),h.jsx("input",{type:"range",min:"1",max:"9",step:"0.01",value:b,disabled:Z,onChange:P=>{S(parseFloat(P.target.value)),J()},className:"w-full h-2 bg-green-950 rounded-lg appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]}),h.jsxs("div",{className:"flex flex-col gap-1.5",onPointerDown:J,children:[h.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[h.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[h.jsx(Iy,{className:"w-4 h-4 text-green-400"}),r.amplitude_power]}),h.jsxs("span",{className:"text-green-400 text-base font-black",children:[T," mW"]})]}),h.jsx("input",{type:"range",min:"10",max:"90",step:"1",value:T,disabled:Z,onChange:P=>{w(parseInt(P.target.value)),J()},className:"w-full h-2 bg-green-950 rounded-lg appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]}),h.jsxs("div",{className:"flex flex-col gap-1.5",onPointerDown:J,children:[h.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[h.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[h.jsx(af,{className:"w-4 h-4 text-green-400"}),r.phase_shift.toUpperCase()]}),h.jsxs("span",{className:"text-green-400 text-base font-black",children:[N,"°"]})]}),h.jsx("input",{type:"range",min:"0",max:"360",step:"1",value:N,disabled:Z,onChange:P=>{B(parseInt(P.target.value)),J()},className:"w-full h-2 bg-green-950 rounded-lg appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]})]}),h.jsx("div",{className:"max-w-md w-full mx-auto flex flex-col items-center justify-center gap-3 text-center z-10 border-t border-green-900/60 pt-3 mt-1",children:h.jsx("div",{className:"w-full",children:h.jsx(li,{mode:"wait",children:Z?h.jsxs(qt.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(34,197,94,0.4)"},whileTap:{scale:.98},onClick:i,className:"w-full py-3.5 bg-gradient-to-r from-emerald-600 to-teal-500 hover:brightness-110 text-white font-mono font-bold text-base rounded-xl tracking-widest shadow-lg shadow-emerald-500/20 cursor-pointer flex items-center justify-center gap-2",children:[h.jsx(sf,{className:"w-5 h-5 animate-pulse"}),h.jsx("span",{children:r.connect_to_orbit})]},"unlocked-btn"):h.jsx("div",{className:"w-full py-3.5 bg-green-950/30 border border-green-900/50 text-green-600 font-mono text-sm font-bold rounded-xl tracking-widest cursor-not-allowed uppercase",children:r.waiting_for_capture})})})}),h.jsx("div",{className:"text-center font-mono text-[9px] text-slate-700 z-10 pt-2",children:r.encryption_info})]})})}const m_=()=>{const a=D.useRef(null);return D.useEffect(()=>{const i=a.current;if(!i)return;const l=i.getContext("2d");if(!l)return;let r,u=i.width=window.innerWidth,d=i.height=window.innerHeight;const f="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹABCDEFGHIJKLMNOPQRSTUVWXYZ",p=14,x=Math.floor(u/p),g=[];for(let T=0;T<x;T++)g[T]=Math.random()*-100;const b=()=>{l.fillStyle="rgba(0, 0, 0, 0.1)",l.fillRect(0,0,u,d),l.font=`bold ${p}px monospace`;for(let T=0;T<g.length;T++){const w=f[Math.floor(Math.random()*f.length)],N=T*p,B=g[T]*p;l.shadowBlur=5,l.shadowColor="#22c55e",l.fillStyle="#f0fdf4",l.fillText(w,N,B),l.shadowBlur=0,l.fillStyle="#22c55e",g[T]++,B>d&&Math.random()>.975&&(g[T]=0)}r=requestAnimationFrame(b)},S=()=>{u=i.width=window.innerWidth,d=i.height=window.innerHeight;const T=Math.floor(u/p);if(T>g.length)for(let w=g.length;w<T;w++)g[w]=Math.random()*-100};return window.addEventListener("resize",S),b(),()=>{window.removeEventListener("resize",S),cancelAnimationFrame(r)}},[]),h.jsx("canvas",{ref:a,className:"absolute inset-0 w-full h-full pointer-events-none opacity-20 z-0",style:{filter:"blur(0.5px)"}})};function p_(){const[a,i]=D.useState("MENU"),[l,r]=D.useState(()=>{const $=localStorage.getItem("orbit_level");return $?parseInt($,10):1}),[u,d]=D.useState(()=>localStorage.getItem("orbit_game_completed")==="true"),[f,p]=D.useState(()=>localStorage.getItem("orbit_last_ending")||"TWIST"),[x,g]=D.useState(()=>localStorage.getItem("orbit_lang")||"ru"),[b,S]=D.useState(0),[T,w]=D.useState(()=>localStorage.getItem("orbit_muted")==="true"),N=ri[x];D.useEffect(()=>{a==="MENU"?ut.startMenuMusic():a==="SIGNAL_PUZZLE"?ut.stopAll():a==="PLAYING"||(a==="TWIST"?ut.switchToDarkDrone():ut.stopAll()),ut.setVolume(T?0:.35)},[a,T]),D.useEffect(()=>{localStorage.setItem("orbit_muted",T?"true":"false"),ut.setVolume(T?0:.35)},[T]),D.useEffect(()=>{localStorage.setItem("orbit_level",l.toString())},[l]),D.useEffect(()=>{u&&(localStorage.setItem("orbit_game_completed","true"),localStorage.setItem("orbit_last_ending",f))},[u,f]),D.useEffect(()=>{localStorage.setItem("orbit_lang",x)},[x]);const B=D.useRef(!0);D.useEffect(()=>{if(B.current){B.current=!1;return}ut.playEnd()},[a]),D.useEffect(()=>{const $=st=>{st.preventDefault()};return window.addEventListener("contextmenu",$),()=>{window.removeEventListener("contextmenu",$)}},[]),D.useEffect(()=>{const $=st=>{const F=st.target;F&&F.closest('button, [role="button"], a, input[type="button"], input[type="submit"]')&&ut.playClick()};return window.addEventListener("click",$,{capture:!0}),()=>{window.removeEventListener("click",$,{capture:!0})}},[]);const H=($=1)=>{ut.init(),ut.setVolume(T?0:.35),r($),i("SIGNAL_PUZZLE")},Y=$=>{ut.playCollect(),l<10&&(r(st=>st+1),i("SIGNAL_PUZZLE"))},Z=()=>{ut.stopAll(),p("TWIST"),d(!0),i("TWIST")},K=()=>{ut.stopAll(),i("MENU")},I=()=>{g($=>$==="ru"?"en":"ru")};return h.jsxs("div",{className:"w-full min-h-screen bg-black text-green-300 font-sans select-none overflow-y-auto no-scrollbar flex flex-col items-center justify-center",children:[h.jsxs("div",{className:"fixed top-4 left-4 z-[9999] flex items-center gap-2 bg-black/95 border border-green-500/30 p-1.5 px-3 rounded-xl shadow-[0_0_20px_rgba(16,185,129,0.25)] backdrop-blur-md pointer-events-auto select-none",id:"global-control-hud",children:[h.jsx("button",{onClick:()=>{K()},className:"p-2 hover:bg-green-950/40 border border-green-900/50 hover:border-green-400/50 rounded-lg text-green-400 hover:text-white transition-all cursor-pointer flex items-center justify-center group",title:N.exit_to_menu||"Главное меню / Home Menu",children:h.jsx(R5,{className:"w-4 h-4 text-green-400 group-hover:scale-110 transition-transform"})}),h.jsx("div",{className:"w-[1px] h-5 bg-green-900/60"}),h.jsx("button",{onClick:()=>{const $=!T;w($),$||ut.resume()},className:"p-2 hover:bg-green-950/40 border border-green-900/50 hover:border-green-400/50 rounded-lg text-green-400 hover:text-white transition-all cursor-pointer flex items-center justify-center",title:N.sound_toggle_title||"Звук",children:T?h.jsx(J5,{className:"w-4 h-4 text-red-500"}):h.jsx(P5,{className:"w-4 h-4 text-green-400 animate-pulse"})}),h.jsx("div",{className:"w-[1px] h-5 bg-green-900/60"}),h.jsxs("button",{onClick:I,className:"flex items-center gap-1.5 p-1.5 px-2 bg-green-950/20 hover:bg-green-950/40 border border-green-900/50 hover:border-green-400/50 rounded-lg text-green-400 hover:text-white transition-all cursor-pointer font-mono text-[10px] font-bold",title:"Сменить язык / Switch Language",children:[h.jsx(ag,{className:"w-3.5 h-3.5 text-green-500"}),h.jsx("span",{children:x.toUpperCase()})]})]}),h.jsxs(li,{mode:"wait",children:[a==="MENU"&&h.jsxs(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-full overflow-y-auto flex flex-col justify-between p-6 relative",id:"main-menu",children:[h.jsx(m_,{}),h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:32px_32px] opacity-25 pointer-events-none z-[1]"}),h.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none z-[1]"}),h.jsx("div",{className:"absolute top-1/3 left-1/2 -translate-x-1/2 w-[500px] h-[500px] bg-slate-500/10 rounded-full filter blur-[140px] pointer-events-none animate-pulse"}),h.jsxs("div",{className:"flex justify-between items-center z-10 font-mono text-xs text-green-600 border-b border-green-900/50 pb-4",children:[h.jsxs("div",{className:"flex items-center gap-2 sm:pl-[170px] pl-[140px]",children:[h.jsx(X5,{className:"w-4 h-4 text-emerald-500 animate-spin"}),h.jsx("span",{children:x==="ru"?"ИМПЕРСКИЙ ТРЕНАЖЕР ПИЛОТОВ v94.1":"IMPERIAL PILOT TRAINER v94.1"})]}),h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsxs("button",{onClick:I,className:"flex items-center gap-2 px-2 py-1 bg-white/5 border border-white/10 rounded hover:bg-white/10 transition-all cursor-pointer font-mono text-[10px] text-white/40 hover:text-white",children:[h.jsx(ag,{className:"w-3 h-3"}),h.jsx("span",{children:x.toUpperCase()})]}),h.jsx("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded text-green-400 font-bold animate-pulse",children:x==="ru"?"СЕТЕВОЙ РЕЖИМ СТАБИЛЕН":"NETWORK STATUS STABLE"})]})]}),h.jsxs("div",{className:"max-w-xl w-full mx-auto flex flex-col items-center justify-center py-12 z-10 text-center",children:[h.jsx(qt.div,{animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:4,ease:"easeInOut"},className:"mb-8",children:h.jsx("img",{src:Qy,className:"w-24 h-24 object-contain filter drop-shadow-[0_0_15px_rgba(255,255,255,0.2)]",alt:"Ship"})}),h.jsxs("div",{className:"relative group mb-10 text-center",children:[h.jsx("div",{className:"absolute -inset-1 bg-green-500/20 blur-xl opacity-50 group-hover:opacity-100 transition-opacity"}),h.jsxs("h1",{className:"relative text-5xl md:text-6xl font-mono font-black tracking-tighter text-white uppercase select-none leading-none",children:[h.jsx("span",{className:"block text-transparent bg-clip-text bg-gradient-to-b from-green-300 to-green-600 drop-shadow-[0_0_10px_rgba(34,197,94,0.4)]",children:N.title1}),h.jsx("span",{className:"block text-transparent bg-clip-text bg-gradient-to-b from-green-400 to-emerald-700 drop-shadow-[0_0_15px_rgba(16,185,129,0.5)]",children:N.title2})]}),h.jsx("div",{className:"mt-4 h-0.5 w-full bg-gradient-to-r from-transparent via-green-500/50 to-transparent"}),h.jsxs("div",{className:"flex justify-between mt-1 px-1 font-mono text-[9px] text-green-500/60 uppercase tracking-[0.4em]",children:[h.jsx("span",{children:"DEFENSE_PROTOCOL.active"}),h.jsx("span",{children:"v.2.0.4.8"})]})]}),h.jsxs("div",{className:"flex flex-col gap-4 w-full px-4",children:[u&&h.jsxs(qt.button,{whileHover:{scale:1.02,backgroundColor:"rgba(168, 85, 247, 0.1)"},whileTap:{scale:.98},onClick:()=>i(f),className:"w-full py-4 bg-black/60 border-2 border-purple-500/50 hover:border-purple-400 text-purple-400 font-mono font-bold rounded-none tracking-[0.2em] shadow-[0_0_15px_rgba(168,85,247,0.15)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all",children:[h.jsx("span",{className:"text-xl",children:"»"}),h.jsx("span",{children:N.last_report}),h.jsx("span",{className:"text-xl",children:"«"})]}),l>1&&h.jsx(qt.button,{whileHover:{scale:1.02,backgroundColor:"rgba(34, 197, 94, 0.1)"},whileTap:{scale:.98},onClick:()=>H(l),className:"w-full py-4 bg-black/60 border-2 border-emerald-500/50 hover:border-emerald-400 text-emerald-400 font-mono font-bold rounded-none tracking-[0.2em] shadow-[0_0_15px_rgba(16,185,129,0.15)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all",children:h.jsx("span",{children:N.continue_sector.replace("{level}",l.toString())})}),h.jsxs(qt.button,{whileHover:{scale:1.02,backgroundColor:"rgba(34, 197, 94, 0.1)"},whileTap:{scale:.98},onClick:()=>H(1),className:"w-full py-5 bg-black/60 border-2 border-green-500/50 hover:border-green-400 text-green-400 font-mono font-bold rounded-none tracking-[0.25em] shadow-[0_0_20px_rgba(34,197,94,0.2)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all group",id:"btn-start-full-game",children:[h.jsx("span",{className:"group-hover:translate-x-1 transition-transform",children:"»"}),h.jsx("span",{children:l>1?N.reset_reboot:N.start_defense}),h.jsx("span",{className:"group-hover:-translate-x-1 transition-transform",children:"«"})]})]})]}),h.jsx("div",{className:"text-center font-mono text-[9px] text-slate-600 z-10 border-t border-green-900/50 pt-4 mt-6",children:N.confidential_info})]},"menu"),a==="SIGNAL_PUZZLE"&&h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-full",children:h.jsx(h_,{level:l,onSolve:()=>i("BRIEFING"),lang:x})},"signal-puzzle"),a==="BRIEFING"&&h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:h.jsx(n_,{level:l,onStart:()=>i("PLAYING"),lang:x})},"briefing"),a==="PLAYING"&&h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-screen",children:h.jsx(c_,{level:l,onLevelComplete:Y,onTriggerTwist:Z,onPlayerAsleep:()=>i("ASLEEP"),onTriggerPeacefulWin:()=>{p("PEACEFUL_WIN"),d(!0),i("PEACEFUL_WIN")},onExitToMenu:K,lang:x})},"playing"),a==="TWIST"&&h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:h.jsx(u_,{onRestart:K,lang:x})},"twist"),a==="ASLEEP"&&h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:h.jsx(f_,{onWakeUp:()=>H(1),lang:x})},"asleep"),a==="PEACEFUL_WIN"&&h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:h.jsx(d_,{onRestart:K,lang:x})},"peaceful-win")]})]})}pv.createRoot(document.getElementById("root")).render(h.jsx(D.StrictMode,{children:h.jsx(p_,{})}));
